[PATCH for-next v4 3/4] block: add helper to map bvec iterator for passthrough
Jens Axboe
axboe at kernel.dk
Tue Sep 6 06:06:40 PDT 2022
On 9/6/22 12:51 AM, Christoph Hellwig wrote:
> On Tue, Sep 06, 2022 at 12:03:29PM +0530, Kanchan Joshi wrote:
>>> This context looks weird? That bio_alloc_bioset should not be there,
>>> as biosets are only used for file system I/O, which this is not.
>>
>> if you think it's a deal-breaker, maybe I can add a new bioset in nvme and
>> pass that as argument to this helper. Would you prefer that over the
>> current approach.
>
> The whole point is that biosets exist to allow for forward progress
> guarantees required for file system I/O. For passthrough I/O
> bio_kmalloc is perfectly fine and much simpler. Adding yet another
> bio_set just makes things even worse.
It's a performance concern too, efficiency is much worse by using
kmalloc+kfree for passthrough. You don't get bio caching that way.
--
Jens Axboe
More information about the Linux-nvme
mailing list