Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3726747imw; Thu, 7 Jul 2022 06:44:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sIp/AqVy8dL0g5c7xnP4WOSvkut+c2MHEq5ng93fDW5TK0aVaU1xtCnGAhbpBfBOJ65OBh X-Received: by 2002:a17:90b:4d86:b0:1ef:8701:1b4c with SMTP id oj6-20020a17090b4d8600b001ef87011b4cmr5413432pjb.10.1657201440395; Thu, 07 Jul 2022 06:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657201440; cv=none; d=google.com; s=arc-20160816; b=FrMz0Nqx/gG0fbseDR0r7TeNXF5YA1yDcgI54WcWJaZoA1IavGe/F0UcLSAeoxuM0I x0D6io/gkxhXJx48RCej+uNCSMDe9Uz52VLHZeQhN21LMyM5SbDm5j8aXSZtwsWD6eD7 FhXrjbdITp01MYSjzaDJ0yJFq1BC+XTDC6ouaGk/fx3i18/g1IMdKSAypSmjv/xy4d2N Z8FAiIa3nPC+Ai16ydbuiGNQca3F4Wq3+aeHTxxdLYTkcHfUN3qx6PtQ5vA8WtXI0ZvJ GELEKXVp4ANcTdIYqBzq4m0HUKe8yZ2UIQCGO3Ikh7CaFClwYZWMdCPnVsC06WCVnUMB FlZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=Yd76PYg5hjNTnSx2frQ+Y35oRNvEcs5MSWClYs6+tBc=; b=fVA8sfFJl8iLm3NgGnC/d/s+LybB7FNpYzHkaoX3vkZBOBmCeA9iVeYrAMsyAwZUDC Baot4lzdO4r/L3GI3RVDo+C1uwjFiBh9bOEw6YT2exmtydyElJmVz4cvt+0RVMUwf06I xrsGJeTeNNenuD4W5lrxMdFOC8D9pSmNLF9+zi/++u6cC6GqQZq0ZEuZuFk9B53Szkj5 G1xjfipIt1oG244eQ+5d+FyPQSNMRWsYXrdqCFqo/ALd454RjlXxCV1H+AhwNhk12WLx xC0LzBvL03juLQi0joVR0zadD1lo8zfCF/hKQbXDBeSR8nMKUvP00jGfBvxmWWLsUyrL 210g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc17-20020a656d91000000b00411f3d72b41si1906907pgb.506.2022.07.07.06.43.46; Thu, 07 Jul 2022 06:44:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235662AbiGGM6y (ORCPT + 99 others); Thu, 7 Jul 2022 08:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235832AbiGGM6m (ORCPT ); Thu, 7 Jul 2022 08:58:42 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF469631A for ; Thu, 7 Jul 2022 05:58:40 -0700 (PDT) Received: from mail-yb1-f175.google.com ([209.85.219.175]) by mrelayeu.kundenserver.de (mreue012 [213.165.67.97]) with ESMTPSA (Nemesis) id 1N0qmr-1nLzpL2Vcr-00wlg4 for ; Thu, 07 Jul 2022 14:58:38 +0200 Received: by mail-yb1-f175.google.com with SMTP id 64so23082853ybt.12 for ; Thu, 07 Jul 2022 05:58:38 -0700 (PDT) X-Gm-Message-State: AJIora/Jh4bFRBOY75/n0BhavboDhPra6WEeuoDgeGpLtXc5oA+fNtzU wL5IJ2mUdf9Hv0I4dFxRIleYbVj5tRd4aWJMUdo= X-Received: by 2002:a05:6902:120f:b0:668:2228:9627 with SMTP id s15-20020a056902120f00b0066822289627mr50808203ybu.134.1657198717455; Thu, 07 Jul 2022 05:58:37 -0700 (PDT) MIME-Version: 1.0 References: <20220707110511.52129-1-zhengqi.arch@bytedance.com> <20220707110511.52129-2-zhengqi.arch@bytedance.com> In-Reply-To: <20220707110511.52129-2-zhengqi.arch@bytedance.com> From: Arnd Bergmann Date: Thu, 7 Jul 2022 14:58:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 1/2] arm64: run softirqs on the per-CPU IRQ stack To: Qi Zheng Cc: Catalin Marinas , Will Deacon , Linux ARM , Linux Kernel Mailing List , Sebastian Andrzej Siewior Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Fbdeyp6aStkOat7X8aZFib1kvwr8Isk9MFjCz1eXuG/SgWwXr/U BUcJh3NX8kyDmBp3379Xups9tIZwPHGqUaFDF5Nv7/opVqRJaRXN4mA5z6JCGoJwpDIThPX lHEO0PnKqm1WUQQ0ve0cOs61wQhQuZaQa1zSJtZHe8eighgifnGgZusqtHJtX/ujHW2Ejda Lt4H873QtslRqX4oivACw== X-UI-Out-Filterresults: notjunk:1;V03:K0:Asw8vCdvcxc=:Dc+rVX/pwIMghXDnEzcqOT 8hH4+83KwV/2qLcWPHAg7pPvJtikGRUlF2W3iEyo2ylpPw03WTKa+dw/MZJRajtRHpXaE4V4F da6Z9olr2BeUKOYWEVwoC+ha9tlJT9VSY39Ws2nk2XYw4a7JlYWafmtUcB2x+P693Q2wsPZyT uYi3OLtOC78r0M4QzA16f0FTb5GfrzrQVwJjcovOXiSjuhS5nXm7E0ckc+kXEc47Ld6ZNVxP0 NkwfoIqO0zeCT4PnyiFEy3YAJPGKDbjprSiQdqlY89IDsL79zzL8/mIxlPAPU5NVBPeIUvBQc FE8zCDzlMWTZYTyfdD8dW0dV+F7dpI++RuMBLEMAnswNOO/u7C1Tco+iuP+IR4Utu5r8sOebw 2XdQ9ef5+HTW1TMyFiLPYfj83R+qi1imA/r9CLUncTH4fcJ+pTv82SF93qBAjzspGiUWYb0bw UJ3rluGbhYB3wvvKmlAmmCEVU8JJi+AhwO5MbX9rsoZZE8/GqGPCF49CD40iiC34blMh0C+Fw oXl2Y+LIZ/OfOUCIGT+PB0229dJjy7e1cIHrHBg+UgeIp5yn4MoXBU7F254kguyysMPl0txZ2 0XidCgK7h1fyd09SOOjL1HmXQpE25HfjZ2gX1JVE3ZeU3MYcVN111xJyWTII2wKd8R9DWTYeW ih59/yabSqGhJxgEhHC6Shok5ryqouwyQSpNrp9fvmOKN4kMHikXMyRaAkgNpJGQ+QpaUkpgk y575zpB/vrbQEQeEXVoBOZbmE5mahxBqBJIivBedMPtglLjd8i2E0+ILrvjKzuOhwaNteeAW0 xHlH70O9nz8YyMOcKcyC3GFkUSMzuSKut2lSs7qyhus72oXedSQpECylzK01ZuNdtr832HCB5 5ANW3TrZvXaogcQtOWxw6Goa+ITkMEJfqmFUIuTdM= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 7, 2022 at 1:05 PM 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 I think this is the correct approach, but your patch conflicts with another patch I have queued up in the asm-generic tree, see https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?h=asm-generic&id=f2c5092190f21 Please adapt accordingly. Are there any architectures left that use IRQ stacks but don't set HAVE_SOFTIRQ_ON_OWN_STACK? If not, we could also consider removing the Kconfig symbol and just requiring it to be done this way (for non-PREEMPT_RT). Arnd