lkml.org 
[lkml]   [2011]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] cpu idle ticks show twice in xen pvm guest
    Run below test on xen pvm.
    # x=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && sleep 60 \
    && y=$(cat /proc/stat | grep cpu0 | awk '{print $5}') \
    && echo -e "X:$x\nY:$y\nIDLE:" $(echo "scale=3; ($y-$x)/6000*100" | bc)

    @ X:58562301
    @ Y:58574282
    @ IDLE: 199.600

    Normal idle percent should be around 100%.
    xen_timer_interrupt called account_idle_ticks to account hypervisor stolen idle ticks
    but these ticks will be accounted again when idle ticks restarted.

    Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
    Signed-off-by: Joe Jin <joe.jin@oracle.com>

    diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
    index 163b467..5dcbc91 100644
    --- a/arch/x86/xen/time.c
    +++ b/arch/x86/xen/time.c
    @@ -151,7 +151,6 @@ static void do_stolen_accounting(void)

    ticks = iter_div_u64_rem(blocked, NS_PER_TICK, &blocked);
    __this_cpu_write(xen_residual_blocked, blocked);
    - account_idle_ticks(ticks);
    }

    /* Get the TSC speed from Xen */

    \
     
     \ /
      Last update: 2011-10-06 07:15    [W:0.020 / U:34.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site