aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-01-27 06:29:13 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-01-27 06:29:37 -0500
commitf97b12cce6dea51880a6a89d4607c29c70a6a841 (patch)
tree1f05f6d39975bd213e7506e8a73ae0a59188c75e /kernel/sysctl.c
parentccaa8d657117bb1876d471bd91579d774106778d (diff)
parent1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff)
Merge commit 'v2.6.38-rc2' into core/locking
Reason: Update to mainline before adding the locking cleanup Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c93
1 files changed, 47 insertions, 46 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c33a1edb799f..bc86bb32e126 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -24,6 +24,7 @@
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <linux/sysctl.h> 25#include <linux/sysctl.h>
26#include <linux/signal.h> 26#include <linux/signal.h>
27#include <linux/printk.h>
27#include <linux/proc_fs.h> 28#include <linux/proc_fs.h>
28#include <linux/security.h> 29#include <linux/security.h>
29#include <linux/ctype.h> 30#include <linux/ctype.h>
@@ -245,10 +246,6 @@ static struct ctl_table root_table[] = {
245 .mode = 0555, 246 .mode = 0555,
246 .child = dev_table, 247 .child = dev_table,
247 }, 248 },
248/*
249 * NOTE: do not add new entries to this table unless you have read
250 * Documentation/sysctl/ctl_unnumbered.txt
251 */
252 { } 249 { }
253}; 250};
254 251
@@ -259,8 +256,6 @@ static int min_wakeup_granularity_ns; /* 0 usecs */
259static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */ 256static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
260static int min_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE; 257static int min_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE;
261static int max_sched_tunable_scaling = SCHED_TUNABLESCALING_END-1; 258static int max_sched_tunable_scaling = SCHED_TUNABLESCALING_END-1;
262static int min_sched_shares_ratelimit = 100000; /* 100 usec */
263static int max_sched_shares_ratelimit = NSEC_PER_SEC; /* 1 second */
264#endif 259#endif
265 260
266#ifdef CONFIG_COMPACTION 261#ifdef CONFIG_COMPACTION
@@ -305,15 +300,6 @@ static struct ctl_table kern_table[] = {
305 .extra2 = &max_wakeup_granularity_ns, 300 .extra2 = &max_wakeup_granularity_ns,
306 }, 301 },
307 { 302 {
308 .procname = "sched_shares_ratelimit",
309 .data = &sysctl_sched_shares_ratelimit,
310 .maxlen = sizeof(unsigned int),
311 .mode = 0644,
312 .proc_handler = sched_proc_update_handler,
313 .extra1 = &min_sched_shares_ratelimit,
314 .extra2 = &max_sched_shares_ratelimit,
315 },
316 {
317 .procname = "sched_tunable_scaling", 303 .procname = "sched_tunable_scaling",
318 .data = &sysctl_sched_tunable_scaling, 304 .data = &sysctl_sched_tunable_scaling,
319 .maxlen = sizeof(enum sched_tunable_scaling), 305 .maxlen = sizeof(enum sched_tunable_scaling),
@@ -323,14 +309,6 @@ static struct ctl_table kern_table[] = {
323 .extra2 = &max_sched_tunable_scaling, 309 .extra2 = &max_sched_tunable_scaling,
324 }, 310 },
325 { 311 {
326 .procname = "sched_shares_thresh",
327 .data = &sysctl_sched_shares_thresh,
328 .maxlen = sizeof(unsigned int),
329 .mode = 0644,
330 .proc_handler = proc_dointvec_minmax,
331 .extra1 = &zero,
332 },
333 {
334 .procname = "sched_migration_cost", 312 .procname = "sched_migration_cost",
335 .data = &sysctl_sched_migration_cost, 313 .data = &sysctl_sched_migration_cost,
336 .maxlen = sizeof(unsigned int), 314 .maxlen = sizeof(unsigned int),
@@ -352,6 +330,13 @@ static struct ctl_table kern_table[] = {
352 .proc_handler = proc_dointvec, 330 .proc_handler = proc_dointvec,
353 }, 331 },
354 { 332 {
333 .procname = "sched_shares_window",
334 .data = &sysctl_sched_shares_window,
335 .maxlen = sizeof(unsigned int),
336 .mode = 0644,
337 .proc_handler = proc_dointvec,
338 },
339 {
355 .procname = "timer_migration", 340 .procname = "timer_migration",
356 .data = &sysctl_timer_migration, 341 .data = &sysctl_timer_migration,
357 .maxlen = sizeof(unsigned int), 342 .maxlen = sizeof(unsigned int),
@@ -382,6 +367,17 @@ static struct ctl_table kern_table[] = {
382 .mode = 0644, 367 .mode = 0644,
383 .proc_handler = proc_dointvec, 368 .proc_handler = proc_dointvec,
384 }, 369 },
370#ifdef CONFIG_SCHED_AUTOGROUP
371 {
372 .procname = "sched_autogroup_enabled",
373 .data = &sysctl_sched_autogroup_enabled,
374 .maxlen = sizeof(unsigned int),
375 .mode = 0644,
376 .proc_handler = proc_dointvec,
377 .extra1 = &zero,
378 .extra2 = &one,
379 },
380#endif
385#ifdef CONFIG_PROVE_LOCKING 381#ifdef CONFIG_PROVE_LOCKING
386 { 382 {
387 .procname = "prove_locking", 383 .procname = "prove_locking",
@@ -702,6 +698,24 @@ static struct ctl_table kern_table[] = {
702 .extra1 = &zero, 698 .extra1 = &zero,
703 .extra2 = &ten_thousand, 699 .extra2 = &ten_thousand,
704 }, 700 },
701 {
702 .procname = "dmesg_restrict",
703 .data = &dmesg_restrict,
704 .maxlen = sizeof(int),
705 .mode = 0644,
706 .proc_handler = proc_dointvec_minmax,
707 .extra1 = &zero,
708 .extra2 = &one,
709 },
710 {
711 .procname = "kptr_restrict",
712 .data = &kptr_restrict,
713 .maxlen = sizeof(int),
714 .mode = 0644,
715 .proc_handler = proc_dointvec_minmax,
716 .extra1 = &zero,
717 .extra2 = &two,
718 },
705#endif 719#endif
706 { 720 {
707 .procname = "ngroups_max", 721 .procname = "ngroups_max",
@@ -736,21 +750,21 @@ static struct ctl_table kern_table[] = {
736 .extra1 = &zero, 750 .extra1 = &zero,
737 .extra2 = &one, 751 .extra2 = &one,
738 }, 752 },
739#endif
740#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) && !defined(CONFIG_LOCKUP_DETECTOR)
741 { 753 {
742 .procname = "unknown_nmi_panic", 754 .procname = "nmi_watchdog",
743 .data = &unknown_nmi_panic, 755 .data = &watchdog_enabled,
744 .maxlen = sizeof (int), 756 .maxlen = sizeof (int),
745 .mode = 0644, 757 .mode = 0644,
746 .proc_handler = proc_dointvec, 758 .proc_handler = proc_dowatchdog_enabled,
747 }, 759 },
760#endif
761#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
748 { 762 {
749 .procname = "nmi_watchdog", 763 .procname = "unknown_nmi_panic",
750 .data = &nmi_watchdog_enabled, 764 .data = &unknown_nmi_panic,
751 .maxlen = sizeof (int), 765 .maxlen = sizeof (int),
752 .mode = 0644, 766 .mode = 0644,
753 .proc_handler = proc_nmi_enabled, 767 .proc_handler = proc_dointvec,
754 }, 768 },
755#endif 769#endif
756#if defined(CONFIG_X86) 770#if defined(CONFIG_X86)
@@ -954,10 +968,6 @@ static struct ctl_table kern_table[] = {
954 .proc_handler = proc_dointvec, 968 .proc_handler = proc_dointvec,
955 }, 969 },
956#endif 970#endif
957/*
958 * NOTE: do not add new entries to this table unless you have read
959 * Documentation/sysctl/ctl_unnumbered.txt
960 */
961 { } 971 { }
962}; 972};
963 973
@@ -1318,11 +1328,6 @@ static struct ctl_table vm_table[] = {
1318 .extra2 = &one, 1328 .extra2 = &one,
1319 }, 1329 },
1320#endif 1330#endif
1321
1322/*
1323 * NOTE: do not add new entries to this table unless you have read
1324 * Documentation/sysctl/ctl_unnumbered.txt
1325 */
1326 { } 1331 { }
1327}; 1332};
1328 1333
@@ -1478,10 +1483,6 @@ static struct ctl_table fs_table[] = {
1478 .proc_handler = &pipe_proc_fn, 1483 .proc_handler = &pipe_proc_fn,
1479 .extra1 = &pipe_min_size, 1484 .extra1 = &pipe_min_size,
1480 }, 1485 },
1481/*
1482 * NOTE: do not add new entries to this table unless you have read
1483 * Documentation/sysctl/ctl_unnumbered.txt
1484 */
1485 { } 1486 { }
1486}; 1487};
1487 1488
@@ -2891,7 +2892,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
2891 } 2892 }
2892} 2893}
2893 2894
2894#else /* CONFIG_PROC_FS */ 2895#else /* CONFIG_PROC_SYSCTL */
2895 2896
2896int proc_dostring(struct ctl_table *table, int write, 2897int proc_dostring(struct ctl_table *table, int write,
2897 void __user *buffer, size_t *lenp, loff_t *ppos) 2898 void __user *buffer, size_t *lenp, loff_t *ppos)
@@ -2943,7 +2944,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2943} 2944}
2944 2945
2945 2946
2946#endif /* CONFIG_PROC_FS */ 2947#endif /* CONFIG_PROC_SYSCTL */
2947 2948
2948/* 2949/*
2949 * No sense putting this after each symbol definition, twice, 2950 * No sense putting this after each symbol definition, twice,