All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] cputime fixes and cleanups
@ 2016-07-13 14:50 Frederic Weisbecker
  2016-07-13 14:50 ` [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time Frederic Weisbecker
                   ` (4 more replies)
  0 siblings, 5 replies; 53+ messages in thread
From: Frederic Weisbecker @ 2016-07-13 14:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: LKML, Frederic Weisbecker, Paolo Bonzini, Peter Zijlstra,
	Wanpeng Li, Thomas Gleixner, Radim Krcmar, Mike Galbraith,
	Rik van Riel

Ingo,

Please pull the sched/cputime branch that can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
	sched/cputime

It is based on top of tip:sched/core due to conflicts against commits in
this branch.

HEAD: 363e4ca0466a3db318fce18e53f6e492bffc0202

---
Summary of changes:

* Fix system/idle cputime leaked on cputime accounting (all nohz configs)
* Remove nohz full messy ad-hoc irqtime accounting, make it compatible
  with CONFIG_IRQ_TIME_ACCOUNTING instead.
* Cleanups
* Remove unecessary irq disablement on irqtime code.

Thanks,
	Frederic
---

Rik van Riel (3):
      sched,time: Count actually elapsed irq & softirq time
      nohz,cputime: Replace VTIME_GEN irq time code with IRQ_TIME_ACCOUNTING code
      time: Drop local_irq_save/restore from irqtime_account_irq

Frederic Weisbecker (2):
      sched: Complete cleanup of old vtime gen irqtime accounting
      sched: Reorganize vtime native irqtime accounting headers


 include/asm-generic/cputime_nsecs.h |   2 +
 include/linux/vtime.h               |  50 ++++-------
 init/Kconfig                        |   6 +-
 kernel/sched/cputime.c              | 171 ++++++++++++++++++------------------
 4 files changed, 109 insertions(+), 120 deletions(-)

^ permalink raw reply	[flat|nested] 53+ messages in thread
* [PATCH v2 0/5] sched,time: fix irq time accounting with nohz_idle
@ 2016-06-23  2:25 riel
  2016-06-23  2:25 ` [PATCH 1/5] sched,time: count actually elapsed irq & softirq time riel
  0 siblings, 1 reply; 53+ messages in thread
From: riel @ 2016-06-23  2:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, mingo, pbonzini, fweisbec, wanpeng.li, efault, tglx, rkrcmar

Currently irq time accounting only works in these cases:
1) purely ticke based accounting
2) nohz_full accounting, but only on housekeeping & nohz_full CPUs
3) architectures with native vtime accounting

On nohz_idle CPUs, which are probably the majority nowadays,
irq time accounting is currently broken. This leads to systems
reporting a dramatically lower amount of irq & softirq time than
is actually spent handling them, with all the time spent while the
system is in the idle task being accounted as idle.

This patch set seems to bring the amount of irq time reported by
top (and /proc/stat) roughly in line with that measured when I do
a "perf record -g -a" run to see what is using all that time.

The amount of irq time used, especially softirq, is shockingly high,
to the point of me thinking this patch set may be wrong, but the
numbers seem to match what perf is giving me...

These patches apply on top of Wanpeng Li's steal time patches.

CONFIG_IRQ_TIME_ACCOUNTING is now a config option that is available
as a separate choice from tick based / nohz_idle / nohz_full mode,
a suggested by Frederic Weisbecker.

Next up: look at the things that are using CPU time on an otherwise
idle system, and see if I can make those a little faster :)

v2: address Peterz's concerns, some more cleanups

^ permalink raw reply	[flat|nested] 53+ messages in thread
* [PATCH 0/5] sched,time: fix irq time accounting with nohz_idle
@ 2016-06-16 16:06 riel
  2016-06-16 16:06 ` [PATCH 1/5] sched,time: count actually elapsed irq & softirq time riel
  0 siblings, 1 reply; 53+ messages in thread
From: riel @ 2016-06-16 16:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, pbonzini, peterz, fweisbec, wanpeng.li, efault, tglx, rkrcmar

Currently irq time accounting only works in these cases:
1) purely ticke based accounting
2) nohz_full accounting, but only on housekeeping & nohz_full CPUs
3) architectures with native vtime accounting

On nohz_idle CPUs, which are probably the majority nowadays,
irq time accounting is currently broken. This leads to systems
reporting a dramatically lower amount of irq & softirq time than
is actually spent handling them, with all the time spent while the
system is in the idle task being accounted as idle.

This patch set seems to bring the amount of irq time reported by
top (and /proc/stat) roughly in line with that measured when I do
a "perf record -g -a" run to see what is using all that time.

The amount of irq time used, especially softirq, is shockingly high,
to the point of me thinking this patch set may be wrong, but the
numbers seem to match what perf is giving me...

These patches apply on top of Wanpeng Li's steal time patches.

CONFIG_IRQ_TIME_ACCOUNTING is now a config option that is available
as a separate choice from tick based / nohz_idle / nohz_full mode,
a suggested by Frederic Weisbecker.

Next up: look at the things that are using CPU time on an otherwise
idle system, and see if I can make those a little faster :)

^ permalink raw reply	[flat|nested] 53+ messages in thread
* [PATCH RFC 0/5] sched,time: make irq time accounting work for nohz_idle
@ 2016-06-08  2:29 riel
  2016-06-08  2:30 ` [PATCH 1/5] sched,time: count actually elapsed irq & softirq time riel
  0 siblings, 1 reply; 53+ messages in thread
From: riel @ 2016-06-08  2:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernellwp, mingo, peterz, tglx, fweisbec

This patch series seems to make irq time accounting work with
nohz_idle, by having it re-use the same strategy used for steal
time accounting in Wanpeng Li's patch.

It applies on top of an earlier version of Wanpeng Li's patch.

It gets rid of some code duplication, but needs a little bit more
work. Specifically, selecting CONFIG_IRQ_TIME_ACCOUNTING at the
same time as CONFIG_TICK_BASED_ACCOUNTING probably breaks :)

I am posting this because it works, and because I would like to
know what other changes I need to make at the same time.

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2016-08-18  8:38 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 14:50 [GIT PULL] cputime fixes and cleanups Frederic Weisbecker
2016-07-13 14:50 ` [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time Frederic Weisbecker
2016-07-14 10:37   ` [tip:timers/nohz] sched/cputime: " tip-bot for Rik van Riel
2016-08-09  3:59   ` [PATCH 1/5] sched,time: " Wanpeng Li
2016-08-09 14:06     ` Rik van Riel
2016-08-09 23:07       ` Wanpeng Li
2016-08-10  7:51         ` Wanpeng Li
2016-08-09 23:25       ` Wanpeng Li
2016-08-09 23:31         ` Wanpeng Li
2016-08-09 23:35         ` Wanpeng Li
2016-08-09 23:39         ` Wanpeng Li
2016-08-10  5:07           ` Rik van Riel
2016-08-10  6:33             ` Wanpeng Li
2016-08-10 16:52           ` [PATCH] time,virt: resync steal time when guest & host lose sync Rik van Riel
2016-08-11 10:11             ` Wanpeng Li
2016-08-12  2:44               ` Rik van Riel
2016-08-12  7:09                 ` Wanpeng Li
2016-08-12 15:58                   ` Rik van Riel
2016-08-13 15:36                     ` Frederic Weisbecker
2016-08-15  8:53                     ` Wanpeng Li
2016-08-15 11:38                       ` Wanpeng Li
2016-08-15 15:00                       ` Rik van Riel
2016-08-15 22:19                         ` Wanpeng Li
2016-08-16  1:31                         ` Wanpeng Li
2016-08-16  2:11                           ` Rik van Riel
2016-08-16  6:54                             ` Wanpeng Li
2016-08-16 14:01                               ` Rik van Riel
2016-08-16 23:08                                 ` Wanpeng Li
2016-08-12 16:33             ` Paolo Bonzini
2016-08-12 17:23               ` Rik van Riel
2016-08-13  7:18                 ` Paolo Bonzini
2016-08-13  8:42             ` Ingo Molnar
2016-08-14  1:50               ` Rik van Riel
2016-08-18  8:23               ` Wanpeng Li
2016-07-13 14:50 ` [PATCH 2/5] nohz,cputime: Replace VTIME_GEN irq time code with IRQ_TIME_ACCOUNTING code Frederic Weisbecker
2016-07-14 10:37   ` [tip:timers/nohz] sched/cputime: " tip-bot for Rik van Riel
2016-07-13 14:50 ` [PATCH 3/5] sched: Complete cleanup of old vtime gen irqtime accounting Frederic Weisbecker
2016-07-14 10:38   ` [tip:timers/nohz] sched/cputime: Clean up the old vtime gen irqtime accounting completely tip-bot for Frederic Weisbecker
2016-07-13 14:50 ` [PATCH 4/5] sched: Reorganize vtime native irqtime accounting headers Frederic Weisbecker
2016-07-14 10:38   ` [tip:timers/nohz] sched/cputime: " tip-bot for Frederic Weisbecker
2016-07-13 14:50 ` [PATCH 5/5] time: Drop local_irq_save/restore from irqtime_account_irq Frederic Weisbecker
2016-07-14 10:38   ` [tip:timers/nohz] sched/cputime: Drop local_irq_save/restore from irqtime_account_irq() tip-bot for Rik van Riel
  -- strict thread matches above, loose matches on Subject: below --
2016-06-23  2:25 [PATCH v2 0/5] sched,time: fix irq time accounting with nohz_idle riel
2016-06-23  2:25 ` [PATCH 1/5] sched,time: count actually elapsed irq & softirq time riel
2016-06-27 12:25   ` Frederic Weisbecker
2016-06-27 12:50     ` Rik van Riel
2016-06-28 20:56       ` Frederic Weisbecker
2016-06-16 16:06 [PATCH 0/5] sched,time: fix irq time accounting with nohz_idle riel
2016-06-16 16:06 ` [PATCH 1/5] sched,time: count actually elapsed irq & softirq time riel
2016-06-16 16:22   ` kbuild test robot
2016-06-21 21:21   ` Peter Zijlstra
2016-06-21 22:20     ` Rik van Riel
2016-06-22 10:40     ` Paolo Bonzini
2016-06-22 10:52       ` Peter Zijlstra
2016-06-08  2:29 [PATCH RFC 0/5] sched,time: make irq time accounting work for nohz_idle riel
2016-06-08  2:30 ` [PATCH 1/5] sched,time: count actually elapsed irq & softirq time riel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.