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

Re: [Xen-devel] linux: {start, stop}_hz_timer() not really affecting per

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] linux: {start, stop}_hz_timer() not really affecting periodic timer?
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 16 Jan 2008 16:36:21 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 16 Jan 2008 08:36:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3B3D94C.1AE84%Keir.Fraser@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <478E35C2.76E4.0078.0@xxxxxxxxxx> <C3B3D94C.1AE84%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> The call to VCPUOP_set_singleshot_timer cannot return -ETIME because the
>>> kernel does not specify the VCPU_SSHOTTMR_future flag.
>> 
>> I noticed this after pushing the send button. Nevertheless, the whole
>> construct in stop_hz_timer() seems to assume that it is called with
>> interrupts disabled, which might be the case now but nothing enforces
>> xen_safe_halt() to only be called in such contexts... For that reason it
>> would seem safer to set the flag, check for -ETIME, and avoid
>> HYPERVISOR_block() altogether in that case.
>
>If the time is in the past then the singleshot timer will fire immediately.
>So you'll take a slower path than necessary, but the code as-is will work
>fine.

Immediately would mean to me that it would fire on the return path
from VCPUOP_set_singleshot_timer, so HYPERVISOR_block() would
not (necessarily) find any pending events and hence block when it
shouldn't. Or am I missing some magic by which this is being avoided?

Jan


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