Merge tag 'f2fs-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeu...
[linux-2.6-microblaze.git] / include / linux / mmzone.h
index cca2a44..b593316 100644 (file)
@@ -113,8 +113,7 @@ static inline bool free_area_empty(struct free_area *area, int migratetype)
 struct pglist_data;
 
 /*
- * zone->lock and the zone lru_lock are two of the hottest locks in the kernel.
- * So add a wild amount of padding here to ensure that they fall into separate
+ * Add a wild amount of padding here to ensure datas fall into separate
  * cachelines.  There are very few zone structures in the machine, so space
  * consumption is not a concern here.
  */
@@ -276,6 +275,8 @@ enum lruvec_flags {
 
 struct lruvec {
        struct list_head                lists[NR_LRU_LISTS];
+       /* per lruvec lru_lock for memcg */
+       spinlock_t                      lru_lock;
        /*
         * These track the cost of reclaiming one LRU - file or anon -
         * over the other. As the observed cost of reclaiming one LRU
@@ -354,26 +355,6 @@ enum zone_type {
         * DMA mask is assumed when ZONE_DMA32 is defined. Some 64-bit
         * platforms may need both zones as they support peripherals with
         * different DMA addressing limitations.
-        *
-        * Some examples:
-        *
-        *  - i386 and x86_64 have a fixed 16M ZONE_DMA and ZONE_DMA32 for the
-        *    rest of the lower 4G.
-        *
-        *  - arm only uses ZONE_DMA, the size, up to 4G, may vary depending on
-        *    the specific device.
-        *
-        *  - arm64 has a fixed 1G ZONE_DMA and ZONE_DMA32 for the rest of the
-        *    lower 4G.
-        *
-        *  - powerpc only uses ZONE_DMA, the size, up to 2G, may vary
-        *    depending on the specific device.
-        *
-        *  - s390 uses ZONE_DMA fixed to the lower 2G.
-        *
-        *  - ia64 and riscv only use ZONE_DMA32.
-        *
-        *  - parisc uses neither.
         */
 #ifdef CONFIG_ZONE_DMA
        ZONE_DMA,
@@ -470,6 +451,12 @@ struct zone {
 #endif
        struct pglist_data      *zone_pgdat;
        struct per_cpu_pageset __percpu *pageset;
+       /*
+        * the high and batch values are copied to individual pagesets for
+        * faster access
+        */
+       int pageset_high;
+       int pageset_batch;
 
 #ifndef CONFIG_SPARSEMEM
        /*
@@ -796,7 +783,6 @@ typedef struct pglist_data {
 
        /* Write-intensive fields used by page reclaim */
        ZONE_PADDING(_pad1_)
-       spinlock_t              lru_lock;
 
 #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
        /*
@@ -1428,17 +1414,6 @@ void sparse_init(void);
 #define subsection_map_init(_pfn, _nr_pages) do {} while (0)
 #endif /* CONFIG_SPARSEMEM */
 
-/*
- * During memory init memblocks map pfns to nids. The search is expensive and
- * this caches recent lookups. The implementation of __early_pfn_to_nid
- * may treat start/end as pfns or sections.
- */
-struct mminit_pfnnid_cache {
-       unsigned long last_start;
-       unsigned long last_end;
-       int last_nid;
-};
-
 /*
  * If it is possible to have holes within a MAX_ORDER_NR_PAGES, then we
  * need to check pfn validity within that MAX_ORDER_NR_PAGES block.
@@ -1451,37 +1426,6 @@ struct mminit_pfnnid_cache {
 #define pfn_valid_within(pfn) (1)
 #endif
 
-#ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL
-/*
- * pfn_valid() is meant to be able to tell if a given PFN has valid memmap
- * associated with it or not. This means that a struct page exists for this
- * pfn. The caller cannot assume the page is fully initialized in general.
- * Hotplugable pages might not have been onlined yet. pfn_to_online_page()
- * will ensure the struct page is fully online and initialized. Special pages
- * (e.g. ZONE_DEVICE) are never onlined and should be treated accordingly.
- *
- * In FLATMEM, it is expected that holes always have valid memmap as long as
- * there is valid PFNs either side of the hole. In SPARSEMEM, it is assumed
- * that a valid section has a memmap for the entire section.
- *
- * However, an ARM, and maybe other embedded architectures in the future
- * free memmap backing holes to save memory on the assumption the memmap is
- * never used. The page_zone linkages are then broken even though pfn_valid()
- * returns true. A walker of the full memmap must then do this additional
- * check to ensure the memmap they are looking at is sane by making sure
- * the zone and PFN linkages are still valid. This is expensive, but walkers
- * of the full memmap are extremely rare.
- */
-bool memmap_valid_within(unsigned long pfn,
-                                       struct page *page, struct zone *zone);
-#else
-static inline bool memmap_valid_within(unsigned long pfn,
-                                       struct page *page, struct zone *zone)
-{
-       return true;
-}
-#endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */
-
 #endif /* !__GENERATING_BOUNDS.H */
 #endif /* !__ASSEMBLY__ */
 #endif /* _LINUX_MMZONE_H */