[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.