lkml.org 
[lkml]   [2012]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 43/46] sched: numa: Rename mempolicy to HOME
Date
Rename the policy to reflect that while allocations and migrations are
based on reference that the home node is taken into account for
migration decisions.

Signed-off-by: Mel Gorman <mgorman@suse.de>
---
include/uapi/linux/mempolicy.h | 9 ++++++++-
mm/mempolicy.c | 9 ++++++---
2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/mempolicy.h b/include/uapi/linux/mempolicy.h
index 0d11c3d..4506772 100644
--- a/include/uapi/linux/mempolicy.h
+++ b/include/uapi/linux/mempolicy.h
@@ -67,7 +67,14 @@ enum mpol_rebind_step {
#define MPOL_F_LOCAL (1 << 1) /* preferred local allocation */
#define MPOL_F_REBINDING (1 << 2) /* identify policies in rebinding */
#define MPOL_F_MOF (1 << 3) /* this policy wants migrate on fault */
-#define MPOL_F_MORON (1 << 4) /* Migrate On pte_numa Reference On Node */
+#define MPOL_F_HOME (1 << 4) /*
+ * Migrate towards referencing node.
+ * By building up stats on faults, the
+ * scheduler will reinforce the choice
+ * by identifying a home node and
+ * queueing the task on that node
+ * where possible.
+ */


#endif /* _UAPI_LINUX_MEMPOLICY_H */
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index fd20e28..3da7435 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2316,8 +2316,11 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long
BUG();
}

- /* Migrate the page towards the node whose CPU is referencing it */
- if (pol->flags & MPOL_F_MORON) {
+ /*
+ * Migrate pages towards their referencing node. Based on the fault
+ * statistics a home node will be chosen by the scheduler
+ */
+ if (pol->flags & MPOL_F_HOME) {
int last_nid;

polnid = numa_node_id();
@@ -2540,7 +2543,7 @@ void __init numa_policy_init(void)
preferred_node_policy[nid] = (struct mempolicy) {
.refcnt = ATOMIC_INIT(1),
.mode = MPOL_PREFERRED,
- .flags = MPOL_F_MOF | MPOL_F_MORON,
+ .flags = MPOL_F_MOF | MPOL_F_HOME,
.v = { .preferred_node = nid, },
};
}
--
1.7.9.2


\
 
 \ /
  Last update: 2012-11-21 12:01    [W:0.317 / U:1.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site