Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-23 Thread Johannes Weiner
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

Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-23 Thread Johannes Weiner
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

Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-16 Thread Sam Ben
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

Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-16 Thread Sam Ben
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

Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-12 Thread Yinghai Lu
On Fri, Jul 12, 2013 at 12:45 AM, Robin Holt wrote: > At the very least, I think we could change to: > static void __init __free_pages_memory(unsigned long start, unsigned long end) > { > int order; > > while (start < end) { > order = ffs(start); > >

Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-12 Thread Robin Holt
After sleeping on this, why can't we change __free_pages_bootmem to not take an order, but rather nr_pages? If we did that, then __free_pages_memory could just calculate nr_pages and call __free_pages_bootmem one time. I don't see why any of the callers of __free_pages_bootmem would not easily

Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-12 Thread Robin Holt
After sleeping on this, why can't we change __free_pages_bootmem to not take an order, but rather nr_pages? If we did that, then __free_pages_memory could just calculate nr_pages and call __free_pages_bootmem one time. I don't see why any of the callers of __free_pages_bootmem would not easily

Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-12 Thread Yinghai Lu
On Fri, Jul 12, 2013 at 12:45 AM, Robin Holt h...@sgi.com wrote: At the very least, I think we could change to: static void __init __free_pages_memory(unsigned long start, unsigned long end) { int order; while (start end) { order = ffs(start);

[RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-11 Thread Robin Holt
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 free only the first page of a 2MiB chunk, we need that to be increased to PTRS_PER_PMD.

[RFC 2/4] Have __free_pages_memory() free in larger chunks.

2013-07-11 Thread Robin Holt
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 free only the first page of a 2MiB chunk, we need that to be increased to PTRS_PER_PMD.