[RFC PATCH v3 0/9] pids controller events rework and migration charging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The series consists of two parts:
- pids.events rework (originally v2, patches 1-6,
- migration charging, patches 7-9.

The changes are independent in principle, I stacked them for (my)
convenience and because they both deserve RFC:

1) Changed semantics of v2 pids.events
  - similar change was proposed for memory.swap.events:max [1]
2) Migration charging is obsolete concept

How are the new events supposed to be useful?

- pids.events.local:max
  - tells that cgroup's limit is hit (too tight?)
- pids.events.local:max.imposed
  - tells that cgroup's workload was restricted (generalization of
    'cgroup: fork rejected by pids controller in %s' message)
- pids.events:*
  - "only" directs top-down search to cgroups of interest

The migration charging is motivated by apparenty surprising
	pids.current > pids.max
because supervised processes are forked in supervisor's cgroup (more
details in commit cgroup/pids: Enforce pids.max on task migrations too)

Changes from v2 (https://lore.kernel.org/r/20200205134426.10570-1-mkoutny@xxxxxxxx)
- implemented pids.events.local (Tejun)
- added migration charging

[1] https://lore.kernel.org/r/20230202155626.1829121-1-hannes@xxxxxxxxxxx/

Michal Koutný (9):
  cgroup/pids: Remove superfluous zeroing
  cgroup/pids: Separate semantics of pids.events related to pids.max
  cgroup/pids: Make event counters hierarchical
  cgroup/pids: Add pids.events.local
  selftests: cgroup: Lexicographic order in Makefile
  selftests: cgroup: Add basic tests for pids controller
  cgroup/pids: Replace uncharge/charge pair with a single function
  cgroup/pids: Enforce pids.max on task migrations
  selftests: cgroup: Add tests pids controller

 Documentation/admin-guide/cgroup-v1/pids.rst |   3 +-
 Documentation/admin-guide/cgroup-v2.rst      |  22 +-
 include/linux/cgroup-defs.h                  |   7 +-
 kernel/cgroup/cgroup.c                       |  16 +-
 kernel/cgroup/pids.c                         | 206 +++++++++----
 tools/testing/selftests/cgroup/Makefile      |  25 +-
 tools/testing/selftests/cgroup/test_pids.c   | 302 +++++++++++++++++++
 7 files changed, 514 insertions(+), 67 deletions(-)
 create mode 100644 tools/testing/selftests/cgroup/test_pids.c


base-commit: 026e680b0a08a62b1d948e5a8ca78700bfac0e6e
-- 
2.44.0





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux