[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] cpufreq/ondemand: fix race while offlining CPU



On Fri, Mar 09, 2018 at 02:34:32AM -0700, Jan Beulich wrote:
> Offlining a CPU involves stopping the cpufreq governor. The on-demand
> governor will kill the timer before letting generic code proceed, but
> since that generally isn't happening on the subject CPU,
> cpufreq_dbs_timer_resume() may run in parallel. If that managed to
> invoke the timer handler, that handler needs to run to completion before
> dbs_timer_exit() may safely exit.
> 
> Make the "stoppable" field a tristate, changing it from +1 to -1 around
> the timer function invocation, and make dbs_timer_exit() wait for it to
> become non-negative (still writing zero if it's +1).
> 
> Also adjust coding style in cpufreq_dbs_timer_resume().
> 
> Reported-by: Martin Cerveny <martin@xxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Tested-by: Martin Cerveny <martin@xxxxxxxxx>

Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.