diff options
author | Nikhil Rao <ncrao@google.com> | 2011-05-18 13:09:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-20 08:16:50 -0400 |
commit | 1399fa7807a1a5998bbf147e80668e9950661dfa (patch) | |
tree | dc4e1a97f50b8e7297c82f63e1ad2b15430b33d9 /include/linux/sched.h | |
parent | f05998d4b80632f2cc00f108da503066ef5d38d5 (diff) |
sched: Introduce SCHED_POWER_SCALE to scale cpu_power calculations
SCHED_LOAD_SCALE is used to increase nice resolution and to
scale cpu_power calculations in the scheduler. This patch
introduces SCHED_POWER_SCALE and converts all uses of
SCHED_LOAD_SCALE for scaling cpu_power to use SCHED_POWER_SCALE
instead.
This is a preparatory patch for increasing the resolution of
SCHED_LOAD_SCALE, and there is no need to increase resolution
for cpu_power calculations.
Signed-off-by: Nikhil Rao <ncrao@google.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Stephan Barwolf <stephan.baerwolf@tu-ilmenau.de>
Cc: Mike Galbraith <efault@gmx.de>
Link: http://lkml.kernel.org/r/1305738580-9924-3-git-send-email-ncrao@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 12211e1666e2..f2f440221b70 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -788,17 +788,20 @@ enum cpu_idle_type { | |||
788 | }; | 788 | }; |
789 | 789 | ||
790 | /* | 790 | /* |
791 | * sched-domains (multiprocessor balancing) declarations: | ||
792 | */ | ||
793 | |||
794 | /* | ||
795 | * Increase resolution of nice-level calculations: | 791 | * Increase resolution of nice-level calculations: |
796 | */ | 792 | */ |
797 | #define SCHED_LOAD_SHIFT 10 | 793 | #define SCHED_LOAD_SHIFT 10 |
798 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | 794 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) |
799 | 795 | ||
800 | #define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE | 796 | /* |
797 | * Increase resolution of cpu_power calculations | ||
798 | */ | ||
799 | #define SCHED_POWER_SHIFT 10 | ||
800 | #define SCHED_POWER_SCALE (1L << SCHED_POWER_SHIFT) | ||
801 | 801 | ||
802 | /* | ||
803 | * sched-domains (multiprocessor balancing) declarations: | ||
804 | */ | ||
802 | #ifdef CONFIG_SMP | 805 | #ifdef CONFIG_SMP |
803 | #define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */ | 806 | #define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */ |
804 | #define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */ | 807 | #define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */ |