linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>,
	Matthew Wilcox <willy@infradead.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] what to do with IOCB_DSYNC?
Date: Sun, 22 May 2022 20:43:26 -0600	[thread overview]
Message-ID: <6ea33ba8-c5a3-a1e7-92d2-da8744662ed9@kernel.dk> (raw)
In-Reply-To: <9c3a6ad4-cdb5-8e0d-9b01-c2825ea891ad@kernel.dk>

On 5/22/22 7:50 PM, Jens Axboe wrote:
> On 5/22/22 7:28 PM, Jens Axboe wrote:
>> On 5/22/22 7:22 PM, Jens Axboe wrote:
>>> On 5/22/22 6:42 PM, Al Viro wrote:
>>>> On Sun, May 22, 2022 at 02:03:35PM -0600, Jens Axboe wrote:
>>>>
>>>>> Right, I'm saying it's not _immediately_ clear which cases are what when
>>>>> reading the code.
>>>>>
>>>>>> up a while ago.  And no, turning that into indirect calls ended up with
>>>>>> arseloads of overhead, more's the pity...
>>>>>
>>>>> It's a shame, since indirect calls make for nicer code, but it's always
>>>>> been slower and these days even more so.
>>>>>
>>>>>> Anyway, at the moment I have something that builds; hadn't tried to
>>>>>> boot it yet.
>>>>>
>>>>> Nice!
>>>>
>>>> Boots and survives LTP and xfstests...  Current variant is in
>>>> vfs.git#work.iov_iter (head should be at 27fa77a9829c).  I have *not*
>>>> looked into the code generation in primitives; the likely/unlikely on
>>>> those cascades of ifs need rethinking.
>>>
>>> I noticed too. Haven't fiddled much in iov_iter.c, but for uio.h I had
>>> the below. iov_iter.c is a worse "offender" though, with 53 unlikely and
>>> 22 likely annotations...
>>
>> Here it is...
> 
> Few more, most notably making sure that dio dirties reads even if they
> are not of the iovec type.
> 
> Last two just add a helper for import_ubuf() and then adopts it for
> io_uring send/recv which is also a hot path. The single range read/write
> can be converted too, but that needs a bit more work...

Branch here:

https://git.kernel.dk/cgit/linux-block/log/?h=iov-iter

First 5 are generic ones, and some of them should just be folded with
your changes.

Last 2 are just converting io_uring to use it where appropriate.

We can also use it for vectored readv/writev and recvmsg/sendmsg with
one segment. The latter is mostly single segment in the real world
anyway, former probably too. Though not sure it's worth it when we're
copying a single iovec first anyway? Something to test...

-- 
Jens Axboe


  reply	other threads:[~2022-05-23  2:43 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  0:46 [RFC] what to do with IOCB_DSYNC? Al Viro
2021-06-21 13:59 ` Christoph Hellwig
2021-06-21 14:03   ` Matthew Wilcox
2021-06-21 14:09     ` Christoph Hellwig
2021-06-21 14:16       ` Matthew Wilcox
2021-06-21 14:22         ` Christoph Hellwig
2021-06-21 14:32           ` Al Viro
2021-06-21 14:35             ` Christoph Hellwig
2021-06-21 15:22               ` Jens Axboe
2022-05-21 17:48               ` Al Viro
2022-05-21 19:03                 ` Jens Axboe
2022-05-21 22:14                   ` Jens Axboe
2022-05-22  7:45                     ` Christoph Hellwig
2022-05-22 10:23                       ` Matthew Wilcox
2022-05-22 10:36                         ` Al Viro
2022-05-22 11:15                           ` Matthew Wilcox
2022-05-22 11:45                             ` Christoph Hellwig
2022-05-22 12:39                               ` Jens Axboe
2022-05-22 12:48                                 ` Al Viro
2022-05-22 13:02                                   ` Jens Axboe
2022-05-22 13:07                                     ` Al Viro
2022-05-22 13:09                                       ` Jens Axboe
2022-05-22 18:06                                         ` Jens Axboe
2022-05-22 18:25                                           ` Al Viro
2022-05-22 18:29                                             ` Jens Axboe
2022-05-22 18:39                                               ` Al Viro
2022-05-22 18:48                                                 ` Jens Axboe
2022-05-22 19:04                                                   ` Al Viro
2022-05-22 20:03                                                     ` Jens Axboe
2022-05-23  0:42                                                       ` Al Viro
2022-05-23  1:22                                                         ` Jens Axboe
2022-05-23  1:28                                                           ` Jens Axboe
2022-05-23  1:50                                                             ` Jens Axboe
2022-05-23  2:43                                                               ` Jens Axboe [this message]
2022-05-23 14:22                                                                 ` Al Viro
2022-05-23 14:34                                                                   ` Jens Axboe
2022-05-23 14:47                                                                     ` Al Viro
2022-05-23 15:12                                                                       ` Jens Axboe
2022-05-23 15:44                                                                         ` Jens Axboe
2022-05-23 15:49                                                                           ` Matthew Wilcox
2022-05-23 15:55                                                                             ` Jens Axboe
2022-05-23 16:03                                                                               ` Jens Axboe
2022-05-26 14:46                                                                                 ` Jason A. Donenfeld
2022-05-27 10:09                                                                                   ` Ingo Molnar
2022-05-27 10:15                                                                                     ` Jason A. Donenfeld
2022-05-27 14:45                                                                                       ` Samuel Neves
2022-05-27 10:25                                                                                     ` Ingo Molnar
2022-05-27 10:36                                                                                       ` Borislav Petkov
2022-05-28 20:54                                                                                         ` Sedat Dilek
2022-05-28 20:38                                                                                       ` Sedat Dilek
2022-05-28 20:39                                                                                         ` Sedat Dilek
2022-05-23 16:15                                                                         ` Al Viro
2022-05-25 14:34                                                         ` Matthew Wilcox
2022-05-26 23:19                                                     ` Al Viro
2022-05-27 14:51                                                       ` Jens Axboe
2022-05-22 12:21                             ` Al Viro
2022-05-22  7:43                 ` Christoph Hellwig
2022-05-22 12:41                   ` Al Viro
2022-05-22 12:51                     ` Christoph Hellwig
2021-06-21 14:22       ` Al Viro

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 \
    --in-reply-to=6ea33ba8-c5a3-a1e7-92d2-da8744662ed9@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).