All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Re: Xen scheduler
@ 2007-04-23 19:33 pak333
  2007-04-24 11:07 ` Petersson, Mats
  2007-04-24 14:34 ` Emmanuel Ackaouy
  0 siblings, 2 replies; 7+ messages in thread
From: pak333 @ 2007-04-23 19:33 UTC (permalink / raw)
  Cc: Mike D. Day, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2293 bytes --]

Thanks. A little more clarification.

Here is an example. 

I have multiple VMs, each with 2 vcpus. There is no user affinity. So i will let the vcpus run whereever the Xen scheduler chooses. My system has 2 dual core sockets.

     If all 4 pcpus are idle, then will the scheduler assign the vcpus of a VM to the same socket pcpus. 
     If while running, 2 pcpus from different sockets become available, the scheduler will assign 2 vcpus to those two pcpus. Does the scheduler do any optimization as to moving the vcpus of a vm to the same socket or just assign the vcpus as they become ready.

or if 3 pcpus are idle will the scheduler assign vcpus from a VM to the same socket.

Basically all my questions boil down to this: Does the Scheduler know about the pcpu layout(same socket) and does it do any scheduling based on that.

Thanks
Prabha



     


-------------- Original message -------------- 
From: "Mike D. Day" <ncmike@us.ibm.com> 

> On 21/04/07 06:03 +0000, pak333@comcast.net wrote: 
> > 
> > Hi, 
> > 
> > 
> > 
> > On running on a dual/quad core does the Xen scheduler take into 
> > account the physical layout of the cores. 
> > 
> > For example if a VM has two vcpus, and there are 4 physical cpus 
> > free, will it take care to assign the 2vcpus (from a VM) to 2 pcpus 
> > on the same socket. 
> 
> 
> The scheduler only knows the affinity of vcpus for physical 
> cpus. The affinity is determined by a userspace application and can 
> be modified using a domain control hypercall. Look in 
> xen/common/domctl.c around line 568 for the following: 
> 
> case XEN_DOMCTL_setvcpuaffinity: 
> case XEN_DOMCTL_getvcpuaffinity: 
> 
> 
> 
> When the credit scheduler migrates a vcpu to a pcpu, it only considers 
> pcpus for which the affinity bit is set. If the userspace application 
> sets affinity such that only the bits set for pcpus on the same 
> socket, then the vcpu will only run on pcpu's sharing the same 
> socket. 
> 
> 
> Mike 
> 
> -- 
> Mike D. Day 
> IBM LTC 
> Cell: 919 412-3900 
> Sametime: ncmike@us.ibm.com AIM: ncmikeday Yahoo: ultra.runner 
> PGP key: http://www.ncultra.org/ncmike/pubkey.asc 
> 
> _______________________________________________ 
> Xen-devel mailing list 
> Xen-devel@lists.xensource.com 
> http://lists.xensource.com/xen-devel 

[-- Attachment #1.2: Type: text/html, Size: 3101 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-04-24 14:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 19:33 Re: Xen scheduler pak333
2007-04-24 11:07 ` Petersson, Mats
2007-04-24 14:47   ` Emmanuel Ackaouy
2007-04-24 14:53     ` Petersson, Mats
2007-04-24 14:34 ` Emmanuel Ackaouy
2007-04-24 14:42   ` Petersson, Mats
2007-04-24 14:55     ` Emmanuel Ackaouy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.