[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Bug #327 xentop/libxenstat vcpu fix
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_GETVCPUCONTEXTreturns the next enabled vcpu in the list or an error if it doesn't findone. 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). -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |