Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2434371ioo; Sat, 28 May 2022 13:33:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY4Aub5PYuyTWhfJfcWZG+0cuFosLqRrTBR9Qo4Mb1fyNtFsVcVojmKTI+fJdTlOp+FL8V X-Received: by 2002:a17:902:e78f:b0:163:7572:f83f with SMTP id cp15-20020a170902e78f00b001637572f83fmr15469294plb.60.1653770018427; Sat, 28 May 2022 13:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653770018; cv=none; d=google.com; s=arc-20160816; b=GmAd6uMBJCQ7M0u1qQ9v7KFdMJyzGbuT52f/ytPn1hT53soiS25UsEN6xZtvT0iQgx ni4FTc2NKpwnw1nWUH77mpRWtQcUPEP9+H5XQMJsotywmXi72GyHPnSU+Y1M2lu20XIu p231eHo5RKfh0Gx3+PqlIpL9Y/j/xUkDbwge5qqLVO4NNQhBl5C01PP4fLFg3TFmQ7KY vW2HjUvVXWUAxgCUrICavFhllTo1klNd5NBZbwHVQRLpJRov2uxSnPPrZ2Am/3j73KUq b/DWe3Qx14QTrhV8XD8ZtZAA3SZiMESB9OIhl0tkknUJV6ft9qGpgVk11xVlBhCk2hXy 5SBA== 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=HZkmdeQd5brVZOqI5u8aLaRp6VFbbg132+mKzfSP6oQ=; b=sTHhXJMWHYazMCXz5zfyHiVXKnjujeLZoUtsJYq4BT1VlKEvlyYOXS3MLSEJAkp0x4 JGNWe+OcGIHl5Ze4wRM3TAdoqPbbWciEkvJoloeIT9DndNLN8VNwbop9v5Ydc4bFc68V xooCTKcXco35Jg2Q2xm7RcohtCvgCZcrG6wvous57BUgXULL9OCHqi5+Zm5AQy72B6da BrvmPvoGyJYrRB5wASWaY75l87ot57XIMHPAg+LJoZ0661K/QDxSljpwWJqrz5j1vFPx pPCU9Q8lXBR47lBlRW09sE6s/uym57H5W9Uv4YVkSVWCjrrdpiDVOG8LAsVjNp1NT335 NQDA== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d12-20020a17090ab30c00b001dfbea9f5a2si6723449pjr.94.2022.05.28.13.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1F0D81A0746; Sat, 28 May 2022 12:36:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352836AbiE1Jqq (ORCPT + 99 others); Sat, 28 May 2022 05:46:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233336AbiE1Jqc (ORCPT ); Sat, 28 May 2022 05:46:32 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8126065D3; Sat, 28 May 2022 02:46:31 -0700 (PDT) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4L9Gx33w2cz1JCBM; Sat, 28 May 2022 17:44:55 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 28 May 2022 17:46:29 +0800 Received: from huawei.com (10.175.127.227) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 28 May 2022 17:46:29 +0800 From: Yu Kuai To: , , CC: , , , , Subject: [PATCH -next v3 2/6] block, bfq: cleanup __bfq_weights_tree_remove() Date: Sat, 28 May 2022 17:59:54 +0800 Message-ID: <20220528095958.270455-3-yukuai3@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220528095958.270455-1-yukuai3@huawei.com> References: <20220528095958.270455-1-yukuai3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 It's the same with bfq_weights_tree_remove() now. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara --- block/bfq-iosched.c | 13 +------------ block/bfq-iosched.h | 1 - block/bfq-wf2q.c | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 2315cfbe46e7..8c7020f8cdf2 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -944,8 +944,7 @@ void bfq_weights_tree_add(struct bfq_data *bfqd, 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_data *bfqd, - struct bfq_queue *bfqq) +void bfq_weights_tree_remove(struct bfq_data *bfqd, struct bfq_queue *bfqq) { struct rb_root_cached *root; @@ -965,16 +964,6 @@ void __bfq_weights_tree_remove(struct bfq_data *bfqd, 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_data *bfqd, - struct bfq_queue *bfqq) -{ - __bfq_weights_tree_remove(bfqd, 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 50c554134196..ecca2c0570ea 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h @@ -934,7 +934,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_data *bfqd, struct bfq_queue *bfqq); -void __bfq_weights_tree_remove(struct bfq_data *bfqd, struct bfq_queue *bfqq); void bfq_weights_tree_remove(struct bfq_data *bfqd, 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 03949c20494d..44905ed5175d 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c @@ -794,7 +794,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(bfqd, bfqq); + bfq_weights_tree_remove(bfqd, bfqq); entity->weight = new_weight; /* * Add the entity, if it is not a weight-raised queue, -- 2.31.1