diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 1a631ba684a4..0dfaa47d7cb6 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -50,7 +50,7 @@ | |||
50 | #include <linux/reboot.h> | 50 | #include <linux/reboot.h> |
51 | #include <linux/ftrace.h> | 51 | #include <linux/ftrace.h> |
52 | #include <linux/slow-work.h> | 52 | #include <linux/slow-work.h> |
53 | #include <linux/perf_counter.h> | 53 | #include <linux/perf_event.h> |
54 | 54 | ||
55 | #include <asm/uaccess.h> | 55 | #include <asm/uaccess.h> |
56 | #include <asm/processor.h> | 56 | #include <asm/processor.h> |
@@ -106,6 +106,9 @@ static int __maybe_unused one = 1; | |||
106 | static int __maybe_unused two = 2; | 106 | static int __maybe_unused two = 2; |
107 | static unsigned long one_ul = 1; | 107 | static unsigned long one_ul = 1; |
108 | static int one_hundred = 100; | 108 | static int one_hundred = 100; |
109 | #ifdef CONFIG_PRINTK | ||
110 | static int ten_thousand = 10000; | ||
111 | #endif | ||
109 | 112 | ||
110 | /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ | 113 | /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ |
111 | static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; | 114 | static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; |
@@ -722,6 +725,17 @@ static struct ctl_table kern_table[] = { | |||
722 | .mode = 0644, | 725 | .mode = 0644, |
723 | .proc_handler = &proc_dointvec, | 726 | .proc_handler = &proc_dointvec, |
724 | }, | 727 | }, |
728 | { | ||
729 | .ctl_name = CTL_UNNUMBERED, | ||
730 | .procname = "printk_delay", | ||
731 | .data = &printk_delay_msec, | ||
732 | .maxlen = sizeof(int), | ||
733 | .mode = 0644, | ||
734 | .proc_handler = &proc_dointvec_minmax, | ||
735 | .strategy = &sysctl_intvec, | ||
736 | .extra1 = &zero, | ||
737 | .extra2 = &ten_thousand, | ||
738 | }, | ||
725 | #endif | 739 | #endif |
726 | { | 740 | { |
727 | .ctl_name = KERN_NGROUPS_MAX, | 741 | .ctl_name = KERN_NGROUPS_MAX, |
@@ -964,28 +978,28 @@ static struct ctl_table kern_table[] = { | |||
964 | .child = slow_work_sysctls, | 978 | .child = slow_work_sysctls, |
965 | }, | 979 | }, |
966 | #endif | 980 | #endif |
967 | #ifdef CONFIG_PERF_COUNTERS | 981 | #ifdef CONFIG_PERF_EVENTS |
968 | { | 982 | { |
969 | .ctl_name = CTL_UNNUMBERED, | 983 | .ctl_name = CTL_UNNUMBERED, |
970 | .procname = "perf_counter_paranoid", | 984 | .procname = "perf_event_paranoid", |
971 | .data = &sysctl_perf_counter_paranoid, | 985 | .data = &sysctl_perf_event_paranoid, |
972 | .maxlen = sizeof(sysctl_perf_counter_paranoid), | 986 | .maxlen = sizeof(sysctl_perf_event_paranoid), |
973 | .mode = 0644, | 987 | .mode = 0644, |
974 | .proc_handler = &proc_dointvec, | 988 | .proc_handler = &proc_dointvec, |
975 | }, | 989 | }, |
976 | { | 990 | { |
977 | .ctl_name = CTL_UNNUMBERED, | 991 | .ctl_name = CTL_UNNUMBERED, |
978 | .procname = "perf_counter_mlock_kb", | 992 | .procname = "perf_event_mlock_kb", |
979 | .data = &sysctl_perf_counter_mlock, | 993 | .data = &sysctl_perf_event_mlock, |
980 | .maxlen = sizeof(sysctl_perf_counter_mlock), | 994 | .maxlen = sizeof(sysctl_perf_event_mlock), |
981 | .mode = 0644, | 995 | .mode = 0644, |
982 | .proc_handler = &proc_dointvec, | 996 | .proc_handler = &proc_dointvec, |
983 | }, | 997 | }, |
984 | { | 998 | { |
985 | .ctl_name = CTL_UNNUMBERED, | 999 | .ctl_name = CTL_UNNUMBERED, |
986 | .procname = "perf_counter_max_sample_rate", | 1000 | .procname = "perf_event_max_sample_rate", |
987 | .data = &sysctl_perf_counter_sample_rate, | 1001 | .data = &sysctl_perf_event_sample_rate, |
988 | .maxlen = sizeof(sysctl_perf_counter_sample_rate), | 1002 | .maxlen = sizeof(sysctl_perf_event_sample_rate), |
989 | .mode = 0644, | 1003 | .mode = 0644, |
990 | .proc_handler = &proc_dointvec, | 1004 | .proc_handler = &proc_dointvec, |
991 | }, | 1005 | }, |