diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-15 05:10:26 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-15 05:10:26 +0200 |
commit | 20445cc9159089d9d6b88d7864578efb10eb6590 (patch) | |
tree | fbbb27fd8baa82c77ebc4e020e8ee9ddb57e3ae2 /mm/page_alloc.c | |
parent | [PATCH] hostap: Use ieee80211 WLAN_FC_GET_{TYPE,STYPE} (diff) | |
parent | Merge /spare/repo/linux-2.6/ (diff) | |
download | linux-20445cc9159089d9d6b88d7864578efb10eb6590.tar.xz linux-20445cc9159089d9d6b88d7864578efb10eb6590.zip |
/spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'mm/page_alloc.c')
-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; |