diff options
author | Arun R Bharadwaj <arun@linux.vnet.ibm.com> | 2009-04-16 02:45:34 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-05-13 10:52:42 -0400 |
commit | cd1bb94b4a0531e8211a3774f17de831f8285f76 (patch) | |
tree | 0a031dd2bd984cbfec88a3ced6b2c6e3326efb88 /kernel | |
parent | 5c333864a6ba811052d52ef14fbed056b9ac3512 (diff) |
timers: /proc/sys sysctl hook to enable timer migration
* Arun R Bharadwaj <arun@linux.vnet.ibm.com> [2009-04-16 12:11:36]:
This patch creates the /proc/sys sysctl interface at
/proc/sys/kernel/timer_migration
Timer migration is enabled by default.
To disable timer migration, when CONFIG_SCHED_DEBUG = y,
echo 0 > /proc/sys/kernel/timer_migration
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 2 | ||||
-rw-r--r-- | kernel/sysctl.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 9c5b4d3f97ab..7f1dd56af863 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -8731,6 +8731,8 @@ void __init sched_init_smp(void) | |||
8731 | } | 8731 | } |
8732 | #endif /* CONFIG_SMP */ | 8732 | #endif /* CONFIG_SMP */ |
8733 | 8733 | ||
8734 | const_debug unsigned int sysctl_timer_migration = 1; | ||
8735 | |||
8734 | int in_sched_functions(unsigned long addr) | 8736 | int in_sched_functions(unsigned long addr) |
8735 | { | 8737 | { |
8736 | return in_lock_functions(addr) || | 8738 | return in_lock_functions(addr) || |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index e3d2c7dd59b9..b3ce58137303 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -324,6 +324,14 @@ static struct ctl_table kern_table[] = { | |||
324 | .mode = 0644, | 324 | .mode = 0644, |
325 | .proc_handler = &proc_dointvec, | 325 | .proc_handler = &proc_dointvec, |
326 | }, | 326 | }, |
327 | { | ||
328 | .ctl_name = CTL_UNNUMBERED, | ||
329 | .procname = "timer_migration", | ||
330 | .data = &sysctl_timer_migration, | ||
331 | .maxlen = sizeof(unsigned int), | ||
332 | .mode = 0644, | ||
333 | .proc_handler = &proc_dointvec, | ||
334 | }, | ||
327 | #endif | 335 | #endif |
328 | { | 336 | { |
329 | .ctl_name = CTL_UNNUMBERED, | 337 | .ctl_name = CTL_UNNUMBERED, |