aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-08-25 12:41:53 -0400
committerIngo Molnar <mingo@elte.hu>2007-08-25 12:41:53 -0400
commit172ac3dbb7d3e528ac53d08a34df88d1ac53c534 (patch)
treef17de2a4a7a562792fd85a14bb1c278bb8c40804
parent218050855ece4e923106ab614ac65afa0f618df3 (diff)
sched: cleanup, sched_granularity -> sched_min_granularity
due to adaptive granularity scheduling the role of sched_granularity has changed to "minimum granularity", so rename the variable (and the tunable) accordingly. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
-rw-r--r--include/linux/sched.h2
-rw-r--r--kernel/sched.c6
-rw-r--r--kernel/sched_fair.c4
-rw-r--r--kernel/sysctl.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 322764e04052..bd6a0320a770 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1400,7 +1400,7 @@ static inline void idle_task_exit(void) {}
1400extern void sched_idle_next(void); 1400extern void sched_idle_next(void);
1401 1401
1402extern unsigned int sysctl_sched_latency; 1402extern unsigned int sysctl_sched_latency;
1403extern unsigned int sysctl_sched_granularity; 1403extern unsigned int sysctl_sched_min_granularity;
1404extern unsigned int sysctl_sched_wakeup_granularity; 1404extern unsigned int sysctl_sched_wakeup_granularity;
1405extern unsigned int sysctl_sched_batch_wakeup_granularity; 1405extern unsigned int sysctl_sched_batch_wakeup_granularity;
1406extern unsigned int sysctl_sched_stat_granularity; 1406extern unsigned int sysctl_sched_stat_granularity;
diff --git a/kernel/sched.c b/kernel/sched.c
index da26f46d50d7..a40ab657ad19 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4913,9 +4913,9 @@ static inline void sched_init_granularity(void)
4913 unsigned int factor = 1 + ilog2(num_online_cpus()); 4913 unsigned int factor = 1 + ilog2(num_online_cpus());
4914 const unsigned long limit = 100000000; 4914 const unsigned long limit = 100000000;
4915 4915
4916 sysctl_sched_granularity *= factor; 4916 sysctl_sched_min_granularity *= factor;
4917 if (sysctl_sched_granularity > limit) 4917 if (sysctl_sched_min_granularity > limit)
4918 sysctl_sched_granularity = limit; 4918 sysctl_sched_min_granularity = limit;
4919 4919
4920 sysctl_sched_latency *= factor; 4920 sysctl_sched_latency *= factor;
4921 if (sysctl_sched_latency > limit) 4921 if (sysctl_sched_latency > limit)
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 0ba1e60f08d0..ee3771850aaf 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -40,7 +40,7 @@ unsigned int sysctl_sched_latency __read_mostly = 20000000ULL;
40 * Minimal preemption granularity for CPU-bound tasks: 40 * Minimal preemption granularity for CPU-bound tasks:
41 * (default: 2 msec, units: nanoseconds) 41 * (default: 2 msec, units: nanoseconds)
42 */ 42 */
43unsigned int sysctl_sched_granularity __read_mostly = 2000000ULL; 43unsigned int sysctl_sched_min_granularity __read_mostly = 2000000ULL;
44 44
45/* 45/*
46 * SCHED_BATCH wake-up granularity. 46 * SCHED_BATCH wake-up granularity.
@@ -258,7 +258,7 @@ sched_granularity(struct cfs_rq *cfs_rq)
258 258
259 if (nr > 1) { 259 if (nr > 1) {
260 gran = gran/nr - gran/nr/nr; 260 gran = gran/nr - gran/nr/nr;
261 gran = max(gran, sysctl_sched_granularity); 261 gran = max(gran, sysctl_sched_min_granularity);
262 } 262 }
263 263
264 return gran; 264 return gran;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9e3d2960faf5..6ace893c17c9 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -222,8 +222,8 @@ static ctl_table kern_table[] = {
222#ifdef CONFIG_SCHED_DEBUG 222#ifdef CONFIG_SCHED_DEBUG
223 { 223 {
224 .ctl_name = CTL_UNNUMBERED, 224 .ctl_name = CTL_UNNUMBERED,
225 .procname = "sched_granularity_ns", 225 .procname = "sched_min_granularity_ns",
226 .data = &sysctl_sched_granularity, 226 .data = &sysctl_sched_min_granularity,
227 .maxlen = sizeof(unsigned int), 227 .maxlen = sizeof(unsigned int),
228 .mode = 0644, 228 .mode = 0644,
229 .proc_handler = &proc_dointvec_minmax, 229 .proc_handler = &proc_dointvec_minmax,