WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Wei, Gang" <gang.wei@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH]CPUFREQ: Fix two racing issues during cpu hotplug
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 12 Apr 2010 07:59:36 +0100
Cc:
Delivery-date: Mon, 12 Apr 2010 00:03:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E6467867A6B05E4FA831B7DF29925F5C40F16BEE@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcrZ+wAOQtQIXlCDQjCnYThDbZTKrgAC7vOLAAA2QHAAAYhX3Q==
Thread-topic: [PATCH]CPUFREQ: Fix two racing issues during cpu hotplug
User-agent: Microsoft-Entourage/12.24.0.100205
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