Bug 950478
Summary: | if the value of 'swap-hard-limit' smaller than the existing vaule of 'hard-limit', memtune can not set them together | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | EricLee <bili> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | acathrow, cwei, dallan, dyuan, gsun, lcui, mzhan |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.0.5-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-13 09:44:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
EricLee
2013-04-10 09:57:48 UTC
Fixed upstream in v1.0.4-235-gfa006c4 by: commit fa006c4fdd8c8580bca3db1436e3201350e973f4 Author: Peter Krempa <pkrempa> Date: Wed Apr 17 17:50:56 2013 +0200 qemu: Fix setting of memory tunables Refactoring done in 19c6ad9ac7e7eb2fd3c8262bff5f087b508ad07f didn't correctly take into account the order cgroup limit modification needs to be done in. This resulted into errors when decreasing the limits. The operations need to take place in this order: decrease hard limit change swap hard limit or change swap hard limit increase hard limit This patch also fixes the check if the hard_limit is less than swap_hard_limit to print better error messages. For this purpose I introduced a helper function virCompareLimitUlong to compare limit values where value of 0 is equal to unlimited. Additionally the check is now applied also when the user does not provide all of the tunables through the API and in that case the currently set values are used. This patch resolves: https://bugzilla.redhat.com/show_bug.cgi?id=950478 Verifying this bug: Can reproduce this bug on libvirt-1.0.4-1.1.el7.x86_64; And can not reproduce it on libvirt-1.0.5-1.el7: # virsh start r63 Domain r63 started # virsh memtune --domain r63 hard_limit : 1824256 soft_limit : unlimited swap_hard_limit: unlimited 1. decrease hard limit and change swap hard limit: # virsh memtune r63 --hard-limit 1024000 --soft-limit 1024000 --swap-hard-limit 1024000 # virsh memtune --domain r63 hard_limit : 1024000 soft_limit : 1024000 swap_hard_limit: 1024000 working well. 2.change swap hard limit and increase hard limit: # virsh memtune r63 --hard-limit 1024004 --soft-limit 1024000 --swap-hard-limit 1024008 # virsh memtune --domain r63 hard_limit : 1024004 soft_limit : 1024000 swap_hard_limit: 1024008 # virsh memtune r63 --hard-limit 1024000 --swap-hard-limit 1024004 # virsh memtune --domain r63 hard_limit : 1024000 soft_limit : 1024000 swap_hard_limit: 1024004 also working fine. 3.when hard_limit is less than swap_hard_limit: # virsh memtune r63 --hard-limit 1024008 --swap-hard-limit 1024004 error: Unable to change memory parameters error: invalid argument: memory hard_limit tunable value must be lower than swap_hard_limit So setting VERIFIED. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |