Hi, This is my second attempt to make memcg page stat lock simpler, the first version: http://www.spinics.net/lists/linux-mm/msg50037.html. In this version I investigate the potential race conditions among page stat, move_account, charge, uncharge and try to prove it race safe of my proposing lock scheme. The first patch is the basis of the patchset, so if I've made some stupid mistake please do not hesitate to point it out. Change log: v2 <- v1: * rewrite comments on race condition * split orignal large patch to two parts * change too heavy try_get_mem_cgroup_from_page() to rcu_read_lock to hold memcg alive Sha Zhengju (3): memcg: rewrite the comment about race condition of page stat accounting memcg: alter mem_cgroup_{update,inc,dec}_page_stat() args to memcg pointer memcg: simplify lock of memcg page stat account include/linux/memcontrol.h | 14 ++++++------- mm/memcontrol.c | 16 ++++++--------- mm/rmap.c | 49 +++++++++++++++++++++++++++++++++----------- 3 files changed, 50 insertions(+), 29 deletions(-) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>