Commit Graph

10 Commits

Author SHA1 Message Date
Pavel Hrdina
184245f53b vircgroup: introduce nested cgroup to properly work with systemd
When running on host with systemd we register VMs with machined.
In this case systemd creates the root VM cgroup for us. This has some
implications where one of them is that systemd owns all files inside
the root VM cgroup and we should not touch them.

We already use DBus calls for some of the APIs but for the remaining
ones we will continue accessing the files directly. Systemd doesn't
support threaded cgroups so we need to do this.

The reason why we don't use DBus for most of the APIs is that we already
have a code that works with files and we would have to check if systemd
supports each API.

This change introduces new topology on systemd hosts:

$ROOT
  |
  +- machine.slice
     |
     +- machine-qemu\x2d1\x2dvm1.scope
        |
        +- libvirt
           |
           +- emulator
           +- vcpu0
           +- vcpu0

compared to the previous topology:

$ROOT
  |
  +- machine.slice
     |
     +- machine-qemu\x2d1\x2dvm1.scope
        |
        +- emulator
        +- vcpu0
        +- vcpu0

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-02-10 13:37:12 +01:00
Miguel Ángel Arruga Vivas
ddcb33bdc0 doc: cgroups: Remove unwanted references to systemd
The non-systemd configurations do not create system neither user
control groups.  The title of the diagram referenced systemd too.

Signed-off-by: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2019-11-15 15:45:20 +01:00
Pavel Hrdina
7966414194 docs: Update how we create cgroup directory names
Commit <c3bd0019c0> changed the way how cgroup directory names are
constructed but the documentation was not updated.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-08-13 11:53:53 +02:00
Pavel Hrdina
9c29690478 docs: List cpuacct in controllers used by QEMU driver
The cpuacct controller is used to get cpu stats.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-08-13 11:53:53 +02:00
Daniel P. Berrange
b1c81567c7 docs: switch to using HTML5 doctype declaration
The HTML5 doctype is simply

  <!DOCTYPE html>

no DTD is present because HTML5 is no longer defined as an
extension of SGML.

XSL has no way to natively output a doctype without a public
or system identifier, so we have to use an <xsl:text> hack
instead.

See also

  https://dev.w3.org/html5/html-author/#doctype-declaration

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 17:00:11 +01:00
Daniel P. Berrange
4e42ff6b7e docs: switch to using 'id' attribute instead of 'name' for links
The 'name' attribute on <a...> elements is deprecated in favour
of the 'id' attribute which is allowed on any element. HTML5
drops 'name' support entirely.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 17:00:11 +01:00
Michal Privoznik
c215520578 cgroups.html.in: Kill useless spaces in <pre/>
The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-11-14 11:03:34 +01:00
Jean-Baptiste Rouault
03c96787c2 docs: cgroups: fix typo about LXC cgroups 2014-03-27 06:52:20 -06:00
Daniel P. Berrange
7f2b173feb Improve cgroups docs to cover systemd integration
As of libvirt 1.1.1 and systemd 205, the cgroups layout used by
libvirt has some changes. Update the 'cgroups.html' file from
the website to describe how it works in a systemd world.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-12 11:23:00 +00:00
Daniel P. Berrange
486a86eb18 Add docs about cgroups layout and usage
Describe the new cgroups layout, how to customize placement
of guests and what virsh commands are used to access the
parameters.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-05-13 12:04:42 +01:00