Honor DelegateSubgroup for PIDs in StartTransientUnit

オープン
#44,639 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, linux

調査の方向性

Start by tracing how StartTransientUnit handles scope properties, PIDs, and DelegateSubgroup, then compare that path with AttachProcessesToUnit, which the issue says requires the subcgroup to exist already. Identify the relevant implementation and tests before changing behavior. Done means the specified PIDs enter the requested subgroup when creating a scope, with tests covering the behavior.

索引モデルが issue の本文から書いたものです。

説明

pid1 RFE 🎁
Component

systemd

Is your feature request related to a problem? Please describe

I want to put processes into a cgroup to limit their memory usage. Specifically image loaders processes for glycin. To use controllers in the cgroup/scope I create with StartTransientUnit, I manually have to create a new subcgroup via /sys/fs/cgroup and then move the process there.

Describe the solution you'd like

Just put the specified PIDs in the DelegateSubgroup when creating a scope with StartTransientUnit.

Describe alternatives you've considered

I tried the undocumented (but listed) AttachProcessesToUnit. But it expects the subcgroup to already exist. Manually creating the subcgroup and then moving it required to use non-dbus API mixed with D-Bus API and is needless extra code.

The systemd version you checked that didn't have the feature you are asking for

262

主要言語
C
スター
17k
フォーク
4.8k
平均マージ
2日 10時間
マージ済み PR(30日)
342

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

systemd/systemd のほかの issue

systemd/systemd の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。