Thread (10 messages) 10 messages, 4 authors, 2012-07-25

Re: [PATCH] mm/slub: fix a BUG_ON() when offlining a memory node and CONFIG_SLUB_DEBUG is on

From: Christoph Lameter <hidden>
Date: 2012-07-18 18:53:27
Also in: lkml

On Thu, 19 Jul 2012, Jiang Liu wrote:
	I found the previous analysis of the BUG_ON() issue is incorrect after
another round of code review.
	The really issue is that function early_kmem_cache_node_alloc() calls
inc_slabs_node(kmem_cache_node, node, page->objects) to increase the object
count on local node no matter whether page is allocated from local or remote
node. With current implementation it's OK because every memory node has normal
memory so page is allocated from local node. Now we are working on a patch set
to improve memory hotplug. The basic idea is to to let some memory nodes only
host ZONE_MOVABLE zone, so we could easily remove the whole memory node when
needed. That means some memory nodes have no ZONE_NORMAL/ZONE_DMA, and the page
will be allocated from remote node in function early_kmem_cache_node_alloc().
But early_kmem_cache_node_alloc() still increases object count on local node,
which triggers the BUG_ON eventually when removing the affected memory node.
That does not work. If the node does only have ZONE_MOVABLE then no slab
object can be allocated from the zone. You need to modify the slab
allocators to not allocate a per node structure for those zones and forbit
all allocations from such a node. Actually that should already work
because only ZONE_NORMAL nodes should get a per node structure because
slab objects can only be allocated from ZONE_NORMAL.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help