Re: [PATCH 03/15] sched/cputime: Correctly support generic vtime idle time

From
Peter Zijlstra <peterz@infradead.org>
Date
2026-01-19 13:02:38
Also in
linux-pm, linux-s390, lkml
Reply to
Frederic Weisbecker, 2026-01-16
On Fri, Jan 16, 2026 at 03:51:56PM +0100, Frederic Weisbecker wrote:
quoted hunk ↗ jump to hunk
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 8ddf74e705d3..f1d07a0276a5 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -780,7 +780,7 @@ static u64 get_cpu_sleep_time_us(struct tick_sched *ts, ktime_t *sleeptime,
 	ktime_t now, idle;
 	unsigned int seq;
 
-	if (!tick_nohz_active)
+	if (!tick_nohz_active || vtime_generic_enabled_cpu(cpu))
 		return -1;
 
 	now = ktime_get();
Is this not broken? IIUC this means that you can no longer use
get_cpu_{idle,iowait}_time_us() the moment you have context tracking
enabled.
Thread (41 messages) 41 messages, 8 authors, last reply 2026-02-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help