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] Avoid endless loop for vcpu migration

To: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Avoid endless loop for vcpu migration
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Tue, 15 Mar 2011 09:58:37 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 15 Mar 2011 03:00:49 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=V8GFkqxaAkRcN3s4uQI7v/zAIzdhqDk44OzWhMKPuck=; b=lDs0HXoKy/UQh3bNJ8P2vR/s2hQZfP1VhR13SefD2x8EWwPuqDUCAHEBj0rsrxx9Oj LagCGMS5UQlHs2UnYOfrSovrZABW0UzflbcnB3FhiIFMVPPuY0InZtZr9n9A60ZEMHtl /ri5G5uSV6V7w8qj1fMAuWM+Z5e3D1NctcdGM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=cEqYBaKXiFV1Xj6s0P3yhlhvceBxgil/E68mcLx/isLulPG48XWxDCJt1LJRwHBQ46 X+fMrcHzXSLxlNopoNhCQ+j2tIGdTlzc7VUuj7TQbSKdaK3RWqUt/RUBOKdIrezMIevA z7b0BN1B4wuhSpOoNkBckfJMI0Bak/eGBai6w=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D7F2F98.8090900@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: Acvi942Pla13H3td+kGCO6MXcz0l0w==
Thread-topic: [Xen-devel] [PATCH] Avoid endless loop for vcpu migration
User-agent: Microsoft-Entourage/12.28.0.101117
On 15/03/2011 09:21, "Juergen Gross" <juergen.gross@xxxxxxxxxxxxxx> wrote:

>> That candidate-is-valid check seems absolutely independent of the
>> particular scheduler used, and hence could be done in the (sole)
>> caller, thus not requiring any change to the scheduler interface.
>> 
>> Which at once would eliminate unnecessary calls into pick_cpu (i.e.
>> you'd call it a second time only if the previously selected CPU really
>> is no longer valid to be used for that vCPU).
> 
> True.
> 
> The patch seems to become smaller :-)

By the way, why is the cpu_isset(new_cpu, v->domain->vcpupool->cpu_valid)
check required (after calling pick_cpu, in the cuirrently checked-in code)?
You already check that pick_cpu was called holding the correct pair of
locks, if it has returned a cpu that is not in the pool's cpu_valid mask,
what would make pick_cpu return anything different on the next invocation
thus avoiding an endless loop?

Looks like this question would remain even if this new patch was applied.

 -- Keir



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