On Fri, Nov 06, 2020 at 03:50:22PM +0800, Alex Shi wrote: > From 6c142eb582e7d0dbf473572ad092eca07ab75221 Mon Sep 17 00:00:00 2001 > From: Alexander Duyck <alexander.h.du...@linux.intel.com> > Date: Tue, 26 May 2020 17:31:15 +0800 > Subject: [PATCH v21 18/19] mm/lru: introduce the relock_page_lruvec function > > Use this new function to replace repeated same code, no func change. > > When testing for relock we can avoid the need for RCU locking if we simply > compare the page pgdat and memcg pointers versus those that the lruvec is > holding. By doing this we can avoid the extra pointer walks and accesses of > the memory cgroup. > > In addition we can avoid the checks entirely if lruvec is currently NULL. > > Signed-off-by: Alexander Duyck <alexander.h.du...@linux.intel.com> > Signed-off-by: Alex Shi <alex....@linux.alibaba.com> > Acked-by: Hugh Dickins <hu...@google.com> > Acked-by: Johannes Weiner <han...@cmpxchg.org> > Cc: Johannes Weiner <han...@cmpxchg.org> > Cc: Andrew Morton <a...@linux-foundation.org> > Cc: Thomas Gleixner <t...@linutronix.de> > Cc: Andrey Ryabinin <aryabi...@virtuozzo.com> > Cc: Matthew Wilcox <wi...@infradead.org> > Cc: Mel Gorman <mgor...@techsingularity.net> > Cc: Konstantin Khlebnikov <khlebni...@yandex-team.ru> > Cc: Hugh Dickins <hu...@google.com> > Cc: Tejun Heo <t...@kernel.org> > Cc: linux-kernel@vger.kernel.org > Cc: cgro...@vger.kernel.org > Cc: linux...@kvack.org
Acked-by: Johannes Weiner <han...@cmpxchg.org>