mbox series

[RESEND,0/2] iowait and idle fixes in /proc/stat

Message ID 20200909144122.77210-1-tom.hromatka@oracle.com (mailing list archive)
Headers show
Series iowait and idle fixes in /proc/stat | expand

Message

Tom Hromatka Sept. 9, 2020, 2:41 p.m. UTC
A customer is using /proc/stat to track cpu usage in a VM and noted
that the iowait and idle times behave strangely when a cpu goes
offline and comes back online.

This patchset addresses two issues that can cause iowait and idle
to fluctuate up and down.  With these changes, cpu iowait and idle
now only monotonically increase.

Tom Hromatka (2):
  tick-sched: Do not clear the iowait and idle times
  /proc/stat: Simplify iowait and idle calculations when cpu is offline

 fs/proc/stat.c           | 24 ++++++------------------
 kernel/time/tick-sched.c |  9 +++++++++
 2 files changed, 15 insertions(+), 18 deletions(-)

Comments

Tom Hromatka Sept. 14, 2020, 4:31 p.m. UTC | #1
Thanks for your time and  feedback, Thomas and Alexey.  I'll
address the comments and send out a v2 in the next couple
days.

Thanks!

Tom


On 9/9/20 8:41 AM, Tom Hromatka wrote:
> A customer is using /proc/stat to track cpu usage in a VM and noted
> that the iowait and idle times behave strangely when a cpu goes
> offline and comes back online.
>
> This patchset addresses two issues that can cause iowait and idle
> to fluctuate up and down.  With these changes, cpu iowait and idle
> now only monotonically increase.
>
> Tom Hromatka (2):
>    tick-sched: Do not clear the iowait and idle times
>    /proc/stat: Simplify iowait and idle calculations when cpu is offline
>
>   fs/proc/stat.c           | 24 ++++++------------------
>   kernel/time/tick-sched.c |  9 +++++++++
>   2 files changed, 15 insertions(+), 18 deletions(-)
>