Re: [PATCH] [4/4] SLAB: Fix node add timer race in cache_reap

David Rientjes
2010-03-01T10:27:39Z

On Mon, 1 Mar 2010, KAMEZAWA Hiroyuki wrote:

> > > Well Kamesan indicated that this worked if a cpu became online.
> >
> > I mean in the general case. There were tons of problems all over.
> >
> Then, it's cpu hotplug matter, not memory hotplug.
> cpu hotplug callback should prepaare
>
>
> l3 = searchp->nodelists[node];
> BUG_ON(!l3);
>
> before onlined. Rather than taking care of races.
>

I can only speak for x86 and not the abundance of memory hotplug support
that exists for powerpc, but cpu hotplug doesn't do _anything_ when a
memory region that has a corresponding ACPI_SRAT_MEM_HOT_PLUGGABLE entry
in the SRAT is hotadded and requires a new nodeid. That can be triggered
via the acpi layer with plug and play or explicitly from the command line
via CONFIG_ARCH_MEMORY_PROBE.

Relying on cpu hotplug to set up nodelists in such a circumstance simply
won't work. You need memory hotplug support such as in my patch.