Skip to contentSkip to conversation

delayacct regression in 2.6.24 git

DISCUSSION Balbir Singh 2 participants 4 messages Nov 2, 2007 – Nov 3, 2007

lore
Share & tools
lore
#0 lore raw

Hi, Ingo,

I missed commit 75d4ef16a6aa84f708188bada182315f80aab6fa "sched: fix delay accounting performance regression"

Without these changes, I find that delay accounting does not work as expected, I see zeros in the field for virtual,delay and count(s).

CPU count real total virtual total delay total

                    0      535861848              0              0

This breaks existing delay accounting behaviour.

Am I missing something?

Signature · 4 lines
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
#1 lore raw
Quoted 9 lines · Balbir Singh

Hi, Ingo,

I missed commit 75d4ef16a6aa84f708188bada182315f80aab6fa "sched: fix delay accounting performance regression"

Without these changes, I find that delay accounting does not work as expected, I see zeros in the field for virtual,delay and count(s).

Quoted 7 lines

CPU count real total virtual total delay total

                    0      535861848              0              0

This breaks existing delay accounting behaviour.

Am I missing something?

delay accounting was causing context-switch slowdown because it called sched_clock() explicitly - but indeed my fix to that is wrong ...

how about reverting the change but also using rq->clock instead of sched_clock()?

Ingo

#2 lore raw
Quoted 17 lines · Ingo Molnar
Quoted 15 lines · Balbir Singh

Hi, Ingo,

I missed commit 75d4ef16a6aa84f708188bada182315f80aab6fa "sched: fix delay accounting performance regression"

Without these changes, I find that delay accounting does not work as expected, I see zeros in the field for virtual,delay and count(s).

CPU count real total virtual total delay total

                    0      535861848              0              0

This breaks existing delay accounting behaviour.

Quoted 7 lines
Quoted 1 line

Am I missing something?

delay accounting was causing context-switch slowdown because it called sched_clock() explicitly - but indeed my fix to that is wrong ...

how about reverting the change but also using rq->clock instead of sched_clock()?

Hmm... I think that might work, I find that schedule() calls __update_rq_clock() which in turn calls sched_clock(), so it might be a worthwhile optimization.

Signature · 4 lines
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
#3 lore raw
Quoted 6 lines · Balbir Singh
Quoted 6 lines
Quoted 1 line

Am I missing something?

delay accounting was causing context-switch slowdown because it called sched_clock() explicitly - but indeed my fix to that is wrong
...

Quoted 6 lines
Quoted 2 lines

how about reverting the change but also using rq->clock instead of sched_clock()?

Hmm... I think that might work, I find that schedule() calls __update_rq_clock() which in turn calls sched_clock(), so it might be a worthwhile optimization.

yep, that's the idea - in general rq->clock is updated for almost every scheduling event so you can rely on it instead of calling sched_clock() directly.

Ingo