Re: [mm v2 0/3] Support memory cgroup hotplug
From: Tejun Heo <tj@kernel.org>
Date: 2016-11-29 00:42:02
Also in:
linux-mm
Hello, Balbir. On Tue, Nov 29, 2016 at 11:09:26AM +1100, Balbir Singh wrote:
On 29/11/16 08:10, Tejun Heo wrote:quoted
On Thu, Nov 24, 2016 at 12:05:12AM +1100, Balbir Singh wrote:quoted
On my desktop NODES_SHIFT is 6, many distro kernels have it a 9. I've known of solutions that use fake NUMA for partitioning and need as many nodes as possible.It was a crude kludge that people used before memcg. If people still use it, that's fine but we don't want to optimize / make code complicated for it, so let's please put away this part of justification.Are you suggesting those use cases can be ignored now?
Don't do that. When did I say that? What I said is that it isn't a good idea to optimize and complicate the code base for it at this point. It shouldn't a controversial argument given fake numa's inherent issues and general lack of popularity. Besides, does node hotplug even apply to fake numa? ISTR it being configured statically on the boot prompt.
quoted
NUMA code already has possible detection. Why not simply make memcg use those instead of MAX_NUMNODES like how we use nr_cpu_ids instead of NR_CPUS?nodes_possible_map is set to node_online_map at the moment for ppc64. Which becomes a problem when hotplugging a node that was not already online. I am not sure what you mean by possible detection. node_possible_map is set based on CONFIG_NODE_SHIFT and then can be adjusted by the architecture (if desired). Are you suggesting firmware populate it in?
That's what we do with cpus. The kernel is built with high maximum limit and the kernel queries the firmware during boot to determine how many are actually possible on the system, which in most cases isn't too far from what's already on the system. I don't see why we would take a different approach with NUMA nodes. Thanks. -- tejun