From nobody Mon Feb 9 03:52:17 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 BDCFA258CE7; Fri, 30 Jan 2026 09:03:14 +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=1769763796; cv=none; b=Rd7VoAz3VxdaU2HQzLhnsln4fG/Wv6VSimZEqrwZUm7TGTuy4vHUA9KW4uZ9BZHozfVLVfRNvBXM1m+d96KuwDfXCjwSI+WpcyHetFE3p4V4enBXDYEK7siNoQsPC05rT6b0yMa286aq1C+yjBrZLd4DYCxrbXp0SONoy4rrKq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769763796; c=relaxed/simple; bh=fd+a0tJdPyrdsZxfcRxiGtmIV2qleJetn1Qi5GgWG6I=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=VLS3Cu2tpEp+4FxarkDkjK4mhqKJaROU5+VpHmOb9JzRa7loH8dMhbg7fNPTCWjGixneRGFG29MyrhPvi0GcDm4FaobjhJVaEHgkGOuwWOT/a1V9syvB9j9R76MtM0lcyWrGKncRMJsHuo4FkGimMxw5uQb4PqYbiagbG9/C2LM= 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=XCGW8T0s; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=HOyK8yzn; 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="XCGW8T0s"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HOyK8yzn" Date: Fri, 30 Jan 2026 09:03:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1769763793; 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=dZjhgiJeedvLqBRk6t+/QuImXBGcfBbrru8hvi5pjuQ=; b=XCGW8T0s5PSMxhsAzugzbbdkNo7nrbgXwc7r9+0SOZeFJvCHjCLNZg52KiGyI/jpydTVO3 I8fshl70nVxXC/F8GXBfhTRQK62VC8hX7QA+1JWBG5axtZkKj8g6XrstE67HeHGZBiTjev dCkE8Ibcl4ZUPWol4bdDD3awazUMnfebA0r2QuriTaCWWO2WMm/26stErWZ0osjpYk/7Pn 2RtAWnyL5GsnlZihmklPJa89kBIeZdVwNYLxHd/9Yz2JMuZ6E/08Z835cpXrMgtgw8ullI BP35Y93c1dM3l97z6Wid8X/83Urg7zb08OwqmGZAK0/G4szj7H0B8FKApMdjjA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1769763793; 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=dZjhgiJeedvLqBRk6t+/QuImXBGcfBbrru8hvi5pjuQ=; b=HOyK8yzny99LZv0JBh4Np54IblTsuJp15Ryork+h0O864l2HgBMmcH1hLWMGtGESvZVlrq 6gOehcxZ2rwgd0CQ== 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 , 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: <176976379185.2495410.11245114356600942879.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: 8f9e1849402b34744cf3e4c8174b1907d1f99fe3 Gitweb: https://git.kernel.org/tip/8f9e1849402b34744cf3e4c8174b1907d= 1f99fe3 Author: Ionut Nechita (Sunlight Linux) AuthorDate: Wed, 28 Jan 2026 09:45:43 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 30 Jan 2026 09:59:34 +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 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;