Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Increase SCHED_LOAD_SCALE resolution sched: Introduce SCHED_POWER_SCALE to scale cpu_power calculations sched: Cleanup set_load_weight()
This commit is contained in:
@@ -786,17 +786,39 @@ enum cpu_idle_type {
|
||||
};
|
||||
|
||||
/*
|
||||
* sched-domains (multiprocessor balancing) declarations:
|
||||
* Increase resolution of nice-level calculations for 64-bit architectures.
|
||||
* The extra resolution improves shares distribution and load balancing of
|
||||
* low-weight task groups (eg. nice +19 on an autogroup), deeper taskgroup
|
||||
* hierarchies, especially on larger systems. This is not a user-visible change
|
||||
* and does not change the user-interface for setting shares/weights.
|
||||
*
|
||||
* We increase resolution only if we have enough bits to allow this increased
|
||||
* resolution (i.e. BITS_PER_LONG > 32). The costs for increasing resolution
|
||||
* when BITS_PER_LONG <= 32 are pretty high and the returns do not justify the
|
||||
* increased costs.
|
||||
*/
|
||||
#if BITS_PER_LONG > 32
|
||||
# define SCHED_LOAD_RESOLUTION 10
|
||||
# define scale_load(w) ((w) << SCHED_LOAD_RESOLUTION)
|
||||
# define scale_load_down(w) ((w) >> SCHED_LOAD_RESOLUTION)
|
||||
#else
|
||||
# define SCHED_LOAD_RESOLUTION 0
|
||||
# define scale_load(w) (w)
|
||||
# define scale_load_down(w) (w)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Increase resolution of nice-level calculations:
|
||||
*/
|
||||
#define SCHED_LOAD_SHIFT 10
|
||||
#define SCHED_LOAD_SHIFT (10 + SCHED_LOAD_RESOLUTION)
|
||||
#define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT)
|
||||
|
||||
#define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE
|
||||
/*
|
||||
* Increase resolution of cpu_power calculations
|
||||
*/
|
||||
#define SCHED_POWER_SHIFT 10
|
||||
#define SCHED_POWER_SCALE (1L << SCHED_POWER_SHIFT)
|
||||
|
||||
/*
|
||||
* sched-domains (multiprocessor balancing) declarations:
|
||||
*/
|
||||
#ifdef CONFIG_SMP
|
||||
#define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */
|
||||
#define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */
|
||||
|
Reference in New Issue
Block a user