diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-07-31 13:34:09 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-07-31 13:34:09 +1000 |
commit | 727e6e932d76f05f8691a32bbeabd1061b051a3b (patch) | |
tree | 07572434f36144336e4d4d05f68de840f45db96b /mm | |
parent | bdf242eeb0f69567fe43eba93889d80ecacbfe94 (diff) | |
parent | 889371f61fd5bb914d0331268f12432590cf7e85 (diff) | |
download | blackbird-op-linux-727e6e932d76f05f8691a32bbeabd1061b051a3b.tar.gz blackbird-op-linux-727e6e932d76f05f8691a32bbeabd1061b051a3b.zip |
Merge ../linux-2.6/
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 42bccfb8464d..8d088371196a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1061,20 +1061,19 @@ unsigned int nr_free_pages_pgdat(pg_data_t *pgdat) static unsigned int nr_free_zone_pages(int offset) { - pg_data_t *pgdat; + /* Just pick one node, since fallback list is circular */ + pg_data_t *pgdat = NODE_DATA(numa_node_id()); unsigned int sum = 0; - for_each_pgdat(pgdat) { - struct zonelist *zonelist = pgdat->node_zonelists + offset; - struct zone **zonep = zonelist->zones; - struct zone *zone; + struct zonelist *zonelist = pgdat->node_zonelists + offset; + struct zone **zonep = zonelist->zones; + struct zone *zone; - for (zone = *zonep++; zone; zone = *zonep++) { - unsigned long size = zone->present_pages; - unsigned long high = zone->pages_high; - if (size > high) - sum += size - high; - } + for (zone = *zonep++; zone; zone = *zonep++) { + unsigned long size = zone->present_pages; + unsigned long high = zone->pages_high; + if (size > high) + sum += size - high; } return sum; |