From: Lance Yang <lance.yang@linux.dev>
To: David Hildenbrand <david@redhat.com>
Cc: xu.xin16@zte.com.cn, chengming.zhou@linux.dev,
ran.xiaokai@zte.com.cn, yang.yang29@zte.com.cn,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
ioworker0@gmail.com, akpm@linux-foundation.org
Subject: Re: [PATCH 1/1] mm/ksm: fix spurious soft-dirty bit on zero-filled page merging
Date: Mon, 29 Sep 2025 18:08:45 +0800 [thread overview]
Message-ID: <8476e9be-3f80-4d7a-9a38-f910661e61c6@linux.dev> (raw)
In-Reply-To: <e74ae9da-9dfb-4673-ae9f-c0b27b796cf0@redhat.com>
On 2025/9/29 16:25, David Hildenbrand wrote:
> On 28.09.25 06:52, Lance Yang wrote:
>> From: Lance Yang <lance.yang@linux.dev>
>>
>> When KSM merges a zero-filled page with the shared zeropage, it uses
>> pte_mkdirty() to mark the new PTE for internal accounting. However,
>> pte_mkdirty() unconditionally sets both the hardware dirty bit and the
>> soft-dirty bit.
>>
>
> Right, that's one think we should clean up at one point.
Got it. I’ll take a look when I get a chance ;)
>
>> This behavior causes false positives in userspace tools like CRIU that
>> rely on the soft-dirty mechanism for tracking memory changes.
>
> IIRC, false positives are not a problem. We get them all of the time
> when merging VMAs etc.
Right, Indeed.
> So I am not sure if this here is really worth fixing. Soft-dirty is not,
> and never will be false-positive free.
Makes sense to me. It doesn’t seem worth the trouble to fix. Let’s go
ahead and drop it.
Thanks,
Lance
next prev parent reply other threads:[~2025-09-29 10:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-28 4:52 Lance Yang
2025-09-29 8:25 ` David Hildenbrand
2025-09-29 10:08 ` Lance Yang [this message]
2025-09-30 7:32 ` David Hildenbrand
2025-09-30 7:36 ` Lance Yang
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=8476e9be-3f80-4d7a-9a38-f910661e61c6@linux.dev \
--to=lance.yang@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=david@redhat.com \
--cc=ioworker0@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ran.xiaokai@zte.com.cn \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
/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