diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2020-03-16 15:13:31 -0400 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-03-20 13:06:18 +0100 |
commit | b05e75d611380881e73edc58a20fd8c6bb71720b (patch) | |
tree | 3d641b57b42e934d7518f22a13f3a74cd76f6ff7 /samples/mic | |
parent | 46a87b3851f0d6eb05e6d83d5c5a30df0eca8f76 (diff) | |
download | linux-b05e75d611380881e73edc58a20fd8c6bb71720b.tar.gz linux-b05e75d611380881e73edc58a20fd8c6bb71720b.tar.bz2 linux-b05e75d611380881e73edc58a20fd8c6bb71720b.zip |
psi: Fix cpu.pressure for cpu.max and competing cgroups
For simplicity, cpu pressure is defined as having more than one
runnable task on a given CPU. This works on the system-level, but it
has limitations in a cgrouped reality: When cpu.max is in use, it
doesn't capture the time in which a task is not executing on the CPU
due to throttling. Likewise, it doesn't capture the time in which a
competing cgroup is occupying the CPU - meaning it only reflects
cgroup-internal competitive pressure, not outside pressure.
Enable tracking of currently executing tasks, and then change the
definition of cpu pressure in a cgroup from
NR_RUNNING > 1
to
NR_RUNNING > ON_CPU
which will capture the effects of cpu.max as well as competition from
outside the cgroup.
After this patch, a cgroup running `stress -c 1` with a cpu.max
setting of 5000 10000 shows ~50% continuous CPU pressure.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200316191333.115523-2-hannes@cmpxchg.org
Diffstat (limited to 'samples/mic')
0 files changed, 0 insertions, 0 deletions