linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: xu.xin16@zte.com.cn, hughd@google.com, akpm@linux-foundation.org,
	ljs@kernel.org
Cc: michel@lespinasse.org, chengming.zhou@linux.dev,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: ksm: add mremap selftests for ksm_rmap_walk
Date: Wed, 8 Apr 2026 15:19:09 +0200	[thread overview]
Message-ID: <8e34b0a8-836f-44bb-a6b1-703f79c2ded3@kernel.org> (raw)
In-Reply-To: <20260408211552000LDjkQX010NY5GI_er7Qb1@zte.com.cn>

> 
> Oh, thanks to David and Hugh's reminder, I now understand the issue Hugh was pointing out, and I also
> see why my current test program incorrectly passes: before migrating the memory page, the
> mremap() operation has already turned a KSM page into an anonymous page, causing the code to
> take rmap_walk_anon instead of rmap_walk_ksm. Therefore, to reproduce the issue Hugh described,
> we only need to add a delay of wait_ksmd_scan_finish_two_truns before migration (after mremap) 
> 
> 	— simply wait for ksmd to merge the remapped page back into a KSM page.
> 
> such testing code can reproduce what Hugh points out and FAIL to migrate:
>
Cool, please update the test to take that into account, and please also
test with child processes involved (no mremap() in child, only mremap()
before merging in the host).

-- 
Cheers,

David


      reply	other threads:[~2026-04-08 13:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  6:08 xu.xin16
2026-04-07  9:43 ` Lorenzo Stoakes (Oracle)
2026-04-07 15:00 ` David Hildenbrand (Arm)
2026-04-08  0:08   ` Hugh Dickins
2026-04-08  7:11     ` David Hildenbrand (Arm)
2026-04-08 13:15     ` xu.xin16
2026-04-08 13:19       ` David Hildenbrand (Arm) [this message]

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=8e34b0a8-836f-44bb-a6b1-703f79c2ded3@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=michel@lespinasse.org \
    --cc=xu.xin16@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