diff options
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 68 |
1 files changed, 50 insertions, 18 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 29116652dca8..2a7b9d88706b 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | #include <linux/nfs_fs.h> | 46 | #include <linux/nfs_fs.h> |
| 47 | #include <linux/acpi.h> | 47 | #include <linux/acpi.h> |
| 48 | #include <linux/reboot.h> | 48 | #include <linux/reboot.h> |
| 49 | #include <linux/ftrace.h> | ||
| 49 | 50 | ||
| 50 | #include <asm/uaccess.h> | 51 | #include <asm/uaccess.h> |
| 51 | #include <asm/processor.h> | 52 | #include <asm/processor.h> |
| @@ -82,14 +83,18 @@ extern int maps_protect; | |||
| 82 | extern int sysctl_stat_interval; | 83 | extern int sysctl_stat_interval; |
| 83 | extern int latencytop_enabled; | 84 | extern int latencytop_enabled; |
| 84 | extern int sysctl_nr_open_min, sysctl_nr_open_max; | 85 | extern int sysctl_nr_open_min, sysctl_nr_open_max; |
| 86 | #ifdef CONFIG_RCU_TORTURE_TEST | ||
| 87 | extern int rcutorture_runnable; | ||
| 88 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | ||
| 85 | 89 | ||
| 86 | /* Constants used for minimum and maximum */ | 90 | /* Constants used for minimum and maximum */ |
| 87 | #if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM) | 91 | #if defined(CONFIG_HIGHMEM) || defined(CONFIG_DETECT_SOFTLOCKUP) |
| 88 | static int one = 1; | 92 | static int one = 1; |
| 89 | #endif | 93 | #endif |
| 90 | 94 | ||
| 91 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 95 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
| 92 | static int sixty = 60; | 96 | static int sixty = 60; |
| 97 | static int neg_one = -1; | ||
| 93 | #endif | 98 | #endif |
| 94 | 99 | ||
| 95 | #ifdef CONFIG_MMU | 100 | #ifdef CONFIG_MMU |
| @@ -106,7 +111,7 @@ static int min_percpu_pagelist_fract = 8; | |||
| 106 | 111 | ||
| 107 | static int ngroups_max = NGROUPS_MAX; | 112 | static int ngroups_max = NGROUPS_MAX; |
| 108 | 113 | ||
| 109 | #ifdef CONFIG_KMOD | 114 | #ifdef CONFIG_MODULES |
| 110 | extern char modprobe_path[]; | 115 | extern char modprobe_path[]; |
| 111 | #endif | 116 | #endif |
| 112 | #ifdef CONFIG_CHR_DEV_SG | 117 | #ifdef CONFIG_CHR_DEV_SG |
| @@ -132,8 +137,6 @@ extern int sysctl_userprocess_debug; | |||
| 132 | extern int spin_retry; | 137 | extern int spin_retry; |
| 133 | #endif | 138 | #endif |
| 134 | 139 | ||
| 135 | extern int sysctl_hz_timer; | ||
| 136 | |||
| 137 | #ifdef CONFIG_BSD_PROCESS_ACCT | 140 | #ifdef CONFIG_BSD_PROCESS_ACCT |
| 138 | extern int acct_parm[]; | 141 | extern int acct_parm[]; |
| 139 | #endif | 142 | #endif |
| @@ -266,6 +269,14 @@ static struct ctl_table kern_table[] = { | |||
| 266 | }, | 269 | }, |
| 267 | { | 270 | { |
| 268 | .ctl_name = CTL_UNNUMBERED, | 271 | .ctl_name = CTL_UNNUMBERED, |
| 272 | .procname = "sched_shares_ratelimit", | ||
| 273 | .data = &sysctl_sched_shares_ratelimit, | ||
| 274 | .maxlen = sizeof(unsigned int), | ||
| 275 | .mode = 0644, | ||
| 276 | .proc_handler = &proc_dointvec, | ||
| 277 | }, | ||
| 278 | { | ||
| 279 | .ctl_name = CTL_UNNUMBERED, | ||
| 269 | .procname = "sched_child_runs_first", | 280 | .procname = "sched_child_runs_first", |
| 270 | .data = &sysctl_sched_child_runs_first, | 281 | .data = &sysctl_sched_child_runs_first, |
| 271 | .maxlen = sizeof(unsigned int), | 282 | .maxlen = sizeof(unsigned int), |
| @@ -455,7 +466,17 @@ static struct ctl_table kern_table[] = { | |||
| 455 | .mode = 0644, | 466 | .mode = 0644, |
| 456 | .proc_handler = &proc_dointvec, | 467 | .proc_handler = &proc_dointvec, |
| 457 | }, | 468 | }, |
| 458 | #ifdef CONFIG_KMOD | 469 | #ifdef CONFIG_FTRACE |
| 470 | { | ||
| 471 | .ctl_name = CTL_UNNUMBERED, | ||
| 472 | .procname = "ftrace_enabled", | ||
| 473 | .data = &ftrace_enabled, | ||
| 474 | .maxlen = sizeof(int), | ||
| 475 | .mode = 0644, | ||
| 476 | .proc_handler = &ftrace_enable_sysctl, | ||
| 477 | }, | ||
| 478 | #endif | ||
| 479 | #ifdef CONFIG_MODULES | ||
| 459 | { | 480 | { |
| 460 | .ctl_name = KERN_MODPROBE, | 481 | .ctl_name = KERN_MODPROBE, |
| 461 | .procname = "modprobe", | 482 | .procname = "modprobe", |
| @@ -563,16 +584,6 @@ static struct ctl_table kern_table[] = { | |||
| 563 | .proc_handler = &proc_dointvec, | 584 | .proc_handler = &proc_dointvec, |
| 564 | }, | 585 | }, |
| 565 | #endif | 586 | #endif |
| 566 | #ifdef CONFIG_NO_IDLE_HZ | ||
| 567 | { | ||
| 568 | .ctl_name = KERN_HZ_TIMER, | ||
| 569 | .procname = "hz_timer", | ||
| 570 | .data = &sysctl_hz_timer, | ||
| 571 | .maxlen = sizeof(int), | ||
| 572 | .mode = 0644, | ||
| 573 | .proc_handler = &proc_dointvec, | ||
| 574 | }, | ||
| 575 | #endif | ||
| 576 | { | 587 | { |
| 577 | .ctl_name = KERN_S390_USER_DEBUG_LOGGING, | 588 | .ctl_name = KERN_S390_USER_DEBUG_LOGGING, |
| 578 | .procname = "userprocess_debug", | 589 | .procname = "userprocess_debug", |
| @@ -729,13 +740,24 @@ static struct ctl_table kern_table[] = { | |||
| 729 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 740 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
| 730 | { | 741 | { |
| 731 | .ctl_name = CTL_UNNUMBERED, | 742 | .ctl_name = CTL_UNNUMBERED, |
| 743 | .procname = "softlockup_panic", | ||
| 744 | .data = &softlockup_panic, | ||
| 745 | .maxlen = sizeof(int), | ||
| 746 | .mode = 0644, | ||
| 747 | .proc_handler = &proc_dointvec_minmax, | ||
| 748 | .strategy = &sysctl_intvec, | ||
| 749 | .extra1 = &zero, | ||
| 750 | .extra2 = &one, | ||
| 751 | }, | ||
| 752 | { | ||
| 753 | .ctl_name = CTL_UNNUMBERED, | ||
| 732 | .procname = "softlockup_thresh", | 754 | .procname = "softlockup_thresh", |
| 733 | .data = &softlockup_thresh, | 755 | .data = &softlockup_thresh, |
| 734 | .maxlen = sizeof(unsigned long), | 756 | .maxlen = sizeof(int), |
| 735 | .mode = 0644, | 757 | .mode = 0644, |
| 736 | .proc_handler = &proc_doulongvec_minmax, | 758 | .proc_handler = &proc_dointvec_minmax, |
| 737 | .strategy = &sysctl_intvec, | 759 | .strategy = &sysctl_intvec, |
| 738 | .extra1 = &one, | 760 | .extra1 = &neg_one, |
| 739 | .extra2 = &sixty, | 761 | .extra2 = &sixty, |
| 740 | }, | 762 | }, |
| 741 | { | 763 | { |
| @@ -813,6 +835,16 @@ static struct ctl_table kern_table[] = { | |||
| 813 | .child = key_sysctls, | 835 | .child = key_sysctls, |
| 814 | }, | 836 | }, |
| 815 | #endif | 837 | #endif |
| 838 | #ifdef CONFIG_RCU_TORTURE_TEST | ||
| 839 | { | ||
| 840 | .ctl_name = CTL_UNNUMBERED, | ||
| 841 | .procname = "rcutorture_runnable", | ||
| 842 | .data = &rcutorture_runnable, | ||
| 843 | .maxlen = sizeof(int), | ||
| 844 | .mode = 0644, | ||
| 845 | .proc_handler = &proc_dointvec, | ||
| 846 | }, | ||
| 847 | #endif | ||
| 816 | /* | 848 | /* |
| 817 | * NOTE: do not add new entries to this table unless you have read | 849 | * NOTE: do not add new entries to this table unless you have read |
| 818 | * Documentation/sysctl/ctl_unnumbered.txt | 850 | * Documentation/sysctl/ctl_unnumbered.txt |
