From nobody Sun Feb 8 08:36:40 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 691D6C7EE23 for ; Wed, 24 May 2023 02:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239060AbjEXCd4 (ORCPT ); Tue, 23 May 2023 22:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233493AbjEXCdz (ORCPT ); Tue, 23 May 2023 22:33:55 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D11FE6 for ; Tue, 23 May 2023 19:33:53 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QQwFM4H6ZzLmGj; Wed, 24 May 2023 10:32:23 +0800 (CST) Received: from huawei.com (10.175.104.170) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 24 May 2023 10:33:50 +0800 From: Miaohe Lin To: , , , CC: , , , , , , , Subject: [PATCH] sched/deadline: remove unused dl_bandwidth Date: Wed, 24 May 2023 18:25:14 +0800 Message-ID: <20230524102514.407486-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The default deadline bandwidth control structure has been removed since commit eb77cf1c151c ("sched/deadline: Remove unused def_dl_bandwidth") leading to unused init_dl_bandwidth() and struct dl_bandwidth. Remove them to clean up the code. Signed-off-by: Miaohe Lin Acked-by: Juri Lelli Reviewed-by: Daniel Bristot de Oliveira --- kernel/sched/deadline.c | 7 ------- kernel/sched/sched.h | 7 ------- 2 files changed, 14 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index fe983ed7bb12..7c98ca1f7300 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -482,13 +482,6 @@ static inline int is_leftmost(struct task_struct *p, s= truct dl_rq *dl_rq) =20 static void init_dl_rq_bw_ratio(struct dl_rq *dl_rq); =20 -void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime) -{ - raw_spin_lock_init(&dl_b->dl_runtime_lock); - dl_b->dl_period =3D period; - dl_b->dl_runtime =3D runtime; -} - void init_dl_bw(struct dl_bw *dl_b) { raw_spin_lock_init(&dl_b->lock); diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 1704763897d0..d79f4fd53600 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -286,12 +286,6 @@ struct rt_bandwidth { =20 void __dl_clear_params(struct task_struct *p); =20 -struct dl_bandwidth { - raw_spinlock_t dl_runtime_lock; - u64 dl_runtime; - u64 dl_period; -}; - static inline int dl_bandwidth_enabled(void) { return sysctl_sched_rt_runtime >=3D 0; @@ -2394,7 +2388,6 @@ extern struct rt_bandwidth def_rt_bandwidth; extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 r= untime); extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq); =20 -extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 r= untime); extern void init_dl_task_timer(struct sched_dl_entity *dl_se); extern void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se); =20 --=20 2.27.0