Thread (15 messages) flat view 15 messages, 5 authors, 2020-03-19

Re: [PATCH v2 1/4] mm: Check for node_online in node_present_pages

From: Vlastimil Babka <hidden>
Date: 2020-03-19 09:38:08
Also in: linux-mm

On 3/19/20 1:32 AM, Michael Ellerman wrote:
Seems like a nice solution to me
Thanks :)
quoted
----8<----
diff --git a/mm/slub.c b/mm/slub.c
index 17dc00e33115..1d4f2d7a0080 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1511,7 +1511,7 @@ static inline struct page *alloc_slab_page(struct kmem_cache *s,
 	struct page *page;
 	unsigned int order = oo_order(oo);
 
-	if (node == NUMA_NO_NODE)
+	if (node == NUMA_NO_NODE || !node_online(node))
Why don't we need the node_present_pages() check here?
Page allocator is fine with a node without present pages, as long as there's a
zonelist, which online nodes must have (ideally all possible nodes should have,
and then we can remove this).

SLUB on the other hand doesn't allocate cache per-cpu structures for nodes
without present pages (understandably) that's why the other place includes the
node_present_pages() check.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help