Skip to content

Accounting forced idle time per cpu and per cgroup

Cruz Zhao cgroups lkml oe-kbuild-all 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 9 repliesApplied
  2. v12 patches 13 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3sched/core: Accounting forceidle time for all tasks except idle taskkernel/sched/core.c kernel/sched/core_sched.c+2 -31 reply
2/3sched/core: Forced idle accounting per-cpukernel/sched/core.c kernel/sched/core_sched.c kernel/sched/sched.h +1 more+30 -55 replies
3/3sched/core: Force idle accounting per cgroupinclude/linux/cgroup.h kernel/sched/core_sched.c kernel/sched/cpuacct.c+87 -03 replies

Reviews trailers per patch

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

PatchJosh Don
1/3R-b
2/3
3/3

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

Read the v2 thread

Cover letter [PATCH v2 0/3] Accounting forced idle time per cpu and per cgroup

There are two types of forced idle time: forced idle time from cookie'd task and forced idle time form uncookie'd task. The forced idle time from uncookie'd task is actually caused by the cookie'd task in runqueue indirectly, and it's more accurate to measure the capacity loss with the sum of both.

This patch set accounts forced idle time for each cpu to measure how long the cpu is forced idle, which is displayed via via /proc/schedstat, and also accounts for each cgroup to measure how long it forced its SMT siblings into idle, which is displayed via /sys/fs/cgroup/cpuacct/cpuacct.forceidle and /sys/fs/cgroup/cpuacct/cpuacct.forceidle_percpu. It is worth noting that the forced idle time and the force idle time have different meanings.

We can get the total system forced idle time by looking at the root cgroup, and we can get how long the cgroup forced it SMT siblings into idle. If the force idle time of a cgroup is high, that can be rectified by making some changes(ie. affinity, cpu budget, etc.) to the cgroup.

Cruz Zhao (3):
sched/core: Accounting forceidle time for all tasks except idle task sched/core: Forced idle accounting per-cpu
sched/core: Force idle accounting per cgroup

 include/linux/cgroup.h    |  7 +++++
 kernel/sched/core.c       | 10 ++++--
 kernel/sched/core_sched.c | 10 ++++--
 kernel/sched/cpuacct.c    | 79 +++++++++++++++++++++++++++++++++++++++++++++++
 kernel/sched/sched.h      |  4 +++
 kernel/sched/stats.c      | 17 ++++++++--
 6 files changed, 119 insertions(+), 8 deletions(-)
Signature · 1 line
1.8.3.1