]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/memcg: remove rcu locking for lock_page_lruvec function series
authorAlex Shi <alex.shi@linux.alibaba.com>
Thu, 31 Dec 2020 22:04:08 +0000 (22:04 +0000)
committerJohannes Weiner <hannes@cmpxchg.org>
Thu, 31 Dec 2020 22:04:08 +0000 (22:04 +0000)
commitc4107b140fed8b6860525e284561bd2fe113b494
treef6a895f7c9b3fb7680f208babd0e7745a7a55351
parentde3dc4b7861cf1b86df58884501b8f320b62235c
mm/memcg: remove rcu locking for lock_page_lruvec function series

lock_page_lruvec() and its variants used rcu_read_lock() with the
intention of safeguarding against the mem_cgroup being destroyed
concurrently; but so long as they are called under the specified
conditions (as they are), there is no way for the page's mem_cgroup to be
destroyed.  Delete the unnecessary rcu_read_lock() and _unlock().

Hugh Dickins polished the commit log.  Thanks a lot!

Link: https://lkml.kernel.org/r/1608614453-10739-2-git-send-email-alex.shi@linux.alibaba.com
Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c