From: Cody P Schafer <cody@linux.vnet.ibm.com>
To: Linux MM <linux-mm@kvack.org>
Cc: Cody P Schafer <cody@linux.vnet.ibm.com>,
David Hansen <dave@linux.vnet.ibm.com>
Subject: [PATCH 13/24] page-flags dnuma: reserve a pageflag for determining if a page needs a node lookup.
Date: Thu, 28 Feb 2013 13:26:10 -0800 [thread overview]
Message-ID: <1362086781-16725-4-git-send-email-cody@linux.vnet.ibm.com> (raw)
In-Reply-To: <1362086781-16725-1-git-send-email-cody@linux.vnet.ibm.com>
In-Reply-To: <1362084272-11282-1-git-send-email-cody@linux.vnet.ibm.com>
Add a pageflag called "lookup_node"/ PG_lookup_node / Page*LookupNode().
Used by dynamic numa to indicate when a page has a new node assignment
waiting for it.
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
include/linux/page-flags.h | 18 ++++++++++++++++++
mm/page_alloc.c | 3 +++
2 files changed, 21 insertions(+)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6d53675..e0241d8 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -109,6 +109,9 @@ enum pageflags {
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
PG_compound_lock,
#endif
+#ifdef CONFIG_DYNAMIC_NUMA
+ PG_lookup_node, /* need to do an extra lookup to determine actual node */
+#endif
__NR_PAGEFLAGS,
/* Filesystems */
@@ -275,6 +278,17 @@ PAGEFLAG_FALSE(HWPoison)
#define __PG_HWPOISON 0
#endif
+/* Setting is unconditional, simply leads to an extra lookup.
+ * Clearing must be conditional so we don't miss any memlayout changes.
+ */
+#ifdef CONFIG_DYNAMIC_NUMA
+PAGEFLAG(LookupNode, lookup_node)
+TESTCLEARFLAG(LookupNode, lookup_node)
+#else
+PAGEFLAG_FALSE(LookupNode)
+TESTCLEARFLAG_FALSE(LookupNode)
+#endif
+
u64 stable_page_flags(struct page *page);
static inline int PageUptodate(struct page *page)
@@ -509,7 +523,11 @@ static inline void ClearPageSlabPfmemalloc(struct page *page)
* Pages being prepped should not have any flags set. It they are set,
* there has been a kernel bug or struct page corruption.
*/
+#ifndef CONFIG_DYNAMIC_NUMA
#define PAGE_FLAGS_CHECK_AT_PREP ((1 << NR_PAGEFLAGS) - 1)
+#else
+#define PAGE_FLAGS_CHECK_AT_PREP (((1 << NR_PAGEFLAGS) - 1) & ~(1 << PG_lookup_node))
+#endif
#define PAGE_FLAGS_PRIVATE \
(1 << PG_private | 1 << PG_private_2)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 274826c..5eeb547 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6449,6 +6449,9 @@ static const struct trace_print_flags pageflag_names[] = {
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
{1UL << PG_compound_lock, "compound_lock" },
#endif
+#ifdef CONFIG_DYNAMIC_NUMA
+ {1UL << PG_lookup_node, "lookup_node" },
+#endif
};
static void dump_page_flags(unsigned long flags)
--
1.8.1.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>
next prev parent reply other threads:[~2013-02-28 21:27 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 2:41 [RFC] DNUMA: Runtime NUMA memory layout reconfiguration Cody P Schafer
2013-02-28 20:44 ` [RFC][PATCH 00/24] " Cody P Schafer
2013-02-28 20:44 ` [PATCH 01/24] XXX: reduce MAX_PHYSADDR_BITS & MAX_PHYSMEM_BITS in PAE Cody P Schafer
2013-02-28 20:44 ` [PATCH 02/24] XXX: x86/Kconfig: simplify NUMA config for NUMA_EMU on X86_32 Cody P Schafer
2013-02-28 20:44 ` [PATCH 03/24] XXX: memory_hotplug locking note in online_pages Cody P Schafer
2013-02-28 20:44 ` [PATCH 04/24] rbtree: add postorder iteration functions Cody P Schafer
2013-02-28 20:44 ` [PATCH 05/24] rbtree: add rbtree_postorder_for_each_entry_safe() helper Cody P Schafer
2013-02-28 20:44 ` [PATCH 06/24] mm/memory_hotplug: factor out zone+pgdat growth Cody P Schafer
2013-02-28 20:44 ` [PATCH 07/24] memory_hotplug: export ensure_zone_is_initialized() in mm/internal.h Cody P Schafer
2013-02-28 20:44 ` [PATCH 08/24] mm/memory_hotplug: use {pgdat,zone}_is_empty() when resizing zones & pgdats Cody P Schafer
2013-02-28 20:44 ` [PATCH 09/24] mm: add nid_zone() helper Cody P Schafer
2013-02-28 21:26 ` [PATCH 10/24] page_alloc: add return_pages_to_zone() when DYNAMIC_NUMA is enabled Cody P Schafer
2013-02-28 21:26 ` [PATCH 11/24] page_alloc: in move_freepages(), skip pages instead of VM_BUG on node differences Cody P Schafer
2013-02-28 21:26 ` [PATCH 12/24] page_alloc: when dynamic numa is enabled, don't check that all pages in a block belong to the same zone Cody P Schafer
2013-02-28 21:26 ` Cody P Schafer [this message]
2013-02-28 21:26 ` [PATCH 14/24] memory_hotplug: factor out locks in mem_online_cpu() Cody P Schafer
2013-02-28 21:26 ` [PATCH 15/24] mm: add memlayout & dnuma to track pfn->nid & transplant pages between nodes Cody P Schafer
2013-02-28 21:26 ` [PATCH 16/24] mm: memlayout+dnuma: add debugfs interface Cody P Schafer
2013-02-28 21:26 ` [PATCH 17/24] page_alloc: use dnuma to transplant newly freed pages in __free_pages_ok() Cody P Schafer
2013-02-28 21:26 ` [PATCH 18/24] page_alloc: use dnuma to transplant newly freed pages in free_hot_cold_page() Cody P Schafer
2013-02-28 21:26 ` [PATCH 19/24] page_alloc: transplant pages that are being flushed from the per-cpu lists Cody P Schafer
2013-02-28 21:26 ` [PATCH 20/24] x86: memlayout: add a arch specific inital memlayout setter Cody P Schafer
2013-02-28 21:57 ` [PATCH 21/24] init/main: call memlayout_global_init() in start_kernel() Cody P Schafer
2013-02-28 21:57 ` [PATCH 22/24] dnuma: memlayout: add memory_add_physaddr_to_nid() for memory_hotplug Cody P Schafer
2013-02-28 21:57 ` [PATCH 23/24] x86/mm/numa: when dnuma is enabled, use memlayout to handle memory hotplug's physaddr_to_nid Cody P Schafer
2013-02-28 21:57 ` [PATCH 24/24] XXX: x86/mm/numa: Avoid spamming warnings due to lack of cpu reconfig Cody P Schafer
2013-04-04 5:28 ` [RFC][PATCH 00/24] DNUMA: Runtime NUMA memory layout reconfiguration Simon Jeons
2013-04-04 19:07 ` Cody P Schafer
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=1362086781-16725-4-git-send-email-cody@linux.vnet.ibm.com \
--to=cody@linux.vnet.ibm.com \
--cc=dave@linux.vnet.ibm.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).