<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Hi Michal,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Thank you for your reply. I can grasp the point.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Please let me ask more questions if I think of any.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Besides, I will fix the name of slice in the picture soon.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
BR-Matthew</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>From:</b> Michal Koutný<br>
<b>Sent:</b> Monday, June 30, 2025 1:45 PM<br>
<b>To:</b> Matthew Chae<br>
<b>Cc:</b> systemd-devel@lists.freedesktop.org; Christopher Wong; Fredrik Hugosson; Umut Tezduyar Lindskog<br>
<b>Subject:</b> Re: [systemd-devel] Question about the systemd slice hierarchy </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-size: 11pt;">Hello.<br>
<br>
On Mon, Jun 30, 2025 at 07:45:53AM +0000, Matthew Chae <Matthew.Chae@axis.com> wrote:<br>
> I have some questions about "Example 1. Enabling and disabling controllers" from the slice-related man page linked below.<br>
> <a href="https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#" target="_blank" id="OWA7a6769cf-8e08-4f03-7a48-cdbf844d51b0" class="OWAAutoLink" rel="noopener noreferrer" data-auth="NotApplicable">
https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#</a><br>
><br>
> First, under system.slice, there is a slice named b.slice. Is this possible?<br>
<br>
No, the name encodes the path in reality.<br>
<br>
> Shouldn't it be named system-b.slice instead?<br>
<br>
That would be indeed the proper name of the slice that is pictured<br>
there. You can fix it here [1] :-)<br>
<br>
> Second, under user.slice, there's a user@1000.service, and under that,<br>
> there are app.slice and session.slice.<br>
<br>
If you check user@.service definition, you find that it sets Delegate=<br>
-- this means that the service as seen from PID1 perspective was<br>
delegated the manipulation of its (service's) cgroup subtree.<br>
<br>
> Can a slice like app.slice exist under a service unit like user@1000.service?<br>
<br>
This app.slice is a slice unit of the _user_ instance of systemd. It's<br>
full system path would be:<br>
/user.slice/user-1000.slice/user@1000.service/app.slice<br>
<br>
(app.slice is a random internal subcgroup for PID1)<br>
<br>
> If that's possible, what would be a use case for this kind of structure?<br>
<br>
It's turtles all the way down. One use case is structuring of processes<br>
by user's desktop environment, some more info is in [2].<br>
<br>
HTH,<br>
Michal<br>
<br>
<br>
[1] <a href="https://github.com/systemd/systemd/blob/main/man/systemd.resource-control.xml" target="_blank" id="OWA4732ce65-c599-829e-7dfd-313ffb58891c" class="OWAAutoLink" rel="noopener noreferrer" data-auth="NotApplicable">
https://github.com/systemd/systemd/blob/main/man/systemd.resource-control.xml</a><br>
[2] <a href="https://systemd.io/DESKTOP_ENVIRONMENTS/" target="_blank" id="OWAd2c409f0-abd0-6f11-bc47-cf22b26d66db" class="OWAAutoLink" rel="noopener noreferrer" data-auth="NotApplicable">
https://systemd.io/DESKTOP_ENVIRONMENTS/</a><br>
</div>
</body>
</html>