aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags-layout.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2013-10-07 06:29:20 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-09 08:47:45 -0400
commit90572890d202527c366aa9489b32404e88a7c020 (patch)
tree0577f3b043e312f6d53e50105b236514f7df2455 /include/linux/page-flags-layout.h
parente1dda8a797b59d7ec4b17e393152ec3273a552d5 (diff)
mm: numa: Change page last {nid,pid} into {cpu,pid}
Change the per page last fault tracking to use cpu,pid instead of nid,pid. This will allow us to try and lookup the alternate task more easily. Note that even though it is the cpu that is store in the page flags that the mpol_misplaced decision is still based on the node. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/1381141781-10992-43-git-send-email-mgorman@suse.de [ Fixed build failure on 32-bit systems. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/page-flags-layout.h')
-rw-r--r--include/linux/page-flags-layout.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h
index 02bc9184f16b..da523661500a 100644
--- a/include/linux/page-flags-layout.h
+++ b/include/linux/page-flags-layout.h
@@ -39,9 +39,9 @@
39 * lookup is necessary. 39 * lookup is necessary.
40 * 40 *
41 * No sparsemem or sparsemem vmemmap: | NODE | ZONE | ... | FLAGS | 41 * No sparsemem or sparsemem vmemmap: | NODE | ZONE | ... | FLAGS |
42 * " plus space for last_nidpid: | NODE | ZONE | LAST_NIDPID ... | FLAGS | 42 * " plus space for last_cpupid: | NODE | ZONE | LAST_CPUPID ... | FLAGS |
43 * classic sparse with space for node:| SECTION | NODE | ZONE | ... | FLAGS | 43 * classic sparse with space for node:| SECTION | NODE | ZONE | ... | FLAGS |
44 * " plus space for last_nidpid: | SECTION | NODE | ZONE | LAST_NIDPID ... | FLAGS | 44 * " plus space for last_cpupid: | SECTION | NODE | ZONE | LAST_CPUPID ... | FLAGS |
45 * classic sparse no space for node: | SECTION | ZONE | ... | FLAGS | 45 * classic sparse no space for node: | SECTION | ZONE | ... | FLAGS |
46 */ 46 */
47#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP) 47#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
@@ -65,18 +65,18 @@
65#define LAST__PID_SHIFT 8 65#define LAST__PID_SHIFT 8
66#define LAST__PID_MASK ((1 << LAST__PID_SHIFT)-1) 66#define LAST__PID_MASK ((1 << LAST__PID_SHIFT)-1)
67 67
68#define LAST__NID_SHIFT NODES_SHIFT 68#define LAST__CPU_SHIFT NR_CPUS_BITS
69#define LAST__NID_MASK ((1 << LAST__NID_SHIFT)-1) 69#define LAST__CPU_MASK ((1 << LAST__CPU_SHIFT)-1)
70 70
71#define LAST_NIDPID_SHIFT (LAST__PID_SHIFT+LAST__NID_SHIFT) 71#define LAST_CPUPID_SHIFT (LAST__PID_SHIFT+LAST__CPU_SHIFT)
72#else 72#else
73#define LAST_NIDPID_SHIFT 0 73#define LAST_CPUPID_SHIFT 0
74#endif 74#endif
75 75
76#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_NIDPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS 76#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
77#define LAST_NIDPID_WIDTH LAST_NIDPID_SHIFT 77#define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT
78#else 78#else
79#define LAST_NIDPID_WIDTH 0 79#define LAST_CPUPID_WIDTH 0
80#endif 80#endif
81 81
82/* 82/*
@@ -87,8 +87,8 @@
87#define NODE_NOT_IN_PAGE_FLAGS 87#define NODE_NOT_IN_PAGE_FLAGS
88#endif 88#endif
89 89
90#if defined(CONFIG_NUMA_BALANCING) && LAST_NIDPID_WIDTH == 0 90#if defined(CONFIG_NUMA_BALANCING) && LAST_CPUPID_WIDTH == 0
91#define LAST_NIDPID_NOT_IN_PAGE_FLAGS 91#define LAST_CPUPID_NOT_IN_PAGE_FLAGS
92#endif 92#endif
93 93
94#endif /* _LINUX_PAGE_FLAGS_LAYOUT */ 94#endif /* _LINUX_PAGE_FLAGS_LAYOUT */