aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-08-24 14:39:10 -0400
committerIngo Molnar <mingo@elte.hu>2007-08-24 14:39:10 -0400
commit71fd37146385c8255bfd370f33ca81fe8c81e5a5 (patch)
tree63ef23a5290202c5619d7e3f3f9428d29d5b7db1 /kernel
parent7c6c16f354cde4a48bd305b2587fc78257bcb936 (diff)
sched: remove HZ dependency from the granularity default
remove HZ dependency from the granularity default. Use 10 msec for the base granularity, 1 msec for wakeup granularity and 25 msec for batch wakeup granularity. (These defaults are close to the values that the default HZ=250 setting got previously, and thus it's the most common setting.) Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c2
-rw-r--r--kernel/sched_fair.c13
2 files changed, 7 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 96e9b82246d2..e95ff22ed174 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4923,7 +4923,7 @@ static inline void sched_init_granularity(void)
4923 if (sysctl_sched_granularity > gran_limit) 4923 if (sysctl_sched_granularity > gran_limit)
4924 sysctl_sched_granularity = gran_limit; 4924 sysctl_sched_granularity = gran_limit;
4925 4925
4926 sysctl_sched_runtime_limit = sysctl_sched_granularity * 8; 4926 sysctl_sched_runtime_limit = sysctl_sched_granularity * 5;
4927 sysctl_sched_wakeup_granularity = sysctl_sched_granularity / 2; 4927 sysctl_sched_wakeup_granularity = sysctl_sched_granularity / 2;
4928} 4928}
4929 4929
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index b5270dc98bef..6b0974c3fb67 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -19,7 +19,7 @@
19 19
20/* 20/*
21 * Preemption granularity: 21 * Preemption granularity:
22 * (default: 2 msec, units: nanoseconds) 22 * (default: 10 msec, units: nanoseconds)
23 * 23 *
24 * NOTE: this granularity value is not the same as the concept of 24 * NOTE: this granularity value is not the same as the concept of
25 * 'timeslice length' - timeslices in CFS will typically be somewhat 25 * 'timeslice length' - timeslices in CFS will typically be somewhat
@@ -31,18 +31,17 @@
31 * number of CPUs. (i.e. factor 2x on 2-way systems, 3x on 4-way 31 * number of CPUs. (i.e. factor 2x on 2-way systems, 3x on 4-way
32 * systems, 4x on 8-way systems, 5x on 16-way systems, etc.) 32 * systems, 4x on 8-way systems, 5x on 16-way systems, etc.)
33 */ 33 */
34unsigned int sysctl_sched_granularity __read_mostly = 2000000000ULL/HZ; 34unsigned int sysctl_sched_granularity __read_mostly = 10000000UL;
35 35
36/* 36/*
37 * SCHED_BATCH wake-up granularity. 37 * SCHED_BATCH wake-up granularity.
38 * (default: 10 msec, units: nanoseconds) 38 * (default: 25 msec, units: nanoseconds)
39 * 39 *
40 * This option delays the preemption effects of decoupled workloads 40 * This option delays the preemption effects of decoupled workloads
41 * and reduces their over-scheduling. Synchronous workloads will still 41 * and reduces their over-scheduling. Synchronous workloads will still
42 * have immediate wakeup/sleep latencies. 42 * have immediate wakeup/sleep latencies.
43 */ 43 */
44unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly = 44unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly = 25000000UL;
45 10000000000ULL/HZ;
46 45
47/* 46/*
48 * SCHED_OTHER wake-up granularity. 47 * SCHED_OTHER wake-up granularity.
@@ -52,12 +51,12 @@ unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly =
52 * and reduces their over-scheduling. Synchronous workloads will still 51 * and reduces their over-scheduling. Synchronous workloads will still
53 * have immediate wakeup/sleep latencies. 52 * have immediate wakeup/sleep latencies.
54 */ 53 */
55unsigned int sysctl_sched_wakeup_granularity __read_mostly = 1000000000ULL/HZ; 54unsigned int sysctl_sched_wakeup_granularity __read_mostly = 1000000UL;
56 55
57unsigned int sysctl_sched_stat_granularity __read_mostly; 56unsigned int sysctl_sched_stat_granularity __read_mostly;
58 57
59/* 58/*
60 * Initialized in sched_init_granularity(): 59 * Initialized in sched_init_granularity() [to 5 times the base granularity]:
61 */ 60 */
62unsigned int sysctl_sched_runtime_limit __read_mostly; 61unsigned int sysctl_sched_runtime_limit __read_mostly;
63 62