linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"lizf@cn.fujitsu.com" <lizf@cn.fujitsu.com>,
	"menage@google.com" <menage@google.com>,
	KOSAKI Motohiro <m-kosaki@ceres.dti.ne.jp>
Subject: Re: Low overhead patches for the memory cgroup controller (v4)
Date: Mon, 15 Jun 2009 08:52:56 +0530	[thread overview]
Message-ID: <4A35BE90.7000301@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090615120933.61941977.nishimura@mxp.nes.nec.co.jp>

Daisuke Nishimura wrote:
> On Mon, 15 Jun 2009 08:30:06 +0530, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>> Daisuke Nishimura wrote:
>>
>>>  	pc->mem_cgroup = mem;
>>>  	smp_wmb();
>>> -	pc->flags = pcg_default_flags[ctype];
>> pc->flags needs to be reset here, otherwise we have the danger the carrying over
>> older bits. I'll merge your changes and test.
>>
> hmm, why ?
> 
> I do in my patch:
> 
> +	switch (ctype) {
> +	case MEM_CGROUP_CHARGE_TYPE_CACHE:
> +	case MEM_CGROUP_CHARGE_TYPE_SHMEM:
> +		SetPageCgroupCache(pc);
> +		SetPageCgroupUsed(pc);
> +		break;
> +	case MEM_CGROUP_CHARGE_TYPE_MAPPED:
> +		ClearPageCgroupCache(pc);
> +		SetPageCgroupUsed(pc);
> +		break;
> +	default:
> +		break;
> +	}
> 

Yes, I did that in the older code, what I was suggesting was just an additional
step to ensure that in the future if we add new flags, we don't end up with a
long list of initializations and clearing or if we forget to clear pc->flags and
reuse the page_cgroup, it might be a problem. My message was confusing, it
should have been resetting the pc->flags will provide protection for any future
addition of flags.

I am testing your patch which is the modified version of v3 with your changes
and have your signed-off-by in it as well as I post v5. Is that OK?

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

  reply	other threads:[~2009-06-15  3:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 17:45 [RFC] Low overhead patches for the memory cgroup controller (v2) KAMEZAWA Hiroyuki
2009-05-15 18:16 ` Balbir Singh
2009-05-18 10:11   ` KAMEZAWA Hiroyuki
2009-05-18 10:45     ` Balbir Singh
2009-05-18 16:01       ` KAMEZAWA Hiroyuki
2009-05-19 13:18         ` Balbir Singh
2009-05-31 23:51     ` Balbir Singh
2009-06-01 23:57       ` KAMEZAWA Hiroyuki
2009-06-05  5:31         ` Low overhead patches for the memory cgroup controller (v3) Balbir Singh
2009-06-05  5:51           ` KAMEZAWA Hiroyuki
2009-06-05  9:33             ` Balbir Singh
2009-06-08  0:20               ` Daisuke Nishimura
2009-06-05  6:05           ` Daisuke Nishimura
2009-06-05  9:47             ` Balbir Singh
2009-06-08  0:03               ` Daisuke Nishimura
2009-06-05  6:43           ` Daisuke Nishimura
2009-06-14 18:37           ` Low overhead patches for the memory cgroup controller (v4) Balbir Singh
2009-06-15  2:04             ` KAMEZAWA Hiroyuki
2009-06-15  2:18             ` Daisuke Nishimura
2009-06-15  2:23               ` KAMEZAWA Hiroyuki
2009-06-15  2:44                 ` Balbir Singh
2009-06-15  3:00               ` Balbir Singh
2009-06-15  3:09                 ` Daisuke Nishimura
2009-06-15  3:22                   ` Balbir Singh [this message]
2009-06-15  3:46                     ` Daisuke Nishimura
2009-06-15  4:22                       ` Balbir Singh
2009-05-17  4:15 ` [RFC] Low overhead patches for the memory cgroup controller (v2) Balbir Singh
2009-06-01  4:25   ` Daisuke Nishimura
2009-06-01  5:01     ` Daisuke Nishimura
2009-06-01  5:49     ` 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=4A35BE90.7000301@linux.vnet.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=m-kosaki@ceres.dti.ne.jp \
    --cc=menage@google.com \
    --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;
as well as URLs for NNTP newsgroup(s).