From: Matthew Wilcox <willy@infradead.org>
To: Yang Shi <shy828301@gmail.com>
Cc: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>,
linux-mm@kvack.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] mm/khugepaged: Remove compound_pagelist
Date: Thu, 28 Sep 2023 10:05:39 +0100 [thread overview]
Message-ID: <ZRVB49PruFvT7+43@casper.infradead.org> (raw)
In-Reply-To: <CAHbLzkqt8LFFDH2a7+xaQmncwiK=Ynv6vHs9d=TDNjp9_wJ4rw@mail.gmail.com>
On Tue, Sep 26, 2023 at 03:07:18PM -0700, Yang Shi wrote:
> On Fri, Sep 22, 2023 at 9:33 PM Vishal Moola (Oracle)
> <vishal.moola@gmail.com> wrote:
> >
> > Currently, khugepaged builds a compound_pagelist while scanning, which
> > is used to properly account for compound pages. We can now account
> > for a compound page as a singular folio instead, so remove this list.
> >
> > Large folios are guaranteed to have consecutive ptes and addresses, so
> > once the first pte of a large folio is found skip over the rest.
>
> The address space may just map a partial folio, for example, in the
> extreme case the HUGE_PMD size range may have HUGE_PMD_NR folios with
> mapping one subpage from each folio per PTE. So assuming the PTE
> mapped folio is mapped consecutively may be wrong.
How? You can do that with two VMAs, but this is limited to scanning
within a single VMA. If we've COWed a large folio, we currently do
so as a single page folio, and I'm not seeing any demand to change that.
If we did COW as a large folio, we'd COW every page in that folio.
How do we interleave two large folios in the same VMA?
> Please refer to collapse_compound_extreme() in
> tools/testing/selftests/mm/khugepaged.c.
I agree that running that part of the test-suite would be useful, but
could you point to which test specifically would create a problem here?
next prev parent reply other threads:[~2023-09-28 9:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 19:36 [RFC PATCH 0/2] Remove compound_pagelist from khugepaged Vishal Moola (Oracle)
2023-09-22 19:36 ` [RFC PATCH 1/2] mm/khugepaged: Convert __collapse_huge_page_isolate() to use folios Vishal Moola (Oracle)
2023-09-22 19:46 ` Matthew Wilcox
2023-09-25 7:18 ` David Hildenbrand
2023-09-25 18:57 ` Vishal Moola
2023-09-22 19:36 ` [RFC PATCH 2/2] mm/khugepaged: Remove compound_pagelist Vishal Moola (Oracle)
2023-09-26 22:07 ` Yang Shi
2023-09-28 9:05 ` Matthew Wilcox [this message]
2023-09-28 19:33 ` Yang Shi
2023-10-02 15:55 ` Vishal Moola
2023-09-29 19:07 ` Yang Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZRVB49PruFvT7+43@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shy828301@gmail.com \
--cc=vishal.moola@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox