Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 453D9EE6456 for ; Fri, 15 Sep 2023 10:52:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 980C66B027A; Fri, 15 Sep 2023 06:52:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 932756B0296; Fri, 15 Sep 2023 06:52:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7FABE6B0336; Fri, 15 Sep 2023 06:52:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 691066B027A for ; Fri, 15 Sep 2023 06:52:02 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 311AC80FA3 for ; Fri, 15 Sep 2023 10:52:02 +0000 (UTC) X-FDA: 81238516884.07.5ABFED4 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by imf24.hostedemail.com (Postfix) with ESMTP id 58C50180012 for ; Fri, 15 Sep 2023 10:51:58 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf24.hostedemail.com: domain of david.laight@aculab.com designates 185.58.86.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694775120; h=from:from:sender: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=wgAYSBuHnTAK12lE2A9lNEx4uIRgEiIbYCUE8uVtmqM=; b=twoLj3qi4ak5reSByNbEhS9q0Qc8MglPxodjbzixzJOj+Won6W664ZikJST3M8BCoCPjuX 3dCbi4Tt2zHrfvPS7OJY9vrgEOSRg1xL4zDFWSK7YVvgheOuaIKexDZA4LRdiTZhfHcKiA Tjs+UTj3rqQsTWAa3e7KxMyErjSd0oc= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf24.hostedemail.com: domain of david.laight@aculab.com designates 185.58.86.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694775120; a=rsa-sha256; cv=none; b=6Ta63/ooyvQ67jAiiekTxl1xdfjNLgafPF/hPMYC97ddNfDAZUY22bhokRJsW9h+NgRlFl JPjOT0xM7ulwW4te5mkZjFbqSTxmZGvf2A9MUgO1wi6QKZhK7CxuMp7rLmKzPmG0rzBiMG BHNlvZXL1e1vURl6OwXhyFwkV2c8Wnw= 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: quoted-printable X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 58C50180012 X-Stat-Signature: acq3n4ntwaon4zr6sdmkmzf8kw4kwotu X-Rspam-User: X-HE-Tag: 1694775118-950643 X-HE-Meta: U2FsdGVkX19Z/uJARSQqfBqxJ7sP82u4VTof2jXXx9NqIx2YpODd0MC63uqwa9NgR3IoesaKJFls7RADK1/LQQwLuje7HybB/2mfhNZ2/y3BOWSzqv+hCfPG/GknLi5oX3wqcrCm/l3kcJBEA8luvsiVunC/Ubzoa0Mz8AzoZU2gNUw11ELJg4YUlvW0vkYX8PSMkZi5NtWyCsW6Pp8euo5et6XliGRRtCNhNOrmeRQAT48nzIj8p0TU7dhL1qkIZGxjEkAFcWGd0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w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: David Howells > Sent: 15 September 2023 11:10 >=20 > David Laight wrote: >=20 > > > 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? >=20 > Yes... but it should be consistent in the amount of time that consumes s= ince > 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 pa= ges > on the LRU (if that's even possible) - but I wanted separate pages for th= e > 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. >=20 > Forget /dev/null; that doesn't actually engage any iteration code. The s= ame > 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! =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)