guest time accounting
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 35 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | introduce a new field in cpustatfs/ include/ | +11 | 0 replies | |
| 2/2 | modify account_system_time() to add cputime to cpustat->guestdrivers/ drivers/ include/ +1 more | +12 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2][KVM] guest time accounting
The aim of these two patches is to measure the CPU time used by a virtual machine. All comments are welcome... I'm not sure it's the good way to do that.
[PATCH 1/2] introduce a new field, "guest", in cpustat to store the time used by the CPU to run virtual CPU. Modify /proc/stat to display this new field.
[PATCH 2/2] modify account_system_time() to add cputime to cpustat->guest if we are running a VCPU. We add this cputime to cpustat->user instead of cpustat->system because this part of KVM code is in fact user code although it is executed in the kernel. We duplicate VCPU time between guest and user to allow an unmodified "top(1)" to display correct value. A modified "top(1)" is able to display good cpu user time and cpu guest time by subtracting cpu guest time from cpu user time.
Signature · 2 lines
------------- [email protected] -------------- "Software is hard" - Donald Knuth