From: David Hildenbrand <david@redhat.com>
To: Zach O'Keefe <zokeefe@google.com>
Cc: Yang Shi <shy828301@gmail.com>, Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jann Horn <jannh@google.com>, Song Liu <songliubraving@fb.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/khugepaged: fix collapse_pte_mapped_thp() to allow anon_vma
Date: Mon, 23 Jan 2023 12:09:22 +0100 [thread overview]
Message-ID: <84effdd8-1b67-4451-0fc4-a9e39210e5f1@redhat.com> (raw)
In-Reply-To: <CAAa6QmR6KeCCMHGyR9jkwk-KCwb_FTcEfnKeHRJ2U7+3SVz7hg@mail.gmail.com>
On 18.01.23 00:00, Zach O'Keefe wrote:
> On Mon, Jan 9, 2023 at 12:50 AM David Hildenbrand <david@redhat.com> wrote:
>>
>>>>>>>>
>>>>>>>> Side note: set_huge_pmd() wins the award of "ugliest mm function of early
>>>>>>>> 2023". I was briefly concerned how do_set_pmd() decides whether the PMD can be
>>>>>>>> writable or not. Turns out it's communicated via vm_fault->flags. Just
>>>>>>>> horrible.
>>>
>
> Hey David,
>
> Sorry for the late response here.
>
>>> My first Linux award! :) At least it's not "worst mm security issue of
>>> early 2023". I'll take it!
>>
>> Good that you're not taking my words the wrong way.
>>
>> MADV_COLLAPSE is a very useful feature (especially also for THP tests
>> [1]). I wish I could have looked at some of the patches earlier. But we
>> cannot wait forever to get something merged, otherwise we'd never get
>> bigger changes upstream.
>>
>> ... so there is plenty of time left in 2023 to cleanup khugepaged.c :P
>>
>>
>> [1] https://lkml.kernel.org/r/20230104144905.460075-1-david@redhat.com
>
> Yes, thank you for these tests. I have them open in another tab along
> with a mental TODO to take a closer look at them, and response
> half-written. In-place collapse of anonymous memory *is* something
> that I was interested in exploring later (I have a use-case for it;
> hugepage-aware malloc() implementations). I'm taking so long on it
> (sorry) b/c I need to review your point (2) (all PTE's mapping
> exclusively). Hopefully I can get to it shortly.
Cool, please let me know if you have any questions. Being able to
in-place collapse a PTE-mapped anon THP again would be nice.
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2023-01-23 11:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 20:41 [PATCH] mm/khugepaged: fix collapse_pte_mapped_thp() to allow anon_vma Hugh Dickins
2023-01-02 12:19 ` David Hildenbrand
2023-01-03 20:40 ` Hugh Dickins
2023-01-04 9:20 ` David Hildenbrand
2023-01-05 0:03 ` Yang Shi
2023-01-05 10:44 ` David Hildenbrand
2023-01-05 21:29 ` Zach O'Keefe
2023-01-09 8:50 ` David Hildenbrand
2023-01-17 23:00 ` Zach O'Keefe
2023-01-23 11:09 ` David Hildenbrand [this message]
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=84effdd8-1b67-4451-0fc4-a9e39210e5f1@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shy828301@gmail.com \
--cc=songliubraving@fb.com \
--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;
as well as URLs for NNTP newsgroup(s).