From patchwork Sat Jun 10 12:45:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 105936 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1528506vqr; Sat, 10 Jun 2023 06:02:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7PtI3OFV+dbHK5SpMw/wNN+EH6Td47bXNwmk/tBhCz0YD1rH2z3hHUwQTRBoz5OsLOjIiU X-Received: by 2002:a17:90a:65c3:b0:247:6ead:d0ed with SMTP id i3-20020a17090a65c300b002476eadd0edmr4111332pjs.28.1686402164765; Sat, 10 Jun 2023 06:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686402164; cv=none; d=google.com; s=arc-20160816; b=W+jDGjHGYZ5AaswarLbhAZd38VUHEzI23vk7/QmMnVzVQNfpU8/YhO3/N6LYGt4mg4 +RiwaHcx5xkWAsAzW2hptyceb0Pr/B5s/GGDe9KxPHU0feuPoizLmMPniD+uRxNrd15L +iNdQw4Hgejl9PMbLNFTGbDGD1vbB9oCk7qUJG1VjVDWKiIcmTKvt6MVg0ZKDT6KPvrf jHnw4UJaDp1O+7qDJPwuUmn48ik5BcG+QROIMc1KdnJQbbJmeAL1PQRSNvQYo7AsMRPc gIBkBoCKbESxZiAMfFIBrPCKeyZSBtNkQXFMolKdj1lKiUGpn83W/27gP0JdWYtmOu72 /1TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=XboSUGbdr0u3XL6PVEwK6uua1P2wr0tGpGmjuZRtSzw=; b=iUztHWgH2wKrdek4T0nm+CRgBJpDTifnbUx4fiKwCHYZ5R2SAIaq9ueEXmfVmNGT7+ Gs6NAfggsOM98/gkN/5e7v5lSgF8xEwfB1XzxDNjtrH7gI74P92YgzrSirEkzVPM26Ml Rrk4OT2hjft8AqAtC9v/IBzGg7Ue9xIKSwQ9gI66yfTe/UXCcNVOzb0uOmE2M9Tp1hLR nu+sAWmj7yeoFzpuMBeSz4ctsIFb8+6WpPNYz0duZmE+12BZlr7upN5j0WIGHNzxjNw0 xQDDD/mXiykKyVSw9HNxnWH4HDtRTxe+FbGuOUE79x0ImhzWHWxegLhg0kuEPinxblNg nCSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=APOAJCIx; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a17090a394700b0023d22d0f0fdsi314028pjf.19.2023.06.10.06.02.32; Sat, 10 Jun 2023 06:02:44 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=APOAJCIx; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234228AbjFJMpe (ORCPT + 99 others); Sat, 10 Jun 2023 08:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbjFJMpc (ORCPT ); Sat, 10 Jun 2023 08:45:32 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5586A35A9; Sat, 10 Jun 2023 05:45:31 -0700 (PDT) Date: Sat, 10 Jun 2023 12:45:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686401130; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XboSUGbdr0u3XL6PVEwK6uua1P2wr0tGpGmjuZRtSzw=; b=APOAJCIxP8No2Xm40yAMANDmIkGb+N0E6CwzRD/CwFOIoSwCIiER0WmQEmz/VprFjX/RuC lWygmV+LVQFev1sq/iVZ9y8naG/+VCG2Q0zBiHvjO7KS97RZ2ssgFYUVF2Q7ymXwiDOwvN AFAnWlsVFqfLBmdDDTg5cTkpwlXr2Z5dEeae6jN5tG6UsfbyMQdjlyKMvXs0p23s9amt6b BO8uwWoABvDoHFIcpdxb28a9GCkjFYD5RSTk+YbU9FF0kb8LKJmxPF+UdnHhl7sEyFB8wI VoCvaUVAGyL5t8Su/h8jIwpUIws48H2vhaIUBsSPH2FlvWuI0VS/UFIXiiKVJQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686401130; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XboSUGbdr0u3XL6PVEwK6uua1P2wr0tGpGmjuZRtSzw=; b=D7ax3R2ue6vSHytfgqvV66ngUofx/6Z2TXV5wJqdXIdZRidkN/z2RHtCrWSUFu6LSMUgio ydh8gC89sru3RrAg== From: "tip-bot2 for Wen Yang" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] tick/rcu: Fix bogus ratelimit condition Cc: Wen Yang , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <168640112909.404.8400459838695123810.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768320836601598227?= X-GMAIL-MSGID: =?utf-8?q?1768320836601598227?= The following commit has been merged into the timers/core branch of tip: Commit-ID: 5579a8a8f15bd08b731a015630daca6ccd0f8a14 Gitweb: https://git.kernel.org/tip/5579a8a8f15bd08b731a015630daca6ccd0f8a14 Author: Wen Yang AuthorDate: Fri, 05 May 2023 00:12:53 +08:00 Committer: Thomas Gleixner CommitterDate: Sat, 10 Jun 2023 14:36:17 +02:00 tick/rcu: Fix bogus ratelimit condition The ratelimit logic in report_idle_softirq() is broken because the exit condition is always true: static int ratelimit; if (ratelimit < 10) return false; ---> always returns here ratelimit++; ---> no chance to run Make it check for >= 10 instead. Fixes: 0345691b24c0 ("tick/rcu: Stop allowing RCU_SOFTIRQ in idle") Signed-off-by: Wen Yang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/tencent_5AAA3EEAB42095C9B7740BE62FBF9A67E007@qq.com --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 5225467..8905505 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -1030,7 +1030,7 @@ static bool report_idle_softirq(void) return false; } - if (ratelimit < 10) + if (ratelimit >= 10) return false; /* On RT, softirqs handling may be waiting on some lock */