From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80E38ECAAD2 for ; Fri, 26 Aug 2022 04:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b7T4Fb9A3FXBYZzu/nYUjcMIxkZH2MQpAbY9yWSg2eU=; b=OAleTcuSRK0Iyb TZOBkZfP8JVBctJmppZVkN0boyVrlV/5vjOz14X+YnthGLYCj+IbSgQtLRtaFjGIKQszJYyD4A6We BfeY6CfVxCnv/HoJ0kXNWwDlwkwu+tCp035OFltf/fX0UtGvn6wvG+1/9UH5xReIpyuygEYeh4wpC 3oQgv8a+lsRxCjPnEWFpA/lqX8vrMYPsX6nE7xyKnXIVUIOI2/iyzcljFWGodADXT5v+yrBiLl4M3 meIyDbinCIkf3LbaWIqD3Q+C1cWQ+PYlJJIwaEbVlftxPhAl1+9CwEp77EaI5BTvtClFgCJtWD/Yz WO+WGPUenl3h5rXep9lA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRQlb-00CtHD-VD; Fri, 26 Aug 2022 04:16:24 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRQlY-00CssD-A7 for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 04:16:22 +0000 Received: by mail-pl1-x62b.google.com with SMTP id u22so558980plq.12 for ; Thu, 25 Aug 2022 21:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=qWMrLWTIFlNOH6VHT62t3klsgdHgFqNGp3rL1eTyrqQ=; b=ku1WlQzHvJZ0JCLdD7/3TLs6RatHXczjzuLYdmBI7Z/b3797hkABiY33LMH00rytQM uHtMoD7cgnH9al8c5pFUo7Em7w6BUw6UZ6WP14svaC5n6k0YztcMp21iFP8u8VZtDY+g G6dYfje5YB13lviPrpQb3kP3PbrYSD8TIrUjUYrTa4bumEL+ZZcpiWUm6J4I6tBcw7jV Qizy2E81nVFCfRE3dHwpM5Ra3WQwOAbKgpYFgEmOLYcyqt2FXy5Yf4Mt/6k1rN1Xg3O4 ZNpRfn+gyYY09AtFdPBZUCQSctaczl7kagHEbZu092nEDW+BAh7BnkKD/00lRNRRVHc2 rNkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=qWMrLWTIFlNOH6VHT62t3klsgdHgFqNGp3rL1eTyrqQ=; b=YtfyPftqGiPzK0k6VkIIDc+VWK8XLyyhmDPUb/PR9dntQ6DZgwosV5dLdvvV6Pe6uo G6Txl9pnbbSC5hDtXW6ybLAPtj835YHNzjUhRw3VwMUqdwd0VGI68lXL9adYXEcKWgTv yZDq58dkoXZLWa4CLOheOay03cRJQub/mvPi+a0P/t3jJwB6NQH4ERF8kl9++Kh1Y1va PmXqyF+ebaJGPRc06TE51ETpNNatLSmv5/tlE/um5mJFnr4BsKpD1XnTtNow045VCPI5 YI/lHGOx+ZS/2jzPwSD4HC2OFQzu0qni0Ln4frWfl6fRqsclJfqAhhmuVCgex7g4IIWt RCCA== X-Gm-Message-State: ACgBeo1BH6om1NXP9DmLhYtiBtbuWwVUOCTJ056TylHpey5k1HBLhGAi +s5msjIJaBQC8eMsJpdXO2BTzw== X-Google-Smtp-Source: AA6agR69UWzt6OIytVHHZ6KMxyKtTwl29Xi/yE85vs1SZzfOlWZ+XwL2wzUSyk2/5zP49d8EntUpiw== X-Received: by 2002:a17:903:11c7:b0:170:a74e:3803 with SMTP id q7-20020a17090311c700b00170a74e3803mr1981530plh.156.1661487371650; Thu, 25 Aug 2022 21:16:11 -0700 (PDT) Received: from [10.4.107.53] ([139.177.225.250]) by smtp.gmail.com with ESMTPSA id x22-20020a1709027c1600b0016f1319d2a7sm363703pll.297.2022.08.25.21.16.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 21:16:10 -0700 (PDT) Message-ID: <595c912a-1503-d420-f32f-297b824decae@bytedance.com> Date: Fri, 26 Aug 2022 12:16:04 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v3] arm64: run softirqs on the per-CPU IRQ stack Content-Language: en-US To: will@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Catalin Marinas , Mark Rutland References: <20220815124739.15948-1-zhengqi.arch@bytedance.com> From: Qi Zheng In-Reply-To: <20220815124739.15948-1-zhengqi.arch@bytedance.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220825_211620_605022_9DEE8B4B X-CRM114-Status: GOOD ( 21.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022/8/15 20:47, Qi Zheng wrote: > Currently arm64 supports per-CPU IRQ stack, but softirqs > are still handled in the task context. > > Since any call to local_bh_enable() at any level in the task's > call stack may trigger a softirq processing run, which could > potentially cause a task stack overflow if the combined stack > footprints exceed the stack's size, let's run these softirqs > on the IRQ stack as well. > > Signed-off-by: Qi Zheng > Reviewed-by: Arnd Bergmann > Acked-by: Will Deacon > --- > v2: https://lore.kernel.org/lkml/20220802065325.39740-1-zhengqi.arch@bytedance.com/ > v1: https://lore.kernel.org/lkml/20220708094950.41944-1-zhengqi.arch@bytedance.com/ > RFC: https://lore.kernel.org/lkml/20220707110511.52129-1-zhengqi.arch@bytedance.com/ > > Changelog in v2 -> v3: > - rebase onto the v6.0-rc1 Gentle ping. Thanks, Qi > > Changelog in v1 -> v2: > - temporarily discard [PATCH v1 2/2] to allow this patch to be merged first > - rebase onto the v5.19 > - collect Reviewed-by and Acked-by > > Changelog in RFC -> v1: > - fix conflicts with commit f2c5092190f2 ("arch/*: Disable softirq stacks on PREEMPT_RT.") > > arch/arm64/Kconfig | 1 + > arch/arm64/kernel/irq.c | 13 +++++++++++++ > 2 files changed, 14 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 571cc234d0b3..ee92f5887cf6 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -230,6 +230,7 @@ config ARM64 > select HAVE_ARCH_USERFAULTFD_MINOR if USERFAULTFD > select TRACE_IRQFLAGS_SUPPORT > select TRACE_IRQFLAGS_NMI_SUPPORT > + select HAVE_SOFTIRQ_ON_OWN_STACK > help > ARM 64-bit (AArch64) Linux support. > > diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c > index bda49430c9ea..c36ad20a52f3 100644 > --- a/arch/arm64/kernel/irq.c > +++ b/arch/arm64/kernel/irq.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > > /* Only access this in an NMI enter/exit */ > DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts); > @@ -71,6 +72,18 @@ static void init_irq_stacks(void) > } > #endif > > +#ifndef CONFIG_PREEMPT_RT > +static void ____do_softirq(struct pt_regs *regs) > +{ > + __do_softirq(); > +} > + > +void do_softirq_own_stack(void) > +{ > + call_on_irq_stack(NULL, ____do_softirq); > +} > +#endif > + > static void default_handle_irq(struct pt_regs *regs) > { > panic("IRQ taken without a root IRQ handler\n"); -- Thanks, Qi _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel