public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Al Viro <[email protected]>,
	Pavel Begunkov <[email protected]>
Cc: yangerkun <[email protected]>,
	[email protected], [email protected],
	[email protected]
Subject: Re: [PATCH] block: reexpand iov_iter after read/write
Date: Thu, 6 May 2021 11:19:03 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 4/30/21 8:35 AM, Al Viro wrote:
> On Fri, Apr 30, 2021 at 01:57:22PM +0100, Pavel Begunkov wrote:
>> On 4/28/21 7:16 AM, yangerkun wrote:
>>> Hi,
>>>
>>> Should we pick this patch for 5.13?
>>
>> Looks ok to me
> 
> 	Looks sane.  BTW, Pavel, could you go over #untested.iov_iter
> and give it some beating?  Ideally - with per-commit profiling to see
> what speedups/slowdowns do they come with...
> 
> 	It's not in the final state (if nothing else, it needs to be
> rebased on top of xarray stuff, and there will be followup cleanups
> as well), but I'd appreciate testing and profiling data...
> 
> 	It does survive xfstests + LTP syscall tests, but that's about
> it.

Al, I ran your v3 branch of that and I didn't see anything in terms
of speedups. The test case is something that just writes to eventfd
a ton of times, enough to get a picture of the overall runtime. First
I ran with the existing baseline, which is eventfd using ->write():

Executed in  436.58 millis    fish           external
   usr time  106.21 millis  121.00 micros  106.09 millis
   sys time  331.32 millis   33.00 micros  331.29 millis

Executed in  436.84 millis    fish           external
   usr time  113.38 millis    0.00 micros  113.38 millis
   sys time  324.32 millis  226.00 micros  324.10 millis

Then I ran it with the eventfd ->write_iter() patch I posted:

Executed in  484.54 millis    fish           external
   usr time   93.19 millis  119.00 micros   93.07 millis
   sys time  391.35 millis   46.00 micros  391.30 millis

Executed in  485.45 millis    fish           external
   usr time   96.05 millis    0.00 micros   96.05 millis
   sys time  389.42 millis  216.00 micros  389.20 millis

Doing a quick profile, on the latter run with ->write_iter() we're
spending 8% of the time in _copy_from_iter(), and 4% in
new_sync_write(). That's obviously not there at all for the first case.
Both have about 4% in eventfd_write(). Non-iter case spends 1% in
copy_from_user().

Finally with your branch pulled in as well, iow using ->write_iter() for
eventfd and your iov changes:

Executed in  485.26 millis    fish           external
   usr time  103.09 millis   70.00 micros  103.03 millis
   sys time  382.18 millis   83.00 micros  382.09 millis

Executed in  485.16 millis    fish           external
   usr time  104.07 millis   69.00 micros  104.00 millis
   sys time  381.09 millis   94.00 micros  381.00 millis

and there's no real difference there. We're spending less time in
_copy_from_iter() (8% -> 6%) and less time in new_sync_write(), but
doesn't seem to manifest itself in reduced runtime.

-- 
Jens Axboe


  parent reply	other threads:[~2021-05-06 17:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  7:18 [PATCH] block: reexpand iov_iter after read/write yangerkun
2021-04-06  1:28 ` yangerkun
2021-04-06 11:04   ` Pavel Begunkov
2021-04-07 14:16     ` yangerkun
2021-04-09 14:49 ` Pavel Begunkov
2021-04-15 17:37   ` Pavel Begunkov
2021-04-15 17:39     ` Pavel Begunkov
2021-04-28  6:16       ` yangerkun
2021-04-30 12:57         ` Pavel Begunkov
2021-04-30 14:35           ` Al Viro
2021-05-06 16:57             ` Pavel Begunkov
2021-05-06 17:17               ` Al Viro
2021-05-06 17:19             ` Jens Axboe [this message]
2021-05-06 18:55               ` Al Viro
2021-05-06 19:15                 ` Jens Axboe
2021-05-06 21:08                   ` Al Viro
2021-05-06 21:17                     ` Matthew Wilcox
2021-05-07 14:59                     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox