Skip to content

Commit

Permalink
sched/deadline: remove unused dl_bandwidth
Browse files Browse the repository at this point in the history
The default deadline bandwidth control structure has been removed since
commit eb77cf1 ("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 <linmiaohe@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://lore.kernel.org/r/20230524102514.407486-1-linmiaohe@huawei.com
  • Loading branch information
Miaohe Lin authored and Peter Zijlstra committed May 30, 2023
1 parent 7aa55f2 commit 3f4bf7a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions kernel/sched/deadline.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,6 @@ static inline int is_leftmost(struct task_struct *p, struct dl_rq *dl_rq)

static void init_dl_rq_bw_ratio(struct dl_rq *dl_rq);

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 = period;
dl_b->dl_runtime = runtime;
}

void init_dl_bw(struct dl_bw *dl_b)
{
raw_spin_lock_init(&dl_b->lock);
Expand Down
7 changes: 0 additions & 7 deletions kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,6 @@ struct rt_bandwidth {

void __dl_clear_params(struct task_struct *p);

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 >= 0;
Expand Down Expand Up @@ -2394,7 +2388,6 @@ extern struct rt_bandwidth def_rt_bandwidth;
extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime);
extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);

extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime);
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);

Expand Down

0 comments on commit 3f4bf7a

Please sign in to comment.