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

Re: [Xen-devel] credit vs sedf scheduler

Hi Emmanuel,

Thanks a lot for your reply and this is clear now.

When you are talking about CPU scheduler, another question just came into mind: Xen manual mentioned Xen used kind of depth-first algorithm to determine the CPU sequence on a platform which has two processor and each processor has two cores and each core has two hyper-threads. That means, CPU0 will be the first thread in the first core in the first processor, CPU1 will be the second thread in the first core in the first processor, etc. I have a dual-processor/dual-core platform and it seems this is true by disabling/enabling multi-core in BIOS.

However, I was told the CPU sequence is not numbered using this depth-first scheme on the latest Intel quad-core platform. I don't understand why Xen need to change this.

Do you have any idea how to verify the CPU sequence number on a dual-processor/quad-core/hyper-threaded platforms?

Best regards,

Liang

----- Original Message ----- From: "Emmanuel Ackaouy" <ack@xxxxxxxxxxxxx>
To: "Liang Yang" <yangliang_mr@xxxxxxxxxxx>
Cc: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sent: Thursday, November 16, 2006 10:22 AM
Subject: Re: [Xen-devel] credit vs sedf scheduler


On Thu, Nov 16, 2006 at 10:08:40AM -0700, Liang Yang wrote:
Hi Emmanuel,

Do you mean, if the number of VCPUs is equal to the number of physcial
CPUs, Xen will still call credit scheduler to allocate CPU resources
amongst V CPUs even though each guest domain is assigned a fixed VCPU/CPU
using xm vcpu-pin?

What I mean is that:

1- The clock interrupt will still run every 10ms and this will
run some scheduler accounting code.
2- After a VCPU completes its time slice, Xen will call into
the scheduler code to see if anything else needs to run. Of
course, in this case, there will be nothing else to run so the
VCPU will continue running.

Both of these should be absolutely negligeable.

Are you seeing overhead which is not negligeable? If so, this
would be a bug and should be fixed.

The purpose I assign each domain a CPU and fix the mapping of VCPU to CPU
is I want each guest domain get equal CPU resources at any time. I don't
want to credit scheduler get involved.

If your goal is to have each domain get equal CPU at any given
time, then you don't need to do anything. The scheduler will
automatically spread your VCPUs across the 4 physical CPUs and
they will each get an equal amount of physical CPU resources.

Also keep in mind that if a 5th domain (dom0 for example) needs
CPU resources as well, the credit scheduler will do this fairly
and also with negligeable costs whereas your scheme to pin all
VCPUs on their own physical CPU will not.

Cheers,
Emmanuel.

Regards,

Liang
----- Original Message ----- From: "Emmanuel Ackaouy" <ack@xxxxxxxxxxxxx>
To: "Liang Yang" <multisyncfe991@xxxxxxxxxxx>
Cc: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sent: Thursday, November 16, 2006 9:37 AM
Subject: Re: [Xen-devel] credit vs sedf scheduler


>On Thu, Nov 16, 2006 at 09:29:30AM -0700, Liang Yang wrote:
>>   Hi,
>>
>>   Can I used vcpu-pin to avoid CPU scheduler overhead? Suppose I have
>>four
>> CPUs, if I used xm vcpu-pin to fix the mapping of each physcial CPU >> to
>>   virtual CPU. So credit scheduler will not be needed.
>>
>>   Liang
>
>Pinning all your VCPUs will not stop Xen from executing various
>scheduler code paths.
>
>Why are you worried about the scheduler overhead? It should be
>negligeable.
>
>Emmanuel.
>



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