xen/cpufreq: fix usages of align_timer() in the on-demand governor

The first parameter passed to align_timer() is the timer expiration, not
the current time.  Adjust the calls to align_timer() in the on-demand
governor to pass the expected timer expiration as the first parameter.

Fixes: af74e3a15a ("cpufreq: align dbs timer for better package C state residency")
Fixes: 382b95f627 ("Fix cpufreq HW-ALL coordination handle")
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Roger Pau Monne committed 2026-03-02 17:16:26 +01:00
1 parent 74867aae25
commit a0ed5bcfbe
1 file changed
+3 -2
+3 -2
View File
@@ -185,7 +185,8 @@ static void cf_check do_dbs_timer(void *dbs)
dbs_check_cpu(dbs_info);
set_timer(&per_cpu(dbs_timer, dbs_info->cpu),
align_timer(NOW() , dbs_tuners_ins.sampling_rate));
align_timer(NOW() + dbs_tuners_ins.sampling_rate,
dbs_tuners_ins.sampling_rate));
}
static void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
@@ -400,6 +401,6 @@ void cpufreq_dbs_timer_resume(void)
(void)cmpxchg(stoppable, -1, 1);
}
else
set_timer(t, align_timer(now, dbs_tuners_ins.sampling_rate));
set_timer(t, align_timer(t->expires, dbs_tuners_ins.sampling_rate));
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.