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] continue_hypercall_on_cpu rework using tasklets

To: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 15 Apr 2010 10:08:35 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 15 Apr 2010 02:09:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BC6CE61.1010505@xxxxxxxxxxxxxx>
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: AcrcdcDXsapl2fHNThWaj31OTMo53AABXloi
Thread-topic: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets
User-agent: Microsoft-Entourage/12.24.0.100205
On 15/04/2010 09:29, "Juergen Gross" <juergen.gross@xxxxxxxxxxxxxx> wrote:

>> There is only one ASSERT in __sync_lazy_execstate, and it's safe for this
>> case. Bear in mind that our softirqs always run in the context of whatever
>> domain happens to be running on that cpu currently -- they don't have their
>> own proper vcpu context.
> 
> I don't see how it should be guaranteed that the current vcpu MUST be an idle
> one...

It's odd because someone else asked this exact same question, so the code
must be more subtle than I thought. Note that the ASSERT is inside
if(switch_required), and switch_required is true only if the vcpu whose
state is loaded on this CPU is not the same as the currently-scheduled vcpu.
This odd situation is only possible if we are lazy-syncing the former vcpu's
state, and that only occurs if the currently-running vcpu is the idle vcpu
(as all other vcpus would need their state loaded immediately, so lazy sync
does not apply).

 -- Keir



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