Skip to content

Commit 8c0944c

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
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: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Luca Abeni <luca.abeni@santannapisa.it> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Daniel 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.it Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 295d6d5 commit 8c0944c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

kernel/sched/deadline.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static void task_non_contending(struct task_struct *p)
242242
if (p->state == TASK_DEAD)
243243
sub_rq_bw(p->dl.dl_bw, &rq->dl);
244244
raw_spin_lock(&dl_b->lock);
245-
__dl_clear(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
245+
__dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
246246
__dl_clear_params(p);
247247
raw_spin_unlock(&dl_b->lock);
248248
}
@@ -1209,7 +1209,7 @@ static enum hrtimer_restart inactive_task_timer(struct hrtimer *timer)
12091209
}
12101210

12111211
raw_spin_lock(&dl_b->lock);
1212-
__dl_clear(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
1212+
__dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
12131213
raw_spin_unlock(&dl_b->lock);
12141214
__dl_clear_params(p);
12151215

@@ -2170,7 +2170,7 @@ static void set_cpus_allowed_dl(struct task_struct *p,
21702170
* until we complete the update.
21712171
*/
21722172
raw_spin_lock(&src_dl_b->lock);
2173-
__dl_clear(src_dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
2173+
__dl_sub(src_dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
21742174
raw_spin_unlock(&src_dl_b->lock);
21752175
}
21762176

@@ -2448,7 +2448,7 @@ int sched_dl_overflow(struct task_struct *p, int policy,
24482448
if (dl_policy(policy) && !task_has_dl_policy(p) &&
24492449
!__dl_overflow(dl_b, cpus, 0, new_bw)) {
24502450
if (hrtimer_active(&p->dl.inactive_timer))
2451-
__dl_clear(dl_b, p->dl.dl_bw, cpus);
2451+
__dl_sub(dl_b, p->dl.dl_bw, cpus);
24522452
__dl_add(dl_b, new_bw, cpus);
24532453
err = 0;
24542454
} else if (dl_policy(policy) && task_has_dl_policy(p) &&
@@ -2460,7 +2460,7 @@ int sched_dl_overflow(struct task_struct *p, int policy,
24602460
* But this would require to set the task's "inactive
24612461
* timer" when the task is not inactive.
24622462
*/
2463-
__dl_clear(dl_b, p->dl.dl_bw, cpus);
2463+
__dl_sub(dl_b, p->dl.dl_bw, cpus);
24642464
__dl_add(dl_b, new_bw, cpus);
24652465
dl_change_utilization(p, new_bw);
24662466
err = 0;

kernel/sched/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ struct dl_bw {
226226
static inline void __dl_update(struct dl_bw *dl_b, s64 bw);
227227

228228
static inline
229-
void __dl_clear(struct dl_bw *dl_b, u64 tsk_bw, int cpus)
229+
void __dl_sub(struct dl_bw *dl_b, u64 tsk_bw, int cpus)
230230
{
231231
dl_b->total_bw -= tsk_bw;
232232
__dl_update(dl_b, (s32)tsk_bw / cpus);

0 commit comments

Comments
 (0)