[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOUHufaqjFmeghdGvXNASWvjdK3n9y7MdzVFJfQFG486-P+Erg@mail.gmail.com>
Date: Tue, 13 Aug 2024 11:16:19 -0600
From: Yu Zhao <yuzhao@...gle.com>
To: Yuanchu Xie <yuanchu@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Lance Yang <ioworker0@...il.com>,
Huang Ying <ying.huang@...el.com>, linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm: multi-gen LRU: ignore non-leaf pmd_young for force_scan=true
On Tue, Aug 13, 2024 at 10:38 AM Yuanchu Xie <yuanchu@...gle.com> wrote:
>
> When non-leaf pmd accessed bits are available, MGLRU page table walks
> can clear the non-leaf pmd accessed bit and ignore the accessed bit on
> the pte if it's on a different node, skipping a generation update as
> well. If another scan occurs on the same node as said skipped pte.
> the non-leaf pmd accessed bit might remain cleared and the pte accessed
> bits won't be checked. While this is sufficient for reclaim-driven
> aging, where the goal is to select a reasonably cold page, the access
> can be missed when aging proactively for workingset estimation of a
> node/memcg.
>
> In more detail, get_pfn_folio returns NULL if the folio's nid != node
> under scanning, so the page table walk skips processing of said pte. Now
> the pmd_young flag on this pmd is cleared, and if none of the pte's are
> accessed before another scan occurs on the folio's node, the pmd_young
> check fails and the pte accessed bit is skipped.
>
> Since force_scan disables various other optimizations, we check
> force_scan to ignore the non-leaf pmd accessed bit.
>
> Signed-off-by: Yuanchu Xie <yuanchu@...gle.com>
Acked-by: Yu Zhao <yuzhao@...gle.com>
Powered by blists - more mailing lists