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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5581DC433EF for ; Mon, 7 Mar 2022 23:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343936AbiCGXb6 (ORCPT ); Mon, 7 Mar 2022 18:31:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343926AbiCGXbs (ORCPT ); Mon, 7 Mar 2022 18:31:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0176454BEA for ; Mon, 7 Mar 2022 15:30:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 962ACB81737 for ; Mon, 7 Mar 2022 23:30:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 010C9C340F4; Mon, 7 Mar 2022 23:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646695850; bh=n6QJvvZazyADPz1LlLyLrBKMBYy2feH1ZYNWrHMIOqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tPkmM1ZXxLoU6RIDZHmf9rmZFmgm5PTV5h2OG7MGzbJzFLuDQybLsZ+9fEmetva4U MWKid0cwfsyjH4v92RSB/B5RzUW3W2tjEvTaTNKKGIGQNIFgvtSMCa2emB+rUdyPEC lIppz65/ocZnfAsdAlcjuavk8BLcugmVqyJ6rpM6MqTUnGJ8G/b6QDJE7SAcilghdj dEesBFvO42a8SVleSPskqSMHgP1qWuX637zB/CMOeUN2WGjj3fWq5h8LLdONk9B1zq oZyaqE+am6aNbZ7qWJsqd6KTYcljO/qyIdR2prO3i+54lT24WrfQui5E/uC4vumqeT 69YKzGf3ZzMTw== From: Frederic Weisbecker To: Thomas Gleixner Cc: LKML , Frederic Weisbecker , "Paul E . McKenney" , Peter Zijlstra , Paul Menzel Subject: [PATCH 4/4] lib/irq_poll: Declare IRQ_POLL softirq vector as ksoftirqd-parking safe Date: Tue, 8 Mar 2022 00:30:34 +0100 Message-Id: <20220307233034.34550-5-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220307233034.34550-1-frederic@kernel.org> References: <20220307233034.34550-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following warning may appear while setting a CPU down: NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #20!!! The IRQ_POLL_SOFTIRQ vector can be raised during the hotplug cpu_down() path after ksoftirqd is parked and before the CPU actually dies. However this is handled afterward at the CPUHP_IRQ_POLL_DEAD stage where the queue gets migrated. Hence this warning can be considered spurious and the vector can join the "hotplug-safe" list. Reported-and-tested-by: Paul Menzel Signed-off-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Paul E. McKenney Cc: Paul Menzel --- include/linux/interrupt.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 9613326d2f8a..f40754caaefa 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -580,12 +580,15 @@ enum }; /* - * Ignoring the RCU vector after ksoftirqd is parked is fine - * because: - * 1) rcutree_migrate_callbacks() takes care of the queue. + * The following vectors can be safely ignored after ksoftirqd is parked: + * + * _ RCU: + * 1) rcutree_migrate_callbacks() migrates the queue. * 2) rcu_report_dead() reports the final quiescent states. + * + * _ IRQ_POLL: irq_poll_cpu_dead() migrates the queue */ -#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(RCU_SOFTIRQ)) +#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(RCU_SOFTIRQ) | BIT(IRQ_POLL_SOFTIRQ)) /* map softirq index to softirq name. update 'softirq_to_name' in * kernel/softirq.c when adding a new softirq. -- 2.25.1