linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Marty Kareem <MartyKareem@outlook.com>
To: Peter Xu <peterx@redhat.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"shuah@kernel.org" <shuah@kernel.org>
Subject: Re: [PATCH v2] [PATCH RESEND] mm/selftest: Replace static BASE_PMD_ADDR with dynamic address allocation
Date: Fri, 28 Mar 2025 03:04:56 +0000	[thread overview]
Message-ID: <LV3P220MB181573467230AB623C074478BAA02@LV3P220MB1815.NAMP220.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <Z9rQU64AAnrGlATV@x1.local>

[-- Attachment #1: Type: text/plain, Size: 2469 bytes --]

Hi Peter,
Thanks for your guidance on the proper workflow. I just fixed my git email and I'll be resending my v2 patch using git send-email as suggested.

Best regards,
Marty

________________________________
From: Peter Xu <peterx@redhat.com>
Sent: Wednesday, March 19, 2025 10:10 AM
To: Marty Kareem <MartyKareem@outlook.com>
Cc: linux-mm@kvack.org <linux-mm@kvack.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; akpm@linux-foundation.org <akpm@linux-foundation.org>; shuah@kernel.org <shuah@kernel.org>
Subject: Re: [PATCH v2] [PATCH RESEND] mm/selftest: Replace static BASE_PMD_ADDR with dynamic address allocation

On Tue, Mar 18, 2025 at 10:35:33PM -0400, Marty Kareem wrote:
> Hi Peter,

Marty,

>
> Thank you for your detailed review and suggestions.
>
> I've updated the patch to address the race condition you highlighted. In this v2 patch, the following changes have been made:
>
> 1. The PROT_NONE reservation is maintained until it can be atomically replaced.
>
> 2. I now use MAP_FIXED to atomically replace the reservation with the intended mapping.
>
> 3. The MAP_FIXED_NOREPLACE conditionals have been removed, as the atomic replacement works reliably across all kernel versions.
>
> 4. The overall implementation has been simplified while ensuring robustness.

All look good here, thanks.

>
> These modifications ensure that the memory region remains reserved until it is atomically replaced, effectively eliminating the race window and improving test reliability—especially in parallel test environments. Benchmark results show only a minimal performance impact (approximately 1.3x overhead vs. static addressing), and all tests pass successfully.
>
> One note: I'm currently having some issues with git send-email and my Outlook account, so I'm sending this patch through Thunderbird as a plain text attachment. I’m working on resolving the git send-email setup for future submissions.

If your intention is to try working on something on Linux, let's try to fix
this.  Using attachment is not the normal workflow, so you'll need it
sooner or later.

I bet now with all the AI stuff recently, it shouldn't be hard to ask and
get something to try even without asking on the list, AI should be able to
look at your specific issue.

Then please send your v2 formally with git send-email.  You can start
testing that with sending to yourself of course.

Good luck,

--
Peter Xu


[-- Attachment #2: Type: text/html, Size: 4086 bytes --]

  reply	other threads:[~2025-03-28  3:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14  2:35 Marty Kareem
2025-03-17 19:05 ` Peter Xu
2025-03-19  2:35   ` [PATCH v2] " Marty Kareem
2025-03-19 14:10     ` Peter Xu
2025-03-28  3:04       ` Marty Kareem [this message]
2025-03-28  3:19       ` [PATCH v2] mm/selftest: Fix race condition in userfaultfd " MrMartyK
2025-04-17 18:18         ` Marty Kareem
2025-04-23 22:14           ` Peter Xu

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=LV3P220MB181573467230AB623C074478BAA02@LV3P220MB1815.NAMP220.PROD.OUTLOOK.COM \
    --to=martykareem@outlook.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=shuah@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