linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][BUGFIX] memcg fix zone congestion
@ 2011-05-13  3:10 KAMEZAWA Hiroyuki
  2011-05-13  3:53 ` Minchan Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-05-13  3:10 UTC (permalink / raw)
  To: linux-mm; +Cc: akpm, nishimura, balbir, Ying Han, Johannes Weiner, Michal Hocko


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 1st.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
 mm/vmscan.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: mmotm-May11/mm/vmscan.c
===================================================================
--- mmotm-May11.orig/mm/vmscan.c
+++ mmotm-May11/mm/vmscan.c
@@ -941,7 +941,8 @@ keep_lumpy:
 	 * back off and wait for congestion to clear because further reclaim
 	 * will encounter the same problem
 	 */
-	if (nr_dirty == nr_congested && nr_dirty != 0)
+	if (scanning_global_lru(sc) &&
+	    nr_dirty == nr_congested && nr_dirty != 0)
 		zone_set_flag(zone, ZONE_CONGESTED);
 
 	free_page_list(&free_pages);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-13  6:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13  3:10 [PATCH][BUGFIX] memcg fix zone congestion KAMEZAWA Hiroyuki
2011-05-13  3:53 ` Minchan Kim
2011-05-13  4:15 ` Daisuke Nishimura
2011-05-13  6:24   ` KAMEZAWA Hiroyuki
2011-05-13  5:25 ` Ying Han
2011-05-13  6:25   ` KAMEZAWA Hiroyuki
2011-05-13  6:25 ` Andrew Morton
2011-05-13  6:52   ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox