218170a sysctl-util: minimize side-effects when running `systemd-sysctl`

1 file Authored by Antony Deepak Thomas 2 years ago, Committed by anitazha 2 years ago,
    sysctl-util: minimize side-effects when running `systemd-sysctl`
    
    Currently `systemd-sysctl` binary is used in `systemd-sysctl.service`
    which is mostly configured as `oneshot`. There are situations where one
    would like to use systemd to maintain Sysctl configurations on a host,
    using a configuration managers such as Chef or Puppet, by apply
    configurations every X duration.
    The problem with using `systemd-sysctl` is that it writes all the Sysctl
    settings, even if the values for those settings have not changed. From
    experience, we have observed that some Sysctl settings cause actions in
    the kernel upon writing(like dropping caches) which in turn cause
    undesired side effects.
    This patch tries to minimize such side effects by comparing values
    before writing.
    
        
file modified
+5 -14