lkml.org 
[lkml]   [2023]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC
Date
David Laight <David.Laight@ACULAB.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.

> I'd have thought you'd need to use something with a lot of
> small fragments so that the iteration code dominates the copy.

That would actually be a separate benchmark case which I should try also.

> 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.

David

\
 
 \ /
  Last update: 2023-09-15 12:12    [W:2.982 / U:2.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site