[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5017b9fa177f4deaa5d481a5d8914ab4@AcuMS.aculab.com>
Date: Fri, 15 Sep 2023 10:51:36 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'David Howells' <dhowells@...hat.com>
CC: Al Viro <viro@...iv.linux.org.uk>, Linus Torvalds
<torvalds@...ux-foundation.org>, Jens Axboe <axboe@...nel.dk>, "Christoph
Hellwig" <hch@....de>, Christian Brauner <christian@...uner.io>, "Matthew
Wilcox" <willy@...radead.org>, Brendan Higgins <brendanhiggins@...gle.com>,
David Gow <davidgow@...gle.com>, "linux-fsdevel@...r.kernel.org"
<linux-fsdevel@...r.kernel.org>, "linux-block@...r.kernel.org"
<linux-block@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"kunit-dev@...glegroups.com" <kunit-dev@...glegroups.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Andrew Morton
<akpm@...ux-foundation.org>, Christian Brauner <brauner@...nel.org>, "David
Hildenbrand" <david@...hat.com>, John Hubbard <jhubbard@...dia.com>
Subject: RE: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for
UBUF/IOVEC
From: David Howells
> Sent: 15 September 2023 11:10
>
> David Laight <David.Laight@...LAB.COM> 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)
Powered by blists - more mailing lists