Thread (15 messages) 15 messages, 5 authors, 2025-09-06

Re: [PATCH] iomap: allow iomap using the per-cpu bio cache

From: Matthew Wilcox <willy@infradead.org>
Date: 2025-08-22 16:51:15
Also in: linux-fsdevel, linux-xfs

On Fri, Aug 22, 2025 at 09:37:32PM +0530, Ritesh Harjani wrote:
Matthew Wilcox [off-list ref] writes:
quoted
On Fri, Aug 22, 2025 at 08:05:50AM -0700, Darrick J. Wong wrote:
quoted
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 max the bio de-queued from cpu X can be returned to cpu Y cache, this
shouldn't be unsafe right? e.g. bio_put_percpu_cache(). 
Not optimal for performance though.

Also even for io-uring the IRQ completions (non-polling requests) can
get routed to a different cpu then the submitting cpu, correct?
Then the completions (bio completion processing) are handled via IPIs on
the submtting cpu or based on the cache topology, right?
quoted
At least, there's nowhere that sets REQ_ALLOC_CACHE unconditionally.

This could do with some better documentation ..
Agreed. Looking at the history this got added for polling mode first but
later got enabled for even irq driven io-uring rw requests [1]. So it
make sense to understand if this can be added unconditionally for DIO
requests or not.
So why does the flag now exist at all?  Why not use the cache
unconditionally?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help