Re: [PATCH v1 2/6] cpufreq: intel_pstate: Do not update global.turbo_disabled after initialization
From: Xi Ruoyao
Date: Tue Jun 04 2024 - 06:32:43 EST
On Tue, 2024-06-04 at 03:29 -0700, srinivas pandruvada wrote:
> On Tue, 2024-06-04 at 17:30 +0800, Xi Ruoyao wrote:
> > On Mon, 2024-06-03 at 21:31 -0700, srinivas pandruvada wrote:
> >
> > > > > Second, a delayed work can be added to check the MSR long
> > > > > enough
> > > > > after
> > > > > initialization and update global.turbo_disabled if it is 1.
> > > > > However,
> > > > > that would require some code surgery.
> > > >
> > > Something like the attached which does same way as user space
> > > no_turbo
> > > update.
> >
> > > static int intel_pstate_register_driver(struct cpufreq_driver
> > > *driver)
> > > {
> > > int ret;
> > > @@ -3114,6 +3137,9 @@ static int
> > > intel_pstate_register_driver(struct cpufreq_driver *driver)
> > > global.turbo_disabled = turbo_is_disabled();
> > > global.no_turbo = global.turbo_disabled;
> > >
> > > + if (global.turbo_disabled)
> > > + schedule_delayed_work(&turbo_work, HZ);
> > > +
> >
> > I have to change it to 20 * HZ to make it work for me. 15 * HZ does
> > not
> > work.
>
> Is there any consistency or it is changing every time?
It seems consistent.
--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University