Lines Matching defs:ac
3484 static bool unreserve_highatomic_pageblock(const struct alloc_context *ac,
3487 struct zonelist *zonelist = ac->zonelist;
3494 for_each_zone_zonelist_nodemask(zone, z, zonelist, ac->highest_zoneidx,
3495 ac->nodemask) {
3526 * Convert to ac->migratetype and avoid the normal
3537 ac->migratetype);
3541 ac->migratetype);
3543 ac->migratetype);
3793 const struct alloc_context *ac)
3809 z = ac->preferred_zoneref;
3810 for_next_zone_zonelist_nodemask(zone, z, ac->highest_zoneidx,
3811 ac->nodemask) {
3838 if (ac->spread_dirty_pages) {
3849 zone != zonelist_zone(ac->preferred_zoneref)) {
3857 local_nid = zonelist_node_idx(ac->preferred_zoneref);
3891 ac->highest_zoneidx, alloc_flags,
3900 ac->highest_zoneidx, alloc_flags,
3921 !zone_allows_reclaim(zonelist_zone(ac->preferred_zoneref), zone))
3935 ac->highest_zoneidx, alloc_flags))
3943 page = rmqueue(zonelist_zone(ac->preferred_zoneref), zone, order,
3944 gfp_mask, alloc_flags, ac->migratetype);
4030 const struct alloc_context *ac)
4035 alloc_flags|ALLOC_CPUSET, ac);
4042 alloc_flags, ac);
4048 const struct alloc_context *ac, unsigned long *did_some_progress)
4051 .zonelist = ac->zonelist,
4052 .nodemask = ac->nodemask,
4080 ALLOC_WMARK_HIGH|ALLOC_CPUSET, ac);
4101 if (ac->highest_zoneidx < ZONE_NORMAL)
4126 ALLOC_NO_WATERMARKS, ac);
4143 unsigned int alloc_flags, const struct alloc_context *ac,
4157 *compact_result = try_to_compact_pages(gfp_mask, order, alloc_flags, ac,
4179 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac);
4202 should_compact_retry(gfp_t gfp_mask, struct alloc_context *ac, int order,
4225 ret = compaction_zonelist_suitable(ac, order, alloc_flags,
4271 unsigned int alloc_flags, const struct alloc_context *ac,
4279 should_compact_retry(gfp_t gfp_mask, struct alloc_context *ac, int order,
4297 for_each_zone_zonelist_nodemask(zone, z, ac->zonelist,
4298 ac->highest_zoneidx, ac->nodemask) {
4300 ac->highest_zoneidx, alloc_flags))
4393 const struct alloc_context *ac)
4405 progress = try_to_free_pages(ac->zonelist, order, gfp_mask,
4406 ac->nodemask);
4419 unsigned int alloc_flags, const struct alloc_context *ac,
4427 *did_some_progress = __perform_reclaim(gfp_mask, order, ac);
4432 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac);
4440 unreserve_highatomic_pageblock(ac, false);
4452 const struct alloc_context *ac)
4457 enum zone_type highest_zoneidx = ac->highest_zoneidx;
4465 for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, highest_zoneidx,
4466 ac->nodemask) {
4582 struct alloc_context *ac, int alloc_flags,
4609 for_each_zone_zonelist_nodemask(zone, z, ac->zonelist,
4610 ac->highest_zoneidx, ac->nodemask) {
4629 ac->highest_zoneidx, alloc_flags, available);
4652 return unreserve_highatomic_pageblock(ac, true);
4658 check_retry_cpuset(int cpuset_mems_cookie, struct alloc_context *ac)
4666 * This assumes that for all allocations, ac->nodemask can come only
4671 if (cpusets_enabled() && ac->nodemask &&
4672 !cpuset_nodemask_valid_mems_allowed(ac->nodemask)) {
4673 ac->nodemask = NULL;
4726 struct alloc_context *ac)
4776 ac->migratetype != MIGRATE_MOVABLE))) {
4794 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist,
4795 ac->highest_zoneidx, ac->nodemask);
4796 if (!zonelist_zone(ac->preferred_zoneref))
4805 struct zoneref *z = first_zones_zonelist(ac->zonelist,
4806 ac->highest_zoneidx,
4815 wake_all_kswapds(order, gfp_mask, ac);
4821 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac);
4836 ac->nodemask = NULL;
4837 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist,
4838 ac->highest_zoneidx, ac->nodemask);
4872 check_alloc_stall_warn(gfp_mask, ac->nodemask, order, alloc_start_time);
4877 ac, &did_some_progress);
4883 page = __alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac,
4932 if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
4936 if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags,
4947 should_compact_retry(gfp_mask, ac, order, alloc_flags,
4962 if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
4967 page = __alloc_pages_may_oom(gfp_mask, order, ac, &did_some_progress);
4988 if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
5012 page = __alloc_pages_cpuset_fallback(gfp_mask, order, ALLOC_MIN_RESERVE, ac);
5020 warn_alloc(gfp_mask, ac->nodemask,
5028 struct alloc_context *ac, gfp_t *alloc_gfp,
5031 ac->highest_zoneidx = gfp_zone(gfp_mask);
5032 ac->zonelist = node_zonelist(preferred_nid, gfp_mask);
5033 ac->nodemask = nodemask;
5034 ac->migratetype = gfp_migratetype(gfp_mask);
5042 if (in_task() && !ac->nodemask)
5043 ac->nodemask = &cpuset_current_mems_allowed;
5061 ac->spread_dirty_pages = (gfp_mask & __GFP_WRITE);
5068 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist,
5069 ac->highest_zoneidx, ac->nodemask);
5104 struct alloc_context ac;
5145 if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &gfp, &alloc_flags))
5149 z = ac.preferred_zoneref;
5150 for_next_zone_zonelist_nodemask(zone, z, ac.highest_zoneidx, ac.nodemask) {
5158 if (nr_online_nodes > 1 && zone != zonelist_zone(ac.preferred_zoneref) &&
5159 zone_to_nid(zone) != zonelist_node_idx(ac.preferred_zoneref)) {
5167 zonelist_zone_idx(ac.preferred_zoneref),
5195 pcp_list = &pcp->lists[order_to_pindex(ac.migratetype, 0)];
5204 page = __rmqueue_pcplist(zone, 0, ac.migratetype, alloc_flags,
5224 zone_statistics(zonelist_zone(ac.preferred_zoneref), zone, nr_account);
5274 struct alloc_context ac = { };
5293 if (!prepare_alloc_pages(gfp, order, preferred_nid, nodemask, &ac,
5301 alloc_flags |= alloc_flags_nofragment(zonelist_zone(ac.preferred_zoneref), gfp);
5304 page = get_page_from_freelist(alloc_gfp, order, alloc_flags, &ac);
5309 ac.spread_dirty_pages = false;
5315 ac.nodemask = nodemask;
5317 page = __alloc_pages_slowpath(alloc_gfp, order, &ac);
5326 trace_mm_page_alloc(page, order, alloc_gfp, ac.migratetype);
7891 struct alloc_context ac = { };
7923 prepare_alloc_pages(alloc_gfp, order, nid, NULL, &ac,
7930 page = get_page_from_freelist(alloc_gfp, order, alloc_flags, &ac);
7939 trace_mm_page_alloc(page, order, alloc_gfp, ac.migratetype);