Skip to content

sched/nohz: Make kcpustat's CPUTIME_SYSTEM vtime aware v2 (Partially fix kcpustat on nohz_full)

Frederic Weisbecker lkml 1 version Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14sched/vtime: Record CPU under seqcount for kcpustat needsinclude/linux/sched.h kernel/sched/cputime.c+4 -00 replies
2/14sched/cputime: Add vtime idle task stateinclude/linux/sched.h kernel/sched/cputime.c+12 -70 replies
3/14sched/cputime: Add vtime guest task stateinclude/linux/sched.h kernel/sched/cputime.c+13 -70 replies
4/14context_tracking: Remove context_tracking_active()include/linux/context_tracking_state.h+0 -10 replies
5/14context_tracking: s/context_tracking_is_enabled/context_tracking_enabled()arch/x86/entry/calling.h include/linux/context_tracking.h include/linux/context_tracking_state.h +3 more+20 -200 replies
6/14context_tracking: Rename context_tracking_is_cpu_enabled() to context_tracking_enabled_this_cpu()include/linux/context_tracking.h include/linux/context_tracking_state.h include/linux/vtime.h+4 -40 replies
7/14context_tracking: Introduce context_tracking_enabled_cpu()include/linux/context_tracking_state.h+6 -00 replies
8/14sched/vtime: Rename vtime_accounting_cpu_enabled() to vtime_accounting_enabled_this_cpu()include/linux/context_tracking.h include/linux/vtime.h kernel/sched/cputime.c +1 more+9 -90 replies
9/14sched/vtime: Introduce vtime_accounting_enabled_cpu()include/linux/vtime.h+7 -60 replies
10/14context_tracking: Check static key on context_tracking_enabled_*cpu()include/linux/context_tracking_state.h include/linux/vtime.h+4 -40 replies
11/14sched/kcpustat: Introduce vtime-aware kcpustat accessor for CPUTIME_SYSTEMinclude/linux/kernel_stat.h kernel/sched/cputime.c+94 -03 replies
12/14procfs: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEMfs/proc/stat.c+2 -20 replies
13/14cpufreq: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEMdrivers/cpufreq/cpufreq.c+1 -11 reply
14/14leds: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEMdrivers/leds/trigger/ledtrig-activity.c+1 -10 replies

Reviews trailers per patch

1 of 14 patches has a Reviewed-by or Acked-by.

PatchViresh Kumar
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14A-b
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/14] sched/nohz: Make kcpustat's CPUTIME_SYSTEM vtime aware v2 (Partially fix kcpustat on nohz_full)

Thanks to the recent patches that have brought a sensible rq->curr RCU lifecycle, here comes a simplified rework of
"[PATCH 00/25] sched/nohz: Make kcpustat vtime aware"

See for the record and a summary: https://lore.kernel.org/lkml/[email protected]/

Since I'm trying to cut and simplify the series, this one only fixes the reading of kcpustat's system field for now. But that also provides all the necessary preparation work for the rest.

User and guest time will have their own series because niceness brings issues of its own.

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
nohz/kcpustat-v2

HEAD: e179e89320c53a96c5d585af38126cfb124da789

Thanks,
Frederic
---

Frederic Weisbecker (14):
sched/vtime: Record CPU under seqcount for kcpustat needs
sched/cputime: Add vtime idle task state
sched/cputime: Add vtime guest task state
context_tracking: Remove context_tracking_active()
context_tracking: s/context_tracking_is_enabled/context_tracking_enabled()
context_tracking: Rename context_tracking_is_cpu_enabled() to context_tracking_enabled_this_cpu()
context_tracking: Introduce context_tracking_enabled_cpu()
sched/vtime: Rename vtime_accounting_cpu_enabled() to vtime_accounting_enabled_this_cpu() sched/vtime: Introduce vtime_accounting_enabled_cpu()
context_tracking: Check static key on context_tracking_enabled_*cpu() sched/kcpustat: Introduce vtime-aware kcpustat accessor for CPUTIME_SYSTEM
procfs: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM
cpufreq: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM
leds: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM

 arch/x86/entry/calling.h                |   2 +-
 drivers/cpufreq/cpufreq.c               |   2 +-
 drivers/leds/trigger/ledtrig-activity.c |   2 +-
 fs/proc/stat.c                          |   4 +-
 include/linux/context_tracking.h        |  26 +++----
 include/linux/context_tracking_state.h  |  21 +++---
 include/linux/kernel_stat.h             |  11 +++
 include/linux/sched.h                   |   9 ++-
 include/linux/tick.h                    |   2 +-
 include/linux/vtime.h                   |  23 +++---
 kernel/context_tracking.c               |   6 +-
 kernel/sched/cputime.c                  | 119 ++++++++++++++++++++++++++++----
 kernel/time/tick-sched.c                |   2 +-
 13 files changed, 172 insertions(+), 57 deletions(-)