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] Bug #327 xentop/libxenstat vcpu fix

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] Bug #327 xentop/libxenstat vcpu fix
From: Daniel Stekloff <dsteklof@xxxxxxxxxx>
Date: Sat, 15 Oct 2005 17:11:14 -0700
Cc: Josh Triplett <josh@xxxxxxxxxxxxxxx>
Delivery-date: Sun, 16 Oct 2005 00:06:11 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <a2ba392c00ee3614cb7b1f6344767438@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: <1129329554.19122.11.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <a2ba392c00ee3614cb7b1f6344767438@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.6.2
On Saturday 15 October 2005 00:44, Keir Fraser wrote:
> On 14 Oct 2005, at 23:39, Daniel Stekloff wrote:
> > xentop will error when getting vcpu information if there are disabled
> > vcpus for a domain at the end of the vcpu list. xentop merely goes
> > through the num_vcpus list and calls DOM0_GETVCPUCONTEXT, it doesn't
> > check if the requested vcpu is disabled or enabled. DOM0_GETVCPUCONTEXT
> > returns the next enabled vcpu in the list or an error if it doesn't
> > find
> > one. xentop will then error.
> >
> > This is just a quick fix to check the vcpu_to_cpu[] map before
> > requesting vcpu info.
>
> GETVCPUCONTEXT no longer returns the next valid vcpu. It just fails if
> the specified vcpu is not currently online. Also, GETDOMAININFO no
> longer returns vcpu_to_cpu or cpumap arrays. I moved those into a new
> GETVCPUINFO call.
>
> I think you can use a simpler algorithm for finding all online VCPUs
> anyway. The tools will always try to ensure that VCPUs 0 to
> info.n_vcpu-1 are online, so you could just iterate over that. If you
> are worried about discontiguous online maps, just iterate over
> 0-(MAX_VIRT_CPUS-1) and silently drop the GETVCPUINFO failures
> (errno==ESRCH).


Ok.. so xm top/xentop is no longer broken - provided you don't care about out 
of order vcpus. 

xm vcpu-list is broken.

xm vcpu-enable will only enable vcpus in order.  I can't, for instance, enable 
vcpu 3 if vcpu 2 isn't enabled. xm vcpu-enable silently fails. 

So stupid question: 

Do we no longer have or care about dicontiguous online maps? Or, do the tools 
just need to catch up with your changes? 

I'm curious because xentop just takes the number of vcpus from domaininfo and 
calls GETVCPUCONTEXT starting with 0 and going until num-1. I just tried this 
on a 4 vcpu dom. I disabled vcpus 1 and 2, leaving 0 and 3 active. xentop 
worked fine but reported those vcpus as 0 and 1. GETVCPUCONTEXT returned the 
as 0 and 1. Is this the way you want it to work? 

If so, I'll close the bug. 

Thanks,

Dan

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