[RFC PATCH] powerpc/numa: reset node_possible_map to only node_online_map
Nishanth Aravamudan
nacc at linux.vnet.ibm.com
Fri Mar 6 10:21:35 AEDT 2015
On 05.03.2015 [17:08:04 -0500], Tejun Heo wrote:
> Hello,
>
> On Thu, Mar 05, 2015 at 01:58:27PM -0800, David Rientjes wrote:
> > I'm not sure why this is being proposed as a powerpc patch and now a patch
> > for mem_cgroup_css_alloc(). In other words, why do we have to allocate
> > for all possible nodes? We should only be allocating for online nodes in
> > N_MEMORY with mem hotplug disabled initially and then have a mem hotplug
> > callback implemented to alloc_mem_cgroup_per_zone_info() for nodes that
> > transition from memoryless -> memory. The extra bonus is that
> > alloc_mem_cgroup_per_zone_info() need never allocate remote memory and the
> > TODO in that function can be removed.
>
> For cpus, the general direction is allocating for all possible cpus.
> For iterations, we alternate between using all possibles and onlines
> depending on the use case; however, the general idea is that the
> possibles and onlines aren't gonna be very different. NR_CPUS and
> MAX_NUMNODES gotta accomodate the worst possible case the kernel may
> run on but the possible masks should be set to the actually possible
> subset during boot so that the kernel don't end up allocating for and
> iterating over things which can't ever exist.
Makes sense to me.
> It can be argued that we should always stick to the online masks for
> allocation and iteration; however, that usually requires more
> complexity and the only cases where this mattered have been when the
> boot code got it wrong and failed to set the possible masks correctly,
> which also seems to be the case here. I don't see any reason to
> deviate here.
So, do you agree with the general direction of my change? :)
Thanks,
Nish
More information about the Linuxppc-dev
mailing list