Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94051
b: refs/heads/master
c: 86f6dae
h: refs/heads/master
i:
  94049: 66f9c43
  94047: 9f690a8
v: v3
  • Loading branch information
Yasunori Goto authored and Linus Torvalds committed Apr 28, 2008
1 parent 3f80925 commit 24984ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 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: e70260aabea3af2a84b951e75166dcebe689b88e
refs/heads/master: 86f6dae1377523689bd8468fed2f2dd180fc0560
15 changes: 13 additions & 2 deletions trunk/mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,22 @@ static unsigned long *__kmalloc_section_usemap(void)

static unsigned long *__init sparse_early_usemap_alloc(unsigned long pnum)
{
unsigned long *usemap;
unsigned long *usemap, section_nr;
struct mem_section *ms = __nr_to_section(pnum);
int nid = sparse_early_nid(ms);
struct pglist_data *pgdat = NODE_DATA(nid);

usemap = alloc_bootmem_node(NODE_DATA(nid), usemap_size());
/*
* Usemap's page can't be freed until freeing other sections
* which use it. And, Pgdat has same feature.
* If section A has pgdat and section B has usemap for other
* sections (includes section A), both sections can't be removed,
* because there is the dependency each other.
* To solve above issue, this collects all usemap on the same section
* which has pgdat.
*/
section_nr = pfn_to_section_nr(__pa(pgdat) >> PAGE_SHIFT);
usemap = alloc_bootmem_section(usemap_size(), section_nr);
if (usemap)
return usemap;

Expand Down

0 comments on commit 24984ec

Please sign in to comment.