From: Caz Yokoyama Subject: Has anyone ever talked about/implemented scheduling policy for Hyperthread/Multi-core/NUMA? Date: Sun, 28 Jun 2009 06:36:17 -0700 Message-ID: <86438A71A49C4FBF9D21F3B29AA5B4F2@xpjpn> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0220839636==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============0220839636== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0381_01C9F7BA.BED61A50" This is a multi-part message in MIME format. ------=_NextPart_000_0381_01C9F7BA.BED61A50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello Xen developers, I am new to this mailing list. I examined Credit scheduling and found that it does load balancing between symmetric multi processors (SMP). In the function, csched_load_balance(), it checks whether the physical CPU(PCPU) N+1 has something to do when PCPU N is nothing to do. Note: N is CPU ID. If so, N takes the job of N+1. If N+1 is idling, then N+2 is checked. In this scheme, N+1, N+2, . are checked in this order because csched_load_balance() assumes SMP. On Hyperthread/Multi-core/NUMA, it is better to check the closest neighbor first, i.e. the same Hyperthread CPU first, then the same socket CPU second, then others. To find the closest neighbor first, I am thinking to have a 2 dimensional array. I.e. for CPU N, Neighbor[N, 0] = CPU ID of the same Hyperthread CPU Neighbor[N, 1] = CPU ID of the same socket CPU Neighbor[N, 2] = CPU ID of the same socket CPU Neighbor[N, 3] = CPU ID of others Neighbor[N, 4] = CPU ID of others ... 1. Has anyone ever talked about or implemented csched_load_balance() for Hyperthread/Multi-core/NUMA? 2. is my understanding above correct? 3. Is the current implementation of csched_load_balance() the result of evaluation even on Hyperthread/Multi-core/NUMA? 4. Do you have better idea for finding closest neighbor first? 5. Do you have an idea how to build the array, Neighbor[]? Thank you. -Caz Yokoyama, caz at caztech dot com. 503-804-1028(m). ------=_NextPart_000_0381_01C9F7BA.BED61A50 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello Xen = developers,

I am new to this mailing list. I examined = Credit scheduling and found that it does load balancing between symmetric multi processors (SMP). In the function, csched_load_balance(), it checks whether the physical CPU(PCPU) N+1 has something to do when = PCPU N is nothing to do. Note: N is CPU ID. If so, N takes the job of N+1. If N+1 = is idling, then N+2 is checked. In this scheme, N+1, N+2, = … are = checked in this order because csched_load_balance() assumes SMP. On = Hyperthread/Multi-core/NUMA, it is better to check the closest neighbor first, i.e. the same = Hyperthread CPU first, then the same socket CPU second, then others. To find the closest neighbor first, I am thinking to have a 2 dimensional array. I.e. for = CPU N,

Neighbor[N, 0] =3D CPU ID of the same Hyperthread CPU

Neighbor[N, 1] =3D CPU ID of the same socket CPU

Neighbor[N, 2] =3D CPU ID of the same socket CPU

Neighbor[N, 3] =3D CPU ID of others

Neighbor[N, 4] =3D CPU ID of others

…….

 

1. Has = anyone ever talked about or implemented csched_load_balance() for = Hyperthread/Multi-core/NUMA?

2. is my understanding above correct?

3. Is = the current implementation of csched_load_balance() the result of evaluation even on = Hyperthread/Multi-core/NUMA?

4. Do you have better idea for finding closest neighbor first?

5. Do you have an idea how to build the array, = Neighbor[]?

 

Thank you.

-Caz Yokoyama, caz at caztech dot com. = 503-804-1028(m).

 

------=_NextPart_000_0381_01C9F7BA.BED61A50-- --===============0220839636== 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 --===============0220839636==--