On Tue, Jul 16, 2013 at 09:02:53PM +0800, Sam Ben wrote: > Hi Robin, > On 07/12/2013 10:03 AM, Robin Holt wrote: > >Currently, when free_all_bootmem() calls __free_pages_memory(), the > >number of contiguous pages that __free_pages_memory() passes to the > >buddy allocator is limited to BITS_PER_LONG. In order to be able to > > I fail to understand this. Why the original page number is BITS_PER_LONG? The mm/bootmem.c implementation uses a bitmap to keep track of free/reserved pages. It walks that bitmap in BITS_PER_LONG steps because it is the biggest chunk that is still trivial and cheap to check if all pages are free in it (chunk == ~0UL). nobootmem.c was written based on the bootmem.c interface, so it was probably adapted to keep things similar between the two, short of a pressing reason not to. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>