From: David Hildenbrand <david@redhat.com>
To: Lance Yang <lance.yang@linux.dev>, akpm@linux-foundation.org
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
Subject: Re: [PATCH 1/1] mm/ksm: fix spurious soft-dirty bit on zero-filled page merging
Date: Mon, 29 Sep 2025 10:25:04 +0200 [thread overview]
Message-ID: <e74ae9da-9dfb-4673-ae9f-c0b27b796cf0@redhat.com> (raw)
In-Reply-To: <20250928045207.78546-1-lance.yang@linux.dev>
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.
> 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.
So I am not sure if this here is really worth fixing. Soft-dirty is not,
and never will be false-positive free.
--
Cheers
David / dhildenb
next prev parent reply other threads:[~2025-09-29 8:25 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 [this message]
2025-09-29 10:08 ` Lance Yang
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=e74ae9da-9dfb-4673-ae9f-c0b27b796cf0@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=ioworker0@gmail.com \
--cc=lance.yang@linux.dev \
--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