• Home
  • Raw
  • Download

Lines Matching full:zone

125  * zone->lock and the zone lru_lock are two of the hottest locks in the kernel.
127 * cachelines. There are very few zone structures in the machine, so space
144 NUMA_INTERLEAVE_HIT, /* interleaver preferred this zone */
459 struct zone { struct
462 /* zone watermarks, access with *_wmark_pages(zone) macros */
471 * wasting several GB of ram we must reserve some of the lower zone argument
497 * spanned_pages is the total pages spanned by the zone, including argument
501 * present_pages is physical pages existing within the zone, which
519 * It is a seqlock because it has to be read outside of zone->lock,
523 * The span_seq lock is declared along with zone->lock because it is
524 * frequently read in proximity to zone->lock. It's good to
541 * of pageblock. Protected by zone->lock. argument
559 /* zone flags, see below */ argument
604 /* Zone statistics */
621 ZONE_BOOSTED_WATERMARK, /* zone recently boosted watermarks. argument
626 static inline unsigned long zone_managed_pages(struct zone *zone) in zone_managed_pages() argument
628 return (unsigned long)atomic_long_read(&zone->managed_pages); in zone_managed_pages()
631 static inline unsigned long zone_end_pfn(const struct zone *zone) in zone_end_pfn() argument
633 return zone->zone_start_pfn + zone->spanned_pages; in zone_end_pfn()
636 static inline bool zone_spans_pfn(const struct zone *zone, unsigned long pfn) in zone_spans_pfn() argument
638 return zone->zone_start_pfn <= pfn && pfn < zone_end_pfn(zone); in zone_spans_pfn()
641 static inline bool zone_is_initialized(struct zone *zone) in zone_is_initialized() argument
643 return zone->initialized; in zone_is_initialized()
646 static inline bool zone_is_empty(struct zone *zone) in zone_is_empty() argument
648 return zone->spanned_pages == 0; in zone_is_empty()
653 * intersection with the given zone
655 static inline bool zone_intersects(struct zone *zone, in zone_intersects() argument
658 if (zone_is_empty(zone)) in zone_intersects()
660 if (start_pfn >= zone_end_pfn(zone) || in zone_intersects()
661 start_pfn + nr_pages <= zone->zone_start_pfn) in zone_intersects()
690 * This struct contains information about a zone in a zonelist. It is stored
694 struct zone *zone; /* Pointer to actual zone */ member
695 int zone_idx; /* zone_idx(zoneref->zone) */
704 * To speed the reading of the zonelist, the zonerefs contain the zone index
708 * zonelist_zone() - Return the struct zone * for an entry in _zonerefs
709 * zonelist_zone_idx() - Return the index of the zone for an entry
735 * per-zone basis.
743 struct zone node_zones[MAX_NR_ZONES];
770 * Nests above zone->lock and zone->span_seqlock
878 void wakeup_kswapd(struct zone *zone, gfp_t gfp_mask, int order,
880 bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
883 bool zone_watermark_ok(struct zone *z, unsigned int order,
886 bool zone_watermark_ok_safe(struct zone *z, unsigned int order,
897 extern void init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
927 * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
929 #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) argument
932 * Returns true if a zone has pages managed by the buddy allocator.
934 * populated_zone(). If the whole zone is reserved then we can easily
937 static inline bool managed_zone(struct zone *zone) in managed_zone() argument
939 return zone_managed_pages(zone); in managed_zone()
942 /* Returns true if a zone has memory */
943 static inline bool populated_zone(struct zone *zone) in populated_zone() argument
945 return zone->present_pages; in populated_zone()
949 static inline int zone_to_nid(struct zone *zone) in zone_to_nid() argument
951 return zone->node; in zone_to_nid()
954 static inline void zone_set_nid(struct zone *zone, int nid) in zone_set_nid() argument
956 zone->node = nid; in zone_set_nid()
959 static inline int zone_to_nid(struct zone *zone) in zone_to_nid() argument
964 static inline void zone_set_nid(struct zone *zone, int nid) {} in zone_set_nid() argument
1000 * is_highmem - helper function to quickly check if a struct zone is a
1001 * highmem zone or not. This is an attempt to keep references
1003 * @zone - pointer to struct zone variable
1005 static inline int is_highmem(struct zone *zone) in is_highmem() argument
1008 return is_highmem_idx(zone_idx(zone)); in is_highmem()
1014 /* These two functions are used to setup the per zone pages min values */
1050 extern struct zone *next_zone(struct zone *zone);
1062 * @zone - pointer to struct zone variable
1064 * The user only needs to declare the zone variable, for_each_zone
1067 #define for_each_zone(zone) \ argument
1068 for (zone = (first_online_pgdat())->node_zones; \
1069 zone; \
1070 zone = next_zone(zone))
1072 #define for_each_populated_zone(zone) \ argument
1073 for (zone = (first_online_pgdat())->node_zones; \
1074 zone; \
1075 zone = next_zone(zone)) \
1076 if (!populated_zone(zone)) \
1080 static inline struct zone *zonelist_zone(struct zoneref *zoneref) in zonelist_zone()
1082 return zoneref->zone; in zonelist_zone()
1092 return zone_to_nid(zoneref->zone); in zonelist_node_idx()
1100 …* next_zones_zonelist - Returns the next zone at or below highest_zoneidx within the allowed nodem…
1102 * @highest_zoneidx - The zone index of the highest zone to return
1105 * This function returns the next zone at or below a given zone index that is
1107 * search. The zoneref returned is a cursor that represents the current zone
1121 …* first_zones_zonelist - Returns the first zone at or below highest_zoneidx within the allowed nod…
1122 * @zonelist - The zonelist to search for a suitable zone
1123 * @highest_zoneidx - The zone index of the highest zone to return
1125 * @return - Zoneref pointer for the first suitable zone found (see below)
1127 * This function returns the first zone at or below a given zone index that is
1132 * When no eligible zone is found, zoneref->zone is NULL (zoneref itself is
1145 …elper macro to iterate over valid zones in a zonelist at or below a given zone index and within a …
1146 * @zone - The current zone in the iterator
1149 * @highidx - The zone index of the highest zone to return
1152 * This iterator iterates though all zones at or below a given zone index and
1155 #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ argument
1156 for (z = first_zones_zonelist(zlist, highidx, nodemask), zone = zonelist_zone(z); \
1157 zone; \
1159 zone = zonelist_zone(z))
1161 #define for_next_zone_zonelist_nodemask(zone, z, highidx, nodemask) \ argument
1162 for (zone = z->zone; \
1163 zone; \
1165 zone = zonelist_zone(z))
1169 …ne_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index
1170 * @zone - The current zone in the iterator
1173 * @highidx - The zone index of the highest zone to return
1175 * This iterator iterates though all zones at or below a given zone index.
1177 #define for_each_zone_zonelist(zone, z, zlist, highidx) \ argument
1178 for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, NULL)
1243 /* See declaration of similar field in struct zone */
1510 * the zone and PFN linkages are still valid. This is expensive, but walkers
1514 struct page *page, struct zone *zone);
1517 struct page *page, struct zone *zone) in memmap_valid_within() argument