[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 3/5] migration/ram: Don't explicitly unprotect when unregi
From: |
Juan Quintela |
Subject: |
Re: [PATCH v1 3/5] migration/ram: Don't explicitly unprotect when unregistering uffd-wp |
Date: |
Thu, 02 Feb 2023 12:17:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
David Hildenbrand <david@redhat.com> wrote:
> When unregistering uffd-wp, older kernels before commit f369b07c86143
> ("mm/uffd:reset write protection when unregister with wp-mode") won't
> clear the uffd-wp PTE bit. When re-registering uffd-wp, the previous
> uffd-wp PTE bits would trigger again. With above commit, the kernel will
> clear the uffd-wp PTE bits when unregistering itself.
>
> Consequently, we'll clear the uffd-wp PTE bits now twice -- whereby we
> don't care about clearing them at all: a new background snapshot will
> re-register uffd-wp and re-protect all memory either way.
>
> So let's skip the manual clearing of uffd-wp. If ever relevant, we
> could clear conditionally in uffd_unregister_memory() -- we just need a
> way to figure out more recent kernels.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Fixing a bug by removing code O:-)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v1 3/5] migration/ram: Don't explicitly unprotect when unregistering uffd-wp,
Juan Quintela <=