|
@@ -2492,16 +2492,16 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
|
|
*/
|
|
*/
|
|
if (zone_pagecache_reclaimable(zone) <= zone->min_unmapped_pages &&
|
|
if (zone_pagecache_reclaimable(zone) <= zone->min_unmapped_pages &&
|
|
zone_page_state(zone, NR_SLAB_RECLAIMABLE) <= zone->min_slab_pages)
|
|
zone_page_state(zone, NR_SLAB_RECLAIMABLE) <= zone->min_slab_pages)
|
|
- return 0;
|
|
|
|
|
|
+ return ZONE_RECLAIM_FULL;
|
|
|
|
|
|
if (zone_is_all_unreclaimable(zone))
|
|
if (zone_is_all_unreclaimable(zone))
|
|
- return 0;
|
|
|
|
|
|
+ return ZONE_RECLAIM_FULL;
|
|
|
|
|
|
/*
|
|
/*
|
|
* Do not scan if the allocation should not be delayed.
|
|
* Do not scan if the allocation should not be delayed.
|
|
*/
|
|
*/
|
|
if (!(gfp_mask & __GFP_WAIT) || (current->flags & PF_MEMALLOC))
|
|
if (!(gfp_mask & __GFP_WAIT) || (current->flags & PF_MEMALLOC))
|
|
- return 0;
|
|
|
|
|
|
+ return ZONE_RECLAIM_NOSCAN;
|
|
|
|
|
|
/*
|
|
/*
|
|
* Only run zone reclaim on the local zone or on zones that do not
|
|
* Only run zone reclaim on the local zone or on zones that do not
|
|
@@ -2511,10 +2511,11 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
|
|
*/
|
|
*/
|
|
node_id = zone_to_nid(zone);
|
|
node_id = zone_to_nid(zone);
|
|
if (node_state(node_id, N_CPU) && node_id != numa_node_id())
|
|
if (node_state(node_id, N_CPU) && node_id != numa_node_id())
|
|
- return 0;
|
|
|
|
|
|
+ return ZONE_RECLAIM_NOSCAN;
|
|
|
|
|
|
if (zone_test_and_set_flag(zone, ZONE_RECLAIM_LOCKED))
|
|
if (zone_test_and_set_flag(zone, ZONE_RECLAIM_LOCKED))
|
|
- return 0;
|
|
|
|
|
|
+ return ZONE_RECLAIM_NOSCAN;
|
|
|
|
+
|
|
ret = __zone_reclaim(zone, gfp_mask, order);
|
|
ret = __zone_reclaim(zone, gfp_mask, order);
|
|
zone_clear_flag(zone, ZONE_RECLAIM_LOCKED);
|
|
zone_clear_flag(zone, ZONE_RECLAIM_LOCKED);
|
|
|
|
|