]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #20522 from yuwata/cgroup-fix
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Dec 2021 09:24:44 +0000 (10:24 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Dec 2021 09:24:44 +0000 (10:24 +0100)
core/cgroup: fix io.weight and blkio.weight

1  2 
src/core/cgroup.c

index 5c2c9ed54ea4162d831f772e343acf651a88cb46,fa397ba84983ffbf953cc41df5c5d1603b312826..f58de95a49196c471b7bb889c13d1e63dc729ff3
  #include "string-util.h"
  #include "virt.h"
  
 +#if BPF_FRAMEWORK
 +#include "bpf-dlopen.h"
 +#include "bpf-link.h"
 +#include "bpf/restrict_fs/restrict-fs-skel.h"
 +#endif
 +
  #define CGROUP_CPU_QUOTA_DEFAULT_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
  
+ /* Special values for the bfq.weight attribute */
+ #define CGROUP_BFQ_WEIGHT_INVALID UINT64_MAX
+ #define CGROUP_BFQ_WEIGHT_MIN UINT64_C(1)
+ #define CGROUP_BFQ_WEIGHT_MAX UINT64_C(1000)
+ #define CGROUP_BFQ_WEIGHT_DEFAULT UINT64_C(100)
  /* Returns the log level to use when cgroup attribute writes fail. When an attribute is missing or we have access
   * problems we downgrade to LOG_DEBUG. This is supposed to be nice to container managers and kernels which want to mask
   * out specific attributes from us. */