From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Gill Subject: Re: [PATCH] xen, tools/python/xen: pincpu support, vcpus, add vcpu to cpu map Date: Thu, 14 Apr 2005 11:40:49 -0700 Message-ID: <425EB931.8080707@seven4sky.com> References: <425EA997.8060409@seven4sky.com> <20050414175141.GJ27571@us.ibm.com> <200504141855.29581.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1437697959==" Return-path: In-Reply-To: <200504141855.29581.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson Cc: xen-devel@lists.xensource.com, Ryan Harper List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============1437697959== Content-Type: multipart/alternative; boundary="------------020506040207020501030905" This is a multi-part message in MIME format. --------------020506040207020501030905 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mark Williamson wrote: >>Yeah, I think we should add something that better shows the available >>resources. Currently the total number of Physical CPUs a system has >>isn't really available in an obvious location. >> >> > >xm info lists this as "packages", I think. > >If the enumeration is done in a standardised way then it's possible to work >out in userspace what CPU id is where but it's not at all obvious to the user >right now. Would definitely be good for the management tools to give more >information to the user on this stuff. > >Cheers, >Mark > > > >>>such as "xm pincpu-show" and "xm pincpu-show-details" for a more verbose >>>listing >>> >>> >>What would these look like? >> >> --JUST general -- # xm pincpu-show cpu configuration ---- id ---- status -- assignment registered cpu1 0 lock vmid1 registered cpu2 1 unlock none registered cpu3 2 unlock vmid1,vmid2 registered cpu4 3 lock vmid3 then you could go about pincpu-add vmid4 1 which would assign cpu2 to vmid4 # xm pincpu-show-details would explain more about the sockets and which cpus were hyperthreading and any core components, and other low-level hardware about the cpus you are using processor cpu0 socket: 0 hyperthreaded instance: N core: 0 processor cpu1 socket: 0 hyperthreaded instance: Y core: 0 so its a much more detailed, very descriptive type of listing the dirfference between brctl show and brctl showstp xen-br0 along those lines >> >> >>>Then the next step would be creating some helper functions "xm >>>pincpu-add" so you could add a cpu to >>> >>> >>>a domain, or "xm pincpu-move" to move a cpu from one domain to another. >>>In addition you could have >>> >>>"xm pincpu-lock"/"xm pincpu-unlock" which would only allow one single >>>domain to access that cpu. >>> >>> >>I think the mapping that Ian mentioned was needed for load-balancing >>would achieve that, but we certainly could create an interface wrapper, >>like lock/unlock that was translated into the correct mapping command. >> >> >> >>>I am just thinking that maybe if you detail (if you have already not >>>done so) what you want the end result to >>>be, than it might be easier to figure out how to implement the lower >>>level functions more efficiently. >>> >>> >>No, this is good things to be talking about. The goal of this patch was >>to allow us to pin VCPUs mainly so we can test space-sharing versus >>time-sharing of VCPUs. That is, if we have a 4-way SMP box, with two >>domUs, each with four VCPUs, what is the perf difference between domUs each >>getting 2 physical cpus to run their 4 VCPUs versus domUs having access >>to all 4 physical cpus on which to run their 4 VCPUs. >> >> Yeah sorry about that, I was just commenting due to past exp, which says that if you wait too long then its too late. Or its better to get out more ideas sooner, than wait till its already going in a direction, and its too hard or too difficult to change. Thanks, -Sam --------------020506040207020501030905 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Mark Williamson wrote:
Yeah, I think we should add something that better shows the available
resources.  Currently the total number of Physical CPUs a system has
isn't really available in an obvious location.
    

xm info lists this as "packages", I think.

If the enumeration is done in a standardised way then it's possible to work 
out in userspace what CPU id is where but it's not at all obvious to the user 
right now.  Would definitely be good for the management tools to give more 
information to the user on this stuff.

Cheers,
Mark

  
such as "xm pincpu-show" and "xm pincpu-show-details" for a more verbose
listing
      
What would these look like?
    
--JUST general --
# xm pincpu-show

cpu configuration ---- id ---- status --  assignment
registered    cpu1        0         lock           vmid1
registered    cpu2        1        unlock         none
registered    cpu3        2        unlock        vmid1,vmid2
registered    cpu4        3         lock           vmid3

then you could go about
pincpu-add vmid4 1
which would assign cpu2 to vmid4

# xm pincpu-show-details
would explain more about the sockets and which cpus were hyperthreading
and any core components, and other low-level hardware about the cpus you are using

processor cpu0
socket: 0
hyperthreaded instance: N
core: 0

processor cpu1
socket: 0
hyperthreaded instance: Y
core: 0

so its a much more detailed, very descriptive type of listing
the dirfference between
brctl show and
brctl showstp xen-br0
along those lines


    
Then the next step would be creating some helper functions "xm
pincpu-add" so you could add a cpu to


a domain, or "xm pincpu-move" to move a cpu from one domain to another.
In addition you could have

"xm pincpu-lock"/"xm pincpu-unlock" which would only allow one single
domain to access that cpu.
      
I think the mapping that Ian mentioned was needed for load-balancing
would achieve that, but we certainly could create an interface wrapper,
like lock/unlock that was translated into the correct mapping command.

    
I am just thinking that maybe if you detail (if you have already not
done so) what you want the end result to
be, than it might be easier to figure out how to implement the lower
level functions more efficiently.
      
No, this is good things to be talking about.  The goal of this patch was
to allow us to pin VCPUs mainly so we can test space-sharing versus
time-sharing of VCPUs.  That is, if we have a 4-way SMP box, with two
domUs, each with four VCPUs, what is the perf difference between domUs each
getting 2 physical cpus to run their 4 VCPUs versus domUs having access
to all 4 physical cpus on which to run their 4 VCPUs.
    
Yeah sorry about that, I was just commenting due to past exp, which says that if you wait too long then
its too late. Or its better to get out more ideas sooner, than wait till its already going in a direction, and its too hard or too difficult to change.

Thanks,
 -Sam
--------------020506040207020501030905-- --===============1437697959== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1437697959==--