diff options
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index e7e92c8f4883..e65d91c02e30 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -114,6 +114,20 @@ struct zone_padding { | |||
114 | #define ZONE_PADDING(name) | 114 | #define ZONE_PADDING(name) |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | #ifdef CONFIG_NUMA | ||
118 | enum numa_stat_item { | ||
119 | NUMA_HIT, /* allocated in intended node */ | ||
120 | NUMA_MISS, /* allocated in non intended node */ | ||
121 | NUMA_FOREIGN, /* was intended here, hit elsewhere */ | ||
122 | NUMA_INTERLEAVE_HIT, /* interleaver preferred this zone */ | ||
123 | NUMA_LOCAL, /* allocation from local node */ | ||
124 | NUMA_OTHER, /* allocation from other node */ | ||
125 | NR_VM_NUMA_STAT_ITEMS | ||
126 | }; | ||
127 | #else | ||
128 | #define NR_VM_NUMA_STAT_ITEMS 0 | ||
129 | #endif | ||
130 | |||
117 | enum zone_stat_item { | 131 | enum zone_stat_item { |
118 | /* First 128 byte cacheline (assuming 64 bit words) */ | 132 | /* First 128 byte cacheline (assuming 64 bit words) */ |
119 | NR_FREE_PAGES, | 133 | NR_FREE_PAGES, |
@@ -132,14 +146,6 @@ enum zone_stat_item { | |||
132 | #if IS_ENABLED(CONFIG_ZSMALLOC) | 146 | #if IS_ENABLED(CONFIG_ZSMALLOC) |
133 | NR_ZSPAGES, /* allocated in zsmalloc */ | 147 | NR_ZSPAGES, /* allocated in zsmalloc */ |
134 | #endif | 148 | #endif |
135 | #ifdef CONFIG_NUMA | ||
136 | NUMA_HIT, /* allocated in intended node */ | ||
137 | NUMA_MISS, /* allocated in non intended node */ | ||
138 | NUMA_FOREIGN, /* was intended here, hit elsewhere */ | ||
139 | NUMA_INTERLEAVE_HIT, /* interleaver preferred this zone */ | ||
140 | NUMA_LOCAL, /* allocation from local node */ | ||
141 | NUMA_OTHER, /* allocation from other node */ | ||
142 | #endif | ||
143 | NR_FREE_CMA_PAGES, | 149 | NR_FREE_CMA_PAGES, |
144 | NR_VM_ZONE_STAT_ITEMS }; | 150 | NR_VM_ZONE_STAT_ITEMS }; |
145 | 151 | ||
@@ -276,6 +282,8 @@ struct per_cpu_pageset { | |||
276 | struct per_cpu_pages pcp; | 282 | struct per_cpu_pages pcp; |
277 | #ifdef CONFIG_NUMA | 283 | #ifdef CONFIG_NUMA |
278 | s8 expire; | 284 | s8 expire; |
285 | s8 numa_stat_threshold; | ||
286 | s8 vm_numa_stat_diff[NR_VM_NUMA_STAT_ITEMS]; | ||
279 | #endif | 287 | #endif |
280 | #ifdef CONFIG_SMP | 288 | #ifdef CONFIG_SMP |
281 | s8 stat_threshold; | 289 | s8 stat_threshold; |
@@ -496,6 +504,7 @@ struct zone { | |||
496 | ZONE_PADDING(_pad3_) | 504 | ZONE_PADDING(_pad3_) |
497 | /* Zone statistics */ | 505 | /* Zone statistics */ |
498 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; | 506 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; |
507 | atomic_long_t vm_numa_stat[NR_VM_NUMA_STAT_ITEMS]; | ||
499 | } ____cacheline_internodealigned_in_smp; | 508 | } ____cacheline_internodealigned_in_smp; |
500 | 509 | ||
501 | enum pgdat_flags { | 510 | enum pgdat_flags { |