Lines Matching refs:zone
323 unsigned long zone_reclaimable_pages(struct zone *zone) in zone_reclaimable_pages() argument
327 nr = zone_page_state_snapshot(zone, NR_ZONE_INACTIVE_FILE) + in zone_reclaimable_pages()
328 zone_page_state_snapshot(zone, NR_ZONE_ACTIVE_FILE); in zone_reclaimable_pages()
330 nr += zone_page_state_snapshot(zone, NR_ZONE_INACTIVE_ANON) + in zone_reclaimable_pages()
331 zone_page_state_snapshot(zone, NR_ZONE_ACTIVE_ANON); in zone_reclaimable_pages()
348 struct zone *zone = &lruvec_pgdat(lruvec)->node_zones[zid]; in lruvec_lru_size() local
350 if (!managed_zone(zone)) in lruvec_lru_size()
356 size += zone_page_state(zone, NR_ZONE_LRU_BASE + lru); in lruvec_lru_size()
1562 unsigned int reclaim_clean_pages_from_list(struct zone *zone, in reclaim_clean_pages_from_list() argument
1583 nr_reclaimed = shrink_page_list(&clean_pages, zone->zone_pgdat, &sc, in reclaim_clean_pages_from_list()
1586 mod_node_page_state(zone->zone_pgdat, NR_ISOLATED_FILE, in reclaim_clean_pages_from_list()
1594 mod_node_page_state(zone->zone_pgdat, NR_ISOLATED_ANON, in reclaim_clean_pages_from_list()
1596 mod_node_page_state(zone->zone_pgdat, NR_ISOLATED_FILE, in reclaim_clean_pages_from_list()
2688 struct zone *zone = &pgdat->node_zones[z]; in should_continue_reclaim() local
2689 if (!managed_zone(zone)) in should_continue_reclaim()
2692 switch (compaction_suitable(zone, sc->order, 0, sc->reclaim_idx)) { in should_continue_reclaim()
2860 struct zone *zone = &pgdat->node_zones[z]; in shrink_node() local
2861 if (!managed_zone(zone)) in shrink_node()
2864 total_high_wmark += high_wmark_pages(zone); in shrink_node()
2973 static inline bool compaction_ready(struct zone *zone, struct scan_control *sc) in compaction_ready() argument
2978 suitable = compaction_suitable(zone, sc->order, 0, sc->reclaim_idx); in compaction_ready()
2995 watermark = high_wmark_pages(zone) + compact_gap(sc->order); in compaction_ready()
2997 return zone_watermark_ok_safe(zone, 0, watermark, sc->reclaim_idx); in compaction_ready()
3011 struct zone *zone; in shrink_zones() local
3028 for_each_zone_zonelist_nodemask(zone, z, zonelist, in shrink_zones()
3035 if (!cpuset_zone_allowed(zone, in shrink_zones()
3050 compaction_ready(zone, sc)) { in shrink_zones()
3061 if (zone->zone_pgdat == last_pgdat) in shrink_zones()
3071 nr_soft_reclaimed = mem_cgroup_soft_limit_reclaim(zone->zone_pgdat, in shrink_zones()
3080 if (zone->zone_pgdat == last_pgdat) in shrink_zones()
3082 last_pgdat = zone->zone_pgdat; in shrink_zones()
3083 shrink_node(zone->zone_pgdat, sc); in shrink_zones()
3128 struct zone *zone; in do_try_to_free_pages() local
3156 for_each_zone_zonelist_nodemask(zone, z, zonelist, sc->reclaim_idx, in do_try_to_free_pages()
3158 if (zone->zone_pgdat == last_pgdat) in do_try_to_free_pages()
3160 last_pgdat = zone->zone_pgdat; in do_try_to_free_pages()
3162 snapshot_refaults(sc->target_mem_cgroup, zone->zone_pgdat); in do_try_to_free_pages()
3168 zone->zone_pgdat); in do_try_to_free_pages()
3212 struct zone *zone; in allow_direct_reclaim() local
3222 zone = &pgdat->node_zones[i]; in allow_direct_reclaim()
3223 if (!managed_zone(zone)) in allow_direct_reclaim()
3226 if (!zone_reclaimable_pages(zone)) in allow_direct_reclaim()
3229 pfmemalloc_reserve += min_wmark_pages(zone); in allow_direct_reclaim()
3230 free_pages += zone_page_state(zone, NR_FREE_PAGES); in allow_direct_reclaim()
3263 struct zone *zone; in throttle_direct_reclaim() local
3297 for_each_zone_zonelist_nodemask(zone, z, zonelist, in throttle_direct_reclaim()
3299 if (zone_idx(zone) > ZONE_NORMAL) in throttle_direct_reclaim()
3303 pgdat = zone->zone_pgdat; in throttle_direct_reclaim()
3332 wait_event_killable(zone->zone_pgdat->pfmemalloc_wait, in throttle_direct_reclaim()
3493 struct zone *zone; in pgdat_watermark_boosted() local
3503 zone = pgdat->node_zones + i; in pgdat_watermark_boosted()
3504 if (!managed_zone(zone)) in pgdat_watermark_boosted()
3507 if (zone->watermark_boost) in pgdat_watermark_boosted()
3522 struct zone *zone; in pgdat_balanced() local
3529 zone = pgdat->node_zones + i; in pgdat_balanced()
3531 if (!managed_zone(zone)) in pgdat_balanced()
3534 mark = high_wmark_pages(zone); in pgdat_balanced()
3535 if (zone_watermark_ok_safe(zone, order, mark, highest_zoneidx)) in pgdat_balanced()
3608 struct zone *zone; in kswapd_shrink_node() local
3614 zone = pgdat->node_zones + z; in kswapd_shrink_node()
3615 if (!managed_zone(zone)) in kswapd_shrink_node()
3618 sc->nr_to_reclaim += max(high_wmark_pages(zone), SWAP_CLUSTER_MAX); in kswapd_shrink_node()
3662 struct zone *zone; in balance_pgdat() local
3682 zone = pgdat->node_zones + i; in balance_pgdat()
3683 if (!managed_zone(zone)) in balance_pgdat()
3686 nr_boost_reclaim += zone->watermark_boost; in balance_pgdat()
3687 zone_boosts[i] = zone->watermark_boost; in balance_pgdat()
3713 zone = pgdat->node_zones + i; in balance_pgdat()
3714 if (!managed_zone(zone)) in balance_pgdat()
3834 zone = pgdat->node_zones + i; in balance_pgdat()
3835 spin_lock_irqsave(&zone->lock, flags); in balance_pgdat()
3836 zone->watermark_boost -= min(zone->watermark_boost, zone_boosts[i]); in balance_pgdat()
3837 spin_unlock_irqrestore(&zone->lock, flags); in balance_pgdat()
4100 void wakeup_kswapd(struct zone *zone, gfp_t gfp_flags, int order, in wakeup_kswapd() argument
4106 if (!managed_zone(zone)) in wakeup_kswapd()
4109 if (!cpuset_zone_allowed(zone, gfp_flags)) in wakeup_kswapd()
4112 pgdat = zone->zone_pgdat; in wakeup_kswapd()