mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
rename cfs_* to vcpu_*
In the XML file we now have <cputune> <shares>1024</shares> <period>90000</period> <quota>0</quota> </cputune> But the schedinfo parameter are being named cpu_shares: 1024 cfs_period: 90000 cfs_quota: 0 The period/quota is per-vcpu value, so these new tunables should be named 'vcpu_period' and 'vcpu_quota'.
This commit is contained in:
parent
d0e83bd84f
commit
2a667c34cb
@ -6188,10 +6188,10 @@ static int qemuSetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||||
vmdef->cputune.shares = params[i].value.ul;
|
vmdef->cputune.shares = params[i].value.ul;
|
||||||
}
|
}
|
||||||
} else if (STREQ(param->field, "cfs_period")) {
|
} else if (STREQ(param->field, "vcpu_period")) {
|
||||||
if (param->type != VIR_TYPED_PARAM_ULLONG) {
|
if (param->type != VIR_TYPED_PARAM_ULLONG) {
|
||||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
_("invalid type for cfs_period tunable,"
|
_("invalid type for vcpu_period tunable,"
|
||||||
" expected a 'ullong'"));
|
" expected a 'ullong'"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -6208,10 +6208,10 @@ static int qemuSetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||||
vmdef->cputune.period = params[i].value.ul;
|
vmdef->cputune.period = params[i].value.ul;
|
||||||
}
|
}
|
||||||
} else if (STREQ(param->field, "cfs_quota")) {
|
} else if (STREQ(param->field, "vcpu_quota")) {
|
||||||
if (param->type != VIR_TYPED_PARAM_LLONG) {
|
if (param->type != VIR_TYPED_PARAM_LLONG) {
|
||||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
_("invalid type for cfs_quota tunable,"
|
_("invalid type for vcpu_quota tunable,"
|
||||||
" expected a 'llong'"));
|
" expected a 'llong'"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -6470,10 +6470,10 @@ out:
|
|||||||
if (*nparams > saved_nparams) {
|
if (*nparams > saved_nparams) {
|
||||||
params[1].value.ul = period;
|
params[1].value.ul = period;
|
||||||
params[1].type = VIR_TYPED_PARAM_ULLONG;
|
params[1].type = VIR_TYPED_PARAM_ULLONG;
|
||||||
if (virStrcpyStatic(params[1].field, "cfs_period") == NULL) {
|
if (virStrcpyStatic(params[1].field, "vcpu_period") == NULL) {
|
||||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s",
|
"%s",
|
||||||
_("Field cfs_period too long for destination"));
|
_("Field vcpu_period too long for destination"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
saved_nparams++;
|
saved_nparams++;
|
||||||
@ -6482,10 +6482,10 @@ out:
|
|||||||
if (*nparams > saved_nparams) {
|
if (*nparams > saved_nparams) {
|
||||||
params[2].value.ul = quota;
|
params[2].value.ul = quota;
|
||||||
params[2].type = VIR_TYPED_PARAM_LLONG;
|
params[2].type = VIR_TYPED_PARAM_LLONG;
|
||||||
if (virStrcpyStatic(params[2].field, "cfs_quota") == NULL) {
|
if (virStrcpyStatic(params[2].field, "vcpu_quota") == NULL) {
|
||||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s",
|
"%s",
|
||||||
_("Field cfs_quota too long for destination"));
|
_("Field vcpu_quota too long for destination"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
saved_nparams++;
|
saved_nparams++;
|
||||||
|
Loading…
Reference in New Issue
Block a user