On Thu, Oct 29, 2020 at 06:45:04PM +0800, Alex Shi wrote: > From: Alexander Duyck <[email protected]> > > 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 <[email protected]> > Signed-off-by: Alex Shi <[email protected]> > Acked-by: Hugh Dickins <[email protected]> > Cc: Johannes Weiner <[email protected]> > Cc: Andrew Morton <[email protected]> > Cc: Thomas Gleixner <[email protected]> > Cc: Andrey Ryabinin <[email protected]> > Cc: Matthew Wilcox <[email protected]> > Cc: Mel Gorman <[email protected]> > Cc: Konstantin Khlebnikov <[email protected]> > Cc: Hugh Dickins <[email protected]> > Cc: Tejun Heo <[email protected]> > Cc: [email protected] > Cc: [email protected] > Cc: [email protected]
Acked-by: Johannes Weiner <[email protected]>

