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

[Xen-devel] Re: [PATCH]CPUFREQ: Fix two racing issues during cpu hotplug



On 12/04/2010 07:54, "Wei, Gang" <gang.wei@xxxxxxxxx> wrote:

>> Can't you just kill_timer()? Adding extra code into a stop_machine
>> context is dangerous: e.g.,
>> xmalloc()->alloc_xenheap_pages()->memguard_unguard_range()->map_pages_to_xen
>> ()->flush_area_all() results in deadlock as other cpus are spinning
>> with irqs disabled.
> 
> You are right. kill_timer stop timer and wait until timer handler end if this
> timer is current running. I can switch to it. BTW, I may need to re-init the
> killed timer before set_timer on it, right?

Yes, init_timer() must be called to be able to reuse a kill_timer()ed timer.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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