]> git.baikalelectronics.ru Git - kernel.git/commit
sched/cputime: Fix steal time accounting
authorWanpeng Li <wanpeng.li@hotmail.com>
Thu, 11 Aug 2016 05:36:35 +0000 (13:36 +0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 11 Aug 2016 09:02:14 +0000 (11:02 +0200)
commit1bfabf68d43d953caa90d758e08cd8313cd995f2
treea91de94c46cb85a38fb8198ee2c65e37e4bb8347
parentca541b533cdf49dae712afe2003c2a3e20af4e04
sched/cputime: Fix steal time accounting

Commit:

  ef1873b0f70 ("sched/cputime: Count actually elapsed irq & softirq time")

... didn't take steal time into consideration with passing the noirqtime
kernel parameter.

As Paolo pointed out before:

| Why not? If idle=poll, for example, any time the guest is suspended (and
| thus cannot poll) does count as stolen time.

This patch fixes it by reducing steal time from idle time accounting when
the noirqtime parameter is true. The average idle time drops from 56.8%
to 54.75% for nohz idle kvm guest(noirqtime, idle=poll, four vCPUs running
on one pCPU).

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Radim <rkrcmar@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1470893795-3527-1-git-send-email-wanpeng.li@hotmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/cputime.c