[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65F47450-2658-42E7-ADDA-DF6E24066AFF@nvidia.com>
Date: Wed, 26 Nov 2025 11:59:02 -0500
From: Zi Yan <ziy@...dia.com>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, Nico Pache <npache@...hat.com>,
Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
Barry Song <baohua@...nel.org>, Lance Yang <lance.yang@...ux.dev>,
Miaohe Lin <linmiaohe@...wei.com>, Naoya Horiguchi <nao.horiguchi@...il.com>,
Wei Yang <richard.weiyang@...il.com>, Balbir Singh <balbirs@...dia.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/4] mm/huge_memory: change folio_split_supported() to
folio_check_splittable()
On 26 Nov 2025, at 4:54, David Hildenbrand (Red Hat) wrote:
>> - /*
>> - * Folios that just got truncated cannot get split. Signal to the
>> - * caller that there was a race.
>> - *
>> - * TODO: this will also currently refuse shmem folios that are in the
>> - * swapcache.
>> - */
>> - if (!is_anon && !folio->mapping)
>> - return -EBUSY;
>> -
>> if (new_order >= old_order)
>> return -EINVAL;
>> - if (!folio_split_supported(folio, new_order, split_type, /* warn = */ true))
>> - return -EINVAL;
>> -
>> - is_hzp = is_huge_zero_folio(folio);
>> - if (is_hzp) {
>> - pr_warn_ratelimited("Called split_huge_page for huge zero page\n");
>> - return -EBUSY;
>
> As we are changing that case to a VM_WARN_ONCE(), is there some path where we might trigger that?
Based on the git history, this check is added for injecting errors
to huge zero folio and triggering memory failure handling.
>
> I'm wondering about the split_huge_pages_all() function in particular. I guess the "!folio_test_lru(folio)" would protect us?
I think so.
>
> Apart from that LGTM
>
> Acked-by: David Hildenbrand (Red Hat) <david@...nel.org>
>
Thanks.
Best Regards,
Yan, Zi
Powered by blists - more mailing lists