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 27D7AC433FE for ; Thu, 24 Mar 2022 17:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346885AbiCXRrU (ORCPT ); Thu, 24 Mar 2022 13:47:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243676AbiCXRrU (ORCPT ); Thu, 24 Mar 2022 13:47:20 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0B7CB2473; Thu, 24 Mar 2022 10:45:47 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id bn33so7191023ljb.6; Thu, 24 Mar 2022 10:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XjdOGRorC0nLuKT+vnf4KghH4qK564bOF026m1uq2LM=; b=qn5ODB5qgGzbNY6LyHQ1PpJ+e8WZnGb3VIdgWKJ4RWs7GjUS5wjCq7s+T4SpWzyyRz X5Kv8cFbzPU1ALMGYa5T8WOKpm0YB33F4W56+qyixcVsxniuEIBj//m/DJEJnq38UrXs Eza/doKWtG2viDJxbE93l6gb1wq/dqhYes8nQfFolowATEmhocCTqet3SrVAaIdCgFVH ET9VDmte4nWETFRNYj9+ixpoXev6v5YAd2bMDMRF8A28SoDBtTRjFTNaR+7uOkgyQ58r 1JGivxE8gPTnFFm7NcbScjnOreo9c7fXFQrtZpcYtCUtAjcjyHiZpx6ghM0sQ8Nfvvx0 iMHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XjdOGRorC0nLuKT+vnf4KghH4qK564bOF026m1uq2LM=; b=RCCHIx6CvWna5WLhhuYwj+cbgQf2byARXA2bJVXPNb/KupEDYU0TPuvY5reQNm5Wrm dOusxIJ2IlwAQqPFQ7+uiMipndGogzzxwfvqOwM22EDQHwBhlpzGH34a5ujIEw1RIeA3 8+/wImD9c8kNkp1QZfCUkc9QdDIV7R5kO1rm8UwhPW/3RdPp3iq/7RTdPboMegkm+/iq mR5WKYUoFrikvgJoyAhqWCiq9ASOZzd0TTurJZutA8rGXGDTriKckwWJ9TmLc6zDqGGZ fyZ6udvfcSL/BL2vu0lh4GgwA3VKENemWh7WyeT+cBqysdTuAdmMCWOT8yvewG4R5Fj3 lOiA== X-Gm-Message-State: AOAM531B49aXZ3YBDK2KG0yYhql4mCKtddViUG+RLjLEmN9e4HuZGgs6 WOGpig55QJPITda0l5vJwrEcWtilVj+18SUv64c= X-Google-Smtp-Source: ABdhPJz0+kF30iUk1IKjKuHkn6OMlOdoGxgUwTrEvzpunKZL2D1zUDJ7ekei/or9tWttmHRiMEUXp+orM938M0EQA9Q= X-Received: by 2002:a2e:90d6:0:b0:246:e44:bcf6 with SMTP id o22-20020a2e90d6000000b002460e44bcf6mr4820564ljg.501.1648143946143; Thu, 24 Mar 2022 10:45:46 -0700 (PDT) MIME-Version: 1.0 References: <20220308152105.309618-1-joshi.k@samsung.com> <20220308152105.309618-12-joshi.k@samsung.com> <20220310083503.GE26614@lst.de> <20220324063011.GA12660@lst.de> In-Reply-To: <20220324063011.GA12660@lst.de> From: Kanchan Joshi Date: Thu, 24 Mar 2022 23:15:20 +0530 Message-ID: Subject: Re: [PATCH 11/17] block: factor out helper for bio allocation from cache To: Christoph Hellwig Cc: 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 , =?UTF-8?Q?Javier_Gonz=C3=A1lez?= , Luis Chamberlain , Adam Manzanares , Anuj Gupta Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Thu, Mar 24, 2022 at 12:00 PM Christoph Hellwig 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 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.