Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80205
b: refs/heads/master
c: bac4894
h: refs/heads/master
i:
  80203: 8886d74
v: v3
  • Loading branch information
Mel Gorman authored and Ingo Molnar committed Jan 30, 2008
1 parent 6fb8cb7 commit c1ee704
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 87e8407f9ad2a2df901c4b690ab0a2bf0fb168c5
refs/heads/master: bac4894dfa9c75c297b905e2ea88caaa5768f1e2
13 changes: 11 additions & 2 deletions trunk/arch/x86/mm/discontig_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ unsigned long __init setup_memory(void)
{
int nid;
unsigned long system_start_pfn, system_max_low_pfn;
unsigned long wasted_pages;

/*
* When mapping a NUMA machine we allocate the node_mem_map arrays
Expand All @@ -292,7 +293,14 @@ unsigned long __init setup_memory(void)
kva_start_pfn = PFN_DOWN(initrd_start - PAGE_OFFSET)
- kva_pages;
#endif
kva_start_pfn -= kva_start_pfn & (PTRS_PER_PTE-1);

/*
* We waste pages past at the end of the KVA for no good reason other
* than how it is located. This is bad.
*/
wasted_pages = kva_start_pfn & (PTRS_PER_PTE-1);
kva_start_pfn -= wasted_pages;
kva_pages += wasted_pages;

system_max_low_pfn = max_low_pfn = find_max_low_pfn();
printk("kva_start_pfn ~ %ld find_max_low_pfn() ~ %ld\n",
Expand Down Expand Up @@ -345,7 +353,8 @@ unsigned long __init setup_memory(void)

void __init numa_kva_reserve(void)
{
reserve_bootmem(PFN_PHYS(kva_start_pfn),PFN_PHYS(kva_pages));
if (kva_pages)
reserve_bootmem(PFN_PHYS(kva_start_pfn), PFN_PHYS(kva_pages));
}

void __init zone_sizes_init(void)
Expand Down

0 comments on commit c1ee704

Please sign in to comment.