On Wed, 24 Apr 2024 23:46:59 +0800 Lance Yang <ioworker0@xxxxxxxxx> wrote: > On Wed, Apr 24, 2024 at 12:15 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> 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". I made that changelog edit.