Skip to contentSkip to conversation

IDLE domain is scheduled more than dom0

DISCUSSION Tian, Kevin 2 participants 4 messages Jul 11, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines

From: [email protected] [mailto:[email protected]] On Behalf Of Stephan Diestelhorst
Sent: Monday, July 11, 2005 7:26 PM

Quoted 4 lines

Not 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

Quoted 1 line

task.

Ah, yes, slice of IDLE is always 0, which means arbitration will take effect on every tick when current is IDLE.

Quoted 4 lines
Quoted 1 line
Quoted 1 line

b) set inf->slice = MILLIESECS(20);

Okay, thanks for your investigation!
The thing is that the idle domain IS the lowest prioritised domain in

the

Quoted 2 lines

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

Quoted 2 lines

this
is treated differently whether it occurs in EDF-time or in extra-time.

I will

Quoted 1 line

have a closer look at this, as this behaviuor is not acceptable.

And one thing I'd like you to know is, my test environment is with XEN/VTI domain0, which is whole unmodified one without any explicit request to do_block. So actually within this model, you can consider Dom0 as always runable... Not sure this different behavior as xen0 will cause any issue in sedf scheduler which, however can be considered as an extreme example for IDLE never to be scheduled. ;-)

Thanks,
Kevin

#1 lore raw
Quoted 4 lines · Kevin
Quoted 4 lines

From: [email protected] [mailto:[email protected]] On Behalf Of Stephan Diestelhorst
Sent: Monday, July 11, 2005 7:26 PM

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Not 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.

Ah, yes, slice of IDLE is always 0, which means arbitration will take effect on every tick when current is IDLE.

Not quite. Arbitration points are set by the value of ret.task in do_schedule, for the idle-task this value is estimated by the time the first domain on the waitq gets ready. (Bear in mind that the idle task only runs if dom0 is blocked once you specify the EXTRA_AWARE flag!) If the waitq is empty the idle task runs for a relatively long time (one second), but gets immediately descheduled when the domain wakes up!

Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line

b) set inf->slice = MILLIESECS(20);

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 behaviour is not acceptable.

Quoted 6 lines

And one thing I'd like you to know is, my test environment is with XEN/VTI domain0, which is whole unmodified one without any explicit request to do_block. So actually within this model, you can consider Dom0 as always runable... Not sure this different behavior as xen0 will cause any issue in sedf scheduler which, however can be considered as an extreme example for IDLE never to be scheduled. ;-)

But still it should work!

Stephan

#2 lore raw
In reply to Tian, Kevin

Kevin,
I just made my own measurements on my machine (intel dual xeon 2.4 GhZ SMT
aka. HT) results:

My machine:
SEDF: dom0 (15ms/20ms,extra on)
dom0 cpu-time after boot: 7796144577 ~ 7.8 sec
idle -"- 40933867915 ~ 40.9 sec
-> total boot-time: 48.7 sec
ratio: 0.191

SEDF: dom0 (5ms/20ms,xon)
dom0 cpu-time after boot: 8300470815 ~ 8.3 sec
idle -"- 38639540787 ~ 38.6 sec
-> total boot-time: 46.9 sec
ratio: 0.215

With BVT:
dom0 cpu-time after boot: 0x1F20E0DF4 = 8355974644 ~ 8.4 sec
idle -"- 0x7D5F045FA = 33654064634 ~ 33.7 sec
-> total boot-time: 42.1 sec
ratio: 0.248

Kevin Tian's measurements (on IA64 hardware):
SEDF: dom0 (15/20, xoff)
Dom0 0x5420288a1b = 361316780571 ~ 361.3 sec
IDLE 0x93def9294f = 635101063503 ~ 635.1 sec
-> total boot time: 996.4 sec ?!
ratio: 0.57

SEDF: dom0(15/20, xon)
Dom0 0x1040A91728 = 69804300072 ~ 69.8 sec
IDLE 0x19CE88F3E7 = 110839264231 ~ 110.8 sec
-> total boot time: 180.6 sec
ratio: 0.63

SEDF: dom0(20/20, xoff)
Dom0                  0x2D61AF8D5D = 194912423261 ~ 194.9 sec
IDLE                    0x48FD92BF = 1224577727 ~ 1.2 sec
-> total boot time: 196.1 sec
ratio: 162.42

As you see, for me the fiddling with the parameters of sedf doesn't make much difference (even to BVT) and the idle-task always has 4-5 times as much CPU time as dom0. In my setup this is due to mounting of NFS devices, which takes quite a while, where dom0 is blocked most of the times. So our times might not be comparable. Did you measure your times at roughly the same stage during / after boot? I'm not quite sure, what causes the weird problems. But I'll def. look into I/O performance of extra-time, probably these artifacts vanish!

Thanks,
Stephan

#3 lore raw
In reply to Tian, Kevin

Kevin,
I just made my own measurements on my machine (intel dual xeon 2.4 GhZ SMT
aka. HT) results:

My machine:
SEDF: dom0 (15ms/20ms,extra on)
dom0 cpu-time after boot: 7796144577 ~ 7.8 sec
idle -"- 40933867915 ~ 40.9 sec
-> total boot-time: 48.7 sec
ratio: 0.191

SEDF: dom0 (5ms/20ms,xon)
dom0 cpu-time after boot: 8300470815 ~ 8.3 sec
idle -"- 38639540787 ~ 38.6 sec
-> total boot-time: 46.9 sec
ratio: 0.215

With BVT:
dom0 cpu-time after boot: 0x1F20E0DF4 = 8355974644 ~ 8.4 sec
idle -"- 0x7D5F045FA = 33654064634 ~ 33.7 sec
-> total boot-time: 42.1 sec
ratio: 0.248

Kevin Tian's measurements (on IA64 hardware):
SEDF: dom0 (15/20, xoff)
Dom0 0x5420288a1b = 361316780571 ~ 361.3 sec
IDLE 0x93def9294f = 635101063503 ~ 635.1 sec
-> total boot time: 996.4 sec ?!
ratio: 0.57

SEDF: dom0(15/20, xon)
Dom0 0x1040A91728 = 69804300072 ~ 69.8 sec
IDLE 0x19CE88F3E7 = 110839264231 ~ 110.8 sec
-> total boot time: 180.6 sec
ratio: 0.63

SEDF: dom0(20/20, xoff)
Dom0                  0x2D61AF8D5D = 194912423261 ~ 194.9 sec
IDLE                    0x48FD92BF = 1224577727 ~ 1.2 sec
-> total boot time: 196.1 sec
ratio: 162.42

As you see, for me the fiddling with the parameters of sedf doesn't make much difference (even to BVT) and the idle-task always has 4-5 times as much CPU time as dom0. In my setup this is due to mounting of NFS devices, which takes quite a while, where dom0 is blocked most of the times. So our times might not be comparable. Did you take your samples at a similar stage during / after boot? I find it quite strange that they have such a massive variance! I'll look into I/O performance during extra-time execution anyways, probably these artifacts will vanish when addressing this issue!

Thanks,
Stephan