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: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86 linux: prevent halted VCPUs from eating up CPU bandwidth
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 29 May 2006 15:59:25 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 29 May 2006 08:04:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <447B22B4.76E4.0078.0@xxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

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())

 -- Keir


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