Re: [PATCH v2] s390: fix HugeTLB vmemmap optimization crash

From: Andrew Morton

Date: Tue Oct 28 2025 - 17:53:36 EST


On Tue, 28 Oct 2025 17:15:33 -0400 Luiz Capitulino <luizcap@xxxxxxxxxx> wrote:

> A reproducible crash occurs when enabling HugeTLB vmemmap optimization (HVO)
> on s390. The crash and the proposed fix were worked on an s390 KVM guest
> running on an older hypervisor, as I don't have access to an LPAR. However,
> the same issue should occur on bare-metal.
>
> Reproducer (it may take a few runs to trigger):
>
> # sysctl vm.hugetlb_optimize_vmemmap=1
> # echo 1 > /proc/sys/vm/nr_hugepages
> # echo 0 > /proc/sys/vm/nr_hugepages
>
> ...
>
> This commit fixes this by implementing flush_tlb_all() on s390 as an
> alias to __tlb_flush_global(). This should cause a flush on all TLB
> entries on all CPUs as expected by the flush_tlb_all() semantics.
>
> ...
>
> arch/s390/include/asm/tlbflush.h | 6 +++++-

Thanks, I'll add this to mm.git. If s390 people prefer to merge it
(or nack it!) then please do so and I'll drop the mm.git copy.