Re: [PATCH] sparc64: fix hugetlb for sun4u
From: David Hildenbrand
Date: Mon Aug 11 2025 - 04:20:25 EST
On 09.08.25 08:23, John Paul Adrian Glaubitz wrote:
Hi Anthony,
On Sat, 2025-08-09 at 00:37 +0200, John Paul Adrian Glaubitz wrote:
Maybe try enabling CONFIG_DEBUG_VM_IRQSOFF, CONFIG_DEBUG_VM, and perhaps
CONFIG_DEBUG_VM_PGFLAGS. That might help detect a problem closer to the
source. You can also try adding transparent_hugepage=never to the kernel
boot line to see if compiling in THP support but not using it is okay.
OK, I will try that. But not today anymore. It's half past midnight now here in Germany
and I was debugging this issue almost all day long. I'm glad to have finally been able
to track this down to THP support being enabled.
Maybe you can try whether you can reproduce this in QEMU as well.
OK, first data point: Setting CONFIG_TRANSPARENT_HUGEPAGE_NEVER=y causes the backtrace during
boot to disappear with CONFIG_TRANSPARENT_HUGEPAGE=y. However, it still disappears later when
running "apt update && apt -y upgrade" again:
Just to give some context: (m)THPs in file systems will get used
independently of CONFIG_TRANSPARENT_HUGEPAGE_NEVER=y.
So CONFIG_TRANSPARENT_HUGEPAGE_NEVER=y primarily only controls usage of
(m)THPs for anonymous memory, but not in the pagecache.
[ 170.472743] kernel BUG at fs/ext4/inode.c:1174!
[ 170.532313] \|/ ____ \|/
"@'/ .. \`@"
/_| \__/ |_\
\__U_/
Is this the
BUG_ON(to > folio_size(folio));
?
--
Cheers,
David / dhildenb