[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c1cf2254-2449-48b4-b1db-0d92595567df@redhat.com>
Date: Tue, 30 Sep 2025 11:44:15 +0200
From: David Hildenbrand <david@...hat.com>
To: Ankur Arora <ankur.a.arora@...cle.com>
Cc: 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 v7 11/16] mm/highmem: introduce clear_user_highpages()
On 25.09.25 07:26, Ankur Arora wrote:
>
> David Hildenbrand <david@...hat.com> writes:
>
>> On 23.09.25 22:34, Ankur Arora wrote:
>>> David Hildenbrand <david@...hat.com> writes:
>>>
>>>> On 17.09.25 17:24, Ankur Arora wrote:
>>>>> Define clear_user_highpages() which clears pages sequentially using
>>>>> the single page variant.
>>>>> With !CONFIG_HIGHMEM, pages are contiguous so use the range clearing
>>>>> primitive clear_user_pages().
>>>>> Signed-off-by: Ankur Arora <ankur.a.arora@...cle.com>
>>>>> ---
>>>>> include/linux/highmem.h | 18 ++++++++++++++++++
>>>>> 1 file changed, 18 insertions(+)
>>>>> diff --git a/include/linux/highmem.h b/include/linux/highmem.h
>>>>> index 6234f316468c..ed609987e24d 100644
>>>>> --- a/include/linux/highmem.h
>>>>> +++ b/include/linux/highmem.h
>>>>> @@ -207,6 +207,24 @@ static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
>>>>> }
>>>>> #endif
>>>>> +#ifndef clear_user_highpages
>>>>
>>>> Maybe we can add a simple kernel doc that points at the doc of clear_user_pages,
>>>> but makes it clear that this for pages that might reside in highmem.
>>> Didn't add one because clear_user_highpage() didn't have one. Will add
>>> for both.
>>>
>>
>> Doesn't have to be excessive. But even I have to keep reminding myself when to
>> use clear_page(), clear_user_page(), clear_user_highpage() ...
>
> And now all the multi-page variants. Really motivates the removal of
> the HIGHMEM stuff.
:) I'm afraid it will stick around for a couple of years to come.
--
Cheers
David / dhildenb
Powered by blists - more mailing lists