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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ..




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux