public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Virtual Machine Time Accounting
@ 2007-08-20 13:13 Laurent Vivier
  2007-08-20 13:41 ` [kvm-devel] " Avi Kivity
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Laurent Vivier @ 2007-08-20 13:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: kvm-devel, linux-kernel, virtualization

The aim of these four patches is to introduce Virtual Machine time accounting.

_Ingo_, as these patches modify files of the scheduler, could you have a look to
them, please ?

[PATCH 1/4] as recent CPUs introduce a third running state, after "user" and
"system", we need 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/4] like for cpustat, introduce the "gtime" (guest time of the task) and
"cgtime" (guest time of the task children) fields for the
tasks. Modify signal_struct and task_struct. Modify /proc/<pid>/stat to display
these new fields.

[PATCH 3/4] 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. Update "gtime" and "cgtime" in signal_struct and
task_struct accordingly.

[PATCH 4/4] Modify KVM to update guest time accounting.

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
-- 
------------- Laurent.Vivier@bull.net  --------------
          "Software is hard" - Donald Knuth

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-08-04 22:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-20 13:13 [PATCH 0/4] Virtual Machine Time Accounting Laurent Vivier
2007-08-20 13:41 ` [kvm-devel] " Avi Kivity
2007-08-20 13:43 ` John Stoffel
2007-08-20 14:39   ` Laurent Vivier
2007-08-20 16:13     ` Jeremy Fitzhardinge
2007-08-20 23:30       ` Rusty Russell
2007-08-21 12:54       ` [kvm-devel] " Avi Kivity
2009-08-04 14:16 ` Peter Zijlstra
2009-08-04 15:07   ` Martin Schwidefsky
2009-08-04 16:26     ` Peter Zijlstra
2009-08-04 17:29       ` Martin Schwidefsky
2009-08-04 17:33         ` Peter Zijlstra
2009-08-04 18:12           ` Martin Schwidefsky
2009-08-04 22:23           ` Jeremy Fitzhardinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox