Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5507
b: refs/heads/master
c: e310fd4
h: refs/heads/master
i:
  5505: 2b27d94
  5503: 25821ed
v: v3
  • Loading branch information
Martin J. Bligh authored and Linus Torvalds committed Jul 30, 2005
1 parent bafb0f4 commit a4189c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fa918b451f625870cd4275ca908b2392ee86a51
refs/heads/master: e310fd43256b3cf4d37f6447b8f7413ca744657a
21 changes: 10 additions & 11 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a4189c0

Please sign in to comment.