Commit Graph

6 Commits

Author SHA1 Message Date
Kir Kolyshkin
a09e703853 docs/systemd.md: amend
Include some important previously missed detail about how
linux.cgroupsPath works.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-07-01 18:15:05 -07:00
ver4a
171304c8a3 docs/systemd: fix a broken link
Documentation was moved from https://docs.gtk.org/glib/gvariant-text.html to https://docs.gtk.org/glib/gvariant-text-format.html.

Signed-off-by: ver4a <verca@uncontrol.me>
2024-08-07 00:27:57 +02:00
Kir Kolyshkin
73b5dc027d docs/systemd: fix a broken link
Apparently, developer.gnome.org/documentation no longer hosts the
documentation we used to refer to. Link to docs.gtk.org instead.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-12 16:10:06 -07:00
Kir Kolyshkin
ed9651bc71 libct/cg/sd: support setting cpu.idle via systemd
Systemd v252 (available in CentOS Stream 9 in our CI) added support
for setting cpu.idle (see [1]). The way it works is:
 - if CPUWeight == 0, cpu.idle is set to 1;
 - if CPUWeight != 0, cpu.idle is set to 0.

This commit implements setting cpu.idle in systemd cgroup driver via a
unit property. In case CPUIdle is set to non-zero value, the driver sets
adds CPUWeight=0 property, which will result in systemd setting cpu.idle
to 1.

Unfortunately, there's no way to set cpu.idle to 0 without also changing
the CPUWeight value, so the driver doesn't do anything if CPUIdle is
explicitly set to 0. This case is handled by the fs driver which is
always used as a followup to setting systemd unit properties.

Also, handle cpu.idle set via unified map. In case it is set to non-zero
value, add CPUWeight=0 property, and ignore cpu.weight (otherwise we'll
get two different CPUWeight properties set).

Add a unit test for new values in unified map, and an integration test case.

[1] https://github.com/systemd/systemd/pull/23299
[2] https://github.com/opencontainers/runc/issues/3786

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-04-03 18:25:07 -07:00
Kir Kolyshkin
75761bccf7 Fix codespell warnings, add codespell to ci
The two exceptions I had to add to codespellrc are:
 - CLOS (used by intelrtd);
 - creat (syscall name used in tests/integration/testdata/seccomp_*.json).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-08-17 16:12:35 -07:00
Kir Kolyshkin
44611630a5 docs/systemd: add
1. Move docs/systemd-properties.md to docs/systemd.md

2. Document the cgroupsPath to systemd unit name and slice conversion
   rules, as well as mapping of OCI runtime spec resource limits to
   systemd unit properties.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-04-01 19:50:47 -07:00