[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a6q0ot7b.fsf@yhuang6-desk1.ccr.corp.intel.com>
Date: Thu, 15 Apr 2021 16:19:52 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Yu Zhao <yuzhao@...gle.com>
Cc: Rik van Riel <riel@...riel.com>,
Dave Chinner <david@...morbit.com>,
Jens Axboe <axboe@...nel.dk>,
SeongJae Park <sj38.park@...il.com>,
Linux-MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Benjamin Manes <ben.manes@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Hillf Danton <hdanton@...a.com>,
Johannes Weiner <hannes@...xchg.org>,
Jonathan Corbet <corbet@....net>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Matthew Wilcox <willy@...radead.org>,
Mel Gorman <mgorman@...e.de>,
Miaohe Lin <linmiaohe@...wei.com>,
Michael Larabel <michael@...haellarabel.com>,
Michal Hocko <mhocko@...e.com>,
Michel Lespinasse <michel@...pinasse.org>,
Roman Gushchin <guro@...com>,
Rong Chen <rong.a.chen@...el.com>,
SeongJae Park <sjpark@...zon.de>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Vlastimil Babka <vbabka@...e.cz>,
Yang Shi <shy828301@...il.com>, Zi Yan <ziy@...dia.com>,
linux-kernel <linux-kernel@...r.kernel.org>, lkp@...ts.01.org,
Kernel Page Reclaim v2 <page-reclaim@...gle.com>,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework
Yu Zhao <yuzhao@...gle.com> writes:
> On Wed, Apr 14, 2021 at 9:00 PM Andi Kleen <ak@...ux.intel.com> wrote:
>>
>> > We fall back to the rmap when it's obviously not smart to do so. There
>> > is still a lot of room for improvement in this function though, i.e.,
>> > it should be per VMA and NUMA aware.
>>
>> Okay so it's more a question to tune the cross over heuristic. That
>> sounds much easier than replacing everything.
>>
>> Of course long term it might be a problem to maintain too many
>> different ways to do things, but I suppose short term it's a reasonable
>> strategy.
>
> Hi Rik, Ying,
>
> Sorry for being persistent. I want to make sure we are on the same page:
>
> Page table scanning doesn't replace the existing rmap walk. It is
> complementary and only happens when it is likely that most of the
> pages on a system under pressure have been referenced, i.e., out of
> *inactive* pages, by definition of the existing implementation. Under
> such a condition, scanning *active* pages one by one with the rmap is
> likely to cost more than scanning them all at once via page tables.
> When we evict *inactive* pages, we still use the rmap and share a
> common path with the existing code.
>
> Page table scanning falls back to the rmap walk if the page tables of
> a process are apparently sparse, i.e., rss < size of the page tables.
>
> I should have clarified this at the very beginning of the discussion.
> But it has become so natural to me and I assumed we'd all see it this
> way.
>
> Your concern regarding the NUMA optimization is still valid, and it's
> a high priority.
Hi, Yu,
In general, I think it's a good idea to combine the page table scanning
and rmap scanning in the page reclaiming. For example, if the
working-set is transitioned, we can take advantage of the fast page
table scanning to identify the new working-set quickly. While we can
fallback to the rmap scanning if the page table scanning doesn't help.
Best Regards,
Huang, Ying
Powered by blists - more mailing lists