Re: [PATCH] [1/4] SLAB: Handle node-not-up case in fallback_alloc()

From: Andi Kleen
Date: Sat Feb 06 2010 - 10:56:37 EST


> If a hot-added node has not been initialized for the cache, your code is
> picking an existing one in zonelist order which may be excluded by
> current's cpuset. Thus, your code has a very real chance of having
> kmem_getpages() return NULL because get_page_from_freelist() will reject
> non-atomic ALLOC_CPUSET allocations for prohibited nodes. That isn't a
> scenario that requires a "funny cpuset," it just has to not allow whatever
> initialized node comes first in the zonelist.

The point was that you would need to run whoever triggers the memory
hotadd in a cpuset with limitations. That would be a clear
don't do that if hurts(tm)

> My suggested alternative does not pick a single initialized node, rather
> it tries all nodes that actually have a chance of having kmem_getpages()
> succeed which increases the probability that your patch actually has an
> effect for cpuset users.

cpuset users are unlikely to trigger memory hotadds from inside limiting
cpusets. Typically that's done from udev etc.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/