diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-04-19 21:10:50 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-05-07 13:14:51 +0200 |
commit | 8527632dc95472adb571701e852479531c0567a2 (patch) | |
tree | 658d9237beda390534cae46558b9c3e1adf4bf23 /kernel/sched/fair.c | |
parent | sched: Factor out load calculation code from sched/core.c --> sched/proc.c (diff) | |
download | linux-8527632dc95472adb571701e852479531c0567a2.tar.xz linux-8527632dc95472adb571701e852479531c0567a2.zip |
sched: Move update_load_*() methods from sched.h to fair.c
These inlines are only used by kernel/sched/fair.c so they do
not need to be present in the main kernel/sched/sched.h file.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1366398650-31599-3-git-send-email-paul.gortmaker@windriver.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c61a614465c8..08a554dd3e90 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -113,6 +113,24 @@ unsigned int __read_mostly sysctl_sched_shares_window = 10000000UL; unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; #endif +static inline void update_load_add(struct load_weight *lw, unsigned long inc) +{ + lw->weight += inc; + lw->inv_weight = 0; +} + +static inline void update_load_sub(struct load_weight *lw, unsigned long dec) +{ + lw->weight -= dec; + lw->inv_weight = 0; +} + +static inline void update_load_set(struct load_weight *lw, unsigned long w) +{ + lw->weight = w; + lw->inv_weight = 0; +} + /* * Increase the granularity value when there are more CPUs, * because with more CPUs the 'effective latency' as visible |