Lines Matching full:zone

129 	NUMA_INTERLEAVE_HIT,	/* interleaver preferred this zone */
705 * zone lock contention and keep cache-hot pages reusing.
794 * faulted, they come from the right zone right away. However, it is
798 * to a different zone. When migration fails - pinning fails.
819 * on different platforms may end up in a movable zone. ZERO_PAGE(0)
822 * memory to the MOVABLE zone, the vmemmap pages are also placed in
823 * such zone. Such pages cannot be really moved around as they are
845 struct zone { struct
848 /* zone watermarks, access with *_wmark_pages(zone) macros */
858 * wasting several GB of ram we must reserve some of the lower zone argument
892 * spanned_pages is the total pages spanned by the zone, including argument
896 * present_pages is physical pages existing within the zone, which
900 * present_early_pages is present pages existing within the zone
921 * It is a seqlock because it has to be read outside of zone->lock,
925 * The span_seq lock is declared along with zone->lock because it is
926 * frequently read in proximity to zone->lock. It's good to
949 * of pageblock. Protected by zone->lock. argument
971 /* To be called once the last page in the zone is accepted */ argument
975 /* zone flags, see below */ argument
1023 /* Zone statistics */
1040 ZONE_BOOSTED_WATERMARK, /* zone recently boosted watermarks. argument
1043 ZONE_RECLAIM_ACTIVE, /* kswapd may be scanning the zone. */
1044 ZONE_BELOW_HIGH, /* zone is below high watermark. */
1047 static inline unsigned long wmark_pages(const struct zone *z, in wmark_pages()
1053 static inline unsigned long min_wmark_pages(const struct zone *z) in min_wmark_pages()
1058 static inline unsigned long low_wmark_pages(const struct zone *z) in low_wmark_pages()
1063 static inline unsigned long high_wmark_pages(const struct zone *z) in high_wmark_pages()
1068 static inline unsigned long promo_wmark_pages(const struct zone *z) in promo_wmark_pages()
1073 static inline unsigned long zone_managed_pages(struct zone *zone) in zone_managed_pages() argument
1075 return (unsigned long)atomic_long_read(&zone->managed_pages); in zone_managed_pages()
1078 static inline unsigned long zone_cma_pages(struct zone *zone) in zone_cma_pages() argument
1081 return zone->cma_pages; in zone_cma_pages()
1087 static inline unsigned long zone_end_pfn(const struct zone *zone) in zone_end_pfn() argument
1089 return zone->zone_start_pfn + zone->spanned_pages; in zone_end_pfn()
1092 static inline bool zone_spans_pfn(const struct zone *zone, unsigned long pfn) in zone_spans_pfn() argument
1094 return zone->zone_start_pfn <= pfn && pfn < zone_end_pfn(zone); in zone_spans_pfn()
1097 static inline bool zone_is_initialized(struct zone *zone) in zone_is_initialized() argument
1099 return zone->initialized; in zone_is_initialized()
1102 static inline bool zone_is_empty(struct zone *zone) in zone_is_empty() argument
1104 return zone->spanned_pages == 0; in zone_is_empty()
1109 * The zone field is never updated after free_area_init_core()
1113 /* Page flags: | [SECTION] | [NODE] | ZONE | [LAST_CPUPID] | ... | FLAGS | */
1133 /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allocator */
1177 * Consecutive zone device pages should not be merged into the same sgl
1181 * both pages are not zone device pages or both pages are zone device pages
1194 extern void memmap_init_zone_device(struct zone *, unsigned long,
1230 * intersection with the given zone
1232 static inline bool zone_intersects(struct zone *zone, in zone_intersects() argument
1235 if (zone_is_empty(zone)) in zone_intersects()
1237 if (start_pfn >= zone_end_pfn(zone) || in zone_intersects()
1238 start_pfn + nr_pages <= zone->zone_start_pfn) in zone_intersects()
1267 * This struct contains information about a zone in a zonelist. It is stored
1271 struct zone *zone; /* Pointer to actual zone */ member
1272 int zone_idx; /* zone_idx(zoneref->zone) */
1281 * To speed the reading of the zonelist, the zonerefs contain the zone index
1285 * zonelist_zone() - Return the struct zone * for an entry in _zonerefs
1286 * zonelist_zone_idx() - Return the index of the zone for an entry
1339 * per-zone basis.
1347 struct zone node_zones[MAX_NR_ZONES];
1374 * Nests above zone->lock and zone->span_seqlock
1497 void wakeup_kswapd(struct zone *zone, gfp_t gfp_mask, int order,
1499 bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
1502 bool zone_watermark_ok(struct zone *z, unsigned int order,
1514 extern void init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
1535 * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
1537 #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) argument
1540 static inline bool zone_is_zone_device(struct zone *zone) in zone_is_zone_device() argument
1542 return zone_idx(zone) == ZONE_DEVICE; in zone_is_zone_device()
1545 static inline bool zone_is_zone_device(struct zone *zone) in zone_is_zone_device() argument
1552 * Returns true if a zone has pages managed by the buddy allocator.
1554 * populated_zone(). If the whole zone is reserved then we can easily
1557 static inline bool managed_zone(struct zone *zone) in managed_zone() argument
1559 return zone_managed_pages(zone); in managed_zone()
1562 /* Returns true if a zone has memory */
1563 static inline bool populated_zone(struct zone *zone) in populated_zone() argument
1565 return zone->present_pages; in populated_zone()
1569 static inline int zone_to_nid(struct zone *zone) in zone_to_nid() argument
1571 return zone->node; in zone_to_nid()
1574 static inline void zone_set_nid(struct zone *zone, int nid) in zone_set_nid() argument
1576 zone->node = nid; in zone_set_nid()
1579 static inline int zone_to_nid(struct zone *zone) in zone_to_nid() argument
1584 static inline void zone_set_nid(struct zone *zone, int nid) {} in zone_set_nid() argument
1600 * is_highmem - helper function to quickly check if a struct zone is a
1601 * highmem zone or not. This is an attempt to keep references
1603 * @zone: pointer to struct zone variable
1604 * Return: 1 for a highmem zone, 0 otherwise
1606 static inline int is_highmem(struct zone *zone) in is_highmem() argument
1608 return is_highmem_idx(zone_idx(zone)); in is_highmem()
1637 extern struct zone *next_zone(struct zone *zone);
1649 * @zone: pointer to struct zone variable
1651 * The user only needs to declare the zone variable, for_each_zone
1654 #define for_each_zone(zone) \ argument
1655 for (zone = (first_online_pgdat())->node_zones; \
1656 zone; \
1657 zone = next_zone(zone))
1659 #define for_each_populated_zone(zone) \ argument
1660 for (zone = (first_online_pgdat())->node_zones; \
1661 zone; \
1662 zone = next_zone(zone)) \
1663 if (!populated_zone(zone)) \
1667 static inline struct zone *zonelist_zone(struct zoneref *zoneref) in zonelist_zone()
1669 return zoneref->zone; in zonelist_zone()
1679 return zone_to_nid(zoneref->zone); in zonelist_node_idx()
1687 …* next_zones_zonelist - Returns the next zone at or below highest_zoneidx within the allowed nodem…
1689 * @highest_zoneidx: The zone index of the highest zone to return
1692 * This function returns the next zone at or below a given zone index that is
1694 * search. The zoneref returned is a cursor that represents the current zone
1698 * Return: the next zone at or below highest_zoneidx within the allowed
1711 …* first_zones_zonelist - Returns the first zone at or below highest_zoneidx within the allowed nod…
1712 * @zonelist: The zonelist to search for a suitable zone
1713 * @highest_zoneidx: The zone index of the highest zone to return
1716 * This function returns the first zone at or below a given zone index that is
1721 * When no eligible zone is found, zoneref->zone is NULL (zoneref itself is
1725 * Return: Zoneref pointer for the first suitable zone found
1736 …elper macro to iterate over valid zones in a zonelist at or below a given zone index and within a …
1737 * @zone: The current zone in the iterator
1740 * @highidx: The zone index of the highest zone to return
1743 * This iterator iterates though all zones at or below a given zone index and
1746 #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ argument
1747 for (z = first_zones_zonelist(zlist, highidx, nodemask), zone = zonelist_zone(z); \
1748 zone; \
1750 zone = zonelist_zone(z))
1752 #define for_next_zone_zonelist_nodemask(zone, z, highidx, nodemask) \ argument
1753 for (zone = zonelist_zone(z); \
1754 zone; \
1756 zone = zonelist_zone(z))
1760 …ne_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index
1761 * @zone: The current zone in the iterator
1764 * @highidx: The zone index of the highest zone to return
1766 * This iterator iterates though all zones at or below a given zone index.
1768 #define for_each_zone_zonelist(zone, z, zlist, highidx) \ argument
1769 for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, NULL)
1784 * at least one zone that can satisfy kernel allocations. in movable_only_nodes()
1855 /* See declaration of similar field in struct zone */