OSDN Git Service

Merge tag 'driver-core-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[uclinux-h8/linux.git] / mm / vmstat.c
index 4057372..b75b1a6 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/mm_inline.h>
 #include <linux/page_ext.h>
 #include <linux/page_owner.h>
+#include <linux/migrate.h>
 
 #include "internal.h"
 
@@ -1242,6 +1243,9 @@ const char * const vmstat_text[] = {
 #ifdef CONFIG_SWAP
        "nr_swapcached",
 #endif
+#ifdef CONFIG_NUMA_BALANCING
+       "pgpromote_success",
+#endif
 
        /* enum writeback_stat_item counters */
        "nr_dirty_threshold",
@@ -1385,6 +1389,9 @@ const char * const vmstat_text[] = {
 #ifdef CONFIG_SWAP
        "swap_ra",
        "swap_ra_hit",
+#ifdef CONFIG_KSM
+       "ksm_swpin_copy",
+#endif
 #endif
 #ifdef CONFIG_X86
        "direct_map_level2_splits",
@@ -2043,7 +2050,12 @@ static void __init init_cpu_node_state(void)
 static int vmstat_cpu_online(unsigned int cpu)
 {
        refresh_zone_stat_thresholds();
-       node_set_state(cpu_to_node(cpu), N_CPU);
+
+       if (!node_state(cpu_to_node(cpu), N_CPU)) {
+               node_set_state(cpu_to_node(cpu), N_CPU);
+               set_migration_target_nodes();
+       }
+
        return 0;
 }
 
@@ -2066,6 +2078,8 @@ static int vmstat_cpu_dead(unsigned int cpu)
                return 0;
 
        node_clear_state(node, N_CPU);
+       set_migration_target_nodes();
+
        return 0;
 }
 
@@ -2097,6 +2111,9 @@ void __init init_mm_internals(void)
 
        start_shepherd_timer();
 #endif
+#if defined(CONFIG_MIGRATION) && defined(CONFIG_HOTPLUG_CPU)
+       migrate_on_reclaim_init();
+#endif
 #ifdef CONFIG_PROC_FS
        proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
        proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op);