mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Garg, Shivank" <shivankg@amd.com>,
	"pfalcato@suse.de" <pfalcato@suse.de>
Cc: "Rao, Bharata Bhasker" <bharata@amd.com>,
	"rppt@kernel.org" <rppt@kernel.org>,
	"ankur.a.arora@oracle.com" <ankur.a.arora@oracle.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>,
	"surenb@google.com" <surenb@google.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"Salunke, Hrushikesh" <Hrushikesh.Salunke@amd.com>,
	"liam@infradead.org" <liam@infradead.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mhocko@suse.com" <mhocko@suse.com>,
	"bp@alien8.de" <bp@alien8.de>, "ljs@kernel.org" <ljs@kernel.org>,
	"Nayak, K Prateek" <KPrateek.Nayak@amd.com>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v2] mm/memory: drop PROCESS_PAGES_NON_PREEMPT_BATCH
Date: Mon, 9 Nov 2026 13:15:39 +0100	[thread overview]
Message-ID: <22e06030-92b8-43f7-96e2-ac3b168bf6fd@kernel.org> (raw)
In-Reply-To: <490893fe6ead90740ccd1fc1011004d03e49a27f.camel@amd.com>

On 11/9/26 11:28, Garg, Shivank wrote:
> On Mon, 2026-11-09 at 10:12 +0000, Pedro Falcato wrote:
>>>
>>> No functional change intended.
>>>
>>> Suggested-by: David Hildenbrand <david@kernel.org>
>>> Signed-off-by: Shivank Garg <shivankg@amd.com>
>>
>> Reviewed-by: Pedro Falcato <pfalcato@suse.de>
>>
>> with a question below.
>>
>>> ---
>>> This came up in review of the copy_mc_highpages() series [1]. Pedro
>>> pointed out that most architecture run with full or lazy preempt, so mm
>>> does not need to check the preemption model at runtime or batch the copy
>>>
> 
> 
>>> -
>>> -     might_sleep();
>>> +     if (IS_ENABLED(CONFIG_PREEMPTION)) {
>>> +             clear_user_highpages(page, addr, nr_pages);
>>> +             return;
>>> +     }
>>>
>>> -     for (i = 0; i < nr_pages; i += count) {
>>> +     for (i = 0; i < nr_pages; i++) {
>>>               cond_resched();
>>> -
>>> -             count = min(unit, nr_pages - i);
>>> -             clear_user_highpages(page + i, addr + i * PAGE_SIZE, count);
>>> +             clear_user_highpages(page + i, addr + i * PAGE_SIZE, 1);
>>
>> I think we can use clear_user_highpage() here. I don't know if that's
>> necessarily desirable, but it would make this a little simpler.
>>
> 
> Sure, this makes sense. Will do this in next version.

Makes sense. So I'll wait for the v3 :)

-- 
Cheers,

David

      reply	other threads:[~2026-11-09 12:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  6:51 Shivank Garg
2026-11-09 10:12 ` Pedro Falcato
2026-11-09 10:28   ` Garg, Shivank
2026-11-09 12:15     ` David Hildenbrand (Arm) [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=22e06030-92b8-43f7-96e2-ac3b168bf6fd@kernel.org \
    --to=david@kernel.org \
    --cc=Hrushikesh.Salunke@amd.com \
    --cc=KPrateek.Nayak@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=ankur.a.arora@oracle.com \
    --cc=bharata@amd.com \
    --cc=bp@alien8.de \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=peterz@infradead.org \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=shivankg@amd.com \
    --cc=surenb@google.com \
    --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®