ed264d core: introduce support for cgroup freezer

18 files Authored by Michal Sekletár 4 years ago, Committed by Packit Service 4 years ago,
    core: introduce support for cgroup freezer
    
    With cgroup v2 the cgroup freezer is implemented as a cgroup
    attribute called cgroup.freeze. cgroup can be frozen by writing "1"
    to the file and kernel will send us a notification through
    "cgroup.events" after the operation is finished and processes in the
    cgroup entered quiescent state, i.e. they are not scheduled to
    run. Writing "0" to the attribute file does the inverse and process
    execution is resumed.
    
    This commit exposes above low-level functionality through systemd's DBus
    API. Each unit type must provide specialized implementation for these
    methods, otherwise, we return an error. So far only service, scope, and
    slice unit types provide the support. It is possible to check if a
    given unit has the support using CanFreeze() DBus property.
    
    Note that DBus API has a synchronous behavior and we dispatch the reply
    to freeze/thaw requests only after the kernel has notified us that
    requested operation was completed.
    
    (cherry picked from commit d9e45bc3abb8adf5a1cb20816ba8f2d2aa65b17e)
    
    Resolves: #1830861
    
    patch_name: 0424-core-introduce-support-for-cgroup-freezer.patch
    present_in_specfile: true
    location_in_specfile: 424
    squash_commits: true
    
        
file modified
+24 -0
file modified
+15 -3
file modified
+1 -0
file modified
+9 -0
file modified
+12 -0
file modified
+97 -8
file modified
+12 -0
file modified
+50 -0
file modified
+96 -0
file modified
+3 -0
file modified
+6 -1
file modified
+3 -0
file modified
+3 -0
file modified
+80 -0
file modified
+123 -0
file modified
+20 -0
file modified
+104 -1