linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Fengnan Chang <changfengnan@bytedance.com>,
	brauner@kernel.org, linux-xfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH] iomap: allow iomap using the per-cpu bio cache
Date: Fri, 22 Aug 2025 16:42:47 +0100	[thread overview]
Message-ID: <aKiP966iRv5gEBwm@casper.infradead.org> (raw)
In-Reply-To: <20250822150550.GP7942@frogsfrogsfrogs>

On Fri, Aug 22, 2025 at 08:05:50AM -0700, Darrick J. Wong wrote:
> On Fri, Aug 22, 2025 at 04:26:06PM +0800, Fengnan Chang wrote:
> > When use io_uring with direct IO, we could use per-cpu bio cache
> > from bio_alloc_bioset, So pass IOCB_ALLOC_CACHE flag to alloc
> > bio helper.
> >  
> > +	if (iter->flags & IOMAP_ALLOC_CACHE)
> > +		bio_opf |= REQ_ALLOC_CACHE;
> 
> Is there a reason /not/ to use the per-cpu bio cache unconditionally?

AIUI it's not safe because completions might happen on a different CPU
from the submission.  At least, there's nowhere that sets REQ_ALLOC_CACHE
unconditionally.

This could do with some better documentation ..

  reply	other threads:[~2025-08-22 15:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22  8:26 [PATCH] iomap: allow iomap using the per-cpu bio cache Fengnan Chang
2025-08-22 15:05 ` Darrick J. Wong
2025-08-22 15:42   ` Matthew Wilcox [this message]
2025-08-22 16:07     ` Ritesh Harjani
2025-08-22 16:51       ` Matthew Wilcox
2025-08-23  4:15         ` Ritesh Harjani
2025-08-25  8:51           ` Fengnan Chang
2025-08-25  9:21             ` Christoph Hellwig
2025-08-25  9:41               ` Fengnan Chang
2025-08-25 10:47                 ` Christoph Hellwig
2025-08-26  9:46                   ` Fengnan Chang
2025-08-26 13:15                     ` Christoph Hellwig
2025-08-26 16:53                 ` Ritesh Harjani
2025-08-29  4:26                   ` [External] " Fengnan Chang
2025-09-03  8:28                   ` Fengnan Chang
2025-09-03  9:53           ` Pavel Begunkov

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=aKiP966iRv5gEBwm@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=changfengnan@bytedance.com \
    --cc=djwong@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.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).