[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11399c99-f966-47be-bbb4-a7d4e79c8c38@kernel.org>
Date: Wed, 4 Feb 2026 20:55:36 +0100
From: "David Hildenbrand (arm)" <david@...nel.org>
To: Zi Yan <ziy@...dia.com>
Cc: 是参差 <shicenci@...il.com>, linux-mm@...ck.org,
linmiaohe@...wei.com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, Matthew Wilcox <willy@...radead.org>
Subject: Re: WARNING in memory_failure() at include/linux/huge_mm.h:635
triggered
On 2/4/26 20:48, Zi Yan wrote:
> On 4 Feb 2026, at 14:18, David Hildenbrand (arm) wrote:
>
>> On 2/4/26 18:41, Zi Yan wrote:
>>>
>>>
>>> More details:
>>> later at sg_vma_fault(), the driver just handles a page fault by supplying
>>> a subpage from a pre-allocated compound page[3]. We then get a large folio
>>> without !CONFIG_TRANSPARENT_HUGEPAGE.
>>
>> We can identify such non-folio (but compound) things by looking at PG_large_rmappable IIRC.
>
> What do you mean? Changing memory failure code to only handle large_rmappable?
> large_rmappable is a folio flag, memory failure code should see such
Did you mean "should not" ? :)
> non-folio but compound things to begin with, IMHO.
I would say that we could right now reject in memory failure code any
compound pages that do not have PG_large_rmappable set.
I have the faint recollection that we don't set PG_large_rmappable on
hugetlb folios yet, so they have to identified as well.
>
> I think we need to be able to tell between raw page (compound or not),
> mappable page (compound or not, especially for those used with vm_insert_*),
> and folio.
We can't identify (small) folios just yet. We'd need another page flag
for that (just like PG_large_rmappable), and we all know how that ends ;)
With Willy's work we'll be able to identify folios reliably.
How to deal with that vm_insert_* crap, especially for non-folio pages,
is also future work based on that.
--
Cheers,
David
Powered by blists - more mailing lists