[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2cb95372-f7dd-61f9-9d2a-461390fb0907@redhat.com>
Date: Thu, 11 Aug 2022 18:24:59 +0200
From: David Hildenbrand <david@...hat.com>
To: Peter Xu <peterx@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2 2/2] mm/hugetlb: support write-faults in shared
mappings
On 11.08.22 15:59, Peter Xu wrote:
> On Thu, Aug 11, 2022 at 12:34:35PM +0200, David Hildenbrand wrote:
>> Reason is that uffd-wp doesn't clear the uffd-wp PTE bit when
>> unregistering and consequently keeps the PTE writeprotected. Reason for
>> this is to avoid the additional overhead when unregistering. Note
>> that this is the case also for !hugetlb and that we will end up with
>> writable PTEs that still have the uffd-wp PTE bit set once we return
>> from hugetlb_wp(). I'm not touching the uffd-wp PTE bit for now, because it
>> seems to be a generic thing -- wp_page_reuse() also doesn't clear it.
>
> This may justify that lazy reset of ptes may not really be a good idea,
> including anonymous. I'm indeed not aware of any app that do frequent
> reg/unreg at least.
Yeah. QEMU snapshots come to mind, but I guess the reg/unreg overhead is
the smallest issue.
>
> I'll prepare a patch to change it from uffd side too.
>
> Thanks again for finding this problem.
YW!
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists