From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40558C433EF for ; Thu, 24 Mar 2022 06:30:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231436AbiCXGcB (ORCPT ); Thu, 24 Mar 2022 02:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiCXGbs (ORCPT ); Thu, 24 Mar 2022 02:31:48 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5AA06541E; Wed, 23 Mar 2022 23:30:16 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 20F6A68B05; Thu, 24 Mar 2022 07:30:11 +0100 (CET) Date: Thu, 24 Mar 2022 07:30:11 +0100 From: Christoph Hellwig To: Kanchan Joshi Cc: Christoph Hellwig , Kanchan Joshi , Jens Axboe , Keith Busch , Pavel Begunkov , io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, sbates@raithlin.com, logang@deltatee.com, Pankaj Raghav , Javier =?iso-8859-1?Q?Gonz=E1lez?= , Luis Chamberlain , Adam Manzanares , Anuj Gupta Subject: Re: [PATCH 11/17] block: factor out helper for bio allocation from cache Message-ID: <20220324063011.GA12660@lst.de> References: <20220308152105.309618-1-joshi.k@samsung.com> <20220308152105.309618-12-joshi.k@samsung.com> <20220310083503.GE26614@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Thu, Mar 10, 2022 at 05:55:02PM +0530, Kanchan Joshi wrote: > On Thu, Mar 10, 2022 at 2:05 PM Christoph Hellwig 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.