diff options
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 9bb314577911..72496140ac08 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -812,6 +812,7 @@ const char * const vmstat_text[] = { | |||
812 | 812 | ||
813 | #ifdef CONFIG_NUMA_BALANCING | 813 | #ifdef CONFIG_NUMA_BALANCING |
814 | "numa_pte_updates", | 814 | "numa_pte_updates", |
815 | "numa_huge_pte_updates", | ||
815 | "numa_hint_faults", | 816 | "numa_hint_faults", |
816 | "numa_hint_faults_local", | 817 | "numa_hint_faults_local", |
817 | "numa_pages_migrated", | 818 | "numa_pages_migrated", |
@@ -1229,6 +1230,20 @@ static void start_cpu_timer(int cpu) | |||
1229 | schedule_delayed_work_on(cpu, work, __round_jiffies_relative(HZ, cpu)); | 1230 | schedule_delayed_work_on(cpu, work, __round_jiffies_relative(HZ, cpu)); |
1230 | } | 1231 | } |
1231 | 1232 | ||
1233 | static void vmstat_cpu_dead(int node) | ||
1234 | { | ||
1235 | int cpu; | ||
1236 | |||
1237 | get_online_cpus(); | ||
1238 | for_each_online_cpu(cpu) | ||
1239 | if (cpu_to_node(cpu) == node) | ||
1240 | goto end; | ||
1241 | |||
1242 | node_clear_state(node, N_CPU); | ||
1243 | end: | ||
1244 | put_online_cpus(); | ||
1245 | } | ||
1246 | |||
1232 | /* | 1247 | /* |
1233 | * Use the cpu notifier to insure that the thresholds are recalculated | 1248 | * Use the cpu notifier to insure that the thresholds are recalculated |
1234 | * when necessary. | 1249 | * when necessary. |
@@ -1258,6 +1273,7 @@ static int vmstat_cpuup_callback(struct notifier_block *nfb, | |||
1258 | case CPU_DEAD: | 1273 | case CPU_DEAD: |
1259 | case CPU_DEAD_FROZEN: | 1274 | case CPU_DEAD_FROZEN: |
1260 | refresh_zone_stat_thresholds(); | 1275 | refresh_zone_stat_thresholds(); |
1276 | vmstat_cpu_dead(cpu_to_node(cpu)); | ||
1261 | break; | 1277 | break; |
1262 | default: | 1278 | default: |
1263 | break; | 1279 | break; |
@@ -1276,8 +1292,12 @@ static int __init setup_vmstat(void) | |||
1276 | 1292 | ||
1277 | register_cpu_notifier(&vmstat_notifier); | 1293 | register_cpu_notifier(&vmstat_notifier); |
1278 | 1294 | ||
1279 | for_each_online_cpu(cpu) | 1295 | get_online_cpus(); |
1296 | for_each_online_cpu(cpu) { | ||
1280 | start_cpu_timer(cpu); | 1297 | start_cpu_timer(cpu); |
1298 | node_set_state(cpu_to_node(cpu), N_CPU); | ||
1299 | } | ||
1300 | put_online_cpus(); | ||
1281 | #endif | 1301 | #endif |
1282 | #ifdef CONFIG_PROC_FS | 1302 | #ifdef CONFIG_PROC_FS |
1283 | proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); | 1303 | proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); |