libvirt/src/qemu
Michal Privoznik f136b83139 qemu: Rework setting process affinity
https://bugzilla.redhat.com/show_bug.cgi?id=1503284

The way we currently start qemu from CPU affinity POV is as
follows:

  1) the child process is set affinity to all online CPUs (unless
  some vcpu pinning was given in the domain XML)

  2) Once qemu is running, cpuset cgroup is configured taking
  memory pinning into account

Problem is that we let qemu allocate its memory just anywhere in
1) and then rely in 2) to be able to move the memory to
configured NUMA nodes. This might not be always possible (e.g.
qemu might lock some parts of its memory) and is very suboptimal
(copying large memory between NUMA nodes takes significant amount
of time).

The solution is to set affinity to one of (in priority order):
  - The CPUs associated with NUMA memory affinity mask
  - The CPUs associated with emulator pinning
  - All online host CPUs

Later (once QEMU has allocated its memory) we then change this
again to (again in priority order):
  - The CPUs associated with emulator pinning
  - The CPUs returned by numad
  - The CPUs associated with vCPU pinning
  - All online host CPUs

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-01 12:53:46 +01:00
..
EVENTHANDLERS.txt
libvirtd_qemu.aug qemu.conf: add vnc_tls_x509_secret_uuid 2019-01-22 12:18:28 +01:00
Makefile.inc.am src/qemu: Fix indentation in Makefile.inc.am 2019-01-09 17:56:09 +01:00
MIGRATION.txt
qemu_agent.c qemu: require reply from guest agent in qemuAgentGetInterfaces 2019-01-10 12:09:48 +01:00
qemu_agent.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_alias.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
qemu_alias.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_block.c Fix minor typos in messages and docs 2018-12-05 10:39:54 +01:00
qemu_block.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_blockjob.c qemu: domain: Allow overriding disk source in qemuDomainDetermineDiskChain 2019-01-30 17:20:38 +01:00
qemu_blockjob.h qemu: improve compile-time check of qemuBlockjobState mapping 2019-01-23 16:20:25 -06:00
qemu_capabilities.c qemu: caps: Use CAP_DAC_OVERRIDE for probing to avoid permission issues 2019-02-01 12:44:28 +01:00
qemu_capabilities.h qemu: Introduce QEMU_CAPS_DEVICE_NVDIMM_UNARMED capability 2019-01-02 09:00:34 -05:00
qemu_capspriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_cgroup.c qemu: cgroup: Expose /dev/sev/ only to domains that require SEV 2019-02-01 12:40:18 +01:00
qemu_cgroup.h qemu: cgroup: Change qemu[Setup|Teardown]DiskCgroup to take virStorageSource 2019-01-30 17:20:38 +01:00
qemu_command.c qemu: pass virDomainDeviceInfo by reference 2019-01-31 10:38:36 +00:00
qemu_command.h qemuBuildControllerDevStr: remove nusbcontroller argument 2019-01-25 14:54:51 +01:00
qemu_conf.c qemu.conf: add vnc_tls_x509_secret_uuid 2019-01-22 12:18:28 +01:00
qemu_conf.h qemu.conf: add vnc_tls_x509_secret_uuid 2019-01-22 12:18:28 +01:00
qemu_domain_address.c qemu: Add PCI support for RISC-V guests 2019-02-01 11:57:50 +01:00
qemu_domain_address.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_domain.c qemu: domain: Add /dev/sev into the domain mount namespace selectively 2019-02-01 12:40:20 +01:00
qemu_domain.h qemu: pass virDomainDeviceInfo by reference 2019-01-31 10:38:36 +00:00
qemu_driver.c qemu: blockjob: Don't report block job progress at 100% if job isn't ready 2019-01-31 13:03:01 +01:00
qemu_driver.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_extdevice.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
qemu_extdevice.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_hostdev.c qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices 2019-01-11 08:52:10 -05:00
qemu_hostdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_hotplug.c qemu: hotplug: Refactor qemuHotplugPrepareDiskAccess to work on virStorageSource 2019-01-30 17:20:38 +01:00
qemu_hotplug.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_hotplugpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_interface.c conf: Add virDomainNetIsVirtioModel 2019-01-24 18:59:38 -05:00
qemu_interface.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_migration_cookie.c qemu: Add support for postcopy-requests migration statistics 2018-12-17 16:16:30 +01:00
qemu_migration_cookie.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_migration_params.c Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_migration_params.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_migration_paramspriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_migration.c lib: Use more of VIR_STEAL_PTR() 2019-01-28 14:46:58 +01:00
qemu_migration.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_monitor_json.c qemu: Process RDMA GID state change event 2019-01-09 10:26:29 +01:00
qemu_monitor_json.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_monitor_priv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_monitor_text.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
qemu_monitor_text.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_monitor.c qemu: Use ULL instead of uint64_t for RDMA GID event 2019-01-09 11:31:58 +01:00
qemu_monitor.h qemu: Use ULL instead of uint64_t for RDMA GID event 2019-01-09 11:31:58 +01:00
qemu_parse_command.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
qemu_parse_command.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_process.c qemu: Rework setting process affinity 2019-02-01 12:53:46 +01:00
qemu_process.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_processpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_qapi.c qemu: qapi: Allow selecting specifically optional schema entries in virQEMUQAPISchemaTraverse 2018-08-24 15:58:33 +02:00
qemu_qapi.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_security.c qemu: security: Replace and remove qemuSecurity[Set|Restore]DiskLabel 2019-01-30 17:20:38 +01:00
qemu_security.h qemu: security: Replace and remove qemuSecurity[Set|Restore]DiskLabel 2019-01-30 17:20:38 +01:00
qemu_tpm.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
qemu_tpm.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu.conf qemu: conf: Remove /dev/sev from the default cgroup device acl list 2019-02-01 12:39:41 +01:00
test_libvirtd_qemu.aug.in qemu: conf: Remove /dev/sev from the default cgroup device acl list 2019-02-01 12:39:41 +01:00
THREADS.txt qemu: Introduce APIs for manipulating qemuDomainAgentJob 2018-06-20 13:24:17 +02:00