cgroup: Fixes for v7.2-rc6

- A pressure trigger's poll timer could be re-armed while the last trigger
  was being torn down and then fire after the cgroup was freed. Tie the
  timer to the cgroup's lifetime and shut it down when the cgroup is freed.

- Writing to a pressure file forked a worker kthread while holding the
  cgroup mutex, creating lock dependencies from the mutex to the whole fork
  path. A pressure write racing a sched_ext scheduler enable, which blocks
  forks before grabbing the mutex, deadlocked. Fork the worker with the
  mutex dropped.

- Documentation fix for io.latency behavior on non-rotational devices.
Docs/admin-guide/cgroup-v2: document io.latency rotational vs non-rotational behavior

io.latency is documented only in terms of average latency and the avg_lat
stat, which matches rotational devices.  On non-rotational devices a group
misses its target once enough of the IOs in the window individually exceed
it, and io.stat reports missed/total rather than avg_lat/win.

Describe both cases: how a miss is detected, note that the avg_lat tuning
guidance is rotational-only, and update the io.stat field list (mark
avg_lat/win as rotational-only, document missed/total).

Acked-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
1 file changed