[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5bd37d82-6a46-84eb-7110-411bc5e6515c@suse.cz>
Date: Thu, 12 Nov 2020 13:31:04 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Alex Shi <alex.shi@...ux.alibaba.com>, akpm@...ux-foundation.org,
mgorman@...hsingularity.net, tj@...nel.org, hughd@...gle.com,
khlebnikov@...dex-team.ru, daniel.m.jordan@...cle.com,
willy@...radead.org, hannes@...xchg.org, lkp@...el.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, shakeelb@...gle.com,
iamjoonsoo.kim@....com, richard.weiyang@...il.com,
kirill@...temov.name, alexander.duyck@...il.com,
rong.a.chen@...el.com, mhocko@...e.com, vdavydov.dev@...il.com,
shy828301@...il.com
Cc: Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: Re: [PATCH v21 18/19] mm/lru: introduce the relock_page_lruvec
function
On 11/5/20 9:55 AM, Alex Shi wrote:
> From: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
>
> 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.
Ah, clever. Seems to address my worry from previous patch (except the potential
to improve documenting comments).
> In addition we can avoid the checks entirely if lruvec is currently NULL.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
> Signed-off-by: Alex Shi <alex.shi@...ux.alibaba.com>
> Acked-by: Hugh Dickins <hughd@...gle.com>
> Acked-by: Johannes Weiner <hannes@...xchg.org>
Acked-by: Vlastimil Babka <vbabka@...e.cz>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
> Cc: Matthew Wilcox <willy@...radead.org>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
> Cc: Hugh Dickins <hughd@...gle.com>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: linux-kernel@...r.kernel.org
> Cc: cgroups@...r.kernel.org
> Cc: linux-mm@...ck.org
Powered by blists - more mailing lists