linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: Zi Yan <ziy@nvidia.com>,
	akpm@linux-foundation.org, lorenzo.stoakes@oracle.com,
	baolin.wang@linux.alibaba.com, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [Patch v2] selftests/mm: check content to see whether mremap corrupt data
Date: Tue, 2 Sep 2025 10:23:51 +0200	[thread overview]
Message-ID: <05f628ba-c24b-4180-87be-e5a577dc4e4d@redhat.com> (raw)
In-Reply-To: <20250902081342.rthx5sopowmg4hyb@master>

On 02.09.25 10:13, Wei Yang wrote:
> On Tue, Sep 02, 2025 at 09:49:48AM +0200, David Hildenbrand wrote:
>>>> +	/*
>>>> +	 * To challenge spitting code, we will mremap page[x] of the
>>>> +	 * thp[x] into a smaller area, and trigger the split from that
>>>> +	 * smaller area. This will end up replacing the PMD mappings in
>>>> +	 * the thp_area by PTE mappings first, leaving the THPs unsplit.
>>>> +	 */
> 
> This confuse me a little. How about move "and trigger the split from that
> smaller area" to the end? So that I know mremap convert to pte-mapping and
> leave thp unsplit. Then we do the split.
> 

After spleeping over it, what about the following?

+       /*
+        * To challenge spitting code, we will mremap a single page of each
+        * THP (page[i] of thp[i]) in the thp_area into page_area. This will
+        * replace the PMD mappings in the thp_area by PTE mappings first,
+        * but leaving the THP unsplit, to then create a page-sized hole in
+        * the thp_area.
+        * We will then manually trigger splitting of all THPs through the
+        * single mremap'ed pages of each THP in the page_area.
+        */

-- 
Cheers

David / dhildenb



  reply	other threads:[~2025-09-02  8:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-31  2:27 [Patch v2] selftests/mm: check content to see whether mremap corrupt data Wei Yang
2025-09-01  2:08 ` wang lian
2025-09-01  7:22 ` David Hildenbrand
2025-09-01  8:11   ` wang lian
2025-09-01  8:16     ` David Hildenbrand
2025-09-01  8:34       ` wang lian
2025-09-01  8:43   ` Wei Yang
2025-09-01 12:56   ` Zi Yan
2025-09-01 13:03     ` David Hildenbrand
2025-09-01 17:04       ` Zi Yan
2025-09-01 19:10         ` David Hildenbrand
2025-09-02  2:51           ` Wei Yang
2025-09-02  7:49             ` David Hildenbrand
2025-09-02  8:13               ` Wei Yang
2025-09-02  8:23                 ` David Hildenbrand [this message]
2025-09-02  8:28                   ` Wei Yang
2025-09-02  8:16           ` Wei Yang
2025-09-02  8:26             ` David Hildenbrand
2025-09-02 14:56           ` Zi Yan
2025-09-02 15:28             ` David Hildenbrand
2025-09-02 15:39               ` Zi Yan
2025-09-02 15:40               ` David Hildenbrand
2025-09-02 15:42                 ` Zi Yan

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=05f628ba-c24b-4180-87be-e5a577dc4e4d@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=richard.weiyang@gmail.com \
    --cc=ziy@nvidia.com \
    /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;
as well as URLs for NNTP newsgroup(s).