[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1340025022-7272-1-git-send-email-liwp.linux@gmail.com>
Date: Mon, 18 Jun 2012 21:10:21 +0800
From: Wanpeng Li <liwp.linux@...il.com>
To: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...e.cz>,
Balbir Singh <bsingharora@...il.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: cgroups@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Gavin Shan <shangw@...ux.vnet.ibm.com>,
Wanpeng Li <liwp.linux@...il.com>
Subject: [PATCH] mm/memcg: add unlikely to mercg->move_charge_at_immigrate
From: Wanpeng Li <liwp@...ux.vnet.ibm.com>
move_charge_at_immigrate feature is disabled by default. Charges
are moved only when you move mm->owner and it also add additional
overhead.
Signed-off-by: Wanpeng Li <liwp.linux@...il.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a9c3d01..795a00f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5316,7 +5316,7 @@ static int mem_cgroup_can_attach(struct cgroup *cgroup,
int ret = 0;
struct mem_cgroup *memcg = mem_cgroup_from_cont(cgroup);
- if (memcg->move_charge_at_immigrate) {
+ if (unlikely(memcg->move_charge_at_immigrate)) {
struct mm_struct *mm;
struct mem_cgroup *from = mem_cgroup_from_task(p);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists