diff options
Diffstat (limited to 'include/linux/page-flags-layout.h')
-rw-r--r-- | include/linux/page-flags-layout.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h index 93506a114034..da523661500a 100644 --- a/include/linux/page-flags-layout.h +++ b/include/linux/page-flags-layout.h | |||
@@ -38,10 +38,10 @@ | |||
38 | * The last is when there is insufficient space in page->flags and a separate | 38 | * The last is when there is insufficient space in page->flags and a separate |
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_nid: | NODE | ZONE | LAST_NID ... | 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_nid: | SECTION | NODE | ZONE | LAST_NID ... | 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) |
@@ -62,15 +62,21 @@ | |||
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef CONFIG_NUMA_BALANCING | 64 | #ifdef CONFIG_NUMA_BALANCING |
65 | #define LAST_NID_SHIFT NODES_SHIFT | 65 | #define LAST__PID_SHIFT 8 |
66 | #define LAST__PID_MASK ((1 << LAST__PID_SHIFT)-1) | ||
67 | |||
68 | #define LAST__CPU_SHIFT NR_CPUS_BITS | ||
69 | #define LAST__CPU_MASK ((1 << LAST__CPU_SHIFT)-1) | ||
70 | |||
71 | #define LAST_CPUPID_SHIFT (LAST__PID_SHIFT+LAST__CPU_SHIFT) | ||
66 | #else | 72 | #else |
67 | #define LAST_NID_SHIFT 0 | 73 | #define LAST_CPUPID_SHIFT 0 |
68 | #endif | 74 | #endif |
69 | 75 | ||
70 | #if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_NID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS | 76 | #if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS |
71 | #define LAST_NID_WIDTH LAST_NID_SHIFT | 77 | #define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT |
72 | #else | 78 | #else |
73 | #define LAST_NID_WIDTH 0 | 79 | #define LAST_CPUPID_WIDTH 0 |
74 | #endif | 80 | #endif |
75 | 81 | ||
76 | /* | 82 | /* |
@@ -81,8 +87,8 @@ | |||
81 | #define NODE_NOT_IN_PAGE_FLAGS | 87 | #define NODE_NOT_IN_PAGE_FLAGS |
82 | #endif | 88 | #endif |
83 | 89 | ||
84 | #if defined(CONFIG_NUMA_BALANCING) && LAST_NID_WIDTH == 0 | 90 | #if defined(CONFIG_NUMA_BALANCING) && LAST_CPUPID_WIDTH == 0 |
85 | #define LAST_NID_NOT_IN_PAGE_FLAGS | 91 | #define LAST_CPUPID_NOT_IN_PAGE_FLAGS |
86 | #endif | 92 | #endif |
87 | 93 | ||
88 | #endif /* _LINUX_PAGE_FLAGS_LAYOUT */ | 94 | #endif /* _LINUX_PAGE_FLAGS_LAYOUT */ |