Thread (3 messages) flat view 3 messages, 2 authors, 2021-08-19

Re: [PATCH RFC] Enable bio cache for IRQ driven IO from io_uring

From: Christoph Hellwig <hch@lst.de>
Date: 2021-08-19 09:01:55
Also in: linux-block

On Wed, Aug 18, 2021 at 10:54:45AM -0600, Jens Axboe wrote:
We previously enabled this for O_DIRECT polled IO, however io_uring
completes all IO from task context these days, so it can be enabled for
that path too. This requires moving the bio_put() from IRQ context, and
this can be accomplished by passing the ownership back to the issuer.

Use kiocb->private for that, which should be (as far as I can tell) free
once we get to the completion side of things. Add a IOCB_PUT_CACHE flag
to tell the issuer that we passed back the ownership, then the issuer
can put the bio from a safe context.

Like the polled IO ditto, this is good for a 10% performance increase.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

---

Just hacked this up and tested it, Works For Me. Would welcome input on
alternative methods here, if anyone has good suggestions.
10% performance improvement looks really nice, but I don't think we can
just hardcode assumptions about bios in iomap->private.  The easiest
would be to call back into the file systems for the freeing, but that
would add an indirect call.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help