Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] Move the fix to align node_end_pfns to a proper location

Move the fix to align node_end_pfns to a proper location. The earlier fix
made the node_remap_start_vaddr to get misaligned causing remap_numa_kva to
barf again :-/

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Ravikiran G Thirumalai and committed by
Linus Torvalds
4b0271eb 079da354

+11 -8
+11 -8
arch/i386/mm/discontig.c
··· 243 243 /* now the roundup is correct, convert to PAGE_SIZE pages */ 244 244 size = size * PTRS_PER_PTE; 245 245 246 - if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) { 247 - /* 248 - * Adjust size if node_end_pfn is not on a proper 249 - * pmd boundary. remap_numa_kva will barf otherwise. 250 - */ 251 - size += node_end_pfn[nid] & (PTRS_PER_PTE-1); 252 - } 253 - 254 246 /* 255 247 * Validate the region we are allocating only contains valid 256 248 * pages. ··· 262 270 reserve_pages += size; 263 271 printk("Shrinking node %d from %ld pages to %ld pages\n", 264 272 nid, node_end_pfn[nid], node_end_pfn[nid] - size); 273 + 274 + if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) { 275 + /* 276 + * Align node_end_pfn[] and node_remap_start_pfn[] to 277 + * pmd boundary. remap_numa_kva will barf otherwise. 278 + */ 279 + printk("Shrinking node %d further by %ld pages for proper alignment\n", 280 + nid, node_end_pfn[nid] & (PTRS_PER_PTE-1)); 281 + size += node_end_pfn[nid] & (PTRS_PER_PTE-1); 282 + } 283 + 265 284 node_end_pfn[nid] -= size; 266 285 node_remap_start_pfn[nid] = node_end_pfn[nid]; 267 286 }