Re: [PATCH 7/7] Add /proc/sys/vm/compact_node for the explicit compaction of a node

2007-05-30 Thread Christoph Lameter
On Wed, 30 May 2007, Mel Gorman wrote: > > Check for node < nr_node_ids first. > Very good point. Will fix And check if the node is online first? F.e. node_online(node) ? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More

Re: [PATCH 7/7] Add /proc/sys/vm/compact_node for the explicit compaction of a node

2007-05-30 Thread Mel Gorman
On Tue, 29 May 2007, Christoph Lameter wrote: On Tue, 29 May 2007, Mel Gorman wrote: + if (nodeid < 0) + return -EINVAL; + + pgdat = NODE_DATA(nodeid); + if (!pgdat || pgdat->node_id != nodeid) + return -EINVAL; You cannot pass an arbitrary numbe

Re: [PATCH 7/7] Add /proc/sys/vm/compact_node for the explicit compaction of a node

2007-05-29 Thread Christoph Lameter
On Tue, 29 May 2007, Mel Gorman wrote: > + if (nodeid < 0) > + return -EINVAL; > + > + pgdat = NODE_DATA(nodeid); > + if (!pgdat || pgdat->node_id != nodeid) > + return -EINVAL; You cannot pass an arbitrary number to node data since NODE_DATA may do a simple a

[PATCH 7/7] Add /proc/sys/vm/compact_node for the explicit compaction of a node

2007-05-29 Thread Mel Gorman
This patch adds a special file /proc/sys/vm/compact_node. When a number is written to this file, each zone in that node will be compacted. sysfs did not look appropriate for exporting this trigger. While the current use of this trigger is for debugging, it is not clear if it should be only exporte