From nobody Sun Feb 8 18:14:21 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 896472F656E; Fri, 30 Jan 2026 21:47:53 +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=1769809674; cv=none; b=F4Ek6Is1FTbgTZ83TfBlhZmuNRqTPzZME+/fRwcs9Uh6Pmlhv9I+swwXygo4+zGVdsjIo0sDqnu5gh4xjxnvNKdR79wha2sQaP9AOmokbwTY+G2fj5MIkJEExVZ5BbYt1oqiYl6wVqSeg2Ws/I7m/u7ivqJQW+ucxU9Tdi5/hes= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769809674; c=relaxed/simple; bh=VvRYU9fkJBgjn/dxj99cVoDWu4ZogpbtENTyrUTQre4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=VRZG8MD9Chg78uSPlfo98opWLoUJ9qxKlYMG94WYdgiyWeAOXNDzy39q0yQCTQASKDU8NqU94kn5gJtqaDevOFkZZACpqXvf+6+4i41OznwD78qX6cuSfIa+htAnucY1wAWi6hvmK/drfH+Rqe53TW4drkraO6SDYQeYTVLtbDM= 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=gBtjPjOd; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WnusIJ0p; 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="gBtjPjOd"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WnusIJ0p" Date: Fri, 30 Jan 2026 21:47:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1769809671; 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=fVrr70mL4C4Rjqxd1+jVJRwWfdbbeR5yPTlDjYRtn2o=; b=gBtjPjOdNFKeSFzw1VVFiXwhMRqsbAB9ZcdzeiNBr/MHs0y1wy4IwoQ4XJB7acHA/Ayt9U OCtfp2T2iIpypIBeyzV5OVVIULRQAzNW0teRbhfU8+/Ya65wmvAIC/pWy+lNdr3or9FiXx UTXdsQ2L+LtV2UnXj2uO7T6krFtQB5BuM5pKh4+JVC/ZXUOzI8dz2F796h5qH0jym0Bbha flktcOFVHDhgzar3XWOkcBd5Jvib144hnWBrsjAz6PfwZ/OpBDVxP+ssZ3ZV1ZzwBNYEK2 1uDgtEW+B37e4YM3/gq9hUC6X5BmR0Bzr7X/w34JnNZQRHWvthbnKqqC16xMDA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1769809671; 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=fVrr70mL4C4Rjqxd1+jVJRwWfdbbeR5yPTlDjYRtn2o=; b=WnusIJ0pT3uxeIbJqzi/Woiy4TGoCI2bkyQ6t7jsVUW90oXSXl01AZ0VZY4lXMANFWo/By eGCPmxKbeWO0nKCg== From: "tip-bot2 for Ionut Nechita (Sunlight Linux)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] tick/nohz: Optimize check_tick_dependency() with early return Cc: Thomas Gleixner , "Ionut Nechita (Sunlight Linux)" , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260128074558.15433-3-sunlightlinux@gmail.com> References: <20260128074558.15433-3-sunlightlinux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <176980966983.2495410.13490237922915334474.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/core branch of tip: Commit-ID: 56534673cea7f00d96a64deb58057298fe9f192e Gitweb: https://git.kernel.org/tip/56534673cea7f00d96a64deb58057298f= e9f192e Author: Ionut Nechita (Sunlight Linux) AuthorDate: Wed, 28 Jan 2026 09:45:43 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 30 Jan 2026 22:13:13 +01:00 tick/nohz: Optimize check_tick_dependency() with early return There is no point in iterating through individual tick dependency bits when the tick_stop tracepoint is disabled, which is the common case. When the trace point is disabled, return immediately based on the atomic value being zero or non-zero, skipping the per-bit evaluation. This optimization improves the hot path performance of tick dependency checks across all contexts (idle and non-idle), not just nohz_full CPUs. Suggested-by: Thomas Gleixner Signed-off-by: Ionut Nechita (Sunlight Linux) Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260128074558.15433-3-sunlightlinux@gmail.c= om --- kernel/time/tick-sched.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 8ddf74e..fd928d3 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -344,6 +344,9 @@ static bool check_tick_dependency(atomic_t *dep) { int val =3D atomic_read(dep); =20 + if (likely(!tracepoint_enabled(tick_stop))) + return !val; + if (val & TICK_DEP_MASK_POSIX_TIMER) { trace_tick_stop(0, TICK_DEP_MASK_POSIX_TIMER); return true;