public inbox for [email protected]
 help / color / mirror / Atom feed
From: Christoph Hellwig <[email protected]>
To: Jens Axboe <[email protected]>
Cc: "[email protected]" <[email protected]>,
	io-uring <[email protected]>,
	Christoph Hellwig <[email protected]>
Subject: Re: [PATCH RFC] Enable bio cache for IRQ driven IO from io_uring
Date: Thu, 19 Aug 2021 11:01:50 +0200	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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 <[email protected]>
> 
> ---
> 
> 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.

  reply	other threads:[~2021-08-19  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 16:54 [PATCH RFC] Enable bio cache for IRQ driven IO from io_uring Jens Axboe
2021-08-19  9:01 ` Christoph Hellwig [this message]
2021-08-19 15:15   ` 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] \
    /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