Lines Matching full:zone

126 	NUMA_INTERLEAVE_HIT,	/* interleaver preferred this zone */
679 * zone lock contention and keep cache-hot pages reusing.
768 * faulted, they come from the right zone right away. However, it is
772 * to a different zone. When migration fails - pinning fails.
793 * on different platforms may end up in a movable zone. ZERO_PAGE(0)
796 * memory to the MOVABLE zone, the vmemmap pages are also placed in
797 * such zone. Such pages cannot be really moved around as they are
819 struct zone { struct
822 /* zone watermarks, access with *_wmark_pages(zone) macros */
831 * wasting several GB of ram we must reserve some of the lower zone argument
865 * spanned_pages is the total pages spanned by the zone, including argument
869 * present_pages is physical pages existing within the zone, which
873 * present_early_pages is present pages existing within the zone
894 * It is a seqlock because it has to be read outside of zone->lock,
898 * The span_seq lock is declared along with zone->lock because it is
899 * frequently read in proximity to zone->lock. It's good to
922 * of pageblock. Protected by zone->lock. argument
945 /* zone flags, see below */ argument
990 /* Zone statistics */
1007 ZONE_BOOSTED_WATERMARK, /* zone recently boosted watermarks. argument
1010 ZONE_RECLAIM_ACTIVE, /* kswapd may be scanning the zone. */
1011 ZONE_BELOW_HIGH, /* zone is below high watermark. */
1014 static inline unsigned long zone_managed_pages(struct zone *zone) in zone_managed_pages() argument
1016 return (unsigned long)atomic_long_read(&zone->managed_pages); in zone_managed_pages()
1019 static inline unsigned long zone_cma_pages(struct zone *zone) in zone_cma_pages() argument
1022 return zone->cma_pages; in zone_cma_pages()
1028 static inline unsigned long zone_end_pfn(const struct zone *zone) in zone_end_pfn() argument
1030 return zone->zone_start_pfn + zone->spanned_pages; in zone_end_pfn()
1033 static inline bool zone_spans_pfn(const struct zone *zone, unsigned long pfn) in zone_spans_pfn() argument
1035 return zone->zone_start_pfn <= pfn && pfn < zone_end_pfn(zone); in zone_spans_pfn()
1038 static inline bool zone_is_initialized(struct zone *zone) in zone_is_initialized() argument
1040 return zone->initialized; in zone_is_initialized()
1043 static inline bool zone_is_empty(struct zone *zone) in zone_is_empty() argument
1045 return zone->spanned_pages == 0; in zone_is_empty()
1050 * The zone field is never updated after free_area_init_core()
1054 /* Page flags: | [SECTION] | [NODE] | ZONE | [LAST_CPUPID] | ... | FLAGS | */
1074 /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allocator */
1112 * Consecutive zone device pages should not be merged into the same sgl
1116 * both pages are not zone device pages or both pages are zone device pages
1129 extern void memmap_init_zone_device(struct zone *, unsigned long,
1161 * intersection with the given zone
1163 static inline bool zone_intersects(struct zone *zone, in zone_intersects() argument
1166 if (zone_is_empty(zone)) in zone_intersects()
1168 if (start_pfn >= zone_end_pfn(zone) || in zone_intersects()
1169 start_pfn + nr_pages <= zone->zone_start_pfn) in zone_intersects()
1198 * This struct contains information about a zone in a zonelist. It is stored
1202 struct zone *zone; /* Pointer to actual zone */ member
1203 int zone_idx; /* zone_idx(zoneref->zone) */
1212 * To speed the reading of the zonelist, the zonerefs contain the zone index
1216 * zonelist_zone() - Return the struct zone * for an entry in _zonerefs
1217 * zonelist_zone_idx() - Return the index of the zone for an entry
1270 * per-zone basis.
1278 struct zone node_zones[MAX_NR_ZONES];
1305 * Nests above zone->lock and zone->span_seqlock
1428 void wakeup_kswapd(struct zone *zone, gfp_t gfp_mask, int order,
1430 bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
1433 bool zone_watermark_ok(struct zone *z, unsigned int order,
1436 bool zone_watermark_ok_safe(struct zone *z, unsigned int order,
1447 extern void init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
1468 * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
1470 #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) argument
1473 static inline bool zone_is_zone_device(struct zone *zone) in zone_is_zone_device() argument
1475 return zone_idx(zone) == ZONE_DEVICE; in zone_is_zone_device()
1478 static inline bool zone_is_zone_device(struct zone *zone) in zone_is_zone_device() argument
1485 * Returns true if a zone has pages managed by the buddy allocator.
1487 * populated_zone(). If the whole zone is reserved then we can easily
1490 static inline bool managed_zone(struct zone *zone) in managed_zone() argument
1492 return zone_managed_pages(zone); in managed_zone()
1495 /* Returns true if a zone has memory */
1496 static inline bool populated_zone(struct zone *zone) in populated_zone() argument
1498 return zone->present_pages; in populated_zone()
1502 static inline int zone_to_nid(struct zone *zone) in zone_to_nid() argument
1504 return zone->node; in zone_to_nid()
1507 static inline void zone_set_nid(struct zone *zone, int nid) in zone_set_nid() argument
1509 zone->node = nid; in zone_set_nid()
1512 static inline int zone_to_nid(struct zone *zone) in zone_to_nid() argument
1517 static inline void zone_set_nid(struct zone *zone, int nid) {} in zone_set_nid() argument
1533 * is_highmem - helper function to quickly check if a struct zone is a
1534 * highmem zone or not. This is an attempt to keep references
1536 * @zone: pointer to struct zone variable
1537 * Return: 1 for a highmem zone, 0 otherwise
1539 static inline int is_highmem(struct zone *zone) in is_highmem() argument
1541 return is_highmem_idx(zone_idx(zone)); in is_highmem()
1570 extern struct zone *next_zone(struct zone *zone);
1582 * @zone: pointer to struct zone variable
1584 * The user only needs to declare the zone variable, for_each_zone
1587 #define for_each_zone(zone) \ argument
1588 for (zone = (first_online_pgdat())->node_zones; \
1589 zone; \
1590 zone = next_zone(zone))
1592 #define for_each_populated_zone(zone) \ argument
1593 for (zone = (first_online_pgdat())->node_zones; \
1594 zone; \
1595 zone = next_zone(zone)) \
1596 if (!populated_zone(zone)) \
1600 static inline struct zone *zonelist_zone(struct zoneref *zoneref) in zonelist_zone()
1602 return zoneref->zone; in zonelist_zone()
1612 return zone_to_nid(zoneref->zone); in zonelist_node_idx()
1620 …* next_zones_zonelist - Returns the next zone at or below highest_zoneidx within the allowed nodem…
1622 * @highest_zoneidx: The zone index of the highest zone to return
1625 * This function returns the next zone at or below a given zone index that is
1627 * search. The zoneref returned is a cursor that represents the current zone
1631 * Return: the next zone at or below highest_zoneidx within the allowed
1644 …* first_zones_zonelist - Returns the first zone at or below highest_zoneidx within the allowed nod…
1645 * @zonelist: The zonelist to search for a suitable zone
1646 * @highest_zoneidx: The zone index of the highest zone to return
1649 * This function returns the first zone at or below a given zone index that is
1654 * When no eligible zone is found, zoneref->zone is NULL (zoneref itself is
1658 * Return: Zoneref pointer for the first suitable zone found
1669 …elper macro to iterate over valid zones in a zonelist at or below a given zone index and within a …
1670 * @zone: The current zone in the iterator
1673 * @highidx: The zone index of the highest zone to return
1676 * This iterator iterates though all zones at or below a given zone index and
1679 #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ argument
1680 for (z = first_zones_zonelist(zlist, highidx, nodemask), zone = zonelist_zone(z); \
1681 zone; \
1683 zone = zonelist_zone(z))
1685 #define for_next_zone_zonelist_nodemask(zone, z, highidx, nodemask) \ argument
1686 for (zone = z->zone; \
1687 zone; \
1689 zone = zonelist_zone(z))
1693 …ne_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index
1694 * @zone: The current zone in the iterator
1697 * @highidx: The zone index of the highest zone to return
1699 * This iterator iterates though all zones at or below a given zone index.
1701 #define for_each_zone_zonelist(zone, z, zlist, highidx) \ argument
1702 for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, NULL)
1717 * at least one zone that can satisfy kernel allocations. in movable_only_nodes()
1722 return (!z->zone) ? true : false; in movable_only_nodes()
1788 /* See declaration of similar field in struct zone */