Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4593802rdb; Fri, 15 Sep 2023 07:01:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHi/FDEf4Sz96dMI7LBbavUH/VbVz1fLkCCpj+5MGavM57/LN7cVYr7zpaj3k2k7ZzRi5e3 X-Received: by 2002:a17:902:dacb:b0:1c0:b8fd:9c7 with SMTP id q11-20020a170902dacb00b001c0b8fd09c7mr1575937plx.43.1694786474167; Fri, 15 Sep 2023 07:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694786474; cv=none; d=google.com; s=arc-20160816; b=I+k8ZzVrrYSNsdQsYkomXx3nAQ2Cb+pXBXCRWCTmJgfJzqvvbMm9tBL+ee9KO4MC1c 0t8AZC8CLJr8Ur9M1zeXEXESVrhr/qq2bXMVcowA7xmwHZw/IsxmfNB93c9H0BPzrxlX kG0W8cUK2Wi9aAM5QUA7cWmD9ywbWvB0F/6AcyasCfdAlSq6fB5HOCKzYgpQ1IcrH4fX E+2MhiyCjoZpleXo4/aYGoOsONoTxApTMoAeacRceq13Tcu/TkdySKVPBXFlnP9Od6cw BP+DV8DVH7UE0lqDuaWSt0hYlQs3zf04QqgFeik15p0AvcvnaIEJc1ZXqOUmXsmh/HdM koaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=0FgfSRx3oRdPWwtJgpHE291K7gqnxGDzcnbdYAGADtA=; fh=d9wb67V2UAqstBRWx2XvsCKLBzBZ8CftsBm8e5GuT8E=; b=pDCW/Ob5rezBZIOPlBx5FSMqMryFMLQODX1fZjbuX2+0PY8Mwbu7IbilpIZR7p7jbN Vjvru3xG5rrKwogUIkn5TbQlhJiP7zPkCgL0h066PhZ/IiWSw3wlT+6S7NImALoncHX1 2hmUd8cCf2mkKWKxWDKhaBWOeVgoMvMh0tAenj4ab1D0+TqyF03Gu+6v4JSoxJaPqruw iC6GQvFk/r9CkeD989+8Oj9l6CeySBTBzp+/powgMHTCgJFBv12YYm5eULr2XHqnXYcr dneC6niUPaaXjyC8dgKnOs98dvjL5cfgIwZH3f92uRiMlVZart/EOMKFMvNaoXM2uM+g U70g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hRM6iqX7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id l9-20020a170902f68900b001bf88e777f9si3747308plg.33.2023.09.15.07.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 07:01:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hRM6iqX7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 85DCE83D6DD7; Fri, 15 Sep 2023 04:24:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232147AbjIOLYC (ORCPT + 99 others); Fri, 15 Sep 2023 07:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233726AbjIOLYA (ORCPT ); Fri, 15 Sep 2023 07:24:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 829581B9 for ; Fri, 15 Sep 2023 04:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694776989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0FgfSRx3oRdPWwtJgpHE291K7gqnxGDzcnbdYAGADtA=; b=hRM6iqX7rr2G/K/W7PxQLJV7vUxMzaeBXjsBssgP7F0NJCXxLijVkYDoGf4G8ir82AFBLJ RxJu4ZQ11+8Tn3Iea5NL/rWRjoiYO1lhKfiQ/t5kzbgRNvYwd+OAT44TXGCewUzk8t/KXk l0FuMd3tcFvb2M70JSQyJRGekYriRy8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-235-wzrmM9JrM0iDuLsov5_gxg-1; Fri, 15 Sep 2023 07:23:04 -0400 X-MC-Unique: wzrmM9JrM0iDuLsov5_gxg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5BFD9803470; Fri, 15 Sep 2023 11:23:03 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id F20CB40C6EA8; Fri, 15 Sep 2023 11:23:00 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <5017b9fa177f4deaa5d481a5d8914ab4@AcuMS.aculab.com> References: <5017b9fa177f4deaa5d481a5d8914ab4@AcuMS.aculab.com> <20230914221526.3153402-1-dhowells@redhat.com> <20230914221526.3153402-10-dhowells@redhat.com> <3370515.1694772627@warthog.procyon.org.uk> To: David Laight Cc: dhowells@redhat.com, Al Viro , Linus Torvalds , Jens Axboe , "Christoph Hellwig" , Christian Brauner , "Matthew Wilcox" , Brendan Higgins , David Gow , "linux-fsdevel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-mm@kvack.org" , "netdev@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "kunit-dev@googlegroups.com" , "linux-kernel@vger.kernel.org" , Andrew Morton , Christian Brauner , "David Hildenbrand" , John Hubbard Subject: Re: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3449351.1694776980.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Sep 2023 12:23:00 +0100 Message-ID: <3449352.1694776980@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 15 Sep 2023 04:24:07 -0700 (PDT) David Laight wrote: > > > Some measurements can be made using readv() and writev() > > > on /dev/zero and /dev/null. > > = > > Forget /dev/null; that doesn't actually engage any iteration code. Th= e same > > for writing to /dev/zero. Reading from /dev/zero does its own iterati= on thing > > rather than using iterate_and_advance(), presumably because it checks = for > > signals and resched. > = > Using /dev/null does exercise the 'copy iov from user' code. Ummm.... Not really: static ssize_t read_null(struct file *file, char __user *buf, size_t count, loff_t *ppos) { return 0; } static ssize_t write_null(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { return count; } static ssize_t read_iter_null(struct kiocb *iocb, struct iov_iter *to) { return 0; } static ssize_t write_iter_null(struct kiocb *iocb, struct iov_iter *from) { size_t count =3D iov_iter_count(from); iov_iter_advance(from, count); return count; } David