1. 15 11月, 2019 1 次提交
    • P
      vircgroup: workaround devices in hybrid mode · c359cb9a
      Pavel Hrdina 提交于
      So the issue here is that you can end up with configuration where
      you have cgroup v1 and v2 enabled at the same time and the devices
      controllers is enabled for cgroup v1.
      
      In cgroup v2 there is no devices controller, the device access is
      controlled using BPF and since it is not a cgroup controller both
      of them can exists at the same time and both of them are applied while
      resolving access to devices.
      
      In order to avoid configuring both BPF and cgroup v1 devices we will
      use BPF if possible and otherwise fallback to cgroup v1 devices.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      c359cb9a
  2. 12 11月, 2019 1 次提交
  3. 21 10月, 2019 2 次提交
  4. 17 10月, 2019 1 次提交
  5. 16 10月, 2019 1 次提交
  6. 15 10月, 2019 1 次提交
  7. 14 10月, 2019 1 次提交
  8. 28 9月, 2019 1 次提交
  9. 25 7月, 2019 3 次提交
  10. 19 7月, 2019 1 次提交
  11. 28 6月, 2019 2 次提交
  12. 26 6月, 2019 2 次提交
  13. 21 6月, 2019 2 次提交
  14. 25 4月, 2019 1 次提交
    • P
      vircgroup: no need to ifdef virCgroupFree · 9470815d
      Pavel Hrdina 提交于
      virCgroup struct is always defined and the free function is not calling
      anything that would require OS supporting cgroups.
      
      This fixes an issue if we try to start a VM with QEMU binary that
      doesn't support QXL.  The start operation will fail in
      qemuProcessStartValidateVideo() which will set correct error message,
      but later in one of the cleanup paths we will call
      qemuDomainObjPrivateDataClear() which always calls virCgroupFree()
      and that will fail on OS that doesn't support cgroups and it will
      set a new error which will be eventually reported to user.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      9470815d
  15. 12 4月, 2019 1 次提交
  16. 07 2月, 2019 1 次提交
  17. 04 2月, 2019 1 次提交
  18. 14 12月, 2018 3 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • P
      vircgroup: introduce virCgroupKillRecursiveCB · b5325468
      Pavel Hrdina 提交于
      The rewrite to support cgroup v2 missed this function.  In cgroup v2
      we have different files to track tasks.
      
      We would fail to remove cgroup on non-systemd OSes if there is any
      extra process assigned to guest cgroup because we would not kill any
      process form the guest cgroup.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b5325468
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  19. 05 12月, 2018 1 次提交
  20. 05 10月, 2018 3 次提交
    • P
      vircgroup: add support for hybrid configuration · b79d8585
      Pavel Hrdina 提交于
      This enables to use both cgroup v1 and v2 at the same time together
      with libvirt.  It is supported by kernel and there is valid use-case,
      not all controllers are implemented in cgroup v2 so there might be
      configurations where administrator would enable these missing
      controllers in cgroup v1.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b79d8585
    • P
      vircgroup: introduce virCgroupV2MakeGroup · 89f52abd
      Pavel Hrdina 提交于
      When creating cgroup hierarchy we need to enable controllers in the
      parent cgroup in order to be usable.  That means writing "+{controller}"
      into cgroup.subtree_control file.  We can enable only controllers that
      are enabled for parent cgroup, that means we need to do that for the
      whole cgroup tree.
      
      Cgroups for threads needs to be handled differently in cgroup v2.  There
      are two types of controllers:
      
          - domain controllers: these cannot be enabled for threads
          - threaded controllers: these can be enabled for threads
      
      In addition there are multiple types of cgroups:
      
          - domain: normal cgroup
          - domain threaded: a domain cgroup that serves as root for threaded
                             cgroups
          - domain invalid: invalid cgroup, can be changed into threaded, this
                            is the default state if you create subgroup inside
                            domain threaded group or threaded group
          - threaded: threaded cgroup which can have domain threaded or
                      threaded as parent group
      
      In order to create threaded cgroup it's sufficient to write "threaded"
      into cgroup.type file, it will automatically make parent cgroup
      "domain threaded" if it was only "domain".  In case the parent cgroup
      is already "domain threaded" or "threaded" it will modify only the type
      of current cgroup.  After that we can enable threaded controllers.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      89f52abd
    • P
      util: introduce cgroup v2 files · b4ddf5ae
      Pavel Hrdina 提交于
      Place cgroup v2 backend type before cgroup v1 to make it obvious
      that cgroup v2 is preferred implementation.
      
      Following patches will introduce support for hybrid configuration
      which will allow us to use both at the same time, but we should
      prefer cgroup v2 regardless.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b4ddf5ae
  21. 29 9月, 2018 1 次提交
  22. 27 9月, 2018 2 次提交
  23. 25 9月, 2018 7 次提交