Am Freitag, 10. August 2007 schrieb Laurent Vivier:
The aim of these two patches is to measure the CPU time used by a virtualthat.
machine. All comments are welcome... I'm not sure it's the good way to do
I did something similar for or s390guest prototype, that Carsten posted in May. I decided to account guest time to the user process instead of adding a new field to avoid hazzle with old top. As you can read in the patch comment, I personally prefer a new field if we can get one.
My implementation uses a similar mechanism like hard and softirq. So I have an sie_enter an sie_exit and a task_is_in_sie function - like irq_enter and irq_exit. The main difference is based on the fact, that s390 has precise accouting for irq, steal, user and system time, and therefore my patch is based on architecture specifc code using CONFIG_VIRT_CPU_ACCOUNT.