From nobody Mon Jun 8 05:26:06 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 1DC002EB87F; Tue, 2 Jun 2026 19:30:17 +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=1780428619; cv=none; b=lBQ+xSEDcJiWtqTIii+LFpjnWJpdBlPwkR2Ea+okukPfw2DSGlLaPPqhBsnem+4tRqvjt9utQjclFv1cZYaeHNmRw82ar1P1nVts8ACwQ7f1piL1RTXEoTX5u5fdiycKCDNA+XE1rHj2y5FRTsjaaGmpkDoRnkSOEEpPuFAC7bc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780428619; c=relaxed/simple; bh=3C4nlArmn/dGgY+b8MZAFUmBaZWtu+ipFEDWHFZJcm4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=eAkiBm+KgFPYnP+43fspGmwJR0AsJALQeYuwDWIcmUS8sULgrdnwKRZYWhsXHPaMfV83B6/xgun3FYrAuv+vpv/wmfbugnHnORavBzavfUO28FDLImiu0xd32c8Sxau91dK3GKlqOSA8RcCrjnA0cNa25Nq67GCR9nprMQbwJyc= 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=hqGg3KkF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+wovKzv3; 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="hqGg3KkF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+wovKzv3" Date: Tue, 02 Jun 2026 19:30:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1780428615; 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=OD6SLidRHZI1vbXCnB3ixW8wBD6rkkgATI7w+Cp96Ng=; b=hqGg3KkFFiNT7b27o0kiRIm7iaKa9otGFOH8I/y0BuUpXp3iip3btT/FsKL86HYOGfnv4Q P/78h7OLJDQbQ4Y1M8kWdV6LesPad358tbjjWNUvQ3rDwK/Mq25ySqkNGYo8yqbFI01Rkp waVCyxbPYvL7cAErZzAMPGAfxQ0aEDv1AJUqF++T1wS2AGTIa2VJObATz3TYeg0zIwyBYN Hp+ccp0HZVMjIWxBAJOKhVGrfRNFQYOIiZsRiAuKGLsHahCNU6OowvHbhKX4IYlIKZ4ENm 3Ug6RVg10gnIZ3/V9+m9ycVoabloQTi0XnvUhRXCKLindIdGHnIFcvHaD0fWFA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1780428615; 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=OD6SLidRHZI1vbXCnB3ixW8wBD6rkkgATI7w+Cp96Ng=; b=+wovKzv3Hxcyo6qbSBFsgevf6Ei5kJxyqEJhm1Pe9qj9Ni/iYeqyA/9JYjWvoupX/nf59m 6JOzIxOn1poXDFAQ== From: "tip-bot2 for Frederic Weisbecker" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/nohz] tick/sched: Remove nohz disabled special case in cputime fetch Cc: Frederic Weisbecker , Thomas Gleixner , Shrikanth Hegde , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260508131647.43868-9-frederic@kernel.org> References: <20260508131647.43868-9-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178042861342.710.12605862034580720350.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/nohz branch of tip: Commit-ID: bd0c77cd46c63d02bc33dacdba56133ec1fe44a0 Gitweb: https://git.kernel.org/tip/bd0c77cd46c63d02bc33dacdba56133ec= 1fe44a0 Author: Frederic Weisbecker AuthorDate: Fri, 08 May 2026 15:16:40 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 02 Jun 2026 21:27:25 +02:00 tick/sched: Remove nohz disabled special case in cputime fetch Even when nohz is not runtime enabled, the dynticks idle cputime accounting can run and the common idle cputime accessors are still relevant. Remove the nohz disabled special case accordingly. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Shrikanth Hegde Link: https://patch.msgid.link/20260508131647.43868-9-frederic@kernel.org --- kernel/time/tick-sched.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index c3efd35..cb235ec 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -795,9 +795,6 @@ static u64 get_cpu_sleep_time_us(int cpu, enum cpu_usag= e_stat idx, ktime_t now, idle; unsigned int seq; =20 - if (!tick_nohz_active) - return -1; - now =3D ktime_get(); if (last_update_time) *last_update_time =3D ktime_to_us(now); @@ -839,7 +836,7 @@ static u64 get_cpu_sleep_time_us(int cpu, enum cpu_usag= e_stat idx, * This time is measured via accounting rather than sampling, * and is as accurate as ktime_get() is. * - * Return: -1 if NOHZ is not enabled, else total idle time of the @cpu + * Return: -1 if generic vtime is enabled, else total idle time of the @cpu */ u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time) { @@ -863,7 +860,7 @@ EXPORT_SYMBOL_GPL(get_cpu_idle_time_us); * This time is measured via accounting rather than sampling, * and is as accurate as ktime_get() is. * - * Return: -1 if NOHZ is not enabled, else total iowait time of @cpu + * Return: -1 if generic vtime is enabled, else total iowait time of @cpu */ u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time) {