linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nicolai Stange <nicstange@gmail.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Nicolai Stange <nicstange@gmail.com>
Subject: [RFC 3/3] sparse-vmemmap: let vmemmap_verify() ignore NUMA_NO_NODE requests
Date: Wed, 15 Feb 2017 21:58:26 +0100	[thread overview]
Message-ID: <20170215205826.13356-4-nicstange@gmail.com> (raw)
In-Reply-To: <20170215205826.13356-1-nicstange@gmail.com>

On x86, Kasan's initizalization in arch/x86/mm/kasan_init_64.c calls
vmemmap_populate() and thus, since commit 7b79d10a2d64 ("mm: convert
kmalloc_section_memmap() to populate_section_memmap()"),
vmemmap_populate_basepages() with a node value of NUMA_NO_NODE.

Since a page's actual NUMA node is never equal to NUMA_NO_NODE, this
results in excessive warnings from vmemmap_verify():

  [ffffed00179c6e00-ffffed00179c7dff] potential offnode page_structs
  [ffffed00179c7e00-ffffed00179c8dff] potential offnode page_structs
  [ffffed00179c8e00-ffffed00179c9dff] potential offnode page_structs
  [ffffed00179c9e00-ffffed00179cadff] potential offnode page_structs
  [ffffed00179cae00-ffffed00179cbdff] potential offnode page_structs
  [...]

Make vmemmap_verify() return early if the requested node equals
NUMA_NO_NODE.

Signed-off-by: Nicolai Stange <nicstange@gmail.com>
---
 mm/sparse-vmemmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index f08872b58e48..e38aaf6c312c 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -165,6 +165,9 @@ void __meminit vmemmap_verify(pte_t *pte, int node,
 	unsigned long pfn = pte_pfn(*pte);
 	int actual_node = early_pfn_to_nid(pfn);
 
+	if (node == NUMA_NO_NODE)
+		return;
+
 	if (node_distance(actual_node, node) > LOCAL_DISTANCE)
 		pr_warn("[%lx-%lx] potential offnode page_structs\n",
 			start, end - 1);
-- 
2.11.1

--
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>

  parent reply	other threads:[~2017-02-15 20:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 20:58 [RFC 0/3] Regressions due to 7b79d10a2d64 ("mm: convert kmalloc_section_memmap() to populate_section_memmap()") and Kasan initialization on Nicolai Stange
2017-02-15 20:58 ` [RFC 1/3] sparse-vmemmap: let vmemmap_populate_basepages() cover the whole range Nicolai Stange
2017-02-15 20:58 ` [RFC 2/3] sparse-vmemmap: make vmemmap_populate_basepages() skip HP mapped ranges Nicolai Stange
2017-02-15 20:58 ` Nicolai Stange [this message]
2017-02-15 21:10 ` [RFC 0/3] Regressions due to 7b79d10a2d64 ("mm: convert kmalloc_section_memmap() to populate_section_memmap()") and Kasan initialization on Andrew Morton
2017-02-15 21:26   ` Dan Williams
2017-02-15 21:54     ` Andrew Morton
2017-02-25 19:03 ` Dan Williams
2017-02-27  9:34   ` Dmitry Vyukov
2017-03-03 16:08   ` Andrey Ryabinin
2017-03-10  0:58     ` Dan Williams
2017-03-10  8:46       ` Andrey Ryabinin

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=20170215205826.13356-4-nicstange@gmail.com \
    --to=nicstange@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).