Skip to content

Commit d6c438b

Browse files
hkamezawatorvalds
authored andcommitted
memcg: fix zone congestion
ZONE_CONGESTED should be a state of global memory reclaim. If not, a busy memcg sets this and give unnecessary throttoling in wait_iff_congested() against memory recalim in other contexts. This makes system performance bad. I'll think about "memcg is congested!" flag is required or not, later. But this fix is required first. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Acked-by: Ying Han <yinghan@google.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Johannes Weiner <jweiner@redhat.com> Cc: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d5f33d4 commit d6c438b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎mm/vmscan.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
937937
* back off and wait for congestion to clear because further reclaim
938938
* will encounter the same problem
939939
*/
940-
if (nr_dirty == nr_congested && nr_dirty != 0)
940+
if (nr_dirty && nr_dirty == nr_congested && scanning_global_lru(sc))
941941
zone_set_flag(zone, ZONE_CONGESTED);
942942

943943
free_page_list(&free_pages);

0 commit comments

Comments
 (0)