IDLE domain is scheduled more than dom0
Quoted 5 lines
From: [email protected] [mailto:[email protected]] On Behalf Of Stephan Diestelhorst
Sent: Friday, July 08, 2005 11:15 PMQuoted 1 line
Quoted 8 lines
Quoted 4 lines
An example is: (No DomU created)
Total cpu time
IDLE93def9294f
Dom05420288a1bHi Kevin,
this is quite an interesting result.
In "sedf_add_task" dom0 is set to 15ms every 20ms, so this means that
it gets
Quoted 1 line
75% of the
cpu_time. During boottime this might vary due to lots of I/O
but a
Quoted 1 line
ratio of 33% for dom0 and 66% for the idle task is strange. Could you
please
Quoted 7 lines
try two things:
a) give the domain extratime by modfying the lineinf->stauts=EXTRA_NONE|SEDF_ASLEEP;
toinf->status=EXTRA_AWARE|SEDF_ASLEEP;
in "sedf_add_task" "case 0" insched_sedf.c
This can't help, with almost same statistics:
Total cpu time
IDLE 19CE88F3E7
Dom0 1040A91728
Not sure whether that strange coming from the fact that IDLE is also initialized with period as WEIGHT_PERIOD(100ms)?
Quoted 1 line
b) set
inf->slice= MILLIESECS(20);
Instead this approach has exactly same effect as previous bvt:
Total cpu time
IDLE 48FD92BF
Dom0 2D61AF8D5D
Then IDLE wasn't scheduled any more after Dom0 is up, except explicit request. Though Dom0 is placed on waitq when in the start of do_schedule, it will be moved back to runq when update_queues. The reason is that the start of next period of Dom0 is always earlier than NOW(), when inf->slice == inf->period. Then scheduler is always happy to choose Dom0 instead of IDLE, since both in runq.
So, to make b) change can give smooth boot for Dom0, but not sure whether this will affect multiple domains since your intent is to set Dom0 as 75% threshold. Then how about adding a special check in update_queues, upon the case where IDLE is only candidate on runq? In that case, it's better to pull one from waitq which is run-able there only being slice consumed up, to begin a new round immediately...
Thanks,
Kevin
Quoted 30 lines
Quoted 4 lines
From: [email protected] [mailto:[email protected]] On Behalf Of Stephan Diestelhorst
Sent: Friday, July 08, 2005 11:15 PMQuoted 8 lines
Quoted 4 lines
An example is: (No DomU created)
Total cpu time
IDLE93def9294f
Dom05420288a1bHi Kevin,
this is quite an interesting result.
In "sedf_add_task" dom0 is set to 15ms every 20ms, so this means thatit gets
Quoted 1 line
75% of the
cpu_time. During boottime this might vary due to lots of I/Obut a
Quoted 1 line
ratio of 33% for dom0 and 66% for the idle task is strange. Could you
please
Quoted 6 lines
try two things:
a) give the domain extratime by modfying the lineinf->stauts=EXTRA_NONE|SEDF_ASLEEP;
toinf->status=EXTRA_AWARE|SEDF_ASLEEP;
in "sedf_add_task" "case 0" insched_sedf.c
Quoted 7 lines
This can't help, with almost same statistics:
Total cpu time
IDLE 19CE88F3E7
Dom0 1040A91728Not sure whether that strange coming from the fact that IDLE is also initialized with period as
WEIGHT_PERIOD(100ms)?
This will not matter, and in fact add_domain will not get called for the idle task.
Quoted 7 lines
Quoted 1 line
b) set
inf->slice= MILLIESECS(20);Instead this approach has exactly same effect as previous bvt:
Total cpu time
IDLE 48FD92BF
Dom0 2D61AF8D5D
Quoted 6 lines
Then IDLE wasn't scheduled any more after Dom0 is up, except explicit request. Though Dom0 is placed on waitq when in the start of
do_schedule, it will be moved back to runq whenupdate_queues. The reason is that the start of next period of Dom0 is always earlier thanNOW(), wheninf->slice==inf->period. Then scheduler is always happy to choose Dom0 instead of IDLE, since both in runq.
Okay, thanks for your investigation!
The thing is that the idle domain IS the lowest prioritised domain in the system! So if you set the EXTRA_AWARE flag, it should almost never get scheduled. The only case when this will happen is when dom0 does I/O, as this is treated differently whether it occurs in EDF-time or in extra-time. I will have a closer look at this, as this behaviuor is not acceptable.
Quoted 6 lines
So, to make b) change can give smooth boot for Dom0, but not sure whether this will affect multiple domains since your intent is to set Dom0 as 75% threshold. Then how about adding a special check in
update_queues, upon the case where IDLE is only candidate on runq? In that case, it's better to pull one from waitq which is run-able there only being slice consumed up, to begin a new round immediately...
This is exactly what happens if you set the extra-flag!
As I said, I will have a closer look on what happens with I/O during extratime.
Thanks for your efforts!
Stephan