Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6643864rdb; Fri, 15 Dec 2023 04:45:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEBXw2T7NVLtwJBY40v6Cz7WuXt/OVp5MCDT3a/b7gc/TEPuZwo6BSF1ypEP99BNCQeClV X-Received: by 2002:ac8:7fcf:0:b0:425:4043:96bd with SMTP id b15-20020ac87fcf000000b00425404396bdmr16792280qtk.74.1702644315175; Fri, 15 Dec 2023 04:45:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702644315; cv=none; d=google.com; s=arc-20160816; b=I0UEAIlXA7UNndrABMCS/T+EF2WJMG6KCMpHRS2ku35BzoeWu2RVGDetdQcIxE/W5c giF/HZcXWXdlJu2sHBlyl4T4NHjjR+7kJmlSzyrbrxHN6xvej8M4/nXlrozZUgoR0DnC 6Gg0zCLoEtdrR+Tl/WqfgIiWpIykuu5SCG+dO86LaouMLmzTKl3aAlPRJit2nimPixYK mWrRF2XIaLgZDxpyl6OOAEnCSp1CsS+T0RWJhckRB+9wrbEtOExx2xzM0nR4zApLpzYe SaeorLZq0LceQDGI+jtCNuJgSZhN+oRgEc81BB+vE0/ZOW9YBNKvkDnZX7+sEPNgHKBr jwpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ZbNUQcJBnFYDjt8DqRZb690YTN+Yerf1ziIZEyZ/aFk=; fh=QwQbIoakUw3dqvWZQaAUHIZ4NTb0z34uNe8jMoS55D8=; b=srsgpR20m0s9JxQ00p4ovc0Xxz2YJ1N4P4GWP2UEM5wz2DOFopvVLWIWCoAA4MsUsb ONfV5Cw7xmozVj4SDPT+jL6ygJpve+PPW4jpJLHI+4VvCZBco5kKgXztZ5no5P7xYMym 6wW4tsUMtCjavqwAGVThhff0OgdiNzD9oYeKaZB4P/QUHTBPhFEcoXBdnSniT6Qn4JeF nzWyWTH1KHNj2Qut3yyeCurcKXKqASnmQjxL6USBfDQqu9lJGSIRhSUq9BdCXPfL/zIk d7NppVX/f0ZYHyt5CKf9OiD5M211eRHEHa98p3jG4D93eo69bbBGwhJJi5PbX6Gqo0yp VeKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=p028LLFF; spf=pass (google.com: domain of linux-kernel+bounces-947-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-947-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m17-20020a05622a055100b00425c2070236si12922887qtx.473.2023.12.15.04.45.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 04:45:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-947-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=p028LLFF; spf=pass (google.com: domain of linux-kernel+bounces-947-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-947-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E72D91C22E38 for ; Fri, 15 Dec 2023 12:45:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFA652C6BB; Fri, 15 Dec 2023 12:45:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="p028LLFF" X-Original-To: linux-kernel@vger.kernel.org Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42FEC2C6AB for ; Fri, 15 Dec 2023 12:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1702644295; bh=ZbNUQcJBnFYDjt8DqRZb690YTN+Yerf1ziIZEyZ/aFk=; h=From:To:Cc:Subject:Date:From; b=p028LLFFmSypXdSf5eQppnhuXxGpim1xqRZkdhtLAxpY23ZFzTWkSL8T/RdmI8sLL QZwz/IDzaaWsAE4icbVRfMLR29J9FF12OF1IZbHHsniZQ6iqqLUv8MCRZHbg/eeaeR mJ/r0zQqoGs1G3DcyNm6Ae9zn6XqZmKEA+pJtX/2vhk7BKw61zCVqjXNKXfogQRhzB XvGZyAzRD9weGxEqE8IWKL5w6kAhsrAdMpNFGzt9ffyftFsOvN9ma8RCFDANZDitx0 TDKU6x3COGie6OLcT1f43fFUSltCQ4wfUkXPqQ9DUGwSQRRUAWQZcvs0akdCdwNbrh YjLEF/m1dokWA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Ss87W3Y79z4xG8; Fri, 15 Dec 2023 23:44:55 +1100 (AEDT) From: Michael Ellerman To: Cc: Subject: [PATCH] powerpc/64s: Increase default stack size to 32KB Date: Fri, 15 Dec 2023 23:44:49 +1100 Message-ID: <20231215124449.317597-1-mpe@ellerman.id.au> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6f105ee4f3cf..2df545c1446e 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -858,6 +858,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 -- 2.43.0