Skip to content

RFC nohz: Fix racy sleeptime stats v2

Frederic Weisbecker lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5nohz: Convert a few places to use local per cpu accessesinclude/linux/tick.h kernel/softirq.c kernel/time/tick-broadcast.c +2 more+24 -330 replies
2/5nohz: Only update sleeptime stats locallykernel/time/tick-sched.c+21 -420 replies
3/5timer: Change idle/iowait accounting semanticsinclude/linux/ktime.h kernel/time/tick-sched.c kernel/time/timer_list.c+17 -52 replies
4/5sched: Refactor iowait accountinginclude/linux/sched.h include/linux/tick.h kernel/sched/core.c +3 more+71 -537 replies
5/5nohz: Synchronize sleep time stats with seqlockinclude/linux/tick.h kernel/time/tick-sched.c+17 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] nohz: Fix racy sleeptime stats v2

Hi,

So this is a new iteration with some more changes on top of the latest discussions we had.

Unfortunately it's not yet a real viable solution. Check out patch 4/5 for details, I think that's too much overhead. Also it changes enough the semantics to break the idle sleeptime accounting along the way. This is because moving the accounting to io_schedule() makes it account _all_ IO sleeptime, even if the CPU is still busy, not just when it is idle like before. As a result, the idle sleeptime, that relies on a diff against the io sleeptime, is broken.

Anyway, my hope with this new take is mostly to launch a discussion with a fresher base and see if we can find better ideas.

Thanks!

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

Thanks,
Frederic
---

Frederic Weisbecker (5):
nohz: Convert a few places to use local per cpu accesses
nohz: Only update sleeptime stats locally
timer: Change idle/iowait accounting semantics
sched: Refactor iowait accounting
nohz: Synchronize sleep time stats with seqlock

 include/linux/ktime.h        |   7 +++
 include/linux/sched.h        |   1 +
 include/linux/tick.h         |  11 ++--
 kernel/sched/core.c          |  68 ++++++++++++++++++---
 kernel/sched/cputime.c       |   2 +-
 kernel/sched/sched.h         |   5 +-
 kernel/softirq.c             |   4 +-
 kernel/time/tick-broadcast.c |   6 +-
 kernel/time/tick-internal.h  |   4 +-
 kernel/time/tick-sched.c     | 138 ++++++++++++++-----------------------------
 kernel/time/timer_list.c     |   3 +-
 11 files changed, 130 insertions(+), 119 deletions(-)