From: "Garg, Shivank" <shivankg@amd.com>
To: "david@kernel.org" <david@kernel.org>,
"pfalcato@suse.de" <pfalcato@suse.de>
Cc: "tejavojjala@google.com" <tejavojjala@google.com>,
"Rao, Bharata Bhasker" <bharata@amd.com>,
"rppt@kernel.org" <rppt@kernel.org>,
"david.laight.linux@gmail.com" <david.laight.linux@gmail.com>,
"ankur.a.arora@oracle.com" <ankur.a.arora@oracle.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"vbabka@kernel.org" <vbabka@kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"surenb@google.com" <surenb@google.com>,
"Salunke, Hrushikesh" <Hrushikesh.Salunke@amd.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"tglx@kernel.org" <tglx@kernel.org>,
"liam@infradead.org" <liam@infradead.org>,
"nhuhuan@google.com" <nhuhuan@google.com>,
"mhocko@suse.com" <mhocko@suse.com>,
"bp@alien8.de" <bp@alien8.de>, "ljs@kernel.org" <ljs@kernel.org>,
"rientjes@google.com" <rientjes@google.com>,
"torvalds@linuxfoundation.org" <torvalds@linuxfoundation.org>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH RFC v2] mm: introduce copy_mc_highpages() and batch copy in folio_mc_copy()
Date: Mon, 19 Oct 2026 17:32:45 +0000 [thread overview]
Message-ID: <a15bbeb33d1c6e6d2cf4922f65cbde43b5784837.camel@amd.com> (raw)
In-Reply-To: <046e3eef-aae6-4361-821e-06cadf250d49@kernel.org>
On Mon, 2026-10-19 at 16:21 +0200, David Hildenbrand (Arm) wrote:
> On 10/19/26 15:10, Garg, Shivank wrote:
> > On Mon, 2026-10-19 at 14:23 +0200, David Hildenbrand (Arm) wrote:
> > > >
> > > > I would suggest that perhaps this should be the fallback for non-preemptible
> > > > models. But it gets a little weird with PREEMPT_DYNAMIC I think?
> > >
> > > Why can't we just use PROCESS_PAGES_NON_PREEMPT_BATCH where we have similar
> > > handling already?
> > >
> > > >
> >
> > I did not reuse PROCESS_PAGES_NON_PREEMPT_BATCH because it depends on
> > whether clear_pages is defined. While COPY_MC_PAGES_NON_PREEMPT_BATCH
> > depends on copy_mc_to_kernel and other constraints. So, using a single
> > param for both would make it more messy.
>
> If it would stay it would all have to be cleaned up to end up with a single one.
Agreed.
>
> >
> > However as Pedro pointed, most architectures are full preempt/preempt lazy,
> > and with this commit 7dadeaa6e851 ("sched: Further restrict the
> > preemption modes"), for PREEMPT_DYNAMIC, preempt=none and preempt=voluntary
> > are rejected at boot. preempt_model_preemptible() is therefore always
> > true for this case.
> >
> > So, this can be simplfied to drop the COPY_MC_PAGES_NON_PREEMPT_BATCH.
>
> Can we simplify the zeroing part as well?
Yes, I think so that it can be simplified similarly. I'll add a RFC patch
on next version.
Thanks,
Shivank
next prev parent reply other threads:[~2026-10-19 17:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 10:06 Shivank Garg
2026-10-19 11:09 ` Pedro Falcato
2026-10-19 12:23 ` David Hildenbrand (Arm)
2026-10-19 13:10 ` Garg, Shivank
2026-10-19 14:21 ` David Hildenbrand (Arm)
2026-10-19 17:32 ` Garg, Shivank [this message]
2026-10-19 13:16 ` Garg, Shivank
2026-10-19 12:19 ` David Laight
2026-10-19 18:54 ` Garg, Shivank
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=a15bbeb33d1c6e6d2cf4922f65cbde43b5784837.camel@amd.com \
--to=shivankg@amd.com \
--cc=Hrushikesh.Salunke@amd.com \
--cc=akpm@linux-foundation.org \
--cc=ankur.a.arora@oracle.com \
--cc=bharata@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=david.laight.linux@gmail.com \
--cc=david@kernel.org \
--cc=hpa@zytor.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=nhuhuan@google.com \
--cc=pfalcato@suse.de \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=tejavojjala@google.com \
--cc=tglx@kernel.org \
--cc=torvalds@linuxfoundation.org \
--cc=vbabka@kernel.org \
--cc=x86@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®