git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linus' into cont_syslog
[safe/jmp/linux-2.6]
/
kernel
/
sysctl.c
diff --git
a/kernel/sysctl.c
b/kernel/sysctl.c
index
284f330
..
d24f761
100644
(file)
--- a/
kernel/sysctl.c
+++ b/
kernel/sysctl.c
@@
-263,6
+263,11
@@
static int min_sched_shares_ratelimit = 100000; /* 100 usec */
static int max_sched_shares_ratelimit = NSEC_PER_SEC; /* 1 second */
#endif
static int max_sched_shares_ratelimit = NSEC_PER_SEC; /* 1 second */
#endif
+#ifdef CONFIG_COMPACTION
+static int min_extfrag_threshold;
+static int max_extfrag_threshold = 1000;
+#endif
+
static struct ctl_table kern_table[] = {
{
.procname = "sched_child_runs_first",
static struct ctl_table kern_table[] = {
{
.procname = "sched_child_runs_first",
@@
-1130,6
+1135,16
@@
static struct ctl_table vm_table[] = {
.mode = 0200,
.proc_handler = sysctl_compaction_handler,
},
.mode = 0200,
.proc_handler = sysctl_compaction_handler,
},
+ {
+ .procname = "extfrag_threshold",
+ .data = &sysctl_extfrag_threshold,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = sysctl_extfrag_handler,
+ .extra1 = &min_extfrag_threshold,
+ .extra2 = &max_extfrag_threshold,
+ },
+
#endif /* CONFIG_COMPACTION */
{
.procname = "min_free_kbytes",
#endif /* CONFIG_COMPACTION */
{
.procname = "min_free_kbytes",
@@
-1456,12
+1471,12
@@
static struct ctl_table fs_table[] = {
},
#endif
{
},
#endif
{
- .procname = "pipe-max-
pages
",
- .data = &pipe_max_
pages
,
+ .procname = "pipe-max-
size
",
+ .data = &pipe_max_
size
,
.maxlen = sizeof(int),
.mode = 0644,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = &p
roc_dointvec_minmax
,
- .extra1 = &
two
,
+ .proc_handler = &p
ipe_proc_fn
,
+ .extra1 = &
pipe_min_size
,
},
/*
* NOTE: do not add new entries to this table unless you have read
},
/*
* NOTE: do not add new entries to this table unless you have read
@@
-2272,6
+2287,8
@@
static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
if (write) {
left -= proc_skip_spaces(&kbuf);
if (write) {
left -= proc_skip_spaces(&kbuf);
+ if (!left)
+ break;
err = proc_get_long(&kbuf, &left, &lval, &neg,
proc_wspace_sep,
sizeof(proc_wspace_sep), NULL);
err = proc_get_long(&kbuf, &left, &lval, &neg,
proc_wspace_sep,
sizeof(proc_wspace_sep), NULL);
@@
-2298,7
+2315,7
@@
static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
if (!write && !first && left && !err)
err = proc_put_char(&buffer, &left, '\n');
if (!write && !first && left && !err)
err = proc_put_char(&buffer, &left, '\n');
- if (write && !err)
+ if (write && !err
&& left
)
left -= proc_skip_spaces(&kbuf);
free:
if (write) {
left -= proc_skip_spaces(&kbuf);
free:
if (write) {