diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-25 11:25:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-25 11:25:29 -0700 |
commit | a3ce8ea66ae9379235334a989ed78a1ea518b0b3 (patch) | |
tree | 88bef2140c00ec607f2d222e953ed380999eb4a6 /kernel/sched.c | |
parent | f2154eef2a926435cdf79156cd361092d6cba91e (diff) | |
parent | 172ac3dbb7d3e528ac53d08a34df88d1ac53c534 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
sched: cleanup, sched_granularity -> sched_min_granularity
sched: adaptive scheduler granularity
sched: fix CONFIG_SCHED_DEBUG dependency of lockdep sysctls
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 6798328a2e0..a40ab657ad1 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4911,14 +4911,18 @@ cpumask_t nohz_cpu_mask = CPU_MASK_NONE; static inline void sched_init_granularity(void) { unsigned int factor = 1 + ilog2(num_online_cpus()); - const unsigned long gran_limit = 100000000; + const unsigned long limit = 100000000; - sysctl_sched_granularity *= factor; - if (sysctl_sched_granularity > gran_limit) - sysctl_sched_granularity = gran_limit; + sysctl_sched_min_granularity *= factor; + if (sysctl_sched_min_granularity > limit) + sysctl_sched_min_granularity = limit; - sysctl_sched_runtime_limit = sysctl_sched_granularity * 5; - sysctl_sched_wakeup_granularity = sysctl_sched_granularity / 2; + sysctl_sched_latency *= factor; + if (sysctl_sched_latency > limit) + sysctl_sched_latency = limit; + + sysctl_sched_runtime_limit = sysctl_sched_latency * 5; + sysctl_sched_wakeup_granularity = sysctl_sched_latency / 2; } #ifdef CONFIG_SMP |