Thread (50 messages) 50 messages, 5 authors, 2012-01-26

Re: [RFC] [PATCH 1/7 v2] memcg: remove unnecessary check in mem_cgroup_update_page_stat()

From: Ying Han <hidden>
Date: 2012-01-19 20:07:25
Also in: linux-mm

On Wed, Jan 18, 2012 at 5:01 AM, Michal Hocko [off-list ref] wrote:
On Wed 18-01-12 08:55:58, KAMEZAWA Hiroyuki wrote:
quoted
On Tue, 17 Jan 2012 16:16:20 +0100
Michal Hocko [off-list ref] wrote:
quoted
On Fri 13-01-12 17:32:27, KAMEZAWA Hiroyuki wrote:
quoted
From 788aebf15f3fa37940e0745cab72547e20683bf2 Mon Sep 17 00:00:00 2001
From: KAMEZAWA Hiroyuki <redacted>
Date: Thu, 12 Jan 2012 16:08:33 +0900
Subject: [PATCH 1/7] memcg: remove unnecessary check in mem_cgroup_update_page_stat()

commit 10ea69f1182b removes move_lock_page_cgroup() in thp-split path.
So, this PageTransHuge() check is unnecessary, too.
I do not see commit like that in the tree. I guess you meant
memcg: make mem_cgroup_split_huge_fixup() more efficient which is not
merged yet, right?
This commit in the linux-next.
Referring to commits from linux-next is tricky as it changes all the
time. I guess that the full commit subject should be sufficient.
quoted
quoted
quoted
Note:
 - considering when mem_cgroup_update_page_stat() is called,
   there will be no race between split_huge_page() and update_page_stat().
   All required locks are held in higher level.
We should never have THP page in this path in the first place. So why
not changing this to VM_BUG_ON(PageTransHuge).
Ying Han considers to support mlock stat.
OK, got it. What about the following updated changelog instead?

===
We do not have to check PageTransHuge in mem_cgroup_update_page_stat
and fallback into the locked accounting because both move charge and thp
one nitpick. Should it be "move account" instead of "move charge"?

--Ying
split up are done with compound_lock so they cannot race. update vs.
move is protected by the mem_cgroup_stealed sufficiently.

PageTransHuge pages shouldn't appear in this code path currently because
we are tracking only file pages at the moment but later we are planning
to track also other pages (e.g. mlocked ones).
===
quoted
Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help