Commit 43dc77b0 authored by Andrea Arcangeli's avatar Andrea Arcangeli

mm: zone_reclaim: remove ZONE_RECLAIM_LOCKED

Zone reclaim locked breaks zone_reclaim_mode=1. If more than one
thread allocates memory at the same time, it forces a premature
allocation into remote NUMA nodes even when there's plenty of clean
cache to reclaim in the local nodes.
Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Reviewed-by: default avatarRik van Riel <riel@redhat.com>
Acked-by: default avatarRafael Aquini <aquini@redhat.com>
Acked-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
parent 93585352
...@@ -530,7 +530,6 @@ struct zone { ...@@ -530,7 +530,6 @@ struct zone {
} ____cacheline_internodealigned_in_smp; } ____cacheline_internodealigned_in_smp;
enum zone_flags { enum zone_flags {
ZONE_RECLAIM_LOCKED, /* prevents concurrent reclaim */
ZONE_OOM_LOCKED, /* zone is in OOM killer zonelist */ ZONE_OOM_LOCKED, /* zone is in OOM killer zonelist */
ZONE_CONGESTED, /* zone has many dirty pages backed by ZONE_CONGESTED, /* zone has many dirty pages backed by
* a congested BDI * a congested BDI
......
...@@ -3743,11 +3743,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) ...@@ -3743,11 +3743,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
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 ZONE_RECLAIM_NOSCAN; return ZONE_RECLAIM_NOSCAN;
if (test_and_set_bit(ZONE_RECLAIM_LOCKED, &zone->flags))
return ZONE_RECLAIM_NOSCAN;
ret = __zone_reclaim(zone, gfp_mask, order); ret = __zone_reclaim(zone, gfp_mask, order);
clear_bit(ZONE_RECLAIM_LOCKED, &zone->flags);
if (!ret) if (!ret)
count_vm_event(PGSCAN_ZONE_RECLAIM_FAILED); count_vm_event(PGSCAN_ZONE_RECLAIM_FAILED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment