From nobody Sun Jun 21 04:20:33 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59341175A9F; Tue, 7 Apr 2026 13:31:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775568691; cv=none; b=CtOplDiTYBdKHK0I+GJB2a35F1pmOxuuFiaM5OclRHIBTtTR8jpgQYsgh+drTtpV6c9rtF6C6nnfqyJhZLr8sxJr1lpxKcJgrVylUrlxWxfONFz3hW0HjNf9Up3VMs578Z2+hlfuvgfqbEWvh9rsk+Y1feoU38XGYhacxwFOv0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775568691; c=relaxed/simple; bh=am3OXfDqzOh0XjlgW5Gez+Yzxy2puoCPPn9+uDJSWvE=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=bqHyi7xExHwVYjr50/G2t7RieDH1xCm1MXn9rnvffoE1NWIBV9uMiial4+3ycKSJwdjOF7DZ71srH9YROH/vrbEePVzAUzq79cCGq9yD3oL1NKKkcoCzmAS90LHlaA4rpopH5VdOpLUAxpTyQhIM3nudhF7YLw0i93B42EZTEHU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IIgVpLG6; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=31+wA4tL; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IIgVpLG6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="31+wA4tL" Date: Tue, 07 Apr 2026 13:31:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775568688; 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=RZ/pnCh0dzy+8jfU3UkcAEYM9YVi0dIq7Lh/lG0bYdo=; b=IIgVpLG6dCvqZDtu9Tvk4LX8rey6rmkIyOHhXMDjCO1RAb63inO4f7jRVqciLqThIcaTym vkoqTBB2Cc/Xi2fYVcdu1OntBKu+dJFRX+JJzOx+8EKVoTTJ8ernmiH0b6Pz6cQkkj4j+i zeH/hSAB9d1R2kv8TIIGokZYvLVltTgEVg4wu+CJb/LJViDTe0dVlgcwO6xvavBIJQLjQ/ QWZifhbbNe/gGgg6As5gHfMGOB3FK8Oqc68Ub++dZdMhe2nGB9ER6MEMzqu++g/MQ+5dc8 n9ETqTPXVyGRIwiaIpzSvGuCmI0g9237VlysvlnRUKKlrub8VNiL4sAMxDoMhQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775568688; 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=RZ/pnCh0dzy+8jfU3UkcAEYM9YVi0dIq7Lh/lG0bYdo=; b=31+wA4tLiEAuHDgphLNx/aaXjxp8zkJosDxV8x2QsduMvqVwJOpzqDwoP7evwV4ZfRuth4 GiCn8Hw5WdfK6ZDA== From: "tip-bot2 for Josh Snyder" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/urgent] tick/nohz: Fix inverted return value in check_tick_dependency() fast path Cc: Josh Snyder , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260402-fix-idle-tick2-v1-1-eecb589649d3@code406.com> References: <20260402-fix-idle-tick2-v1-1-eecb589649d3@code406.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177556868690.226963.12388940385744136349.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/urgent branch of tip: Commit-ID: 82b915051d32a68ea3bbe261c93f5620699ff047 Gitweb: https://git.kernel.org/tip/82b915051d32a68ea3bbe261c93f56206= 99ff047 Author: Josh Snyder AuthorDate: Thu, 02 Apr 2026 16:23:38 -07:00 Committer: Thomas Gleixner CommitterDate: Tue, 07 Apr 2026 15:30:21 +02:00 tick/nohz: Fix inverted return value in check_tick_dependency() fast path Commit 56534673cea7f ("tick/nohz: Optimize check_tick_dependency() with early return") added a fast path that returns !val when the tick_stop tracepoint is disabled. This is inverted: the slow path returns true when a dependency IS found (val !=3D 0), but !val returns true when val is zero (no dependency). The result is that can_stop_full_tick() sees "dependency found" when there are none, and the tick never stops on nohz_full CPUs. Fix this by returning !!val instead of !val, matching the slow-path semanti= cs. Fixes: 56534673cea7f ("tick/nohz: Optimize check_tick_dependency() with ear= ly return") Signed-off-by: Josh Snyder Signed-off-by: Thomas Gleixner Assisted-by: Claude:claude-opus-4-6 Link: https://patch.msgid.link/20260402-fix-idle-tick2-v1-1-eecb589649d3@co= de406.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 f7907fa..36449f0 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -345,7 +345,7 @@ static bool check_tick_dependency(atomic_t *dep) int val =3D atomic_read(dep); =20 if (likely(!tracepoint_enabled(tick_stop))) - return !val; + return !!val; =20 if (val & TICK_DEP_MASK_POSIX_TIMER) { trace_tick_stop(0, TICK_DEP_MASK_POSIX_TIMER);