Skip to content

feat(libcgroups): Support sub-cgroups for unified systemd cgroup manager#3563

Open
logica0419 wants to merge 6 commits into
youki-dev:mainfrom
logica0419:systemd-dbus-sub-cgroup
Open

feat(libcgroups): Support sub-cgroups for unified systemd cgroup manager#3563
logica0419 wants to merge 6 commits into
youki-dev:mainfrom
logica0419:systemd-dbus-sub-cgroup

Conversation

@logica0419

@logica0419 logica0419 commented May 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds support for sub-cgroups in the unified systemd cgroup manager.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test updates
  • CI/CD related changes
  • Other (please describe):

Testing

  • Added new unit tests
  • Added new integration tests
  • Ran existing test suite
  • Tested manually (please provide steps)

Related Issues

fixes #3565
refs #3342
refs #3347
dependent #3564

Additional Context

#3347 (comment)

Signed-off-by: Takuto Nagami <logica0419@gmail.com>
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
Signed-off-by: Takuto Nagami <logica0419@gmail.com>
Copilot AI review requested due to automatic review settings May 27, 2026 18:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for sub-cgroup paths within systemd-managed cgroups by extracting a sub-cgroup suffix from the unit name and propagating it through cgroup path construction and process addition.

Changes:

  • New extract_sub_cgroup helper that splits a name like {id}/sub/init into base name and sub-cgroup suffix.
  • construct_cgroups_path and add_task updated to incorporate the sub-cgroup path.
  • New unit tests for sub-cgroup extraction and path construction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@logica0419

Copy link
Copy Markdown
Contributor Author

Although I worked on this as part of #3564, I’ve opened a separate issue for this PR since the enhancement is necessary regardless of the approach we take.

@logica0419 logica0419 changed the title Support sub-cgroups for unified systemd cgroup manager feat(libcgroup): Support sub-cgroups for unified systemd cgroup manager May 27, 2026
@logica0419 logica0419 changed the title feat(libcgroup): Support sub-cgroups for unified systemd cgroup manager feat(libcgroups): Support sub-cgroups for unified systemd cgroup manager May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: sub-cgroup is not supported for unified systemd (D-Bus) cgroup manager

3 participants