diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-06-17 21:33:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-06-17 21:36:51 +0200 |
commit | a016b9228f338cb9b380ce7e00826ef462767d98 (patch) | |
tree | 515b85e7fb384bc186374067554baf233897a9d3 /src/core/service.c | |
parent | c647f10918940b5d11870df6d008c6c3180bdc41 (diff) |
core: add new .slice unit type for partitioning systems
In order to prepare for the kernel cgroup rework, let's introduce a new
unit type to systemd, the "slice". Slices can be arranged in a tree and
are useful to partition resources freely and hierarchally by the user.
Each service unit can now be assigned to one of these slices, and later
on login users and machines may too.
Slices translate pretty directly to the cgroup hierarchy, and the
various objects can be assigned to any of the slices in the tree.
Diffstat (limited to 'src/core/service.c')
-rw-r--r-- | src/core/service.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/service.c b/src/core/service.c index dadd98123c..ac8cdb2c31 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1225,6 +1225,10 @@ static int service_load(Unit *u) { if (r < 0) return r; + r = unit_add_default_slice(u); + if (r < 0) + return r; + r = unit_add_default_cgroups(u); if (r < 0) return r; |