1 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2023-2024 Oracle. All Rights Reserved.
4 # Author: Darrick J. Wong <djwong@kernel.org>
7 Description=bcachefsck background service slice
12 # If the CPU usage cgroup controller is available, don't use more than 60% of a
13 # single core for all background processes.
18 # As of systemd 249, the systemd cgroupv2 configuration code will drop resource
19 # controllers from the root and system.slice cgroups at startup if it doesn't
20 # find any direct dependencies that require a given controller. Newly
21 # activated units with resource control directives are created under the system
22 # slice but do not cause a reconfiguration of the slice's resource controllers.
23 # Hence we cannot put CPUQuota= into the bcachefsck service units directly.
25 # For the CPUQuota directive to have any effect, we must therefore create an
26 # explicit definition file for the slice that systemd creates to contain the
27 # bcachefsck instance units (e.g. bcachefsck@.service) and we must configure this
28 # slice as a dependency of the system slice to establish the direct dependency