diff options
author | Mel Gorman <mel@csn.ul.ie> | 2008-04-28 05:12:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:18 -0400 |
commit | 0e88460da6ab7bb6a7ef83675412ed5b6315d741 (patch) | |
tree | 1feb4de2362e4998a0deeab66af1efb9c7b8bb34 /fs | |
parent | dac1d27bc8d5ca636d3014ecfdf94407031d1970 (diff) |
mm: introduce node_zonelist() for accessing the zonelist for a GFP mask
Introduce a node_zonelist() helper function. It is used to lookup the
appropriate zonelist given a node and a GFP mask. The patch on its own is a
cleanup but it helps clarify parts of the two-zonelist-per-node patchset. If
necessary, it can be merged with the next patch in this set without problems.
Reviewed-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 1dae94acb3fe..71358499bc57 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -361,13 +361,13 @@ void invalidate_bdev(struct block_device *bdev) | |||
361 | static void free_more_memory(void) | 361 | static void free_more_memory(void) |
362 | { | 362 | { |
363 | struct zonelist *zonelist; | 363 | struct zonelist *zonelist; |
364 | pg_data_t *pgdat; | 364 | int nid; |
365 | 365 | ||
366 | wakeup_pdflush(1024); | 366 | wakeup_pdflush(1024); |
367 | yield(); | 367 | yield(); |
368 | 368 | ||
369 | for_each_online_pgdat(pgdat) { | 369 | for_each_online_node(nid) { |
370 | zonelist = &pgdat->node_zonelists[gfp_zone(GFP_NOFS)]; | 370 | zonelist = node_zonelist(nid, GFP_NOFS); |
371 | if (zonelist->zones[0]) | 371 | if (zonelist->zones[0]) |
372 | try_to_free_pages(zonelist, 0, GFP_NOFS); | 372 | try_to_free_pages(zonelist, 0, GFP_NOFS); |
373 | } | 373 | } |