On Wed 23-05-18 10:01:08, Oscar Salvador wrote: > Hi guys, > > while testing memhotplug, I spotted the following trace: > > ===== > linux kernel: WARNING: CPU: 0 PID: 64 at ./include/linux/gfp.h:467 vmemmap_alloc_block+0x4e/0xc9 This warning is too loud and not really helpful. We are doing gfp_t gfp_mask = GFP_KERNEL|__GFP_RETRY_MAYFAIL|__GFP_NOWARN; page = alloc_pages_node(node, gfp_mask, order); so we do not really insist on the allocation succeeding on the requested node (it is more a hint which node is the best one but we can fallback to any other node). Moreover we do explicitly do not care about allocation warnings by __GFP_NOWARN. So maybe we want to soften the warning like this? diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 036846fc00a6..7f860ea29ec6 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -464,7 +464,7 @@ static inline struct page * __alloc_pages_node(int nid, gfp_t gfp_mask, unsigned int order) { VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); - VM_WARN_ON(!node_online(nid)); + VM_WARN_ON((gfp_mask & __GFP_THISNODE) && !node_online(nid)); return __alloc_pages(gfp_mask, order, nid); } -- Michal Hocko SUSE Labs