[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87o6oz9mbs.fsf@oracle.com>
Date: Tue, 18 Nov 2025 11:23:35 -0800
From: Ankur Arora <ankur.a.arora@...cle.com>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: Ankur Arora <ankur.a.arora@...cle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, x86@...nel.org, akpm@...ux-foundation.org,
bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
mingo@...hat.com, mjguzik@...il.com, luto@...nel.org,
peterz@...radead.org, acme@...nel.org, namhyung@...nel.org,
tglx@...utronix.de, willy@...radead.org, raghavendra.kt@....com,
boris.ostrovsky@...cle.com, konrad.wilk@...cle.com
Subject: Re: [PATCH v8 2/7] mm: introduce clear_pages() and clear_user_pages()
David Hildenbrand (Red Hat) <david@...nel.org> writes:
> On 27.10.25 21:21, Ankur Arora wrote:
>> Introduce clear_pages(), to be overridden by architectures that
>> support more efficient clearing of consecutive pages.
>> Also introduce clear_user_pages(), however, we will not expect
>> this function to be overridden anytime soon.
>> We have to place the clear_user_pages() variant that uses
>> clear_user_page() into mm/util.c for now to work around
>> macro magic on sparc and m68k.
>> Signed-off-by: Ankur Arora <ankur.a.arora@...cle.com>
>> ---
>> include/linux/mm.h | 41 +++++++++++++++++++++++++++++++++++++++++
>> mm/util.c | 13 +++++++++++++
>> 2 files changed, 54 insertions(+)
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index 683168b522b3..ecbcb76df9de 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -3872,6 +3872,26 @@ static inline void clear_page_guard(struct zone *zone, struct page *page,
>> unsigned int order) {}
>> #endif /* CONFIG_DEBUG_PAGEALLOC */
>> +#ifndef __HAVE_ARCH_CLEAR_PAGES
>
> Also here, let's base it on
>
> #ifndef clear_pages
>
> and similarly below for clear_user_pages.
Sounds good. For this one and the other.
> (sorry for the back-and-forth, it's rather unclear what the best practice is)
No worries.
--
ankur
Powered by blists - more mailing lists