aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-01-16 16:21:04 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2011-01-16 16:21:04 -0500
commitf652f6c5b7cfdf139f4155d78f397e99ae1c4acc (patch)
tree71c6344688bf56ea6aaf18c586ab69ff4f077ade /kernel/sysctl.c
parent140e3008e7fe1526cbb12f8f07dbc273ac713b75 (diff)
parentc66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5 (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6 into for-linus
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c84
1 files changed, 38 insertions, 46 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5abfa1518554..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",
@@ -711,6 +707,15 @@ static struct ctl_table kern_table[] = {
711 .extra1 = &zero, 707 .extra1 = &zero,
712 .extra2 = &one, 708 .extra2 = &one,
713 }, 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 },
714#endif 719#endif
715 { 720 {
716 .procname = "ngroups_max", 721 .procname = "ngroups_max",
@@ -745,21 +750,21 @@ static struct ctl_table kern_table[] = {
745 .extra1 = &zero, 750 .extra1 = &zero,
746 .extra2 = &one, 751 .extra2 = &one,
747 }, 752 },
748#endif
749#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) && !defined(CONFIG_LOCKUP_DETECTOR)
750 { 753 {
751 .procname = "unknown_nmi_panic", 754 .procname = "nmi_watchdog",
752 .data = &unknown_nmi_panic, 755 .data = &watchdog_enabled,
753 .maxlen = sizeof (int), 756 .maxlen = sizeof (int),
754 .mode = 0644, 757 .mode = 0644,
755 .proc_handler = proc_dointvec, 758 .proc_handler = proc_dowatchdog_enabled,
756 }, 759 },
760#endif
761#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
757 { 762 {
758 .procname = "nmi_watchdog", 763 .procname = "unknown_nmi_panic",
759 .data = &nmi_watchdog_enabled, 764 .data = &unknown_nmi_panic,
760 .maxlen = sizeof (int), 765 .maxlen = sizeof (int),
761 .mode = 0644, 766 .mode = 0644,
762 .proc_handler = proc_nmi_enabled, 767 .proc_handler = proc_dointvec,
763 }, 768 },
764#endif 769#endif
765#if defined(CONFIG_X86) 770#if defined(CONFIG_X86)
@@ -963,10 +968,6 @@ static struct ctl_table kern_table[] = {
963 .proc_handler = proc_dointvec, 968 .proc_handler = proc_dointvec,
964 }, 969 },
965#endif 970#endif
966/*
967 * NOTE: do not add new entries to this table unless you have read
968 * Documentation/sysctl/ctl_unnumbered.txt
969 */
970 { } 971 { }
971}; 972};
972 973
@@ -1327,11 +1328,6 @@ static struct ctl_table vm_table[] = {
1327 .extra2 = &one, 1328 .extra2 = &one,
1328 }, 1329 },
1329#endif 1330#endif
1330
1331/*
1332 * NOTE: do not add new entries to this table unless you have read
1333 * Documentation/sysctl/ctl_unnumbered.txt
1334 */
1335 { } 1331 { }
1336}; 1332};
1337 1333
@@ -1487,10 +1483,6 @@ static struct ctl_table fs_table[] = {
1487 .proc_handler = &pipe_proc_fn, 1483 .proc_handler = &pipe_proc_fn,
1488 .extra1 = &pipe_min_size, 1484 .extra1 = &pipe_min_size,
1489 }, 1485 },
1490/*
1491 * NOTE: do not add new entries to this table unless you have read
1492 * Documentation/sysctl/ctl_unnumbered.txt
1493 */
1494 { } 1486 { }
1495}; 1487};
1496 1488
@@ -2900,7 +2892,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
2900 } 2892 }
2901} 2893}
2902 2894
2903#else /* CONFIG_PROC_FS */ 2895#else /* CONFIG_PROC_SYSCTL */
2904 2896
2905int proc_dostring(struct ctl_table *table, int write, 2897int proc_dostring(struct ctl_table *table, int write,
2906 void __user *buffer, size_t *lenp, loff_t *ppos) 2898 void __user *buffer, size_t *lenp, loff_t *ppos)
@@ -2952,7 +2944,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2952} 2944}
2953 2945
2954 2946
2955#endif /* CONFIG_PROC_FS */ 2947#endif /* CONFIG_PROC_SYSCTL */
2956 2948
2957/* 2949/*
2958 * No sense putting this after each symbol definition, twice, 2950 * No sense putting this after each symbol definition, twice,