sched: cleanup, sched_granularity -> sched_min_granularity
authorIngo Molnar <mingo@elte.hu>
Sat, 25 Aug 2007 16:41:53 +0000 (18:41 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 25 Aug 2007 16:41:53 +0000 (18:41 +0200)
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>
include/linux/sched.h
kernel/sched.c
kernel/sched_fair.c
kernel/sysctl.c

index 322764e04052684cb8462633615267344036ac05..bd6a0320a770bb9b3123bd57e517136a162165d1 100644 (file)
@@ -1400,7 +1400,7 @@ static inline void idle_task_exit(void) {}
 extern void sched_idle_next(void);
 
 extern unsigned int sysctl_sched_latency;
-extern unsigned int sysctl_sched_granularity;
+extern unsigned int sysctl_sched_min_granularity;
 extern unsigned int sysctl_sched_wakeup_granularity;
 extern unsigned int sysctl_sched_batch_wakeup_granularity;
 extern unsigned int sysctl_sched_stat_granularity;
index da26f46d50d7b6e5930f3182971964b2a7eed914..a40ab657ad193cc7972b64833628ca2597b948bf 100644 (file)
@@ -4913,9 +4913,9 @@ static inline void sched_init_granularity(void)
        unsigned int factor = 1 + ilog2(num_online_cpus());
        const unsigned long limit = 100000000;
 
-       sysctl_sched_granularity *= factor;
-       if (sysctl_sched_granularity > limit)
-               sysctl_sched_granularity = limit;
+       sysctl_sched_min_granularity *= factor;
+       if (sysctl_sched_min_granularity > limit)
+               sysctl_sched_min_granularity = limit;
 
        sysctl_sched_latency *= factor;
        if (sysctl_sched_latency > limit)
index 0ba1e60f08d0f4f8a86ad20620365c011466c5f1..ee3771850aaf1548e41bdcf224e95301d797a5e1 100644 (file)
@@ -40,7 +40,7 @@ unsigned int sysctl_sched_latency __read_mostly = 20000000ULL;
  * Minimal preemption granularity for CPU-bound tasks:
  * (default: 2 msec, units: nanoseconds)
  */
-unsigned int sysctl_sched_granularity __read_mostly = 2000000ULL;
+unsigned int sysctl_sched_min_granularity __read_mostly = 2000000ULL;
 
 /*
  * SCHED_BATCH wake-up granularity.
@@ -258,7 +258,7 @@ sched_granularity(struct cfs_rq *cfs_rq)
 
        if (nr > 1) {
                gran = gran/nr - gran/nr/nr;
-               gran = max(gran, sysctl_sched_granularity);
+               gran = max(gran, sysctl_sched_min_granularity);
        }
 
        return gran;
index 9e3d2960faf534654f2b2ecc7d17549a725f77e0..6ace893c17c94dc737bda11fb63ee2811d34de79 100644 (file)
@@ -222,8 +222,8 @@ static ctl_table kern_table[] = {
 #ifdef CONFIG_SCHED_DEBUG
        {
                .ctl_name       = CTL_UNNUMBERED,
-               .procname       = "sched_granularity_ns",
-               .data           = &sysctl_sched_granularity,
+               .procname       = "sched_min_granularity_ns",
+               .data           = &sysctl_sched_min_granularity,
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = &proc_dointvec_minmax,