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

Re: [Xen-users] whether xen scheduler supports preemption



Hello

Please, i want to continue in this topic!
How does the xen schedule ensures that the cap(not null) value  of a VM is respected? Firstly in a case of a single VCPU VM and in the case of the multiple  VPCU VM?


2013/6/26 张伟 <zhangwqh@xxxxxxx>
Thank you very much for your reply! See below.






在 2013-06-26 07:27:26,"Dario Faggioli" <dario.faggioli@xxxxxxxxxx> 写道: >On mar, 2013-06-25 at 22:29 +0800, 张伟 wrote: >> Hi, all >>  >Hi, > >> I want to know whether xen scheduler supports preemption?  >> >Yes, it definitely does. > >> If it supports,  in the source code, which part decides it has the >> preemption function?  >>  >All the important bits about Xen scheduling can be found, in the source >code, in the following files: > >xen/common/schedule.c >xen/common/sched_credit.c >xen/common/sched_credit2.c >xen/common/sched_sedf.c >xen/common/sched_arinc653.c > >Look particularly carefully at schedule.c, which hosts the generic >scheduling frameweork, common to all the scheduling algorithms we >support, and to sched_credit.c, which is where the scheduling algorithm >that is used by default is implemented. > >Regarding what you're saying about the "preemption function", I'm sorry, >but I cannot parse that part of the sentence... What do you mean by >"which part decides it has the preemption function"?
My meaning is that which code decides the xen scheduler has the preemption ability. In the sched_credit.c file, there is a function, csched_vcpu_wake()->__runq_tickle(), in the function, __runq_tickle(), at the end, there is the following code:

if ( !cpumask_empty(&mask) )
        cpumask_raise_softirq(&mask, SCHEDULE_SOFTIRQ);
It will raise SCHEDULE_SOFTIRQ interrupt, whether here decides it has the preemption ability, or other parts? 
If it raise a SCHEDULE_SOFTIRQ interrupt, when will deal with this software interrupt? In time or the current vcpu gives up the physical cpu?  

>
>Dario
>
>-- 
><<This happens because I choose it to happen!>> (Raistlin Majere)
>-----------------------------------------------------------------
>Dario Faggioli, Ph.D, http://about.me/dario.faggioli
>Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
>



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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