From: Andrew Morton <akpm@linux-foundation.org>
To: "Zach O'Keefe" <zokeefe@google.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Saurabh Singh Sengar <ssengar@microsoft.com>,
Yang Shi <shy828301@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH v4] mm/thp: fix "mm: thp: kill __transhuge_page_enabled()"
Date: Fri, 6 Oct 2023 10:50:12 -0700 [thread overview]
Message-ID: <20231006105012.61a12beefaa0f9a5adc8299f@linux-foundation.org> (raw)
In-Reply-To: <20230925200110.1979606-1-zokeefe@google.com>
On Mon, 25 Sep 2023 13:01:10 -0700 "Zach O'Keefe" <zokeefe@google.com> wrote:
> The 6.0 commits:
>
> commit 9fec51689ff6 ("mm: thp: kill transparent_hugepage_active()")
> commit 7da4e2cb8b1f ("mm: thp: kill __transhuge_page_enabled()")
>
> merged "can we have THPs in this VMA?" logic that was previously done
> separately by fault-path, khugepaged, and smaps "THPeligible" checks.
>
> During the process, the semantics of the fault path check changed in two
> ways:
>
> 1) A VM_NO_KHUGEPAGED check was introduced (also added to smaps path).
> 2) We no longer checked if non-anonymous memory had a vm_ops->huge_fault
> handler that could satisfy the fault. Previously, this check had been
> done in create_huge_pud() and create_huge_pmd() routines, but after
> the changes, we never reach those routines.
>
> During the review of the above commits, it was determined that in-tree
> users weren't affected by the change; most notably, since the only relevant
> user (in terms of THP) of VM_MIXEDMAP or ->huge_fault is DAX, which is
> explicitly approved early in approval logic. However, this was a bad
> assumption to make as it assumes the only reason to support ->huge_fault
> was for DAX (which is not true in general).
>
> Remove the VM_NO_KHUGEPAGED check when not in collapse path and give
> any ->huge_fault handler a chance to handle the fault. Note that we
> don't validate the file mode or mapping alignment, which is consistent
> with the behavior before the aforementioned commits.
It's unclear what are the userspace visible impacts of this change.
Which makes it hard for others to determine whether -stable kernels
should be patched.
> Fixes: 7da4e2cb8b1f ("mm: thp: kill __transhuge_page_enabled()")
> Reported-by: Saurabh Singh Sengar <ssengar@microsoft.com>
It's nice to include a Closes: link after a Reported-by:. Then readers
are better able to answer the above question.
> Signed-off-by: Zach O'Keefe <zokeefe@google.com>
> Cc: Yang Shi <shy828301@gmail.com>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: David Hildenbrand <david@redhat.com>
next prev parent reply other threads:[~2023-10-06 17:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 20:01 Zach O'Keefe
2023-09-26 21:39 ` Yang Shi
2023-10-06 17:50 ` Andrew Morton [this message]
2023-10-09 13:22 ` Zach O'Keefe
2023-10-06 17:58 ` Andrew Morton
2023-10-06 18:52 ` David Hildenbrand
2023-10-06 19:11 ` Andrew Morton
2023-10-06 21:28 ` Ryan Roberts
2023-10-09 13:23 ` Zach O'Keefe
2023-10-06 18:53 ` David Hildenbrand
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=20231006105012.61a12beefaa0f9a5adc8299f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shy828301@gmail.com \
--cc=ssengar@microsoft.com \
--cc=willy@infradead.org \
--cc=zokeefe@google.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