Skip to content

Commit cd1bb94

Browse files
Arun R BharadwajKAGA-KOKO
authored andcommitted
timers: /proc/sys sysctl hook to enable timer migration
* Arun R Bharadwaj <[email protected]> [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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 5c33386 commit cd1bb94

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

include/linux/sched.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,7 @@ extern unsigned int sysctl_sched_child_runs_first;
17661766
extern unsigned int sysctl_sched_features;
17671767
extern unsigned int sysctl_sched_migration_cost;
17681768
extern unsigned int sysctl_sched_nr_migrate;
1769+
extern unsigned int sysctl_timer_migration;
17691770

17701771
int sched_nr_latency_handler(struct ctl_table *table, int write,
17711772
struct file *file, void __user *buffer, size_t *length,

kernel/sched.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8731,6 +8731,8 @@ void __init sched_init_smp(void)
87318731
}
87328732
#endif /* CONFIG_SMP */
87338733

8734+
const_debug unsigned int sysctl_timer_migration = 1;
8735+
87348736
int in_sched_functions(unsigned long addr)
87358737
{
87368738
return in_lock_functions(addr) ||

kernel/sysctl.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ static struct ctl_table kern_table[] = {
324324
.mode = 0644,
325325
.proc_handler = &proc_dointvec,
326326
},
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+
},
327335
#endif
328336
{
329337
.ctl_name = CTL_UNNUMBERED,

0 commit comments

Comments
 (0)