Le Mon, Jan 19, 2026 at 02:02:22PM +0100, Peter Zijlstra a écrit :
On Fri, Jan 16, 2026 at 03:51:56PM +0100, Frederic Weisbecker wrote:
quoted
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.
It is supported again in patch 13/15. And it's not exactly breaking
bisection in the meantime because the sole user is cpufreq and cpufreq
shouldn't be relevant with nohz_full.
Ok a few subsystem rely on the resulting cpufreq API get_cpu_idle_time():
- the legacy drivers/macintosh/rack-meter.c
- drivers/scsi/lpfc/lpfc_init.c
But cpufreq provides a low-resolution version in the worst case for nohz_full
(again until 13/15).
Hmm, but you're right this is confusing. I think I should be able to fix that
in this patch.
Thanks.
--
Frederic Weisbecker
SUSE Labs