[PATCH 11/17] block: factor out helper for bio allocation from cache
Kanchan Joshi
joshiiitr at gmail.com
Thu Mar 24 10:45:20 PDT 2022
On Thu, Mar 24, 2022 at 12:00 PM Christoph Hellwig <hch at lst.de> wrote:
>
> On Thu, Mar 10, 2022 at 05:55:02PM +0530, Kanchan Joshi wrote:
> > On Thu, Mar 10, 2022 at 2:05 PM Christoph Hellwig <hch at lst.de> wrote:
> > >
> > > On Tue, Mar 08, 2022 at 08:50:59PM +0530, Kanchan Joshi wrote:
> > > > +struct bio *bio_alloc_kiocb(struct kiocb *kiocb, unsigned short nr_vecs,
> > > > + struct bio_set *bs)
> > > > +{
> > > > + if (!(kiocb->ki_flags & IOCB_ALLOC_CACHE))
> > > > + return bio_alloc_bioset(GFP_KERNEL, nr_vecs, bs);
> > > > +
> > > > + return bio_from_cache(nr_vecs, bs);
> > > > +}
> > > > EXPORT_SYMBOL_GPL(bio_alloc_kiocb);
> > >
> > > If we go down this route we might want to just kill the bio_alloc_kiocb
> > > wrapper.
> >
> > Fine, will kill that in v2.
>
> As a headsup, Mike Snitzer has been doing something similar in the
>
> "block/dm: use BIOSET_PERCPU_CACHE from bio_alloc_bioset"
>
> series.
Thanks, that can be reused here too. But to enable this feature - we
need to move to a bioset from bio_kmalloc in nvme, and you did not
seem fine with that.
More information about the Linux-nvme
mailing list