[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b82c8fe-7321-4481-bd02-1c0628eaf57c@suse.cz>
Date: Wed, 19 Nov 2025 18:38:43 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: David Hildenbrand <david@...nel.org>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>, Mike Rapoport
<rppt@...nel.org>, Suren Baghdasaryan <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>, Jann Horn <jannh@...gle.com>,
Pedro Falcato <pfalcato@...e.de>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] mm: propagate VM_SOFTDIRTY on merge
On 11/17/25 18:33, Lorenzo Stoakes 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.
>
> This is because currently we simply ignore VM_SOFTDIRTY for the purposes
> of merge, so one VMA may possess the flag and another not, and whichever
> happens to be the target VMA will be the one upon which the merge is
> performed which may or may not have VM_SOFTDIRTY set.
>
> Now we have the concept of 'sticky' VMA flags, let's make VM_SOFTDIRTY one
> which solves this issue.
>
> Additionally update VMA userland tests to propagate changes.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> Suggested-by: Vlastimil Babka <vbabka@...e.cz>
> Acked-by: David Hildenbrand (Red Hat) <david@...nel.org>
> Reviewed-by: Pedro Falcato <pfalcato@...e.de>
Seems it's been like that since 34228d473efe ("mm: ignore VM_SOFTDIRTY on
VMA merging") (unless it was in the meanwhile fixed and broken again) but as
was discussed, not urgent for stable.
Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
Powered by blists - more mailing lists