Pavel Begunkov <asml.silence@xxxxxxxxx> 于2025年9月10日周三 18:18写道: > > On 9/8/25 13:55, Fengnan Chang wrote: > > Pavel Begunkov <asml.silence@xxxxxxxxx> 于2025年9月3日周三 17:52写道: > ...>>> Now that per-cpu bio cache is being used by io-uring rw requests for > >>> both polled and non-polled I/O. Does that mean, we can kill > >>> IOCB_ALLOC_CACHE check from iomap dio path completely and use per-cpu > >>> bio cache unconditionally by passing REQ_ALLOC_CACHE flag? That means > >>> all DIO requests via iomap can now use this per-cpu bio cache and not > >>> just the one initiated via io-uring path. > >>> > >>> Or are there still restrictions in using this per-cpu bio cache, which > >>> limits it to be only used via io-uring path? If yes, what are they? And > >>> can this be documented somewhere? > >> > >> It should be safe to use for task context allocations (struct > >> bio_alloc_cache::free_list is [soft]irq unsafe) > > Why messaging privately? All that is public information people > might be interested in. I'd encourage you to forward this > discussion back to the mailing list. Sorry, It's a mistake. > > > So bio_alloc_bioset is safe for task context, but unsafe for [soft]irq, but > > bio_put is safe for task and [soft]irq context ? > > right > > >> IOCB_ALLOC_CACHE shouldn't be needed, but IIRC I played it > >> conservatively to not impact paths I didn't specifically benchmark. > > > > What's your suggestion? Be conservative or aggressive? > > At this point in time I'd enable it by default. If you do, > just benchmark the worst case to avoid regressions and > attach the result to the patch. Thanks for your suggestion, I'll do this, It's already in testing. > > -- > Pavel Begunkov >