Commit 8c0944ce authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

sched/deadline: Rename __dl_clear() to __dl_sub()

__dl_sub() is more meaningful as a name, and is more consistent
with the naming of the dual function (__dl_add()).
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarLuca Abeni <luca.abeni@santannapisa.it>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarDaniel Bristot de Oliveira <bristot@redhat.com>
Cc: Juri Lelli <juri.lelli@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1504778971-13573-4-git-send-email-luca.abeni@santannapisa.itSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 295d6d5e
...@@ -242,7 +242,7 @@ static void task_non_contending(struct task_struct *p) ...@@ -242,7 +242,7 @@ static void task_non_contending(struct task_struct *p)
if (p->state == TASK_DEAD) if (p->state == TASK_DEAD)
sub_rq_bw(p->dl.dl_bw, &rq->dl); sub_rq_bw(p->dl.dl_bw, &rq->dl);
raw_spin_lock(&dl_b->lock); raw_spin_lock(&dl_b->lock);
__dl_clear(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p))); __dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
__dl_clear_params(p); __dl_clear_params(p);
raw_spin_unlock(&dl_b->lock); raw_spin_unlock(&dl_b->lock);
} }
...@@ -1209,7 +1209,7 @@ static enum hrtimer_restart inactive_task_timer(struct hrtimer *timer) ...@@ -1209,7 +1209,7 @@ static enum hrtimer_restart inactive_task_timer(struct hrtimer *timer)
} }
raw_spin_lock(&dl_b->lock); raw_spin_lock(&dl_b->lock);
__dl_clear(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p))); __dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
raw_spin_unlock(&dl_b->lock); raw_spin_unlock(&dl_b->lock);
__dl_clear_params(p); __dl_clear_params(p);
...@@ -2170,7 +2170,7 @@ static void set_cpus_allowed_dl(struct task_struct *p, ...@@ -2170,7 +2170,7 @@ static void set_cpus_allowed_dl(struct task_struct *p,
* until we complete the update. * until we complete the update.
*/ */
raw_spin_lock(&src_dl_b->lock); raw_spin_lock(&src_dl_b->lock);
__dl_clear(src_dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p))); __dl_sub(src_dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
raw_spin_unlock(&src_dl_b->lock); raw_spin_unlock(&src_dl_b->lock);
} }
...@@ -2448,7 +2448,7 @@ int sched_dl_overflow(struct task_struct *p, int policy, ...@@ -2448,7 +2448,7 @@ int sched_dl_overflow(struct task_struct *p, int policy,
if (dl_policy(policy) && !task_has_dl_policy(p) && if (dl_policy(policy) && !task_has_dl_policy(p) &&
!__dl_overflow(dl_b, cpus, 0, new_bw)) { !__dl_overflow(dl_b, cpus, 0, new_bw)) {
if (hrtimer_active(&p->dl.inactive_timer)) if (hrtimer_active(&p->dl.inactive_timer))
__dl_clear(dl_b, p->dl.dl_bw, cpus); __dl_sub(dl_b, p->dl.dl_bw, cpus);
__dl_add(dl_b, new_bw, cpus); __dl_add(dl_b, new_bw, cpus);
err = 0; err = 0;
} else if (dl_policy(policy) && task_has_dl_policy(p) && } else if (dl_policy(policy) && task_has_dl_policy(p) &&
...@@ -2460,7 +2460,7 @@ int sched_dl_overflow(struct task_struct *p, int policy, ...@@ -2460,7 +2460,7 @@ int sched_dl_overflow(struct task_struct *p, int policy,
* But this would require to set the task's "inactive * But this would require to set the task's "inactive
* timer" when the task is not inactive. * timer" when the task is not inactive.
*/ */
__dl_clear(dl_b, p->dl.dl_bw, cpus); __dl_sub(dl_b, p->dl.dl_bw, cpus);
__dl_add(dl_b, new_bw, cpus); __dl_add(dl_b, new_bw, cpus);
dl_change_utilization(p, new_bw); dl_change_utilization(p, new_bw);
err = 0; err = 0;
......
...@@ -226,7 +226,7 @@ struct dl_bw { ...@@ -226,7 +226,7 @@ struct dl_bw {
static inline void __dl_update(struct dl_bw *dl_b, s64 bw); static inline void __dl_update(struct dl_bw *dl_b, s64 bw);
static inline static inline
void __dl_clear(struct dl_bw *dl_b, u64 tsk_bw, int cpus) void __dl_sub(struct dl_bw *dl_b, u64 tsk_bw, int cpus)
{ {
dl_b->total_bw -= tsk_bw; dl_b->total_bw -= tsk_bw;
__dl_update(dl_b, (s32)tsk_bw / cpus); __dl_update(dl_b, (s32)tsk_bw / cpus);
......
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