This is a note to let you know that I've just added the patch titled powerpc/64s: Increase default stack size to 32KB to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-64s-increase-default-stack-size-to-32kb.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 18f14afe281648e31ed35c9ad2fcb724c4838ad9 Mon Sep 17 00:00:00 2001 From: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Date: Fri, 15 Dec 2023 23:44:49 +1100 Subject: powerpc/64s: Increase default stack size to 32KB From: Michael Ellerman <mpe@xxxxxxxxxxxxxx> commit 18f14afe281648e31ed35c9ad2fcb724c4838ad9 upstream. There are reports of kernels crashing due to stack overflow while running OpenShift (Kubernetes). The primary contributor to the stack usage seems to be openvswitch, which is used by OVN-Kubernetes (based on OVN (Open Virtual Network)), but NFS also contributes in some stack traces. There may be some opportunities to reduce stack usage in the openvswitch code, but doing so potentially require tradeoffs vs performance, and also requires testing across architectures. Looking at stack usage across the kernel (using -fstack-usage), shows that ppc64le stack frames are on average 50-100% larger than the equivalent function built for x86-64. Which is not surprising given the minimum stack frame size is 32 bytes on ppc64le vs 16 bytes on x86-64. So increase the default stack size to 32KB for the modern 64-bit Book3S platforms, ie. pseries (virtualised) and powernv (bare metal). That leaves the older systems like G5s, and the AmigaOne (pasemi) with a 16KB stack which should be sufficient on those machines. Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Signed-off-by: Aneesh Kumar K.V (IBM) <aneesh.kumar@xxxxxxxxxx> Link: https://msgid.link/20231215124449.317597-1-mpe@xxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -857,6 +857,7 @@ config THREAD_SHIFT int "Thread shift" if EXPERT range 13 15 default "15" if PPC_256K_PAGES + default "15" if PPC_PSERIES || PPC_POWERNV default "14" if PPC64 default "13" help Patches currently in stable-queue which might be from mpe@xxxxxxxxxxxxxx are queue-6.6/powerpc-powernv-add-a-null-pointer-check-in-opal_eve.patch queue-6.6/powerpc-powernv-add-a-null-pointer-check-to-scom_deb.patch queue-6.6/powerpc-hv-gpci-add-return-value-check-in-affinity_d.patch queue-6.6/kvm-ppc-book3s-hv-handle-pending-exceptions-on-guest.patch queue-6.6/powerpc-64s-increase-default-stack-size-to-32kb.patch queue-6.6/powerpc-add-crtsavres.o-to-always-y-instead-of-extra.patch queue-6.6/selftests-powerpc-fix-error-handling-in-fpu-vmx-pree.patch queue-6.6/powerpc-imc-pmu-add-a-null-pointer-check-in-update_e.patch queue-6.6/kvm-ppc-book3s-hv-use-accessors-for-vcpu-registers.patch queue-6.6/powerpc-44x-select-i2c-for-currituck.patch queue-6.6/kvm-ppc-book3s-hv-introduce-low-level-msr-accessor.patch queue-6.6/powerpc-powernv-add-a-null-pointer-check-in-opal_pow.patch queue-6.6/powerpc-pseries-memhp-fix-access-beyond-end-of-drmem.patch queue-6.6/powerpc-rtas-avoid-warning-on-invalid-token-argument.patch