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] HVM vcpu hotplug: Fix acpi method NTFY bug

To: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] HVM vcpu hotplug: Fix acpi method NTFY bug
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 29 Jan 2010 08:28:09 +0000
Cc: "Zheng, Shaohui" <shaohui.zheng@xxxxxxxxx>, "Ke, Liping" <liping.ke@xxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Delivery-date: Fri, 29 Jan 2010 00:28:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <EB8593BCECAB3D40A8248BE0B6400A3835ACA93C@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: AcqfEjBdAvKTlDZES9GP92/daWtXOgBn3NcBAABXF2AAAn8xkQ==
Thread-topic: [Xen-devel] [PATCH] HVM vcpu hotplug: Fix acpi method NTFY bug
User-agent: Microsoft-Entourage/12.23.0.091001
On 29/01/2010 07:32, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote:

> suppose
> x = scan loop number defined at method PRSC
> y = scan loop number defined at method NTFY
> in original way, there are 2 implicit precondition to make it work right:
> 1). y = x
> 2). y = 2^n
> however, these preconditions are not always be satisfied.
> for example, if x > y, it will produce unexpected scan and block vcpu
> add/remove.

Well, that didn't help. Some code comments would be handy.

Looking at method PRSC the algorithm seems pretty mad given we auto-generate
the code. Apparently we *always* call NTFY for every value of 0<=Arg0<=127,
in order? And then you would propose to do a further linear If chain within
NTFY? Why not merge NTFY into PRSC: if you must have a linear scan anyway in
PRSC, just unroll the while loops, and inline the relevant bit of NTFY for
every unrolled loop invocation.

And please provide some code comments relating this all back to the ACPI
Spec, and explaining what the local variables represent, etc. It's totally
impossible to understand right now. Although at least loop unrolling will
get rid of several local variables...

 -- Keir

> BTW, decision_tree() is too complicated to understand. it's used to produce
> dsdt.dsl middle code.
> people need spend much time to image what's the temporary dsdt.dsl middle code
> like.
> this is not good for maintain and debug.
> for this reason, I'd like to change it back to normal for() loop, easy to
> understand and maintain.
> (it's correct that decision_tree() will reduce scan loop greatly, for example,
> 128 vcpus scan number will reduce from 64 to 7 times avg, however, it's not
> important since this code is not key path, seldom used).



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