Messages in this thread |  | | | Date | Sat, 23 Jun 2012 11:58:02 -0700 | | Subject | Re: [patch 046/181] mm: remove sparsemem allocation details from the bootmem allocator | | From | Yinghai Lu <> |
| |
On Sat, Jun 23, 2012 at 2:17 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: > On Fri, Jun 22, 2012 at 07:05:45PM -0700, Yinghai Lu wrote: >> On Fri, Jun 22, 2012 at 6:11 PM, Yinghai Lu <yinghai@kernel.org> wrote: >> > On Tue, May 29, 2012 at 3:06 PM, <akpm@linux-foundation.org> wrote: >> >> From: Johannes Weiner <hannes@cmpxchg.org> >> >> Subject: mm: remove sparsemem allocation details from the bootmem allocator >> >> >> >> alloc_bootmem_section() derives allocation area constraints from the >> >> specified sparsemem section. This is a bit specific for a generic memory >> >> allocator like bootmem, though, so move it over to sparsemem. >> >> >> >> As __alloc_bootmem_node_nopanic() already retries failed allocations with >> >> relaxed area constraints, the fallback code in sparsemem.c can be removed >> >> and the code becomes a bit more compact overall. >> >> >> >> [akpm@linux-foundation.org: fix build] >> >> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> >> >> Acked-by: Tejun Heo <tj@kernel.org> >> >> Acked-by: David S. Miller <davem@davemloft.net> >> >> Cc: Yinghai Lu <yinghai@kernel.org> >> >> Cc: Gavin Shan <shangw@linux.vnet.ibm.com> >> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> >> > >> > hi, this one cause regression, will put usemap to last node's memory >> > instead of each node. >> >> attached patch fixes the problem. > > Sorry for the trouble and thanks for the patch! The number of bugs in > these three lines is too damn high... > yeah, i should run Andrew -mm early.
Andrew, Do you have git tree for your -mm? So I could merge it to my local tree. now i only have tip, pci, scsi, net, driver-core, usb, tty in my local tree.
... >> */ >> - goal = __pa(pgdat) & PAGE_SECTION_MASK; >> + goal = ((__pa(pgdat) >> PAGE_SHIFT) & PAGE_SECTION_MASK) << PAGE_SHIFT; > > How about > > goal = __pa(pgdat) & (PAGE_SECTION_MASK << PAGE_SHIFT); > > instead?
yeah.
After closely looking, looks like we need to revert the commit or apply -v2 patch.
old sequence is : try same section range at first. this commit will try [start_of_section, end_of_same_node_range], so could have chance to get
Yinghai [unhandled content-type:application/octet-stream] |  |