[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <516d445f-eac0-4ad0-a337-6c669f1ec191@redhat.com>
Date: Tue, 2 Sep 2025 15:50:50 +0200
From: David Hildenbrand <david@...hat.com>
To: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>,
Kiryl Shutsemau <kirill@...temov.name>
Cc: Ryan Roberts <ryan.roberts@....com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>, Dev Jain <dev.jain@....com>,
Barry Song <baohua@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>,
Nico Pache <npache@...hat.com>, Zi Yan <ziy@...dia.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, willy@...radead.org, mcgrof@...nel.org,
gost.dev@...sung.com, Pankaj Raghav <p.raghav@...sung.com>
Subject: Re: [PATCH] huge_memory: return -EINVAL in folio split functions when
THP is disabled
On 02.09.25 15:40, Pankaj Raghav (Samsung) wrote:
>>>
>>> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
>>> index 48c4f91c5b13..4ddf9e87db91 100644
>>> --- a/include/linux/huge_mm.h
>>> +++ b/include/linux/huge_mm.h
>>> @@ -588,21 +588,29 @@ static inline int
>>> split_huge_page_to_list_to_order(struct page *page, struct list_head *list,
>>> unsigned int new_order)
>>> {
>>> + struct folio *folio = page_folio(page);
>>> +
>>> + VM_WARN_ON_ONCE_FOLIO(!folio_test_large(folio), folio);
>>
>> No. Make it unconditional. The point is we don't expect to see any
>> splitable folios, so no reason to get here at all.
>>
>
> Got it.
>
> Just one question though, in a future world where we remove the
> dependency between large folios and THP, then we can revert back
> this change to do a conditional WARN_ON?
I think we would never expect to get called to split something that is
small. Calling code should be fixed.
--
Cheers
David / dhildenb
Powered by blists - more mailing lists