linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	David Hildenbrand <david@redhat.com>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Rik van Riel <riel@surriel.com>,
	"Liam R . Howlett" <Liam.Howlett@oracle.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Harry Yoo <harry.yoo@oracle.com>
Subject: Re: [Patch v2 2/2] selftests/mm: assert rmap behave as expected
Date: Mon, 28 Jul 2025 02:09:30 +0000	[thread overview]
Message-ID: <20250728020930.w7sv5eccp4kcizts@master> (raw)
In-Reply-To: <20250726025223.350-3-richard.weiyang@gmail.com>

On Sat, Jul 26, 2025 at 02:52:23AM +0000, Wei Yang wrote:
[...]
>+
>+int merge_and_migrate(struct global_data *data)
>+{
>+	int pagemap_fd;
>+	int ret = 0;
>+
>+	if (data->region == MAP_FAILED)
>+		return FAIL_ON_WORK;
>+
>+	ksm_start();

Forget to check the return value here.

Will update it.

>+
>+	ret = try_to_move_page(data->region);
>+
>+	pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
>+	if (pagemap_fd == -1)
>+		return FAIL_ON_WORK;
>+	*data->expected_pfn = pagemap_get_pfn(pagemap_fd, data->region);
>+
>+	return ret;
>+}
>+

-- 
Wei Yang
Help you, Help me


      reply	other threads:[~2025-07-28  2:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-26  2:52 [Patch v2 0/2] assert rmap behaves " Wei Yang
2025-07-26  2:52 ` [Patch v2 1/2] selftests/mm: put general ksm operation into vm_util Wei Yang
2025-08-15  6:47   ` Wei Yang
2025-08-16  7:18     ` Andrew Morton
2025-08-16  8:57       ` Wei Yang
2025-08-18  2:05         ` Andrew Morton
2025-08-18  2:20           ` Wei Yang
2025-07-26  2:52 ` [Patch v2 2/2] selftests/mm: assert rmap behave as expected Wei Yang
2025-07-28  2:09   ` Wei Yang [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=20250728020930.w7sv5eccp4kcizts@master \
    --to=richard.weiyang@gmail.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=harry.yoo@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=riel@surriel.com \
    --cc=vbabka@suse.cz \
    /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