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

[Xen-devel] Re: Xen scheduler

To: pak333@xxxxxxxxxxx
Subject: [Xen-devel] Re: Xen scheduler
From: "Mike D. Day" <ncmike@xxxxxxxxxx>
Date: Sun, 22 Apr 2007 09:09:47 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 22 Apr 2007 06:08:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <042120070603.1707.4629A924000D2BC9000006AB2200735446CCCCCC050E9F@xxxxxxxxxxx>
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>
Organization: IBM Linux Technology Center
References: <042120070603.1707.4629A924000D2BC9000006AB2200735446CCCCCC050E9F@xxxxxxxxxxx>
Reply-to: ncmike@xxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
On 21/04/07 06:03 +0000, pak333@xxxxxxxxxxx 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@xxxxxxxxxx AIM: ncmikeday  Yahoo: ultra.runner
PGP key: http://www.ncultra.org/ncmike/pubkey.asc

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

<Prev in Thread] Current Thread [Next in Thread>