Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-29 Thread Tejun Heo
Hello, Tang. On Mon, Jul 29, 2013 at 10:12:40AM +0800, Tang Chen wrote: > So the point is, how to mark the hotpluggable regions and at the > same time, make > ACPI and memblock parts independent, right ? No, not at all. My point is that the roles need to be divided clearly. The firmware (be tha

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-28 Thread Tang Chen
On 07/26/2013 06:26 PM, Tejun Heo wrote: On Fri, Jul 26, 2013 at 11:45:36AM +0800, Tang Chen wrote: I just don't want to any new variables to store the hotpluggable regions. But without a new shared variable, it seems difficult to achieve the goal you said below. Why can't it be done with the

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-26 Thread Tejun Heo
On Fri, Jul 26, 2013 at 06:26:09AM -0400, Tejun Heo wrote: > > So how about this. > > 1. Introduce a new global list used to store hotpluggable regions. > > 2. On acpi side, find and fulfill the list. > > 3. On memblock side, make the default allocation function stay away from > >these regions.

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-26 Thread Tejun Heo
On Fri, Jul 26, 2013 at 11:45:36AM +0800, Tang Chen wrote: > I just don't want to any new variables to store the hotpluggable regions. > But without a new shared variable, it seems difficult to achieve the goal > you said below. Why can't it be done with the .flags field that was added anyway? >

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-25 Thread Tang Chen
On 07/25/2013 11:17 PM, Tejun Heo wrote: Hello, On Thu, Jul 25, 2013 at 10:13:21AM +0800, Tang Chen wrote: This is rather hacky. Why not just introduce MEMBLOCK_NO_MERGE flag? The original thinking is to merge regions with the same nid. So I used pxm. And then refresh the nid field when nids

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-25 Thread Tejun Heo
Hello, On Thu, Jul 25, 2013 at 10:13:21AM +0800, Tang Chen wrote: > >>This is rather hacky. Why not just introduce MEMBLOCK_NO_MERGE flag? > > The original thinking is to merge regions with the same nid. So I used pxm. > And then refresh the nid field when nids are mapped. > > I will try to int

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-24 Thread Tang Chen
On 07/24/2013 05:32 AM, Tejun Heo wrote: On Tue, Jul 23, 2013 at 04:55:57PM -0400, Tejun Heo wrote: On Fri, Jul 19, 2013 at 03:59:27PM +0800, Tang Chen wrote: + /* +* In such an early time, we don't have nid. We specify pxm +* instead of MAX_NUMNODE

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-23 Thread Tejun Heo
On Tue, Jul 23, 2013 at 04:55:57PM -0400, Tejun Heo wrote: > On Fri, Jul 19, 2013 at 03:59:27PM +0800, Tang Chen wrote: > > + /* > > +* In such an early time, we don't have nid. We specify pxm > > +* instead of MAX_NUMNODES to prevent memblock merging regions > > +

Re: [PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-23 Thread Tejun Heo
On Fri, Jul 19, 2013 at 03:59:27PM +0800, Tang Chen wrote: > + /* > + * In such an early time, we don't have nid. We specify pxm > + * instead of MAX_NUMNODES to prevent memblock merging regions > + * on different nodes. And later modify pxm to nid

[PATCH 14/21] x86, acpi, numa: Reserve hotpluggable memory at early time.

2013-07-19 Thread Tang Chen
As mentioned before, in order to prevent the kernel to use hotpluggable memory, we want to reserve hotpluggable memory in memblock at early time. As the previous two patches are able to find SRAT in initrd file or fireware, this patch does the following: 1. Introduces acpi_reserve_hotpluggable_mem