[lkml]   [2007]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[RESEND][PATCH 0/4] Virtual Machine Time Accounting
    Ingo, please, could you have a look to these patches ?

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

    [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 <>
    ------------- --------------
    "Software is hard" - Donald Knuth

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-09-10 14:05    [W:0.031 / U:0.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site