diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-08-24 14:39:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-08-24 14:39:10 -0400 |
commit | ea0aa3b23a193d1fc5c982286edecd071af67d94 (patch) | |
tree | f0eaf77186b1d6056a34e9a87ab326f0847bdb1f /kernel/sched_fair.c | |
parent | a6f2994042cc2db9e507dc702ed0b5e2cc5890fe (diff) |
sched: simplify bonus calculation #2
current code:
delta = calc_delta_mine(delta_exec, curr->load.weight, lw);
delta = min((u64)delta, cfs_rq->sleeper_bonus);
Notice that this calc_delta_mine() line is exactly delta_mine, which
gives:
delta = min((u64)delta_mine, cfs_rq->sleeper_bonus);
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 5b2d97fcd80c..c078f1af721c 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -303,8 +303,7 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr) | |||
303 | delta_mine = calc_delta_mine(delta_exec, curr->load.weight, lw); | 303 | delta_mine = calc_delta_mine(delta_exec, curr->load.weight, lw); |
304 | 304 | ||
305 | if (cfs_rq->sleeper_bonus > sysctl_sched_granularity) { | 305 | if (cfs_rq->sleeper_bonus > sysctl_sched_granularity) { |
306 | delta = calc_delta_mine(delta_exec, curr->load.weight, lw); | 306 | delta = min((u64)delta_mine, cfs_rq->sleeper_bonus); |
307 | delta = min((u64)delta, cfs_rq->sleeper_bonus); | ||
308 | delta = min(delta, (unsigned long)( | 307 | delta = min(delta, (unsigned long)( |
309 | (long)sysctl_sched_runtime_limit - curr->wait_runtime)); | 308 | (long)sysctl_sched_runtime_limit - curr->wait_runtime)); |
310 | cfs_rq->sleeper_bonus -= delta; | 309 | cfs_rq->sleeper_bonus -= delta; |