]> git.baikalelectronics.ru Git - kernel.git/commit
mm: remove unnecessary uses of lock_page_memcg()
authorJohannes Weiner <hannes@cmpxchg.org>
Tue, 15 Mar 2016 21:57:25 +0000 (14:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Mar 2016 23:55:16 +0000 (16:55 -0700)
commit8714e3d3efce51f46794b617e023bfb876218d55
tree828ad38946acad9990dcc733a10ebdeed0c1fbd5
parent4e8d9a780c926f4fce78c8a689a9e8b50623a68a
mm: remove unnecessary uses of lock_page_memcg()

There are several users that nest lock_page_memcg() inside lock_page()
to prevent page->mem_cgroup from changing.  But the page lock prevents
pages from moving between cgroups, so that is unnecessary overhead.

Remove lock_page_memcg() in contexts with locked contexts and fix the
debug code in the page stat functions to be okay with the page lock.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/memcontrol.h
mm/filemap.c
mm/page-writeback.c
mm/truncate.c
mm/vmscan.c