From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with ESMTP id 8EA366B0011 for ; Fri, 13 May 2011 01:25:16 -0400 (EDT) Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p4D5PCD6021545 for ; Thu, 12 May 2011 22:25:12 -0700 Received: from qyk2 (qyk2.prod.google.com [10.241.83.130]) by kpbe20.cbf.corp.google.com with ESMTP id p4D5P3Cl028358 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 12 May 2011 22:25:11 -0700 Received: by qyk2 with SMTP id 2so170406qyk.0 for ; Thu, 12 May 2011 22:25:10 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110513121030.08fcae08.kamezawa.hiroyu@jp.fujitsu.com> References: <20110513121030.08fcae08.kamezawa.hiroyu@jp.fujitsu.com> Date: Thu, 12 May 2011 22:25:10 -0700 Message-ID: Subject: Re: [PATCH][BUGFIX] memcg fix zone congestion From: Ying Han Content-Type: multipart/alternative; boundary=002354470aa8949ec904a32187bb Sender: owner-linux-mm@kvack.org List-ID: To: KAMEZAWA Hiroyuki Cc: "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "nishimura@mxp.nes.nec.co.jp" , "balbir@linux.vnet.ibm.com" , Johannes Weiner , Michal Hocko --002354470aa8949ec904a32187bb Content-Type: text/plain; charset=ISO-8859-1 On Thu, May 12, 2011 at 8:10 PM, KAMEZAWA Hiroyuki < kamezawa.hiroyu@jp.fujitsu.com> wrote: > > 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 > --- > 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); > > For memcg, wonder if we should make it per-memcg-per-zone congested. Acked-by: Ying Han --Ying --002354470aa8949ec904a32187bb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, May 12, 2011 at 8:10 PM, KAMEZAW= A Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

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 no= t, later.
But this fix is required 1st.
=A0
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
=A0mm/vmscan.c | =A0 =A03 ++-
=A01 file changed, 2 insertions(+), 1 deletion(-)

Index: mmotm-May11/mm/vmscan.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- mmotm-May11.orig/mm/vmscan.c
+++ mmotm-May11/mm/vmscan.c
@@ -941,7 +941,8 @@ keep_lumpy:
=A0 =A0 =A0 =A0 * back off and wait for congestion to clear because furthe= r reclaim
=A0 =A0 =A0 =A0 * will encounter the same problem
=A0 =A0 =A0 =A0 */
- =A0 =A0 =A0 if (nr_dirty =3D=3D nr_congested && nr_dirty !=3D 0)<= br> + =A0 =A0 =A0 if (scanning_global_lru(sc) &&
+ =A0 =A0 =A0 =A0 =A0 nr_dirty =3D=3D nr_congested && nr_dirty !=3D= 0)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0zone_set_flag(zone, ZONE_CONGESTED);

=A0 =A0 =A0 =A0free_page_list(&free_pages);

For memcg, wonder if we should make it per-memcg-per-= zone congested.
=A0
Acked-by:=A0Ying Han=A0<yinghan@google.com&g= t;

--Ying
--002354470aa8949ec904a32187bb-- -- 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: email@kvack.org