[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ic5kobuxfm4zi6agfvosjxs325mdgrfpjz52mi3zn27epbuvef@z5dmowge6uyb>
Date: Tue, 2 Sep 2025 15:40:39 +0200
From: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
To: Kiryl Shutsemau <kirill@...temov.name>
Cc: David Hildenbrand <david@...hat.com>,
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
> >
> > 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?
--
Pankaj
Powered by blists - more mailing lists