Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11612422rwl; Tue, 3 Jan 2023 01:54:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXvg0tRVUI4xmRuAcTLoBAMVf45wdYexSFzcwlqoBVlXk1nEskZU11LelAgQ0VY49HbMkJV/ X-Received: by 2002:a05:6a00:2c98:b0:577:a5c9:5f03 with SMTP id ef24-20020a056a002c9800b00577a5c95f03mr41037015pfb.13.1672739666708; Tue, 03 Jan 2023 01:54:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672739666; cv=none; d=google.com; s=arc-20160816; b=kvhoWRfrExbGQASUzNNHnx2TynMITmHQp4q12mqisTLhSeyX0GDMKLw2ZVeNaaR8yk vLZmErmSw5AxpCQNXtWytrDIt1z34nkrlGOJ32iZQ9Ay5fP9OvU8YJnjSQl5fwGvrevd ML6/bnS8dQ4y0Mq+nap7aWz0BflkfmHnRVTU4CtVz4PnOOqNUQVNSxo8SGFDD5OJCzxC EUngCB2qq9ObH1d+KQlGomIzwq6Nr7j2+vL1I7gqF6Z7gIjIXSMnJ8lvlNu3oxwXnVpd lyEEr4PvwpK8k18z4bPOPQcfwSkw3G9RJ5f0ZlCJpXtjX06xEbpfl3sdMwe9IZIsrQwI /mmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=h9d33HEzxSlB3aWdhyISRr5Fj3AshfOOVeWRm3q0aSQ=; b=LxBI56VWWC0GctxDXCZyCXZB+enlgiPbez28DkzbuiCgaU3dq/Rzm9otxLWq+UobBB 3m/bssifqI1NRKhYDpDNnfLR1DwrSpGA6YKIeD/9oMvpH3FoNygQ4Qs8foXIKGgaTsXF EhBanZ+s054uzJoUMnrMYeDKI67PQeoZVIBrQ/kg2JPgR0M6gXafCvGJaAJY6c3Cybf3 RNwfWcPVsw/nSs0kAbY1FFlmD1YiwNy3axiqdhOhkH8fHHaKFk2WNfE4WGPZg6qqE6Ms 0TjMVRKPTc8XG7yrvexIS52Uzs1Csip4mLxhbKKJa9m5pSMJs4/9HTesW4F236DlwV1P gY1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=dKiKaiVu; dkim=neutral (no key) header.i=@suse.cz; 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 j67-20020a625546000000b00577c17000e1si29288601pfb.280.2023.01.03.01.54.19; Tue, 03 Jan 2023 01:54:26 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=dKiKaiVu; dkim=neutral (no key) header.i=@suse.cz; 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 S237247AbjACJox (ORCPT + 61 others); Tue, 3 Jan 2023 04:44:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbjACJow (ORCPT ); Tue, 3 Jan 2023 04:44:52 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C79DE0D5; Tue, 3 Jan 2023 01:44:51 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 120D83825B; Tue, 3 Jan 2023 09:44:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1672739090; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h9d33HEzxSlB3aWdhyISRr5Fj3AshfOOVeWRm3q0aSQ=; b=dKiKaiVuzqWQLU16r4Itx7y8XqtIAzQ6BeSjKjYn2lVdjgyp003gWZFV++vJ99AxyELn8E KoTn+Gdur7lM/i/CedKASpXAIwyJTi/ioEE9Sf0yug2xHzFeZ5BKXzEtVOX4DeXByfQwlU g/fNrf8iYSgouEtHzKHNdeGZ9crfRSA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1672739090; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h9d33HEzxSlB3aWdhyISRr5Fj3AshfOOVeWRm3q0aSQ=; b=ZnZqVLV55JADBFuAx1wD64/UKUmFDMQdkEfKp3jFPu3mDA7FX/yF63/jnLW5Oh1m0StGDo jLG3z1zpLJwo7/Bw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 033CE1392B; Tue, 3 Jan 2023 09:44:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bFfHABL5s2N1LQAAMHmgww (envelope-from ); Tue, 03 Jan 2023 09:44:50 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 83845A0742; Tue, 3 Jan 2023 10:44:49 +0100 (CET) Date: Tue, 3 Jan 2023 10:44:49 +0100 From: Jan Kara To: Kemeng Shi Cc: jack@suse.com, paolo.valente@linaro.org, axboe@kernel.dk, hch@lst.de, damien.lemoal@opensource.wdc.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 7/8] block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq Message-ID: <20230103094449.caq2hoftxdhmnv6e@quack3> References: <20230103095303.2223546-1-shikemeng@huaweicloud.com> <20230103095303.2223546-8-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230103095303.2223546-8-shikemeng@huaweicloud.com> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL 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 Tue 03-01-23 17:53:02, Kemeng Shi wrote: > We jump to tag only for returning current rq. Return directly to > remove this tag. > > Signed-off-by: Kemeng Shi Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > block/bfq-iosched.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c > index 9ff424c78e9b..a11be312ac77 100644 > --- a/block/bfq-iosched.c > +++ b/block/bfq-iosched.c > @@ -4966,7 +4966,7 @@ static struct request *bfq_dispatch_rq_from_bfqq(struct bfq_data *bfqd, > bfq_dispatch_remove(bfqd->queue, rq); > > if (bfqq != bfqd->in_service_queue) > - goto return_rq; > + return rq; > > /* > * If weight raising has to terminate for bfqq, then next > @@ -4986,12 +4986,9 @@ static struct request *bfq_dispatch_rq_from_bfqq(struct bfq_data *bfqd, > * belongs to CLASS_IDLE and other queues are waiting for > * service. > */ > - if (!(bfq_tot_busy_queues(bfqd) > 1 && bfq_class_idle(bfqq))) > - goto return_rq; > + if (bfq_tot_busy_queues(bfqd) > 1 && bfq_class_idle(bfqq)) > + bfq_bfqq_expire(bfqd, bfqq, false, BFQQE_BUDGET_EXHAUSTED); > > - bfq_bfqq_expire(bfqd, bfqq, false, BFQQE_BUDGET_EXHAUSTED); > - > -return_rq: > return rq; > } > > -- > 2.30.0 > -- Jan Kara SUSE Labs, CR