Re: [PATCH 2/3] block: enable bio caching use for passthru IO
From: Jens Axboe <axboe@kernel.dk>
Date: 2022-08-07 18:45:25
On 8/7/22 12:08 PM, Kanchan Joshi wrote:
On Sat, Aug 06, 2022 at 09:20:03AM -0600, Jens Axboe wrote:quoted
bdev based polled O_DIRECT is currently quite a bit faster than passthru on the same device, and one of the reaons is that we're not able to use the bio caching for passthru IO. If REQ_POLLED is set on the request, use the fs bio set for grabbing a bio from the caches, if available. This saves 5-6% of CPU over head for polled passthru IO.For passthru path, bio is always freed in the task-context (and not in irq) so must this be tied to polled-io only?
Right, that's why it's tied to polled. If polling gets cleared, then it will be freed normally on completion rather than inserted into the cache. I do have patches for irq bio caching too, that'll work fine with io_uring: https://git.kernel.dk/cgit/linux-block/commit/?h=perf-wip&id=ab3d4371227a34a5561e4d594a17baaad03bf1b7 I'll post that too, would be nice if we can figure out a clean way to do this. I have posted it before, iirc. -- Jens Axboe