lkml.org 
[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v20 19/20] mm/lru: introduce the relock_page_lruvec function
    On Thu, Oct 29, 2020 at 06:45:04PM +0800, Alex Shi wrote:
    > From: Alexander Duyck <alexander.h.duyck@linux.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.
    >
    > In addition we can avoid the checks entirely if lruvec is currently NULL.
    >
    > Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
    > Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
    > Acked-by: Hugh Dickins <hughd@google.com>
    > Cc: Johannes Weiner <hannes@cmpxchg.org>
    > Cc: Andrew Morton <akpm@linux-foundation.org>
    > Cc: Thomas Gleixner <tglx@linutronix.de>
    > Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    > Cc: Matthew Wilcox <willy@infradead.org>
    > Cc: Mel Gorman <mgorman@techsingularity.net>
    > Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
    > Cc: Hugh Dickins <hughd@google.com>
    > Cc: Tejun Heo <tj@kernel.org>
    > Cc: linux-kernel@vger.kernel.org
    > Cc: cgroups@vger.kernel.org
    > Cc: linux-mm@kvack.org

    Acked-by: Johannes Weiner <hannes@cmpxchg.org>

    \
     
     \ /
      Last update: 2020-11-02 21:46    [W:4.293 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site