[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af9cf69f-c66b-48ea-8617-f4fcd1bc797a@gmail.com>
Date: Fri, 5 Dec 2025 22:15:34 +0000
From: Usama Arif <usamaarif642@...il.com>
To: Kiryl Shutsemau <kas@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Muchun Song <muchun.song@...ux.dev>, David Hildenbrand <david@...nel.org>,
Oscar Salvador <osalvador@...e.de>, Mike Rapoport <rppt@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Matthew Wilcox <willy@...radead.org>, Zi Yan <ziy@...dia.com>,
Baoquan He <bhe@...hat.com>, Michal Hocko <mhocko@...e.com>,
Johannes Weiner <hannes@...xchg.org>, Jonathan Corbet <corbet@....net>,
kernel-team@...a.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH 01/11] mm: Change the interface of prep_compound_tail()
On 05/12/2025 22:10, Kiryl Shutsemau wrote:
> On Fri, Dec 05, 2025 at 09:49:36PM +0000, Usama Arif wrote:
>>
>>
>> On 05/12/2025 19:43, Kiryl Shutsemau wrote:
>>> Instead of passing down the head page and tail page index, pass the tail
>>> and head pages directly, as well as the order of the compound page.
>>>
>>> This is a preparation for changing how the head position is encoded in
>>> the tail page.
>>>
>>> Signed-off-by: Kiryl Shutsemau <kas@...nel.org>
>>> ---
>>> include/linux/page-flags.h | 4 +++-
>>> mm/hugetlb.c | 8 +++++---
>>> mm/internal.h | 11 +++++------
>>> mm/mm_init.c | 2 +-
>>> mm/page_alloc.c | 2 +-
>>> 5 files changed, 15 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
>>> index 0091ad1986bf..2c1153dd7e0e 100644
>>> --- a/include/linux/page-flags.h
>>> +++ b/include/linux/page-flags.h
>>> @@ -865,7 +865,9 @@ static inline bool folio_test_large(const struct folio *folio)
>>> return folio_test_head(folio);
>>> }
>>>
>>> -static __always_inline void set_compound_head(struct page *page, struct page *head)
>>> +static __always_inline void set_compound_head(struct page *page,
>>> + struct page *head,
>>> + unsigned int order)
>>
>> I can see that order is used later, I think patch 4, but probably this patch might cause a
>> build warning as order is unused? Might be good to integrate that into the later patch?
>
> Is there warning for unused function parameters?
ah I havent tried actually building, but I thought unused args would complain. If it doesnt,
should be ok.
>
> I think it will blow up whole kernel, no?
>
>> Other nit is, do we want const for head here? (Its not there before, but might be good to add).
>
> Sure, can do.
>
Powered by blists - more mailing lists