From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: nishimura@mxp.nes.nec.co.jp
Cc: Liu bo <bo-liu@hotmail.com>,
akpm@linux-foundation.org, kamezawa.hiroyu@jp.fujitsu.com,
linux-mm@kvack.org
Subject: Re: [PATCH] memcg: correct return value at mem_cgroup reclaim
Date: Mon, 7 Dec 2009 13:17:46 +0530 [thread overview]
Message-ID: <20091207074746.GF5780@balbir.in.ibm.com> (raw)
In-Reply-To: <20091206223046.4b08cbfb.d-nishimura@mtf.biglobe.ne.jp>
* Daisuke Nishimura <d-nishimura@mtf.biglobe.ne.jp> [2009-12-06 22:30:46]:
> hi,
>
> On Sun, 6 Dec 2009 18:16:14 +0800
> Liu bo <bo-liu@hotmail.com> wrote:
>
> >
> > In order to indicate reclaim has succeeded, mem_cgroup_hierarchical_reclaim() used to return 1.
> > Now the return value is without indicating whether reclaim has successded usage, so just return the total reclaimed pages don't plus 1.
> >
> > Signed-off-by: Liu Bo <bo-liu@hotmail.com>
> > ---
> >
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index 14593f5..51b6b3c 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -737,7 +737,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
> > css_put(&victim->css);
> > total += ret;
> > if (mem_cgroup_check_under_limit(root_mem))
> > - return 1 + total;
> > + return total;
> > }
> > return total;
> > }
> What's the benefit of this change ?
> I can't find any benefit to bother changing current behavior.
>
I agree, I added the "1 +" for a reason, if the new group is under its
limit magically without us having to reclaim anything (task exits or
memory freed), I don't want to look at total and see we reclaimed
nothing and take action.
> P.S.
> You should run ./scripts/checkpatch.pl before sending your patch,
> and refer to Documentation/email-clients.txt and check your email client setting.
>
Yes, the tabbing and spaces seem to be broken
--
Balbir
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-12-07 7:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 10:16 Liu bo
2009-12-06 13:30 ` Daisuke Nishimura
[not found] ` <COL115-W12ECCA5335D3BFBB60D5829F900@phx.gbl>
2009-12-07 2:23 ` Bob Liu
2009-12-07 7:47 ` Balbir Singh [this message]
2009-12-09 0:28 ` KAMEZAWA Hiroyuki
2009-12-09 6:22 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091207074746.GF5780@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bo-liu@hotmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox