Lines Matching refs:ac

2110 						const struct alloc_context *ac)  in get_page_from_freelist()  argument
2112 struct zonelist *zonelist = ac->zonelist; in get_page_from_freelist()
2131 for_each_zone_zonelist_nodemask(zone, z, zonelist, ac->high_zoneidx, in get_page_from_freelist()
2132 ac->nodemask) { in get_page_from_freelist()
2149 if (!zone_local(ac->preferred_zone, zone)) in get_page_from_freelist()
2187 ac->classzone_idx, alloc_flags)) { in get_page_from_freelist()
2208 !zone_allows_reclaim(ac->preferred_zone, zone)) in get_page_from_freelist()
2230 ac->classzone_idx, alloc_flags)) in get_page_from_freelist()
2251 page = buffered_rmqueue(ac->preferred_zone, zone, order, in get_page_from_freelist()
2252 gfp_mask, ac->migratetype); in get_page_from_freelist()
2275 reset_alloc_batches(ac->preferred_zone); in get_page_from_freelist()
2397 const struct alloc_context *ac, unsigned long *did_some_progress) in __alloc_pages_may_oom() argument
2407 if (!oom_zonelist_trylock(ac->zonelist, gfp_mask)) { in __alloc_pages_may_oom()
2419 ALLOC_WMARK_HIGH|ALLOC_CPUSET, ac); in __alloc_pages_may_oom()
2431 if (ac->high_zoneidx < ZONE_NORMAL) in __alloc_pages_may_oom()
2448 if (out_of_memory(ac->zonelist, gfp_mask, order, ac->nodemask, false) in __alloc_pages_may_oom()
2452 oom_zonelist_unlock(ac->zonelist, gfp_mask); in __alloc_pages_may_oom()
2460 int alloc_flags, const struct alloc_context *ac, in __alloc_pages_direct_compact() argument
2471 compact_result = try_to_compact_pages(gfp_mask, order, alloc_flags, ac, in __alloc_pages_direct_compact()
2492 alloc_flags & ~ALLOC_NO_WATERMARKS, ac); in __alloc_pages_direct_compact()
2516 int alloc_flags, const struct alloc_context *ac, in __alloc_pages_direct_compact() argument
2527 const struct alloc_context *ac) in __perform_reclaim() argument
2541 progress = try_to_free_pages(ac->zonelist, order, gfp_mask, in __perform_reclaim()
2542 ac->nodemask); in __perform_reclaim()
2556 int alloc_flags, const struct alloc_context *ac, in __alloc_pages_direct_reclaim() argument
2562 *did_some_progress = __perform_reclaim(gfp_mask, order, ac); in __alloc_pages_direct_reclaim()
2568 zlc_clear_zones_full(ac->zonelist); in __alloc_pages_direct_reclaim()
2572 alloc_flags & ~ALLOC_NO_WATERMARKS, ac); in __alloc_pages_direct_reclaim()
2593 const struct alloc_context *ac) in __alloc_pages_high_priority() argument
2599 ALLOC_NO_WATERMARKS, ac); in __alloc_pages_high_priority()
2602 wait_iff_congested(ac->preferred_zone, BLK_RW_ASYNC, in __alloc_pages_high_priority()
2609 static void wake_all_kswapds(unsigned int order, const struct alloc_context *ac) in wake_all_kswapds() argument
2614 for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, in wake_all_kswapds()
2615 ac->high_zoneidx, ac->nodemask) in wake_all_kswapds()
2616 wakeup_kswapd(zone, order, zone_idx(ac->preferred_zone)); in wake_all_kswapds()
2675 struct alloc_context *ac) in __alloc_pages_slowpath() argument
2707 wake_all_kswapds(order, ac); in __alloc_pages_slowpath()
2720 if (!(alloc_flags & ALLOC_CPUSET) && !ac->nodemask) { in __alloc_pages_slowpath()
2722 preferred_zoneref = first_zones_zonelist(ac->zonelist, in __alloc_pages_slowpath()
2723 ac->high_zoneidx, NULL, &ac->preferred_zone); in __alloc_pages_slowpath()
2724 ac->classzone_idx = zonelist_zone_idx(preferred_zoneref); in __alloc_pages_slowpath()
2729 alloc_flags & ~ALLOC_NO_WATERMARKS, ac); in __alloc_pages_slowpath()
2740 ac->zonelist = node_zonelist(numa_node_id(), gfp_mask); in __alloc_pages_slowpath()
2742 page = __alloc_pages_high_priority(gfp_mask, order, ac); in __alloc_pages_slowpath()
2772 page = __alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac, in __alloc_pages_slowpath()
2820 page = __alloc_pages_direct_reclaim(gfp_mask, order, alloc_flags, ac, in __alloc_pages_slowpath()
2835 page = __alloc_pages_may_oom(gfp_mask, order, ac, in __alloc_pages_slowpath()
2843 wait_iff_congested(ac->preferred_zone, BLK_RW_ASYNC, HZ/50); in __alloc_pages_slowpath()
2852 alloc_flags, ac, migration_mode, in __alloc_pages_slowpath()
2877 struct alloc_context ac = { in __alloc_pages_nodemask() local
2900 if (IS_ENABLED(CONFIG_CMA) && ac.migratetype == MIGRATE_MOVABLE) in __alloc_pages_nodemask()
2907 ac.zonelist = zonelist; in __alloc_pages_nodemask()
2909 preferred_zoneref = first_zones_zonelist(ac.zonelist, ac.high_zoneidx, in __alloc_pages_nodemask()
2910 ac.nodemask ? : &cpuset_current_mems_allowed, in __alloc_pages_nodemask()
2911 &ac.preferred_zone); in __alloc_pages_nodemask()
2912 if (!ac.preferred_zone) in __alloc_pages_nodemask()
2914 ac.classzone_idx = zonelist_zone_idx(preferred_zoneref); in __alloc_pages_nodemask()
2918 page = get_page_from_freelist(alloc_mask, order, alloc_flags, &ac); in __alloc_pages_nodemask()
2927 page = __alloc_pages_slowpath(alloc_mask, order, &ac); in __alloc_pages_nodemask()
2933 trace_mm_page_alloc(page, order, alloc_mask, ac.migratetype); in __alloc_pages_nodemask()