Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8922422rwl; Tue, 10 Jan 2023 22:09:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXt9Yc0A2gBRLeYo61yfJCOtuhuav3Ajx0u/nz37+dmQRZfmAQsmBLRmcYInu5VwggGCql61 X-Received: by 2002:a05:6a21:169b:b0:aa:7346:2d94 with SMTP id np27-20020a056a21169b00b000aa73462d94mr83378124pzb.25.1673417381703; Tue, 10 Jan 2023 22:09:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673417381; cv=none; d=google.com; s=arc-20160816; b=HDK5x65Yq52aR6gqoB20SKRsG1gXhr2k0kikST1kG3xi06D3Cv4m6ZGnZhe0vET4Zi XcjNKGNYhfLa2Qwp57ljtrioP036c11b1Qw0hnHn13XdjdXnRTswXWRpaV2iurLZlqJB PZURj7e6pO4P+GOnW8Jq9EeplAmLgMEOKhTtLInhaaRCJkXDNCLkEZreHl90YD7T1p5d wVn5yxRTuspovl5V3m5hjKmD5Bu+/aSLsIJ21kh+j25hWdvV+Qhgv2wC86/QtjNBnkU5 T9NaKxREUPk+RsPsoiHz6KxPROnGHWmyb/uQdWD0RgwwI3V/cCqbYqsZuMazMQ1NZb2i qxSg== 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=sbRuq4UYKy48Tjuk91jb5MNpnTkjDwGn5BEvlgEfHDA=; b=GLIV8m9mvvScITSSpkh8hvX+Vv1iTGA6HjwXVgnORxcc7yPl4tiwLKSShi917K3R/X PoC5ZL3dY6GH4Qv5vLuvJFK3hSz3Myws8wZhoNmZis8GCPm1cRjG9staPRBu40ZbbqWy +viVw8yA0iGHjTULTslJCc536jX0N1/iEf+yqgj5hh2z3hcvqMflEj+M125KafZXd0ZV DG49JS4ryn4v8G7qYjNhhcDE738DJ7v+ac5JcLx7qiqRiwvqO7eaBuwS42y/893vaAeI wyCtUhS0gjHX6RVgyS7IxPJXy3t6xtG31VMWg8WJS9oA+/0EsE/IR004HgGY3RHCjEsX ievA== 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 f15-20020a65590f000000b00473c36e3b75si14655234pgu.608.2023.01.10.22.09.35; Tue, 10 Jan 2023 22:09:41 -0800 (PST) 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 S230262AbjAKFp3 (ORCPT + 55 others); Wed, 11 Jan 2023 00:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbjAKFpZ (ORCPT ); Wed, 11 Jan 2023 00:45:25 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66DA9127; Tue, 10 Jan 2023 21:45:25 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id B11B968BEB; Wed, 11 Jan 2023 06:45:20 +0100 (CET) Date: Wed, 11 Jan 2023 06:45:20 +0100 From: Christoph Hellwig To: Kemeng Shi Cc: hch@lst.de, axboe@kernel.dk, dwagner@suse.de, hare@suse.de, ming.lei@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, john.garry@huawei.com, jack@suse.cz Subject: Re: [PATCH v3 07/14] blk-mq: make blk_mq_commit_rqs a general function for all commits Message-ID: <20230111054520.GA17158@lst.de> References: <20230111130159.3741753-1-shikemeng@huaweicloud.com> <20230111130159.3741753-8-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230111130159.3741753-8-shikemeng@huaweicloud.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, Jan 11, 2023 at 09:01:52PM +0800, Kemeng Shi wrote: > 1. rename orignal blk_mq_commit_rqs to blk_mq_plug_commit_rqs as > trace_block_unplug is only needed when we dispatch request from plug list. Why? I think always having the trace even for the commit case seems very useful for making the traces useful. > +/* blk_mq_commit_rqs and blk_mq_plug_commit_rqs notify driver using > + * bd->last that there is no more requests. (See comment in struct This is not the normal kernel comment style. > +static void blk_mq_commit_rqs(struct blk_mq_hw_ctx *hctx, int queued) > +{ > + if (hctx->queue->mq_ops->commit_rqs && queued) { > + hctx->queue->mq_ops->commit_rqs(hctx); > + } No need for the braces.