Commit ba4f7bc1 authored by Yu Chen's avatar Yu Chen Committed by Ingo Molnar

sched/deadline: Make two functions static

Since commit 06a76fe0 ("sched/deadline: Move DL related code
from sched/core.c to sched/deadline.c"), DL related code moved to
deadline.c.

Make the following two functions static since they're only used in
deadline.c:

	dl_change_utilization()
	init_dl_rq_bw_ratio()
Signed-off-by: default avatarYu Chen <chen.yu@easystack.cn>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20200228100329.16927-1-chen.yu@easystack.cn
parent 6f693dd5
...@@ -153,7 +153,7 @@ void sub_running_bw(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) ...@@ -153,7 +153,7 @@ void sub_running_bw(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
__sub_running_bw(dl_se->dl_bw, dl_rq); __sub_running_bw(dl_se->dl_bw, dl_rq);
} }
void dl_change_utilization(struct task_struct *p, u64 new_bw) static void dl_change_utilization(struct task_struct *p, u64 new_bw)
{ {
struct rq *rq; struct rq *rq;
...@@ -334,6 +334,8 @@ static inline int is_leftmost(struct task_struct *p, struct dl_rq *dl_rq) ...@@ -334,6 +334,8 @@ static inline int is_leftmost(struct task_struct *p, struct dl_rq *dl_rq)
return dl_rq->root.rb_leftmost == &dl_se->rb_node; return dl_rq->root.rb_leftmost == &dl_se->rb_node;
} }
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) void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime)
{ {
raw_spin_lock_init(&dl_b->dl_runtime_lock); raw_spin_lock_init(&dl_b->dl_runtime_lock);
...@@ -2496,7 +2498,7 @@ int sched_dl_global_validate(void) ...@@ -2496,7 +2498,7 @@ int sched_dl_global_validate(void)
return ret; return ret;
} }
void init_dl_rq_bw_ratio(struct dl_rq *dl_rq) static void init_dl_rq_bw_ratio(struct dl_rq *dl_rq)
{ {
if (global_rt_runtime() == RUNTIME_INF) { if (global_rt_runtime() == RUNTIME_INF) {
dl_rq->bw_ratio = 1 << RATIO_SHIFT; dl_rq->bw_ratio = 1 << RATIO_SHIFT;
......
...@@ -305,7 +305,6 @@ bool __dl_overflow(struct dl_bw *dl_b, int cpus, u64 old_bw, u64 new_bw) ...@@ -305,7 +305,6 @@ bool __dl_overflow(struct dl_bw *dl_b, int cpus, u64 old_bw, u64 new_bw)
dl_b->bw * cpus < dl_b->total_bw - old_bw + new_bw; dl_b->bw * cpus < dl_b->total_bw - old_bw + new_bw;
} }
extern void dl_change_utilization(struct task_struct *p, u64 new_bw);
extern void init_dl_bw(struct dl_bw *dl_b); extern void init_dl_bw(struct dl_bw *dl_b);
extern int sched_dl_global_validate(void); extern int sched_dl_global_validate(void);
extern void sched_dl_do_global(void); extern void sched_dl_do_global(void);
...@@ -1905,7 +1904,6 @@ extern struct dl_bandwidth def_dl_bandwidth; ...@@ -1905,7 +1904,6 @@ extern struct dl_bandwidth def_dl_bandwidth;
extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime); 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_task_timer(struct sched_dl_entity *dl_se);
extern void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se); extern void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se);
extern void init_dl_rq_bw_ratio(struct dl_rq *dl_rq);
#define BW_SHIFT 20 #define BW_SHIFT 20
#define BW_UNIT (1 << BW_SHIFT) #define BW_UNIT (1 << BW_SHIFT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment