Re: [PATCH 0/2] make VM_SOFTDIRTY a sticky VMA flag
From: Andrew Morton
Date: Fri Nov 14 2025 - 16:53:05 EST
On Fri, 14 Nov 2025 17:53:17 +0000 Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx> wrote:
> Currently we set VM_SOFTDIRTY when a new mapping is set up (whether by
> establishing a new VMA, or via merge) as implemented in __mmap_complete()
> and do_brk_flags().
>
> However, when performing a merge of existing mappings such as when
> performing mprotect(), we may lose the VM_SOFTDIRTY flag.
>
userspace-visible effects?
Documentation/admin-guide/mm/soft-dirty.rst tells me that this can
already happen in other circumstances so I guess it isn't very serious.
CRIU inefficiency. perhaps?
Please review Documentation/admin-guide/mm/soft-dirty.rst, check that
it is complete and accurate?