Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp330728rwb; Wed, 21 Sep 2022 23:26:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4c9m9AU8z2sbsDNDVFlzbKTiofw23+r7+yvJxlR7cagZoBLZktcQivF6qjDd0vcgPjFaTB X-Received: by 2002:a17:906:ef8c:b0:77c:8f77:330 with SMTP id ze12-20020a170906ef8c00b0077c8f770330mr1412557ejb.604.1663827987037; Wed, 21 Sep 2022 23:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663827987; cv=none; d=google.com; s=arc-20160816; b=RlG/j4pnLdvkxvEGqKej2+3HjsnPvXom6Y4UepYxYn2KAcsV86bcFUYvtZ48b1y7sJ SxE14seyC6wJOI/H8jbdYSOMStFjC8sCZWRHbL6nHVsUG4mx8nwjU6A3RFUMnNRNdtnJ uMfoM3bgXQOT7pTatR9njgGkd/lgtY+9/NFMKq7AlWyH0L85VeWAIG26MXWCc45JVf4v zbP/YwAyILvgQplRE/UkyjbFLsXNJXECV3nBadbmbtzEOtnJ4YAHBOqRaWOcb7wVeVmD UXIxWw76n65ErskYpMl3S73X1kQYebkHXd5CvxuC9NBU104smiN5He9wKCr34rk2ENdw UUFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=XkufidiM4E8AW79WmG+yUVbbnK8Hjd8wG2FuMFk9k9Y=; b=U2AiwOyqiKc4S4SG76CXlqYDAckR+76qbag6/vVlBqybvY+qW5oZJhgDzHyC5Bo4nL 4ucJCMHjyEV54UZMJeWsgAP7B1PzEU74X49k5qul6RIUQJX95YF8U5vyKMPfats2mTyK bkwYnewb9hQ1bg3N6+TgwKmHD1RGSprhZ8Cyv0U5I3oxNTQ9YyDzcwwvFazmCekYHCbM VFKzYoc1hpJvTMwtD41g6VZeaYomJWplxhoFXkuedRGfsXQ6RNdeY1L0QlvJO2AyT44y AY4/LMnBJrqXcYHB+1gyjX8ptWY7fwlrwlNkAmqB0wSwvkcRoUfHGvc0GqE+YDca8tpc pEbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170906794600b00781599eb7d9si4458382ejo.542.2022.09.21.23.26.00; Wed, 21 Sep 2022 23:26:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229961AbiIVGUb (ORCPT + 99 others); Thu, 22 Sep 2022 02:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbiIVGUP (ORCPT ); Thu, 22 Sep 2022 02:20:15 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19573B56CB for ; Wed, 21 Sep 2022 23:20:14 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 6262168BEB; Thu, 22 Sep 2022 08:20:10 +0200 (CEST) Date: Thu, 22 Sep 2022 08:20:10 +0200 From: Christoph Hellwig To: Liu Song Cc: axboe@kernel.dk, hch@lst.de, kbusch@kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me Subject: Re: [RFC PATCH] blk-mq: hctx has only one ctx mapping is no need to redirect the completion Message-ID: <20220922062010.GA27946@lst.de> References: <894e18a4-4504-df48-6429-a04c222ca064@kernel.dk> <1663731123-81536-1-git-send-email-liusong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1663731123-81536-1-git-send-email-liusong@linux.alibaba.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 21, 2022 at 11:32:03AM +0800, Liu Song wrote: > From: Liu Song > > High-performance NVMe devices usually support a large hw queue, which a larger number of? > /* > - * For a polled request, always complete locally, it's pointless > - * to redirect the completion. > + * For request which hctx has only one ctx mapping, > + * or a polled request, always complete locally, > + * it's pointless to redirect the completion. > */ > - if (rq->cmd_flags & REQ_POLLED) > + if (rq->mq_hctx->nr_ctx == 1 || > + rq->cmd_flags & REQ_POLLED) Some very odd comment formatting and and indentation here.