Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-09 Thread Tejun Heo
Hello, On Mon, Sep 09, 2013 at 07:56:34PM +0800, Wanpeng Li wrote: > If allocate from low to high as what this patchset done will occupy the > precious memory you mentioned? Yeah, and that'd be the reason why this behavior is dependent on a kernel option. That said, allocating some megs on top

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-09 Thread Tejun Heo
Hello, On Mon, Sep 09, 2013 at 07:56:34PM +0800, Wanpeng Li wrote: If allocate from low to high as what this patchset done will occupy the precious memory you mentioned? Yeah, and that'd be the reason why this behavior is dependent on a kernel option. That said, allocating some megs on top of

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-06 Thread H. Peter Anvin
Specifically there are a bunch of things which need to be below a certain address (which one varies.) Tejun Heo wrote: >Hello, Wanpeng. > >On Fri, Sep 06, 2013 at 04:58:11PM +0800, Wanpeng Li wrote: >> What's the root reason memblock alloc from high to low? To reduce >> fragmentation or ... >

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-06 Thread Tejun Heo
Hello, Wanpeng. On Fri, Sep 06, 2013 at 04:58:11PM +0800, Wanpeng Li wrote: > What's the root reason memblock alloc from high to low? To reduce > fragmentation or ... Because low memory tends to be more precious, it's just easier to pack everything towards the top so that we don't have to worry

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-06 Thread Tejun Heo
Hello, Wanpeng. On Fri, Sep 06, 2013 at 04:58:11PM +0800, Wanpeng Li wrote: What's the root reason memblock alloc from high to low? To reduce fragmentation or ... Because low memory tends to be more precious, it's just easier to pack everything towards the top so that we don't have to worry

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-06 Thread H. Peter Anvin
Specifically there are a bunch of things which need to be below a certain address (which one varies.) Tejun Heo t...@kernel.org wrote: Hello, Wanpeng. On Fri, Sep 06, 2013 at 04:58:11PM +0800, Wanpeng Li wrote: What's the root reason memblock alloc from high to low? To reduce fragmentation

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-05 Thread Tang Chen
Hi tj, On 09/05/2013 03:22 AM, Tejun Heo wrote: .. I'm expectedly happier with this approach but some overall review points. * I think patch splitting went a bit too far. e.g. it doesn't make much sense or helps anything to split "introduction of a param" from "the param doing

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-05 Thread Tang Chen
Hi tj, On 09/05/2013 03:22 AM, Tejun Heo wrote: .. I'm expectedly happier with this approach but some overall review points. * I think patch splitting went a bit too far. e.g. it doesn't make much sense or helps anything to split introduction of a param from the param doing

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-04 Thread Tejun Heo
Hello, On Tue, Aug 27, 2013 at 05:37:37PM +0800, Tang Chen wrote: > 1. Make memblock be able to allocate memory from low address to high address. >Also introduce low limit to prevent memblock allocating memory too low. > > 2. Improve init_mem_mapping() to support allocate page tables from

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-04 Thread Tejun Heo
Hello, On Tue, Aug 27, 2013 at 05:37:37PM +0800, Tang Chen wrote: 1. Make memblock be able to allocate memory from low address to high address. Also introduce low limit to prevent memblock allocating memory too low. 2. Improve init_mem_mapping() to support allocate page tables from low

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-01 Thread Tang Chen
Hi guys, Any comment to this patch-set ? And shall agree on using this solution suggested by Tejun ? Thanks. On 08/27/2013 05:37 PM, Tang Chen wrote: This patch-set is based on tj's suggestion, and not fully tested. Just for review and discussion. [Problem] The current Linux cannot

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-09-01 Thread Tang Chen
Hi guys, Any comment to this patch-set ? And shall agree on using this solution suggested by Tejun ? Thanks. On 08/27/2013 05:37 PM, Tang Chen wrote: This patch-set is based on tj's suggestion, and not fully tested. Just for review and discussion. [Problem] The current Linux cannot

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
Hi Wanpeng, On 08/29/2013 09:36 AM, Wanpeng Li wrote: .. Hi tj, Sorry for the trouble. Please refer to the following branch: https://github.com/imtangchen/linux.git movablenode-boot-option Could you post your testcase? So I can test it on x86 and powerpc machines. Sure. Some simple

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
On 08/28/2013 11:19 PM, Tejun Heo wrote: .. Doesn't apply to -master, -next or tip. Again, can you please include which tree and git commit the patches are against in the patch description? How is one supposed to know on top of which tree you're working? It is in your benefit to make

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tejun Heo
On Tue, Aug 27, 2013 at 05:37:37PM +0800, Tang Chen wrote: > Tang Chen (11): > memblock: Rename current_limit to current_limit_high in memblock. > memblock: Rename memblock_set_current_limit() to > memblock_set_current_limit_high(). > memblock: Introduce lowest limit in memblock. >

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
Hi Wanpeng On 08/28/2013 04:03 PM, Wanpeng Li wrote: Hi Tang, .. [About this patch-set] So this patch-set does the following: 1. Make memblock be able to allocate memory from low address to high address. I want to know if there is fragmentation degree difference here? Before this

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
Hi Wanpeng On 08/28/2013 04:03 PM, Wanpeng Li wrote: Hi Tang, .. [About this patch-set] So this patch-set does the following: 1. Make memblock be able to allocate memory from low address to high address. I want to know if there is fragmentation degree difference here? Before this

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tejun Heo
On Tue, Aug 27, 2013 at 05:37:37PM +0800, Tang Chen wrote: Tang Chen (11): memblock: Rename current_limit to current_limit_high in memblock. memblock: Rename memblock_set_current_limit() to memblock_set_current_limit_high(). memblock: Introduce lowest limit in memblock. memblock:

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
On 08/28/2013 11:19 PM, Tejun Heo wrote: .. Doesn't apply to -master, -next or tip. Again, can you please include which tree and git commit the patches are against in the patch description? How is one supposed to know on top of which tree you're working? It is in your benefit to make

Re: [PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-28 Thread Tang Chen
Hi Wanpeng, On 08/29/2013 09:36 AM, Wanpeng Li wrote: .. Hi tj, Sorry for the trouble. Please refer to the following branch: https://github.com/imtangchen/linux.git movablenode-boot-option Could you post your testcase? So I can test it on x86 and powerpc machines. Sure. Some simple

[PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-27 Thread Tang Chen
This patch-set is based on tj's suggestion, and not fully tested. Just for review and discussion. [Problem] The current Linux cannot migrate pages used by the kerenl because of the kernel direct mapping. In Linux kernel space, va = pa + PAGE_OFFSET. When the pa is changed, we cannot simply

[PATCH 00/11] x86, memblock: Allocate memory near kernel image before SRAT parsed.

2013-08-27 Thread Tang Chen
This patch-set is based on tj's suggestion, and not fully tested. Just for review and discussion. [Problem] The current Linux cannot migrate pages used by the kerenl because of the kernel direct mapping. In Linux kernel space, va = pa + PAGE_OFFSET. When the pa is changed, we cannot simply