aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2015-02-11 18:25:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 20:06:01 -0500
commitcfc511557945812280699a92f171ddd2d254aca6 (patch)
treecfcca683cfa96c3e3e07b5decd55729eabef33e9 /mm/vmscan.c
parent44628d9755e249aab9a6e1a17407d2f4278047ee (diff)
mm, vmscan: wake up all pfmemalloc-throttled processes at once
Kswapd in balance_pgdate() currently uses wake_up() on processes waiting in throttle_direct_reclaim(), which only wakes up a single process. This might leave processes waiting for longer than necessary, until the check is reached in the next loop iteration. Processes might also be left waiting if zone was fully balanced in single iteration. Note that the comment in balance_pgdat() also says "Wake them", so waking up a single process does not seem intentional. Thus, replace wake_up() with wake_up_all(). Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@suse.de> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Cc: Vladimir Davydov <vdavydov@parallels.com> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index dcd90c891d8e..f756a202d5d5 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3175,7 +3175,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
3175 */ 3175 */
3176 if (waitqueue_active(&pgdat->pfmemalloc_wait) && 3176 if (waitqueue_active(&pgdat->pfmemalloc_wait) &&
3177 pfmemalloc_watermark_ok(pgdat)) 3177 pfmemalloc_watermark_ok(pgdat))
3178 wake_up(&pgdat->pfmemalloc_wait); 3178 wake_up_all(&pgdat->pfmemalloc_wait);
3179 3179
3180 /* 3180 /*
3181 * Fragmentation may mean that the system cannot be rebalanced 3181 * Fragmentation may mean that the system cannot be rebalanced