new interface to control emulator_period/emulator_quota

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
This commit is contained in:
Hu Tao 2012-08-21 17:18:43 +08:00 committed by Daniel Veillard
parent b65dafa812
commit e051c482aa
2 changed files with 27 additions and 8 deletions

View File

@ -679,18 +679,36 @@ 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:
*

View File

@ -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>]