mm: convert zone_reclaim to node_reclaim
[cascardo/linux.git] / include / linux / mmzone.h
index 62f477d..e19c081 100644 (file)
@@ -114,26 +114,14 @@ enum zone_stat_item {
        NR_ZONE_LRU_BASE, /* Used only for compaction and reclaim retry */
        NR_ZONE_LRU_ANON = NR_ZONE_LRU_BASE,
        NR_ZONE_LRU_FILE,
+       NR_ZONE_WRITE_PENDING,  /* Count of dirty, writeback and unstable pages */
        NR_MLOCK,               /* mlock()ed pages found and moved off LRU */
-       NR_ANON_PAGES,  /* Mapped anonymous pages */
-       NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
-                          only modified from process context */
-       NR_FILE_PAGES,
-       NR_FILE_DIRTY,
-       NR_WRITEBACK,
        NR_SLAB_RECLAIMABLE,
        NR_SLAB_UNRECLAIMABLE,
        NR_PAGETABLE,           /* used for pagetables */
        NR_KERNEL_STACK,
        /* Second 128 byte cacheline */
-       NR_UNSTABLE_NFS,        /* NFS unstable pages */
        NR_BOUNCE,
-       NR_VMSCAN_WRITE,
-       NR_VMSCAN_IMMEDIATE,    /* Prioritise for reclaim when writeback ends */
-       NR_WRITEBACK_TEMP,      /* Writeback using temporary buffers */
-       NR_SHMEM,               /* shmem pages (included tmpfs/GEM pages) */
-       NR_DIRTIED,             /* page dirtyings since bootup */
-       NR_WRITTEN,             /* page writings since bootup */
 #if IS_ENABLED(CONFIG_ZSMALLOC)
        NR_ZSPAGES,             /* allocated in zsmalloc */
 #endif
@@ -145,9 +133,6 @@ enum zone_stat_item {
        NUMA_LOCAL,             /* allocation from local node */
        NUMA_OTHER,             /* allocation from other node */
 #endif
-       NR_ANON_THPS,
-       NR_SHMEM_THPS,
-       NR_SHMEM_PMDMAPPED,
        NR_FREE_CMA_PAGES,
        NR_VM_ZONE_STAT_ITEMS };
 
@@ -164,6 +149,22 @@ enum node_stat_item {
        WORKINGSET_REFAULT,
        WORKINGSET_ACTIVATE,
        WORKINGSET_NODERECLAIM,
+       NR_ANON_MAPPED, /* Mapped anonymous pages */
+       NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
+                          only modified from process context */
+       NR_FILE_PAGES,
+       NR_FILE_DIRTY,
+       NR_WRITEBACK,
+       NR_WRITEBACK_TEMP,      /* Writeback using temporary buffers */
+       NR_SHMEM,               /* shmem pages (included tmpfs/GEM pages) */
+       NR_SHMEM_THPS,
+       NR_SHMEM_PMDMAPPED,
+       NR_ANON_THPS,
+       NR_UNSTABLE_NFS,        /* NFS unstable pages */
+       NR_VMSCAN_WRITE,
+       NR_VMSCAN_IMMEDIATE,    /* Prioritise for reclaim when writeback ends */
+       NR_DIRTIED,             /* page dirtyings since bootup */
+       NR_WRITTEN,             /* page writings since bootup */
        NR_VM_NODE_STAT_ITEMS
 };
 
@@ -363,12 +364,6 @@ struct zone {
        struct pglist_data      *zone_pgdat;
        struct per_cpu_pageset __percpu *pageset;
 
-       /*
-        * This is a per-zone reserve of pages that are not available
-        * to userspace allocations.
-        */
-       unsigned long           totalreserve_pages;
-
 #ifndef CONFIG_SPARSEMEM
        /*
         * Flags for a pageblock_nr_pages block. See pageblock-flags.h.
@@ -377,14 +372,6 @@ struct zone {
        unsigned long           *pageblock_flags;
 #endif /* CONFIG_SPARSEMEM */
 
-#ifdef CONFIG_NUMA
-       /*
-        * zone reclaim becomes active if more unmapped pages exist.
-        */
-       unsigned long           min_unmapped_pages;
-       unsigned long           min_slab_pages;
-#endif /* CONFIG_NUMA */
-
        /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */
        unsigned long           zone_start_pfn;
 
@@ -530,7 +517,6 @@ struct zone {
 } ____cacheline_internodealigned_in_smp;
 
 enum zone_flags {
-       ZONE_RECLAIM_LOCKED,            /* prevents concurrent reclaim */
        ZONE_FAIR_DEPLETED,             /* fair zone policy batch depleted */
 };
 
@@ -545,6 +531,7 @@ enum pgdat_flags {
        PGDAT_WRITEBACK,                /* reclaim scanning has recently found
                                         * many pages under writeback
                                         */
+       PGDAT_RECLAIM_LOCKED,           /* prevents concurrent reclaim */
 };
 
 static inline unsigned long zone_end_pfn(const struct zone *zone)
@@ -687,6 +674,20 @@ typedef struct pglist_data {
        /* Number of pages migrated during the rate limiting time interval */
        unsigned long numabalancing_migrate_nr_pages;
 #endif
+       /*
+        * This is a per-node reserve of pages that are not available
+        * to userspace allocations.
+        */
+       unsigned long           totalreserve_pages;
+
+#ifdef CONFIG_NUMA
+       /*
+        * zone reclaim becomes active if more unmapped pages exist.
+        */
+       unsigned long           min_unmapped_pages;
+       unsigned long           min_slab_pages;
+#endif /* CONFIG_NUMA */
+
        /* Write-intensive fields used by page reclaim */
        ZONE_PADDING(_pad1_)
        spinlock_t              lru_lock;