Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5705
b: refs/heads/master
c: 4b0271e
h: refs/heads/master
i:
  5703: 6ba722c
v: v3
  • Loading branch information
Ravikiran G Thirumalai authored and Linus Torvalds committed Aug 7, 2005
1 parent fc7e54c commit 1f289d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: 079da354db3473b56eb938ca53a2cb0804ea9c8c
refs/heads/master: 4b0271eb9da5170ab5cadf2edf97c84712c82550
19 changes: 11 additions & 8 deletions trunk/arch/i386/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,6 @@ static unsigned long calculate_numa_remap_pages(void)
/* now the roundup is correct, convert to PAGE_SIZE pages */
size = size * PTRS_PER_PTE;

if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
/*
* Adjust size if node_end_pfn is not on a proper
* pmd boundary. remap_numa_kva will barf otherwise.
*/
size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
}

/*
* Validate the region we are allocating only contains valid
* pages.
Expand All @@ -270,6 +262,17 @@ static unsigned long calculate_numa_remap_pages(void)
reserve_pages += size;
printk("Shrinking node %d from %ld pages to %ld pages\n",
nid, node_end_pfn[nid], node_end_pfn[nid] - size);

if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
/*
* Align node_end_pfn[] and node_remap_start_pfn[] to
* pmd boundary. remap_numa_kva will barf otherwise.
*/
printk("Shrinking node %d further by %ld pages for proper alignment\n",
nid, node_end_pfn[nid] & (PTRS_PER_PTE-1));
size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
}

node_end_pfn[nid] -= size;
node_remap_start_pfn[nid] = node_end_pfn[nid];
}
Expand Down

0 comments on commit 1f289d2

Please sign in to comment.