[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <520914D5.7080501@gmail.com>
Date: Tue, 13 Aug 2013 01:01:09 +0800
From: Tang Chen <imtangchen@...il.com>
To: Tejun Heo <tj@...nel.org>
CC: Tang Chen <tangchen@...fujitsu.com>, robert.moore@...el.com,
lv.zheng@...el.com, rjw@...k.pl, lenb@...nel.org,
tglx@...utronix.de, mingo@...e.hu, hpa@...or.com,
akpm@...ux-foundation.org, trenn@...e.de, yinghai@...nel.org,
jiang.liu@...wei.com, wency@...fujitsu.com, laijs@...fujitsu.com,
isimatu.yasuaki@...fujitsu.com, izumi.taku@...fujitsu.com,
mgorman@...e.de, minchan@...nel.org, mina86@...a86.com,
gong.chen@...ux.intel.com, vasilis.liaskovitis@...fitbricks.com,
lwoodman@...hat.com, riel@...hat.com, jweiner@...hat.com,
prarit@...hat.com, zhangyanfei@...fujitsu.com,
yanghy@...fujitsu.com, x86@...nel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-acpi@...r.kernel.org
Subject: Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.
Hi tj,
On 08/13/2013 12:22 AM, Tejun Heo wrote:
> Hello, Tang.
>
> On Tue, Aug 13, 2013 at 12:19:02AM +0800, Tang Chen wrote:
>> The kernel can export info to users. The point is what kind of info.
>> Exporting phys addr is meaningless, of course. Now in /sys, we only
>> have memory_block and node. memory_block is only 128M on x86, and
>> hotplug a memory_block means nothing. So actually we only have node.
>>
>> So users want to hotplug a node is reasonable, I think. In the
>> beginning, we set the hotplug unit to a node. That is also why we
>> did the movable node.
>>
>> In summary, node hotplug is much meaningful and usable for users.
>> So it is the best that we can arrange a whole node to be movable
>> node, not opportunistic.
>
> Still not following. Yeah, sure, you can tell the userland that node
> X is hotpluggable or not hotpluggable after boot is complete. Why is
> that relevant?
Sorry for the misunderstanding.
I was trying to answer your question: "Why can't the kenrel allocate
hotpluggable memory opportunistic ?".
If the kernel has any opportunity to allocate hotpluggable memory in
SRAT, then the kernel should tell users which memory is hotpluggable.
But in what way ? I think node is the best for now. But a node could
have a lot of memory. If the kernel uses only a little memory, we will
lose the whole movable node, which I don't want to do.
So, I don't want to allow the kenrel allocating hotpluggable memory
opportunistic.
>
>> I'm just thinking of a more extreme case. For example, if a machine
>> has only one node hotpluggable, and the kernel resides in that node.
>> Then the system has no hotpluggable node.
>
> Yeah, sure, then there's no way that node can be hotpluggable and the
> right thing to do is booting up the machine and informing the userland
> that memory is not hotpluggable.
>
>> If we can prevent the kernel from using hotpluggable memory, in such
>> a machine, users can still do memory hotplug.
>>
>> I wanted to do it as generic as possible. But yes, finding out the
>> nodes the kernel resides in and make it unhotpluggable can work.
>
> Short of being able to remap memory under the kernel, I don't think
> this can be very generic and as a compromise trying to keep as many
> hotpluggable nodes as possible doesn't sound too bad.
I think making one of the node hotpluggable is better. But OK, it is
no big deal. There won't be such machine in reality, I think. :)
Thanks. :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists