• Home
  • Raw
  • Download

Lines Matching refs:ac

2064 static bool unreserve_highatomic_pageblock(const struct alloc_context *ac,  in unreserve_highatomic_pageblock()  argument
2067 struct zonelist *zonelist = ac->zonelist; in unreserve_highatomic_pageblock()
2076 for_each_zone_zonelist_nodemask(zone, z, zonelist, ac->highest_zoneidx, in unreserve_highatomic_pageblock()
2077 ac->nodemask) { in unreserve_highatomic_pageblock()
2128 set_pageblock_migratetype(page, ac->migratetype); in unreserve_highatomic_pageblock()
2129 ret = move_freepages_block(zone, page, ac->migratetype, in unreserve_highatomic_pageblock()
3276 const struct alloc_context *ac) in get_page_from_freelist() argument
3290 z = ac->preferred_zoneref; in get_page_from_freelist()
3291 for_next_zone_zonelist_nodemask(zone, z, ac->highest_zoneidx, in get_page_from_freelist()
3292 ac->nodemask) { in get_page_from_freelist()
3322 if (ac->spread_dirty_pages) { in get_page_from_freelist()
3333 zone != ac->preferred_zoneref->zone) { in get_page_from_freelist()
3341 local_nid = zone_to_nid(ac->preferred_zoneref->zone); in get_page_from_freelist()
3353 ac->highest_zoneidx, alloc_flags, in get_page_from_freelist()
3376 !zone_allows_reclaim(ac->preferred_zoneref->zone, zone)) in get_page_from_freelist()
3390 ac->highest_zoneidx, alloc_flags)) in get_page_from_freelist()
3398 page = rmqueue(ac->preferred_zoneref->zone, zone, order, in get_page_from_freelist()
3399 gfp_mask, alloc_flags, ac->migratetype); in get_page_from_freelist()
3489 const struct alloc_context *ac) in __alloc_pages_cpuset_fallback() argument
3494 alloc_flags|ALLOC_CPUSET, ac); in __alloc_pages_cpuset_fallback()
3501 alloc_flags, ac); in __alloc_pages_cpuset_fallback()
3508 const struct alloc_context *ac, unsigned long *did_some_progress) in __alloc_pages_may_oom() argument
3511 .zonelist = ac->zonelist, in __alloc_pages_may_oom()
3512 .nodemask = ac->nodemask, in __alloc_pages_may_oom()
3541 ALLOC_WMARK_HIGH|ALLOC_CPUSET, ac); in __alloc_pages_may_oom()
3562 if (ac->highest_zoneidx < ZONE_NORMAL) in __alloc_pages_may_oom()
3587 ALLOC_NO_WATERMARKS, ac); in __alloc_pages_may_oom()
3605 unsigned int alloc_flags, const struct alloc_context *ac, in __alloc_pages_direct_compact() argument
3619 *compact_result = try_to_compact_pages(gfp_mask, order, alloc_flags, ac, in __alloc_pages_direct_compact()
3640 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac); in __alloc_pages_direct_compact()
3663 should_compact_retry(struct alloc_context *ac, int order, int alloc_flags, in should_compact_retry() argument
3685 ret = compaction_zonelist_suitable(ac, order, alloc_flags); in should_compact_retry()
3730 unsigned int alloc_flags, const struct alloc_context *ac, in __alloc_pages_direct_compact() argument
3738 should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_flags, in should_compact_retry() argument
3755 for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, in should_compact_retry()
3756 ac->highest_zoneidx, ac->nodemask) { in should_compact_retry()
3758 ac->highest_zoneidx, alloc_flags)) in should_compact_retry()
3851 const struct alloc_context *ac) in __perform_reclaim() argument
3863 progress = try_to_free_pages(ac->zonelist, order, gfp_mask, in __perform_reclaim()
3864 ac->nodemask); in __perform_reclaim()
3877 unsigned int alloc_flags, const struct alloc_context *ac, in __alloc_pages_direct_reclaim() argument
3888 *did_some_progress = __perform_reclaim(gfp_mask, order, ac); in __alloc_pages_direct_reclaim()
3893 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac); in __alloc_pages_direct_reclaim()
3901 unreserve_highatomic_pageblock(ac, false); in __alloc_pages_direct_reclaim()
3903 alloc_flags, ac->migratetype, *did_some_progress, &skip_pcp_drain); in __alloc_pages_direct_reclaim()
3917 const struct alloc_context *ac) in wake_all_kswapds() argument
3922 enum zone_type highest_zoneidx = ac->highest_zoneidx; in wake_all_kswapds()
3924 for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, highest_zoneidx, in wake_all_kswapds()
3925 ac->nodemask) { in wake_all_kswapds()
4041 struct alloc_context *ac, int alloc_flags, in should_reclaim_retry() argument
4068 for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, in should_reclaim_retry()
4069 ac->highest_zoneidx, ac->nodemask) { in should_reclaim_retry()
4083 ac->highest_zoneidx, alloc_flags, available); in should_reclaim_retry()
4106 return unreserve_highatomic_pageblock(ac, true); in should_reclaim_retry()
4112 check_retry_cpuset(int cpuset_mems_cookie, struct alloc_context *ac) in check_retry_cpuset() argument
4125 if (cpusets_enabled() && ac->nodemask && in check_retry_cpuset()
4126 !cpuset_nodemask_valid_mems_allowed(ac->nodemask)) { in check_retry_cpuset()
4127 ac->nodemask = NULL; in check_retry_cpuset()
4146 struct alloc_context *ac) in __alloc_pages_slowpath() argument
4189 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist, in __alloc_pages_slowpath()
4190 ac->highest_zoneidx, ac->nodemask); in __alloc_pages_slowpath()
4191 if (!ac->preferred_zoneref->zone) in __alloc_pages_slowpath()
4200 struct zoneref *z = first_zones_zonelist(ac->zonelist, in __alloc_pages_slowpath()
4201 ac->highest_zoneidx, in __alloc_pages_slowpath()
4208 wake_all_kswapds(order, gfp_mask, ac); in __alloc_pages_slowpath()
4217 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac); in __alloc_pages_slowpath()
4232 (order > 0 && ac->migratetype != MIGRATE_MOVABLE)) in __alloc_pages_slowpath()
4235 alloc_flags, ac, in __alloc_pages_slowpath()
4280 wake_all_kswapds(order, gfp_mask, ac); in __alloc_pages_slowpath()
4293 ac->nodemask = NULL; in __alloc_pages_slowpath()
4294 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist, in __alloc_pages_slowpath()
4295 ac->highest_zoneidx, ac->nodemask); in __alloc_pages_slowpath()
4299 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac); in __alloc_pages_slowpath()
4312 ac->migratetype, ac->preferred_zoneref->zone, &page, &should_alloc_retry); in __alloc_pages_slowpath()
4317 alloc_flags, ac->migratetype, &page); in __alloc_pages_slowpath()
4326 page = __alloc_pages_direct_reclaim(gfp_mask, order, alloc_flags, ac, in __alloc_pages_slowpath()
4333 page = __alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac, in __alloc_pages_slowpath()
4353 if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags, in __alloc_pages_slowpath()
4364 should_compact_retry(ac, order, alloc_flags, in __alloc_pages_slowpath()
4374 if (check_retry_cpuset(cpuset_mems_cookie, ac) || in __alloc_pages_slowpath()
4379 page = __alloc_pages_may_oom(gfp_mask, order, ac, &did_some_progress); in __alloc_pages_slowpath()
4400 if (check_retry_cpuset(cpuset_mems_cookie, ac) || in __alloc_pages_slowpath()
4438 page = __alloc_pages_cpuset_fallback(gfp_mask, order, ALLOC_MIN_RESERVE, ac); in __alloc_pages_slowpath()
4447 alloc_flags, ac->migratetype, &page); in __alloc_pages_slowpath()
4451 warn_alloc(gfp_mask, ac->nodemask, in __alloc_pages_slowpath()
4462 struct alloc_context *ac, gfp_t *alloc_gfp, in prepare_alloc_pages() argument
4465 ac->highest_zoneidx = gfp_zone(gfp_mask); in prepare_alloc_pages()
4466 ac->zonelist = node_zonelist(preferred_nid, gfp_mask); in prepare_alloc_pages()
4467 ac->nodemask = nodemask; in prepare_alloc_pages()
4468 ac->migratetype = gfp_migratetype(gfp_mask); in prepare_alloc_pages()
4476 if (in_task() && !ac->nodemask) in prepare_alloc_pages()
4477 ac->nodemask = &cpuset_current_mems_allowed; in prepare_alloc_pages()
4490 ac->spread_dirty_pages = (gfp_mask & __GFP_WRITE); in prepare_alloc_pages()
4497 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist, in prepare_alloc_pages()
4498 ac->highest_zoneidx, ac->nodemask); in prepare_alloc_pages()
4534 struct alloc_context ac; in __alloc_pages_bulk() local
4577 if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &alloc_gfp, &alloc_flags)) in __alloc_pages_bulk()
4582 for_each_zone_zonelist_nodemask(zone, z, ac.zonelist, ac.highest_zoneidx, ac.nodemask) { in __alloc_pages_bulk()
4590 if (nr_online_nodes > 1 && zone != ac.preferred_zoneref->zone && in __alloc_pages_bulk()
4591 zone_to_nid(zone) != zone_to_nid(ac.preferred_zoneref->zone)) { in __alloc_pages_bulk()
4597 zonelist_zone_idx(ac.preferred_zoneref), in __alloc_pages_bulk()
4617 pcp_list = &pcp->lists[order_to_pindex(ac.migratetype, 0)]; in __alloc_pages_bulk()
4626 page = __rmqueue_pcplist(zone, 0, ac.migratetype, alloc_flags, in __alloc_pages_bulk()
4650 zone_statistics(ac.preferred_zoneref->zone, zone, nr_account); in __alloc_pages_bulk()
4681 struct alloc_context ac = { }; in __alloc_pages() local
4700 if (!prepare_alloc_pages(gfp, order, preferred_nid, nodemask, &ac, in __alloc_pages()
4711 alloc_flags |= alloc_flags_nofragment(ac.preferred_zoneref->zone, gfp); in __alloc_pages()
4714 page = get_page_from_freelist(alloc_gfp, order, alloc_flags, &ac); in __alloc_pages()
4719 ac.spread_dirty_pages = false; in __alloc_pages()
4725 ac.nodemask = nodemask; in __alloc_pages()
4728 page = __alloc_pages_slowpath(alloc_gfp, order, &ac); in __alloc_pages()
4737 trace_mm_page_alloc(page, order, alloc_gfp, ac.migratetype); in __alloc_pages()