From: Michal Hocko <mhocko@suse.com>
To: Oscar Salvador <osalvador@techadventures.net>
Cc: linux-mm@kvack.org, vbabka@suse.cz, pasha.tatashin@oracle.com,
dan.j.williams@intel.com
Subject: Re: [RFC] trace when adding memory to an offline nod
Date: Wed, 23 May 2018 10:37:56 +0200 [thread overview]
Message-ID: <20180523083756.GJ20441@dhcp22.suse.cz> (raw)
In-Reply-To: <20180523080108.GA30350@techadventures.net>
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
next prev parent reply other threads:[~2018-05-23 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-23 8:01 Oscar Salvador
2018-05-23 8:37 ` Michal Hocko [this message]
2018-05-23 8:43 ` Michal Hocko
2018-05-23 9:19 ` Oscar Salvador
2018-05-23 9:26 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180523083756.GJ20441@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=dan.j.williams@intel.com \
--cc=linux-mm@kvack.org \
--cc=osalvador@techadventures.net \
--cc=pasha.tatashin@oracle.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox