Resctrl support in libvirt currently associates allocations and monitors
with a set of vCPUs. This does not account for resource consumption by
QEMU IOThreads, worker threads and emulator threads.
Allow cachetune, memorytune, energytune and their monitor elements to
omit the vcpus attribute and apply to the whole QEMU process. Assigning
the emulator process to the resctrl group before it creates threads lets
all subsequently created threads inherit the same configuration.
Whole-process and per-vCPU allocations cannot be mixed within a domain.
A monitor without vcpus inherits its enclosing allocation's scope. Thus,
it monitors the whole process under a whole-process allocation and the
allocation's vCPU set under a per-vCPU allocation.
This series was previously posted as:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/QFXZZOHRSAUIUZYANHKRAXPBDQH2OSKM/
Changes since v1:
- Rebased onto current master.
- Split the independent resctrl domstats fixes into a separate series.
- Added Christopher's Reviewed-by.
- Dropped the NEWS patch.
Jedrzej Wasiukiewicz (4):
conf: allow omitting vcpus in cachetune/memorytune/energytune
conf: implement whole-process resctrl scope
qemu: assign whole-process resctrl groups at domain start
qemu: omit vcpus for whole-process resctrl monitor stats
docs/formatdomain.rst | 57 +++--
src/conf/domain_conf.c | 231 ++++++++++++------
src/conf/domain_conf.h | 2 +
src/conf/schemas/domaincommon.rng | 48 ++--
src/qemu/qemu_driver.c | 24 +-
src/qemu/qemu_process.c | 40 ++-
src/util/virresctrl.c | 10 +-
.../cachetune-monitor-empty-vcpus.xml | 30 +++
.../cachetune-monitor-inherit-alloc.xml | 30 +++
.../cachetune-wholeprocess-duplicate.xml | 32 +++
...chetune-wholeprocess-monitor-duplicate.xml | 31 +++
.../cachetune-wholeprocess-monitors.xml | 31 +++
.../energytune-colliding-monitor.xml | 30 +++
.../energytune-wholeprocess.xml | 29 +++
.../memorytune-wholeprocess.xml | 29 +++
.../resctrl-wholeprocess-alloc-monitor.xml | 32 +++
.../resctrl-wholeprocess-layering.xml | 32 +++
.../resctrl-wholeprocess-monitors.xml | 33 +++
.../cachetune-monitor-inherit-alloc.xml | 30 +++
tests/genericxml2xmltest.c | 11 +
20 files changed, 662 insertions(+), 130 deletions(-)
create mode 100644 tests/genericxml2xmlindata/cachetune-monitor-empty-vcpus.xml
create mode 100644 tests/genericxml2xmlindata/cachetune-monitor-inherit-alloc.xml
create mode 100644 tests/genericxml2xmlindata/cachetune-wholeprocess-duplicate.xml
create mode 100644 tests/genericxml2xmlindata/cachetune-wholeprocess-monitor-duplicate.xml
create mode 100644 tests/genericxml2xmlindata/cachetune-wholeprocess-monitors.xml
create mode 100644 tests/genericxml2xmlindata/energytune-colliding-monitor.xml
create mode 100644 tests/genericxml2xmlindata/energytune-wholeprocess.xml
create mode 100644 tests/genericxml2xmlindata/memorytune-wholeprocess.xml
create mode 100644 tests/genericxml2xmlindata/resctrl-wholeprocess-alloc-monitor.xml
create mode 100644 tests/genericxml2xmlindata/resctrl-wholeprocess-layering.xml
create mode 100644 tests/genericxml2xmlindata/resctrl-wholeprocess-monitors.xml
create mode 100644 tests/genericxml2xmloutdata/cachetune-monitor-inherit-alloc.xml
--
2.43.0
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.