From: Andrew Morton <akpm@linux-foundation.org>
To: balbir@linux.vnet.ibm.com
Cc: kamezawa.hiroyuki@jp.fujitsu.com, nishimura@mxp.nes.nec.co.jp,
lizf@cn.fujitsu.com, menage@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: Low overhead patches for the memory cgroup controller (v5)
Date: Mon, 22 Jun 2009 15:43:43 -0700 [thread overview]
Message-ID: <20090622154343.9cdbf23a.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090615043900.GF23577@balbir.in.ibm.com>
On Mon, 15 Jun 2009 10:09:00 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> ...
>
> This patch changes the memory cgroup and removes the overhead associated
> with accounting all pages in the root cgroup. As a side-effect, we can
> no longer set a memory hard limit in the root cgroup.
>
> A new flag to track whether the page has been accounted or not
> has been added as well. Flags are now set atomically for page_cgroup,
> pcg_default_flags is now obsolete and removed.
>
> ...
>
> @@ -1114,9 +1121,22 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *mem,
> css_put(&mem->css);
> return;
> }
> +
> pc->mem_cgroup = mem;
> smp_wmb();
> - pc->flags = pcg_default_flags[ctype];
> + 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;
> + }
Do we still need the smp_wmb()?
It's hard to say, because we forgot to document it :(
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: balbir@linux.vnet.ibm.com
Cc: kamezawa.hiroyuki@jp.fujitsu.com, nishimura@mxp.nes.nec.co.jp,
lizf@cn.fujitsu.com, menage@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: Low overhead patches for the memory cgroup controller (v5)
Date: Mon, 22 Jun 2009 15:43:43 -0700 [thread overview]
Message-ID: <20090622154343.9cdbf23a.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090615043900.GF23577@balbir.in.ibm.com>
On Mon, 15 Jun 2009 10:09:00 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> ...
>
> This patch changes the memory cgroup and removes the overhead associated
> with accounting all pages in the root cgroup. As a side-effect, we can
> no longer set a memory hard limit in the root cgroup.
>
> A new flag to track whether the page has been accounted or not
> has been added as well. Flags are now set atomically for page_cgroup,
> pcg_default_flags is now obsolete and removed.
>
> ...
>
> @@ -1114,9 +1121,22 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *mem,
> css_put(&mem->css);
> return;
> }
> +
> pc->mem_cgroup = mem;
> smp_wmb();
> - pc->flags = pcg_default_flags[ctype];
> + 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;
> + }
Do we still need the smp_wmb()?
It's hard to say, because we forgot to document it :(
--
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-06-22 22:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 4:39 Low overhead patches for the memory cgroup controller (v5) Balbir Singh
2009-06-15 4:39 ` Balbir Singh
2009-06-15 4:41 ` Balbir Singh
2009-06-15 4:41 ` Balbir Singh
2009-06-15 8:20 ` KAMEZAWA Hiroyuki
2009-06-15 8:20 ` KAMEZAWA Hiroyuki
2009-06-22 22:43 ` Andrew Morton [this message]
2009-06-22 22:43 ` Andrew Morton
2009-06-23 0:01 ` KAMEZAWA Hiroyuki
2009-06-23 0:01 ` KAMEZAWA Hiroyuki
2009-06-23 4:53 ` Balbir Singh
2009-06-23 4:53 ` Balbir Singh
2009-06-26 0:57 ` [PATCH] memcg: add commens for expaing memory barrier (Was " KAMEZAWA Hiroyuki
2009-06-26 0:57 ` KAMEZAWA Hiroyuki
2009-06-26 4:48 ` Balbir Singh
2009-06-26 4:48 ` Balbir Singh
2009-06-28 23:32 ` KAMEZAWA Hiroyuki
2009-06-28 23:32 ` KAMEZAWA Hiroyuki
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=20090622154343.9cdbf23a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyuki@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.