DragonFly kernel List (threaded) for 2004-03
Data needed by userland scheduler [WAS: Re: Goals...]
As I promised, a new and hopefully short thread.
You'd have to be a bit more specific. Run and sleep times are
accounted for. The only scheduler-specific case I guess is how it
wakeup after sleeping for a long period of time.
Yes, but I'm not looking for accumulating timecounters. I know this gets
done essentially in kern/kern_clock.c and marginally/purely adjusting in other places
for the stats.
What I want are informations like
* how long did the process contigueously run until it voluntarily slept ?
(minus the time it spent in interrupts during that period)
If it was stopped, the scheduler needs that information as well, but
will handle the process specially anyway...
* how long did the process sleep until it was woken up ?
About these things I need some (constant) history of switches.
(Like: "The last 5 run/sleep-switches for process p it ran 5 ms, then slept
for 25, then ran for 14, then...")
For this to accomplish, I need two things:
First, some struct fields to record this (easily done in struct sched e.g.)
Second, some points to place hooks in. And this is my problem right now.
For sleeping times, tsleep and endtsleep are presumably the best candidates.
But for running times ? As I already mentioned, I may be blind...
I don't want to account the time it was on some lwkt-queue.
Though this is somehow an abstraction of curproc, it might still be unfair.
Also, I might add, that I don't want to make use of schedcpu, its estcpu cruft
or any FOR_EACH_*. It should be made more event-driven. I think this would
add to the goal "scalability".
Campus der Max-Planck-Institute Tübingen
Netzwerk- und Systemadministration
Tel: +49 7071 601 598
Fax: +49 7071 601 616