mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sarthak Sharma <sarthak.sharma@arm.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R . Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
	John Hubbard <jhubbard@nvidia.com>,
	Kalesh Singh <kaleshsingh@google.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Park Tae-sun <ts930@dgu.ac.kr>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 6/9] selftests/mm: mremap_test: replace random data with deterministic pattern
Date: Thu, 1 Oct 2026 18:46:18 +0530	[thread overview]
Message-ID: <54f1d9b8-948a-482d-8fa5-694fd937c9e8@arm.com> (raw)
In-Reply-To: <b45813af-df08-4270-93ac-d99ee42830ec@kernel.org>



On 10/1/26 5:30 PM, David Hildenbrand (Arm) wrote:
> On 9/24/26 07:00, Sarthak Sharma wrote:
>> mremap_test uses a random data stream to detect corruption after remap
>> operations. This requires seed handling and byte by byte validation,
>> which is inefficient.
>>
>> Replace it with a deterministic pattern where every word in a page
>> contains its one-based page index. Use memcpy() and memcmp() to
>> initialize and validate the mappings. Remove the pattern seed and
>> its command line option. Also update the comment diagrams to
>> reflect the new deterministic pattern.
>>
>> Suggested-by: David Hildenbrand (Arm) <david@kernel.org>
>> Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
>> ---
> 
> How will this patch change with the change in threshold handling? Does it make
> sense to reshuffle the patches?

From an intermediate patch POV, both ways of doing should be identical:

a) Remove threshold first, then remove randomization:
	i) Adjust random buffer size according to what the test requires
	   and implement the start, mid end pages checking
	ii) Replace rand approach with fixed pattern

b) Remove randomization first, then remove threshold:
	i) Adjust fixed pattern size according to threshold
	ii) Implement the new logic of start, mid and end pages checking
	    and adjust pattern size

But if we plan to remove perf and timing infrastructure before (which I
plan to do in v2), yes removing threshold first would be neater, since
it will keep both the removal patches together. Please let me know if I
am missing something.


  reply	other threads:[~2026-10-01 13:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  5:00 [PATCH RESEND 0/9] selftests/mm: improve mremap_test Sarthak Sharma
2026-09-24  5:00 ` [PATCH RESEND 1/9] selftests/mm: mremap_test: use kselftest helpers Sarthak Sharma
2026-09-29  7:58   ` David Hildenbrand (Arm)
2026-09-29  9:12     ` Sarthak Sharma
2026-09-24  5:00 ` [PATCH RESEND 2/9] selftests/mm: mremap_test: skip test when userfaultfd is unavailable Sarthak Sharma
2026-09-29  8:00   ` David Hildenbrand (Arm)
2026-09-29  9:17     ` Sarthak Sharma
2026-09-24  5:00 ` [PATCH RESEND 3/9] selftests/mm: mremap_test: fail unexpected mremap successes Sarthak Sharma
2026-09-29  8:17   ` David Hildenbrand (Arm)
2026-09-24  5:00 ` [PATCH RESEND 4/9] selftests/mm: mremap_test: correct multiple VMA range size Sarthak Sharma
2026-10-01 11:54   ` David Hildenbrand (Arm)
2026-10-01 12:42     ` Sarthak Sharma
2026-09-24  5:00 ` [PATCH RESEND 5/9] selftests/mm: mremap_test: fail on data corruption Sarthak Sharma
2026-10-01 11:54   ` David Hildenbrand (Arm)
2026-09-24  5:00 ` [PATCH RESEND 6/9] selftests/mm: mremap_test: replace random data with deterministic pattern Sarthak Sharma
2026-10-01 12:00   ` David Hildenbrand (Arm)
2026-10-01 13:16     ` Sarthak Sharma [this message]
2026-10-01 13:19       ` David Hildenbrand (Arm)
2026-09-24  5:00 ` [PATCH RESEND 7/9] selftests/mm: mremap_test: remove perf tests and timing Sarthak Sharma
2026-10-01 11:56   ` David Hildenbrand (Arm)
2026-09-24  5:00 ` [PATCH RESEND 8/9] selftests/mm: mremap_test: remove validation threshold Sarthak Sharma
2026-09-24  5:00 ` [PATCH RESEND 9/9] selftests/mm: mremap_test: strengthen multi VMA validation Sarthak Sharma
2026-09-29  5:54 ` [PATCH RESEND 0/9] selftests/mm: improve mremap_test Sarthak Sharma
2026-09-29  7:32   ` Kalesh Singh
2026-09-29  7:47     ` David Hildenbrand (Arm)
2026-09-29  9:05       ` Sarthak Sharma
2026-09-29  8:36 ` Lorenzo Stoakes (ARM)

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=54f1d9b8-948a-482d-8fa5-694fd937c9e8@arm.com \
    --to=sarthak.sharma@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=david@kernel.org \
    --cc=jhubbard@nvidia.com \
    --cc=kaleshsingh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=ts930@dgu.ac.kr \
    --cc=vbabka@kernel.org \
    /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

all inboxes | Powered by JetHome®