On Tue, 23 Mar 2010 12:25:43 +0000 Mel Gorman <mel@xxxxxxxxx> wrote: > This patch adds a proc file /proc/sys/vm/compact_memory. When an arbitrary > value is written to the file, all zones are compacted. The expected user > of such a trigger is a job scheduler that prepares the system before the > target application runs. > > > ... > > +/* This is the entry point for compacting all nodes via /proc/sys/vm */ > +int sysctl_compaction_handler(struct ctl_table *table, int write, > + void __user *buffer, size_t *length, loff_t *ppos) > +{ > + if (write) > + return compact_nodes(); > + > + return 0; > +} Neato. When I saw the overall description I was afraid that this stuff would be fiddling with kernel threads. The underlying compaction code can at times cause rather large amounts of memory to be put onto private lists, so it's lost to the rest of the kernel. What happens if 10000 processes simultaneously write to this thing? It's root-only so I guess the answer is "root becomes unemployed". I fear that the overall effect of this feature is that people will come up with ghastly hacks which keep on poking this tunable as a workaround for some VM shortcoming. This will lead to more shortcomings, and longer-lived ones. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>