This patch adds two macros: VIR_DOMAIN_SCHEDULER_EMULATOR_PERIOD, VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA for controlling cpu bandwidth for emulator activities not tied to vcpus --- include/libvirt/libvirt.h.in | 24 +++++++++++++++++++++--- tools/virsh.pod | 11 ++++++----- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 43774eb..cfe5047 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -679,19 +679,37 @@ typedef virTypedParameter *virTypedParameterPtr; * VIR_DOMAIN_SCHEDULER_VCPU_PERIOD: * * Macro represents the enforcement period for a quota, in microseconds, - * when using the posix scheduler, as a ullong. + * for vcpus only, when using the posix scheduler, as a ullong. */ #define VIR_DOMAIN_SCHEDULER_VCPU_PERIOD "vcpu_period" /** * VIR_DOMAIN_SCHEDULER_VCPU_QUOTA: * - * Macro represents the maximum bandwidth to be used within a period, - * when using the posix scheduler, as an llong. + * Macro represents the maximum bandwidth to be used within a period for + * vcpus only, when using the posix scheduler, as an llong. */ #define VIR_DOMAIN_SCHEDULER_VCPU_QUOTA "vcpu_quota" /** + * VIR_DOMAIN_SCHEDULER_EMULATOR_PERIOD: + * + * Macro represents the enforcement period for a quota in microseconds, + * when using the posix scheduler, for all emulator activity not tied to + * vcpus, as a ullong. + */ +#define VIR_DOMAIN_SCHEDULER_EMULATOR_PERIOD "emulator_period" + +/** + * VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA: + * + * Macro represents the maximum bandwidth to be used within a period for + * all emulator activity not tied to vcpus, when using the posix scheduler, + * as an llong. + */ +#define VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA "emulator_quota" + +/** * VIR_DOMAIN_SCHEDULER_WEIGHT: * * Macro represents the relative weight, when using the credit diff --git a/tools/virsh.pod b/tools/virsh.pod index ec3c331..e932d7c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1202,7 +1202,8 @@ available for each hypervisor are: LXC (posix scheduler) : cpu_shares -QEMU/KVM (posix scheduler): cpu_shares, vcpu_period, vcpu_quota +QEMU/KVM (posix scheduler): cpu_shares, vcpu_period, vcpu_quota, +emulator_period, emulator_quota Xen (credit scheduler): weight, cap @@ -1220,10 +1221,10 @@ values 0 and 1 are automatically converted to a minimal value of 2. B<Note>: The weight and cap parameters are defined only for the XEN_CREDIT scheduler and are now I<DEPRECATED>. -B<Note>: The vcpu_period parameter has a valid value range of 1000-1000000 or -0, and the vcpu_quota parameter has a valid value range of -1000-18446744073709551 or less than 0. The value 0 for either parameter is -the same as not specifying that parameter. +B<Note>: The vcpu_period/emulator_period parameters have a valid value range +of 1000-1000000 or 0, and the vcpu_quota/emulator_quota parameters have a +valid value range of 1000-18446744073709551 or less than 0. The value 0 for +either parameter is the same as not specifying that parameter. =item B<screenshot> I<domain> [I<imagefilepath>] [I<--screen> B<screenID>] -- 1.7.10.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list