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] [PATCH] x86 linux: prevent halted VCPUs from eating up C

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86 linux: prevent halted VCPUs from eating up CPU bandwidth
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 30 May 2006 10:11:05 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 30 May 2006 01:10:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <73269221f5db8876639054dfebfa5617@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: <447B22B4.76E4.0078.0@xxxxxxxxxx> <73269221f5db8876639054dfebfa5617@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> 29.05.06 16:59 >>>
>
>On 29 May 2006, at 15:35, Jan Beulich wrote:
>
>> Since there was no reply to an earlier inquiry regarding this, here's 
>> a patch.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
>
>safe_halt() should simply be HYPERVISOR_block() -- the hypercall 
>implicitly reenables interrupt delivery for the calling VCPU, so no 
>need to call __sti() explicitly.
>
>halt() is a bit trickier -- given that it is executed (as far as I can 
>tell) only in contexts where the CPU has reached "end of life" (it's 
>crashed, or offlined, or shut down for some other reason) it might make 
>sense to define halt() as VCPUOP_down. Or, just in case it is used in 
>places with interrupts still enabled, where the CPU may have a future:
>#define halt() (irqs_disabled() ? HYPERVISOR_vcpu_op(VCPUOP_down) : 
>HYPERVISOR_block())

Indeed, this was the behavior I intended, but somehow I failed to find the 
VCPUOP_down operation that I was looking
for. Here's an updated patch.

Jan

Attachment: xenlinux-x86-better-halt.patch
Description: Text document

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