[PATCH -tip] sched, cpuacct: fix niced guest time accounting

From: Ryota Ozaki
Date: Thu Oct 22 2009 - 11:36:45 EST


Hi list,
(CC: Ingo and Avi)

CPU time of a guest is always accounted in 'user' time
without concern for the nice value of its counterpart
process although the guest is scheduled under the nice
value.

This patch fixes the defect and accounts cpu time of
a niced guest in 'nice' time as same as a niced process.

And also the patch adds 'guest_nice' to cpuacct. The
value provides niced guest cpu time which is like 'nice'
to 'user'.

This patch has already reviewed and acked by Avi on KVM ML.

The original discussions can be found here.
http://www.mail-archive.com/kvm@xxxxxxxxxxxxxxx/msg23982.html
http://www.mail-archive.com/kvm@xxxxxxxxxxxxxxx/msg23860.html

Thanks,
ozaki-r