lkml.org 
[lkml]   [2024]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/1] mm/vmscan: avoid split PMD-mapped THP during shrink_folio_list()
Hey Matthew,

Thanks for taking time to review.

On Wed, Apr 24, 2024 at 12:15 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Mon, Apr 22, 2024 at 01:52:13PM +0800, Lance Yang wrote:
> > When the user no longer requires the pages, they would use
> > madvise(MADV_FREE) to mark the pages as lazy free. IMO, they would not
> > typically rewrite to the given range.
> >
> > At present, PMD-mapped THPs that are marked as lazyfree during
> > shrink_folio_list() are unconditionally split, which may be unnecessary.
> > If the THP is clean, its PMD is also clean, and there are no unexpected

"If the THP is clean, its PMD is also clean" can be confusing - sorry. It should
be modified to "If the THP and its PMD are both marked as clean".

Thanks,
Lance

> > references, then we can attempt to remove the PMD mapping from it. This
> > change will improve the efficiency of memory reclamation in this case.
>
> Does this happen outside of benchmarks? I'm really struggling to see
> how we end up in this situation. We have a clean THP without swap
> backing, so it's full of zeroes, but for some reason we haven't used the
> shared huge zero page? What is going on?
>

\
 
 \ /
  Last update: 2024-04-24 17:47    [W:0.083 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site