Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4605862rdb; Fri, 15 Sep 2023 07:16:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWfq5u0DksNs7ngJ8ftEpKBB257XZx3wzrgcpqKmST4YhIKD97IFaF4L/tItluSYVrD+vU X-Received: by 2002:a17:902:ec8a:b0:1c3:64f9:45ad with SMTP id x10-20020a170902ec8a00b001c364f945admr1870738plg.48.1694787365167; Fri, 15 Sep 2023 07:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694787365; cv=none; d=google.com; s=arc-20160816; b=ofq/EHJMqN6kicwdlIbCoZ6ieaztdvOcSOkMso1l2xIrYcdVbXMRv6r6ZbcE7E7AhC GiF61Zzmo79CYzx8fFnLABIqHBTIDyncl3Mt9jS2AQCW87w1XuFUGJwnEXa/BLbNJQZi b0LjSBgaOIhfHR4jHeQdtpV6oRlUm/DXfm4/IF3xEzWauZau/Jtb3NiCNoDOAth0lcso UYtAnbfXrl5T85mHk1kyvzniuT+qjdsZXCh0XiK+B7cVNgB/D+jNmvv44WYrmhxsayd1 FDu2KiiesfAYvwhqrQnt6rqsDpAXnGjFmiqYkvWTa5Q9POvyo7WH4I6gxz+Xhjj4Vi8t tpzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=1RlAyu2K1ExS4p2wVN+qgRvIsrSidQIfc1QxAoSJvAc=; fh=FevkPa+mLszS+WfpfHO5nl2iXin1D8MhqgULfFUySnM=; b=R39VB0YpQZv4IuNaPx4qEaSQjDG6XdblJso5nnFYzr78Sf65fANpb8vWNW8w37295L I9bhaUCAgYYwfGlQcd+2hEcJtKymJtzkanLJ3InyMgjM1rRMb8LXbIwoycLg4nIQQHeK ZqPkWkHIoA4jTx21BuzTcW7jQ5w9++ggrswafk8uCQis7umXAXowIBPBostRaJ2fa6py 8PlUiPydzOJHdV031//EFYYuVe1ZGj3xKo+0dUSWX/tPER6bsKSSfqrs7l+MDAhGR8Zf ysLtCBxOpO+xWbsmXepV8YT/UdU+Hh+8NcgaMDBlZm8M7iCFDI1zoGFmz9qzc1jJCpLm cCgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o5-20020a17090323c500b001b8c4168e20si3486780plh.58.2023.09.15.07.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 07:16:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EC85F835452E; Fri, 15 Sep 2023 03:52:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234119AbjIOKwM convert rfc822-to-8bit (ORCPT + 99 others); Fri, 15 Sep 2023 06:52:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231341AbjIOKwI (ORCPT ); Fri, 15 Sep 2023 06:52:08 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6410FCC8 for ; Fri, 15 Sep 2023 03:51:48 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-225-CvPY7ioKPtWKGGdbPunc0A-1; Fri, 15 Sep 2023 11:51:40 +0100 X-MC-Unique: CvPY7ioKPtWKGGdbPunc0A-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 15 Sep 2023 11:51:36 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Fri, 15 Sep 2023 11:51:36 +0100 From: David Laight To: 'David Howells' CC: 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 Thread-Topic: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC Thread-Index: AQHZ51kQ26Nrcgq1TkqWWiI5nPv6dLAbdkPggAAj+YCAABqPYA== Date: Fri, 15 Sep 2023 10:51:36 +0000 Message-ID: <5017b9fa177f4deaa5d481a5d8914ab4@AcuMS.aculab.com> References: <20230914221526.3153402-1-dhowells@redhat.com> <20230914221526.3153402-10-dhowells@redhat.com> <3370515.1694772627@warthog.procyon.org.uk> In-Reply-To: <3370515.1694772627@warthog.procyon.org.uk> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 03:52:12 -0700 (PDT) From: David Howells > Sent: 15 September 2023 11:10 > > David Laight wrote: > > > > Add kunit tests to benchmark 256MiB copies to a UBUF iterator and an IOVEC > > > iterator. This attaches a userspace VM with a mapped file in it > > > temporarily to the test thread. > > > > Isn't that going to be completely dominated by the cache fills > > from memory? > > Yes... but it should be consistent in the amount of time that consumes since > no device drivers are involved. I can try adding the same folio to the > anon_file multiple times - it might work especially if I don't put the pages > on the LRU (if that's even possible) - but I wanted separate pages for the > extraction test. You could also just not do the copy! Although you need (say) asm volatile("\n",:::"memory") to stop it all being completely optimised away. That might show up a difference in the 'out_of_line' test where 15% on top on the data copies is massive - it may be that the data cache behaviour is very different for the two cases. ... > > 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. The same > for writing to /dev/zero. Reading from /dev/zero does its own iteration 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. Last time I looked at that the 32bit compat code was faster than the 64bit code on x86! David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)