On 03/02/2018 02:38 PM, John Ferlan wrote:
On 02/22/2018 05:20 PM, Jim Fehlig wrote:
> Long ago in commit dfa1e1dd53 the scheduler weight was accidentally
> hardcoded to 1000. Weight is a setting with no unit since it is
> relative to the weight of other domains. If no weight is specified,
> libxl defaults to 256.
>
> Instead of hardcoding the weight to 1000, honor any <shares> specified
> in <cputune>. libvirt's notion of shares is synonomous to libxl's
> scheduler weight setting. If shares is unspecified, defer default
> weight setting to libxl.
>
> Removing the hardcoded weight required some test fixup. While at it,
> add an explicit test for <shares> conversion to scheduler weight.
>
> Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
> ---
>
> Honoring <shares> specified by the user is certainly desirable,
> but I'm not sure about changing the default weight. One problematic
> scenario that came to mind: Several domains started by pre-patch
> libvirtd with weight=1000, update libvirtd with patch, start more
> domains with weight=256. The pre-patch domains unknowingly have
> a weight nearly 4 times that of post-patch domains.
Put 'em all on a diet. Don't try to do it overnight though because that
never works and it makes them all hangry... Slowly try to have them
lose weight over the course a few months and in no time they'll be slim,
trim, and less cumbersome. Whether they'll be happy - who knows ;-)
Heh, funny :-).
I'll manage this downstream by ensuring the patch only lands in a new product
release, where no domains will be running when libvirt is installed.
>
> src/libxl/libxl_conf.c | 4 +-
> tests/libxlxml2domconfigdata/basic-hvm.json | 2 +-
> tests/libxlxml2domconfigdata/basic-pv.json | 2 +-
> tests/libxlxml2domconfigdata/cpu-shares-hvm.json | 89 ++++++++++++++++++++++
> tests/libxlxml2domconfigdata/cpu-shares-hvm.xml | 39 ++++++++++
> tests/libxlxml2domconfigdata/moredevs-hvm.json | 2 +-
> tests/libxlxml2domconfigdata/multiple-ip.json | 2 +-
> .../libxlxml2domconfigdata/variable-clock-hvm.json | 2 +-
> tests/libxlxml2domconfigdata/vnuma-hvm.json | 2 +-
> tests/libxlxml2domconfigtest.c | 1 +
> 10 files changed, 138 insertions(+), 7 deletions(-)
>
Perhaps this is a "news" worthy type change along with the caveat about
those more weighty domains that were allowed to feed at the trough
without being limited.
I've sent a patch to add a news entry, including a short description of the
potential problem + mitigation
https://www.redhat.com/archives/libvir-list/2018-March/msg01336.html
Regards,
Jim