Skip to content

cgroup:cpuset:separate legacy cgroup v1 code and put under config option

Chen Ridong cgroups lkml 4 versions – Applied

Status from this message: Applied the series to cgroup/for-6.12.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest12 patches 2 repliesApplied
  2. v312 patches 2 repliesSuperseded
  3. v211 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v111 patches6 repliesSuperseded

Changes in v4 from the cover letter

- Rename legacy_files to cpuset1_files.
- Revert rebuild_sched_domain and fmeter_init rename.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/12cgroup/cpuset: introduce cpuset-v1.cMAINTAINERS kernel/cgroup/Makefile kernel/cgroup/cpuset-internal.h +1 more+12 -10 replies
2/12cgroup/cpuset: move common code to cpuset-internal.hkernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset.c+236 -2350 replies
3/12cgroup/cpuset: move memory_pressure to cpuset-v1.ckernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset-v1.c kernel/cgroup/cpuset.c+141 -1340 replies
4/12cgroup/cpuset: move relax_domain_level to cpuset-v1.ckernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset-v1.c kernel/cgroup/cpuset.c+66 -610 replies
5/12cgroup/cpuset: move memory_spread to cpuset-v1.ckernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset-v1.c kernel/cgroup/cpuset.c+45 -420 replies
6/12cgroup/cpuset: add callback_lock helperkernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset.c+12 -00 replies
7/12cgroup/cpuset: move legacy hotplug update to cpuset-v1.ckernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset-v1.c kernel/cgroup/cpuset.c+98 -940 replies
8/12cgroup/cpuset: move validate_change_legacy to cpuset-v1.ckernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset-v1.c kernel/cgroup/cpuset.c+74 -730 replies
9/12cgroup/cpuset: move v1 interfaces to cpuset-v1.ckernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset-v1.c kernel/cgroup/cpuset.c+199 -1990 replies
10/12cgroup/cpuset: rename functions shared between v1 and v2kernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset-v1.c kernel/cgroup/cpuset.c+56 -560 replies
11/12cgroup/cpuset: guard cpuset-v1 code under CONFIG_CPUSETS_V1include/linux/cpuset.h init/Kconfig kernel/cgroup/Makefile +2 more+33 -10 replies
12/12cgroup/cpuset: add sefltest for cpuset v1MAINTAINERS tools/testing/selftests/cgroup/test_cpuset_v1_base.sh+78 -00 replies

Reviews trailers per patch

None of the 12 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWaiman Long
SeriesA-b
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12
12/12

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

Read the v4 thread

Cover letter [PATCH v4 -next 00/12] cgroup:cpuset:separate legacy cgroup v1 code and put under config option

Cgroups v2 have been around for a while and many users have fully adopted them, so they never use cgroups v1 features and functionality. Yet they have to "pay" for the cgroup v1 support anyway:
1) the kernel binary contains an unused cgroup v1 code,
2) some code paths have additional checks which are not needed,
3) some common structures like task_struct and mem_cgroup contain unused cgroup v1-specific members.

Cgroup memory controller has already separated legacy code to memory-v1.c. So it is time to do the same thing for cpuset controller.

This patchset aims to do:
1) moving cgroup v1-specific cpuset code to the new cpuset-v1.c file,
2) putting definitions shared by cpuset.c and cpuset-v1.c into the cpuset-internal.h header,
3) introducing the CONFIG_CPUSETS_V1 config option, turned off by default,
4) making cpuset-v1.c to compile only if CONFIG_CPUSETS_V1 is set.

---
V4:
- Rename legacy_files to cpuset1_files.
- Revert rebuild_sched_domain and fmeter_init rename.

V3:
- Delete blank line at the end of file.
- Rename some generic functions name with cpuset_/cpuset1_ prefix.

V2:
- Update to base on the latest cgroup/for-6.12.
- Add CONFIG_CPUSETS_V1 for cpuset_memory_pressure_bump.

Chen Ridong (12):
cgroup/cpuset: introduce cpuset-v1.c cgroup/cpuset: move common code to cpuset-internal.h cgroup/cpuset: move memory_pressure to cpuset-v1.c cgroup/cpuset: move relax_domain_level to cpuset-v1.c cgroup/cpuset: move memory_spread to cpuset-v1.c cgroup/cpuset: add callback_lock helper cgroup/cpuset: move legacy hotplug update to cpuset-v1.c cgroup/cpuset: move validate_change_legacy to cpuset-v1.c cgroup/cpuset: move v1 interfaces to cpuset-v1.c cgroup/cpuset: rename functions shared between v1 and v2 cgroup/cpuset: guard cpuset-v1 code under CONFIG_CPUSETS_V1 cgroup/cpuset: add sefltest for cpuset v1

 MAINTAINERS                                   |   3 +
 include/linux/cpuset.h                        |   4 +
 init/Kconfig                                  |  13 +
 kernel/cgroup/Makefile                        |   1 +
 kernel/cgroup/cpuset-internal.h               | 304 ++++++
 kernel/cgroup/cpuset-v1.c                     | 562 +++++++++++
 kernel/cgroup/cpuset.c                        | 892 +-----------------
 .../selftests/cgroup/test_cpuset_v1_base.sh   |  77 ++
 8 files changed, 1005 insertions(+), 851 deletions(-)
 create mode 100644 kernel/cgroup/cpuset-internal.h
 create mode 100644 kernel/cgroup/cpuset-v1.c
 create mode 100755 tools/testing/selftests/cgroup/test_cpuset_v1_base.sh
Signature · 1 line
2.34.1