[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Questions about the use of idle_vcpu[]
Hello,I'm confused by the use of idle_vcpu[] in Xen schedulers. In credit, credit2 and rtds schedulers, they are used in conjunction with variable "tasklet_work_scheduled" like this: if ( tasklet_work_scheduled ) { snext = #_VCPU(idle_vcpu[cpu]); .... }The idle_vcpu array is initialized in cpu_schedule_up() and indeed they are set in corresponding alloc_vdata() to have IDLE_CREDIT and 0 weight or DEFAULT_PERIOD and 0 budget. The value of tasklet_work_scheduled comes from scheduler.c interface. According to the comments in sched_credit2.c, if there's tasklet work to do, we want to chose the idle vcpu for this processor, and mark the current for delayed runqueue add. Can someone elaborate the reason why an idle vcpu should be picked? What does an idle_vcpu do to a tasklet? I feel like I'm missing something here. If an idle vcpu is picked, the ret.time is set accordingly in both credit and credit2 by checking whether snext is idle. if so, credit returns -1 and credit2 returns 2ms. However, there is no corresponding code in the RTDS scheduler to handle this. When an idle_vcpu is picked, the value of ret.time would be 0 and the scheduler would be invoked again. What is the logic behind this? I'd appreciate it if anyone could point me to the right direction. Thanks, Tianyang Chen _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |