From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id CF55B8D003B for ; Thu, 21 Apr 2011 01:29:44 -0400 (EDT) Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p3L5TerL008667 for ; Wed, 20 Apr 2011 22:29:41 -0700 Received: from qwj9 (qwj9.prod.google.com [10.241.195.73]) by kpbe11.cbf.corp.google.com with ESMTP id p3L5Tdc5015791 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 20 Apr 2011 22:29:39 -0700 Received: by qwj9 with SMTP id 9so886836qwj.7 for ; Wed, 20 Apr 2011 22:29:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110421125005.eb2be43c.kamezawa.hiroyu@jp.fujitsu.com> References: <1303185466-2532-1-git-send-email-yinghan@google.com> <20110421124059.79990661.kamezawa.hiroyu@jp.fujitsu.com> <20110421125005.eb2be43c.kamezawa.hiroyu@jp.fujitsu.com> Date: Wed, 20 Apr 2011 22:29:38 -0700 Message-ID: Subject: Re: [PATCH 3/3/] fix mem_cgroup_watemark_ok (Was Re: [PATCH V6 00/10] memcg: per cgroup background reclaim From: Ying Han Content-Type: multipart/alternative; boundary=000e0ce008bc0de94a04a1670760 Sender: owner-linux-mm@kvack.org List-ID: To: KAMEZAWA Hiroyuki Cc: KOSAKI Motohiro , Minchan Kim , Daisuke Nishimura , Balbir Singh , Tejun Heo , Pavel Emelyanov , Andrew Morton , Li Zefan , Mel Gorman , Christoph Lameter , Johannes Weiner , Rik van Riel , Hugh Dickins , Michal Hocko , Dave Hansen , Zhu Yanhai , linux-mm@kvack.org --000e0ce008bc0de94a04a1670760 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Apr 20, 2011 at 8:50 PM, KAMEZAWA Hiroyuki < kamezawa.hiroyu@jp.fujitsu.com> wrote: > > Ying, I noticed this at test. please fix the code in your set. > == > if low_wmark_distance = 0, mem_cgroup_watermark_ok() returns > false when usage hits limit. > > Signed-off-by: KAMEZAWA Hiroyuki > --- > mm/memcontrol.c | 3 +++ > 1 file changed, 3 insertions(+) > > Index: mmotm-Apr14/mm/memcontrol.c > =================================================================== > --- mmotm-Apr14.orig/mm/memcontrol.c > +++ mmotm-Apr14/mm/memcontrol.c > @@ -5062,6 +5062,9 @@ int mem_cgroup_watermark_ok(struct mem_c > long ret = 0; > int flags = CHARGE_WMARK_LOW | CHARGE_WMARK_HIGH; > > + if (!mem->low_wmark_distance) > + return 1; > + > VM_BUG_ON((charge_flags & flags) == flags); > > if (charge_flags & CHARGE_WMARK_LOW) > > Thanks. Will add this in the next post. --Ying --000e0ce008bc0de94a04a1670760 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Wed, Apr 20, 2011 at 8:50 PM, KAMEZAW= A Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

Ying, I noticed this at test. please fix the code in your set.
=3D=3D
if low_wmark_distance =3D 0, mem_cgroup_watermark_ok() returns
false when usage hits limit.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
=A0mm/memcontrol.c | =A0 =A03 +++
=A01 file changed, 3 insertions(+)

Index: mmotm-Apr14/mm/memcontrol.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-Apr14.orig/mm/memcontrol.c
+++ mmotm-Apr14/mm/memcontrol.c
@@ -5062,6 +5062,9 @@ int mem_cgroup_watermark_ok(struct mem_c
=A0 =A0 =A0 =A0long ret =3D 0;
=A0 =A0 =A0 =A0int flags =3D CHARGE_WMARK_LOW | CHARGE_WMARK_HIGH;

+ =A0 =A0 =A0 if (!mem->low_wmark_distance)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1;
+
=A0 =A0 =A0 =A0VM_BUG_ON((charge_flags & flags) =3D=3D flags);

=A0 =A0 =A0 =A0if (charge_flags & CHARGE_WMARK_LOW)

Thanks. Will add this in the next post.
--Ying=A0

--000e0ce008bc0de94a04a1670760-- -- 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