]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: memcontrol: remove ordering between pc->mem_cgroup and PageCgroupUsed
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 26 Jun 2014 00:42:38 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 26 Jun 2014 00:42:38 +0000 (10:42 +1000)
commit0ee27621253bb7683cf9a600183d335cdd252b78
tree5ff2423b90605a22ac0998a5db2cedbcc19823e5
parent138870520aaa04ade8512520808de2befd5ae92d
mm: memcontrol: remove ordering between pc->mem_cgroup and PageCgroupUsed

There is a write barrier between setting pc->mem_cgroup and
PageCgroupUsed, which was added to allow LRU operations to lookup the
memcg LRU list of a page without acquiring the page_cgroup lock.

But ever since 38c5d72f3ebe ("memcg: simplify LRU handling by new rule"),
pages are ensured to be off-LRU while charging, so nobody else is changing
LRU state while pc->mem_cgroup is being written, and there are no read
barriers anymore.

Remove the unnecessary write barrier.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Hugh Dickins <hughd@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c