Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1794696rwn; Fri, 16 Sep 2022 00:24:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fiJ25KFKk3lIitR0lum0S91IFsd8szFTwHy6SjHRApfk544u3QPtD6loIujwVantgTOAo X-Received: by 2002:a17:90b:1d8b:b0:200:5367:5ecd with SMTP id pf11-20020a17090b1d8b00b0020053675ecdmr14970171pjb.165.1663313071730; Fri, 16 Sep 2022 00:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663313071; cv=none; d=google.com; s=arc-20160816; b=PkIX2htCJlNZOoU35tLwoPv+fQzkQsB2dj2iZjLs1O1xrYxL74mwsNMjXmKuFnrYGV 4sIarC4L1hZWPcOd+tOcsGx4W1ynY3JMWTeYPkhsfK6vs4eVrYv/Vhlh/8WpgNS/4T44 h+rdHFoZvRPU9sYOzqwOk77iyYw//k+Z168VV/IYnpFXDmkl1E3Gsq9zEL9XFtyZIpsn dzXeub/015ZMhFEnRo4A9HLja34L2qtz809aHtyM4zP51KAofywAkJQ/NlSJFUqu1dro 88xy/dixzicJW2Oqq3BarIjJ+voyievo5cXt1gVumaqgoH56Y9EWi3wmYui6HutWX35S 8W+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=86L+LdcLQ+XQWlCoKD/6lfcknqnaUcqCFEJ2Z/0i7lw=; b=EzhEXCfvN/52dWVyTnU5d2rFgvpbFs1QiMLcFvGpO/8aF3ivfBqv0MmWsJy/mVkLtW ln/jSTHf+FfNtNz3e9tM8hePgSWx1biCMAuHIh7MvefL7ZkcCL2WH+GTK8+SE6GQfKxE GOvhgg7gXty5zVujK7BtId+e1K5MrA2zvKCPxaFezTnMA1l8QwQmUvh0cBbz5tSF/DRr sTVsQTIihlEblxlcGiXzwJLOe9k60VczXW/+UAa2c2RsaE35lp35QQ7reGCO5v03/8k/ wES9JS0VJ6ISmt8bYG88QVMbNdWmW7TgUL/mJhwlXb2/IeF2P5NyV5L6WN/jad/K8ovr FOOw== 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 j125-20020a625583000000b00540488da78fsi2883989pfb.105.2022.09.16.00.24.20; Fri, 16 Sep 2022 00:24:31 -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 S229462AbiIPHJN (ORCPT + 99 others); Fri, 16 Sep 2022 03:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbiIPHIy (ORCPT ); Fri, 16 Sep 2022 03:08:54 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBB81A3D37; Fri, 16 Sep 2022 00:08:52 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4MTQ9s5lhxzlCKk; Fri, 16 Sep 2022 15:07:13 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP2 (Coremail) with SMTP id Syh0CgD3SXP9ICRj02qwAw--.33483S10; Fri, 16 Sep 2022 15:08:51 +0800 (CST) From: Yu Kuai To: tj@kernel.org, axboe@kernel.dk, paolo.valente@linaro.org, jack@suse.cz Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yukuai1@huaweicloud.com, yi.zhang@huawei.com Subject: [patch v11 6/6] block, bfq: cleanup __bfq_weights_tree_remove() Date: Fri, 16 Sep 2022 15:19:42 +0800 Message-Id: <20220916071942.214222-7-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220916071942.214222-1-yukuai1@huaweicloud.com> References: <20220916071942.214222-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgD3SXP9ICRj02qwAw--.33483S10 X-Coremail-Antispam: 1UD129KBjvJXoW7KF1UXr17Wr1fJF1UtF4fZrb_yoW5JF1Dp3 ZxKw4UW3WIkF4fXF48Ja1UZwn3trn5GrnrJas3u3yjgry7Arn2v3Z0y3WFvryFqrZ3Krsx Zr1Yg3s7JF1xGrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPF14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI kIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2 z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F 4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq 3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7 IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4U M4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2 kIc2xKxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E 14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIx kGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAF wI0_Cr0_Gr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJV W8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUOBTY UUUUU X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 From: Yu Kuai It's the same with bfq_weights_tree_remove() now. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara --- block/bfq-iosched.c | 11 +---------- block/bfq-iosched.h | 1 - block/bfq-wf2q.c | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 4ad4fa0dad4a..c14fb6b2a46d 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -944,7 +944,7 @@ void bfq_weights_tree_add(struct bfq_queue *bfqq) * See the comments to the function bfq_weights_tree_add() for considerations * about overhead. */ -void __bfq_weights_tree_remove(struct bfq_queue *bfqq) +void bfq_weights_tree_remove(struct bfq_queue *bfqq) { struct rb_root_cached *root; @@ -964,15 +964,6 @@ void __bfq_weights_tree_remove(struct bfq_queue *bfqq) bfq_put_queue(bfqq); } -/* - * Invoke __bfq_weights_tree_remove on bfqq and decrement the number - * of active groups for each queue's inactive parent entity. - */ -void bfq_weights_tree_remove(struct bfq_queue *bfqq) -{ - __bfq_weights_tree_remove(bfqq); -} - /* * Return expired entry, or NULL to just start from scratch in rbtree. */ diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h index 4bb58ab0c90a..7795aaf4454f 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h @@ -974,7 +974,6 @@ void bic_set_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq, bool is_sync); struct bfq_data *bic_to_bfqd(struct bfq_io_cq *bic); void bfq_pos_tree_add_move(struct bfq_data *bfqd, struct bfq_queue *bfqq); void bfq_weights_tree_add(struct bfq_queue *bfqq); -void __bfq_weights_tree_remove(struct bfq_queue *bfqq); void bfq_weights_tree_remove(struct bfq_queue *bfqq); void bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq, bool compensate, enum bfqq_expiration reason); diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index 124aaea6196e..5a02cb94d86e 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c @@ -770,7 +770,7 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, * there is a counter associated with the entity). */ if (prev_weight != new_weight && bfqq) - __bfq_weights_tree_remove(bfqq); + bfq_weights_tree_remove(bfqq); entity->weight = new_weight; /* * Add the entity, if it is not a weight-raised queue, -- 2.31.1