Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47397
b: refs/heads/master
c: a6af2bc
h: refs/heads/master
i:
  47395: 2af3a15
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Feb 11, 2007
1 parent 36804b6 commit 43313d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 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: e10a4437cb37c85f2df95432025b392d98aac2aa
refs/heads/master: a6af2bc3d5ce8722b9d09c5bdd5383c91c419653
20 changes: 13 additions & 7 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2877,20 +2877,23 @@ static void __init sort_node_map(void)
cmp_node_active_region, NULL);
}

/* Find the lowest pfn for a node. This depends on a sorted early_node_map */
/* Find the lowest pfn for a node */
unsigned long __init find_min_pfn_for_node(unsigned long nid)
{
int i;

/* Regions in the early_node_map can be in any order */
sort_node_map();
unsigned long min_pfn = ULONG_MAX;

/* Assuming a sorted map, the first range found has the starting pfn */
for_each_active_range_index_in_nid(i, nid)
return early_node_map[i].start_pfn;
min_pfn = min(min_pfn, early_node_map[i].start_pfn);

printk(KERN_WARNING "Could not find start_pfn for node %lu\n", nid);
return 0;
if (min_pfn == ULONG_MAX) {
printk(KERN_WARNING
"Could not find start_pfn for node %lu\n", nid);
return 0;
}

return min_pfn;
}

/**
Expand Down Expand Up @@ -2939,6 +2942,9 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn)
unsigned long nid;
enum zone_type i;

/* Sort early_node_map as initialisation assumes it is sorted */
sort_node_map();

/* Record where the zone boundaries are */
memset(arch_zone_lowest_possible_pfn, 0,
sizeof(arch_zone_lowest_possible_pfn));
Expand Down

0 comments on commit 43313d8

Please sign in to comment.