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 E30AAC43334 for ; Tue, 12 Jul 2022 06:59:06 +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=f9YzhTDKWAbflXzVSSwXEfTTJyobX23AfXSKsuuXGdo=; b=IbvmP0INMHxG6x uMzj3+RssYEPe4qea8+arCsFkw0PpdEMvB3i1lR1aV/eaOfScHQrK36FIprY3DmyzG4NmdYM4CfgG x5yF2bj8vMMI+UGBMiqSNDM2cMGh87y8wlCg8Jln/1oMnl98F7aHo2yiizcX67bmCln/paycXjLSk u2BAumvjrKAC7XBiE2gahQn1CX1TX0P48sOAUcIR2rJCSLMwtY90EvY8Omz82QLZfR9N6JreJ1lgE OFW8Csh1weYefBcQdu/L7CkOZGO/wAdnIoKWSr2Heamm/EZufS/fR5H+ft5YNNRi1HQI4lSBoBRCf FmlEuvGnCQUazukrfyKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oB9qM-008B9w-97; Tue, 12 Jul 2022 06:58:02 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oB9qI-008B7R-G2 for linux-arm-kernel@lists.infradead.org; Tue, 12 Jul 2022 06:58:00 +0000 Received: by mail-pl1-x62e.google.com with SMTP id 5so6464070plk.9 for ; Mon, 11 Jul 2022 23:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=wt7MycguGN5t84A6c+lbathd4HawDHnJrnlkQhSwpe0=; b=CzwBC2T4Mqa2pzDTBcG633rO5N28nYTPP7bGlbVQV9ojiSG47PESlVsJEsYM6TYa5S SCa0CD0atvUVv83Wz8vaUOz3hOwmRj39syMiymUzTjpC3L2X8BvaEEfVIEN4iWoYp7nM nldD0Ks1sWeY09r68fIA5kMFBY+7HlaXGr+oEm+N41dA57mAoeUHiBpwotaR1W39JhUG oqtRj1a0Jen39VzVZ06wqBa0sj9UEfZI100tVi0NAH1QzwCGP94mzFRTIOJBf9N/jp7K 999o1bKP8bC0uiCKD8z6aaMFLWRN8BseIEotNtKY+069sZtPalh3fH8RHq1wxFEIsfYb crUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=wt7MycguGN5t84A6c+lbathd4HawDHnJrnlkQhSwpe0=; b=kJzOWR9gUOrhlgZWCWkudungI5G2Ies/ivh+gxtxD6CKB9rVJm568RgMXUinon7ZXz bmvoav2sKsrIhx99a2ym3RWUCD95vddyvgs/8tfsDimc9Hl/orh9kOAuOTQTwG5wLI5H IS3Sk2duYQsN+Uv0X8nUHejdehxp/Bz9FJeucurdQd2RkDfn2VXGh9e/li1r40vOWMGK 49X4XRsDswWhwkKzG+xfKnrahptOc4tBbQ2mj4gYT4CpHsiVHt9mvzk3GwgWYjBXgQIz vpiwySYvgVK24qk7lZ5vdMQxLVOOdFk+in/1iWVDlusODF5ZkT8twv6/sl5EZeqa/1FM yhqA== X-Gm-Message-State: AJIora/FsfBAcv74ZThO2aghtwkA2FZ941cHT33MJ8jDWwBDPj4QsfOe wUaAm/YkMqEqXM7GWYuRkcJLRw== X-Google-Smtp-Source: AGRyM1tbdv2oUxsRq8y9CVKh8tbYW++1GOJcDl6GNmh5W0CAyCZBUi4oZW4X6cLv2UUMsK0rBeIiVg== X-Received: by 2002:a17:903:1111:b0:16a:acf4:e951 with SMTP id n17-20020a170903111100b0016aacf4e951mr22284874plh.72.1657609075494; Mon, 11 Jul 2022 23:57:55 -0700 (PDT) Received: from [10.4.225.66] ([139.177.225.249]) by smtp.gmail.com with ESMTPSA id p6-20020a17090a4f0600b001ef9114eb9dsm5910565pjh.42.2022.07.11.23.57.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jul 2022 23:57:55 -0700 (PDT) Message-ID: <8c0e93e2-72e8-bd67-e5a4-c8e3bb888bfe@bytedance.com> Date: Tue, 12 Jul 2022 14:57:48 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0 Subject: Re: [PATCH v1 0/2] arm64: run softirqs on the per-CPU IRQ stack Content-Language: en-US To: arnd@arndb.de, catalin.marinas@arm.com, will@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220708094950.41944-1-zhengqi.arch@bytedance.com> From: Qi Zheng In-Reply-To: <20220708094950.41944-1-zhengqi.arch@bytedance.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220711_235758_763932_2AAE1DED X-CRM114-Status: GOOD ( 19.02 ) 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/7/8 17:49, Qi Zheng wrote: > Hi all, > > 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. And we did encounter this > situation in the real environment: > > Call trace: > dump_backtrace+0x0/0x1cc, > show_stack+0x14/0x1c, > dump_stack+0xc4/0xfc, > panic+0x150/0x2c8, > panic+0x0/0x2c8, > handle_bad_stack+0x11c/0x130, > __bad_stack+0x88/0x8c, > vsnprintf+0x2c/0x524, > vscnprintf+0x38/0x7c, > scnprintf+0x6c/0x90, > /* ... */ > __do_softirq+0x1e0/0x370, > do_softirq+0x40/0x50, > __local_bh_enable_ip+0x8c/0x90, > _raw_spin_unlock_bh+0x1c/0x24, > /* ... */ > process_one_work+0x1dc/0x3e4, > worker_thread+0x260/0x360, > kthread+0x118/0x128, > ret_from_fork+0x10/0x18, > > So let's run these softirqs on the IRQ stack as well. > > This series is based on next-20220707. > > Comments and suggestions are welcome. > > Thanks, > Qi > > RFC: https://lore.kernel.org/lkml/20220707110511.52129-1-zhengqi.arch@bytedance.com/ > > Changelog in RFC -> v1: > - fix conflicts with commit f2c5092190f2 ("arch/*: Disable softirq stacks on PREEMPT_RT.") > > Qi Zheng (2): > arm64: run softirqs on the per-CPU IRQ stack > arm64: support HAVE_IRQ_EXIT_ON_IRQ_STACK > > arch/arm64/Kconfig | 2 ++ > arch/arm64/include/asm/exception.h | 4 +++- > arch/arm64/kernel/entry-common.c | 30 ++++++++++++++++++++---------- > arch/arm64/kernel/entry.S | 6 ++++-- > arch/arm64/kernel/irq.c | 14 ++++++++++++++ > 5 files changed, 43 insertions(+), 13 deletions(-) > Hi all, Any other suggestions and comments for this patch set? If not, can this patch set be merged into some trees for testing? :) Thanks, Qi _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel