From: Greg Thelen <gthelen@google.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
Ying Han <yinghan@google.com>, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH 2/6 v4] memcg: simplify move_account() check
Date: Mon, 13 Feb 2012 23:21:34 -0800 [thread overview]
Message-ID: <CAHH2K0Ynh6o5fMXnkbaYOSwYYvJhc7F3f48TsJ34hki6WDJF6Q@mail.gmail.com> (raw)
In-Reply-To: <20120214120756.0a42f065.kamezawa.hiroyu@jp.fujitsu.com>
On Mon, Feb 13, 2012 at 7:07 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@jp.fujitsu.com> wrote:
> From 9cdb3b63dc8d08cc2220c54c80438c13433a0d12 Mon Sep 17 00:00:00 2001
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Date: Thu, 2 Feb 2012 10:02:39 +0900
> Subject: [PATCH 2/6] memcg: simplify move_account() check.
>
> In memcg, for avoiding take-lock-irq-off at accessing page_cgroup,
> a logic, flag + rcu_read_lock(), is used. This works as following
>
> CPU-A CPU-B
> rcu_read_lock()
> set flag
> if(flag is set)
> take heavy lock
> do job.
> synchronize_rcu() rcu_read_unlock()
I assume that CPU-A will take heavy lock after synchronize_rcu() when
updating variables read by CPU-B.
> memcontrol.c | 65 ++++++++++++++++++++++-------------------------------------
> 1 file changed, 25 insertions(+), 40 deletions(-)
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Greg Thelen <gthelen@google.com>
> ---
> mm/memcontrol.c | 70 +++++++++++++++++++++++-------------------------------
> 1 files changed, 30 insertions(+), 40 deletions(-)
> @@ -2089,11 +2082,8 @@ static int __cpuinit memcg_cpu_hotplug_callback(struct notifier_block *nb,
> struct memcg_stock_pcp *stock;
> struct mem_cgroup *iter;
>
> - if ((action == CPU_ONLINE)) {
> - for_each_mem_cgroup(iter)
> - synchronize_mem_cgroup_on_move(iter, cpu);
> + if ((action == CPU_ONLINE))
Extra parenthesis. I recommend:
+ if (action == CPU_ONLINE)
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-02-14 7:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 3:04 [PATCH 0/6 v4] memcg: page cgroup diet KAMEZAWA Hiroyuki
2012-02-14 3:06 ` [PATCH 1/6 v4] memcg: remove EXPORT_SYMBOL(mem_cgroup_update_page_stat) KAMEZAWA Hiroyuki
2012-02-14 7:21 ` Greg Thelen
2012-02-14 3:07 ` [PATCH 2/6 v4] memcg: simplify move_account() check KAMEZAWA Hiroyuki
2012-02-14 7:21 ` Greg Thelen [this message]
2012-02-14 8:44 ` KAMEZAWA Hiroyuki
2012-02-14 3:13 ` [PATCH 3/6 v4] memcg: remove PCG_MOVE_LOCK flag from page_cgroup KAMEZAWA Hiroyuki
2012-02-14 7:21 ` Greg Thelen
2012-02-14 3:14 ` [PATCH 4/6 v4] memcg: use new logic for page stat accounting KAMEZAWA Hiroyuki
2012-02-14 7:22 ` Greg Thelen
2012-02-14 8:43 ` KAMEZAWA Hiroyuki
2012-02-14 3:15 ` [PATCH 5/6 v4] memcg: remove PCG_FILE_MAPPED KAMEZAWA Hiroyuki
2012-02-14 7:22 ` Greg Thelen
2012-02-14 3:16 ` [PATCH 6/6 v4] memcg: fix performance of mem_cgroup_begin_update_page_stat() KAMEZAWA Hiroyuki
2012-02-14 7:22 ` Greg Thelen
2012-02-14 11:08 ` 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=CAHH2K0Ynh6o5fMXnkbaYOSwYYvJhc7F3f48TsJ34hki6WDJF6Q@mail.gmail.com \
--to=gthelen@google.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=yinghan@google.com \
/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