Userspace scheduling - exporting stats

- contributed by Bjorn Swift

- adds process accounting, for example counting the number of messages
  sent, how often the process was preemted and how much time it spent
  in the run queue. These statistics, along with the current cpu load,
  are sent back to the user-space scheduler in the Out Of Quantum
  message.

- the user-space scheduler may choose to make use of these statistics
  when making scheduling decisions. For isntance the cpu load becomes
  especially useful when scheduling on multiple cores.
This commit is contained in:
Tomas Hruby
2010-09-19 15:52:12 +00:00
parent 3306687363
commit a665ae3de1
10 changed files with 146 additions and 9 deletions

View File

@@ -85,6 +85,7 @@ PUBLIC int do_fork(struct proc * caller, message * m_ptr)
/* the child process is not runnable until it's scheduled. */
RTS_SET(rpc, RTS_NO_QUANTUM);
reset_proc_accounting(rpc);
make_zero64(rpc->p_cpu_time_left);
make_zero64(rpc->p_cycles);