Bug 627480 - maxmem preservation after xend restart
maxmem preservation after xend restart
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.6
All Linux
low Severity medium
: rc
: ---
Assigned To: Michal Novotny
Virtualization Bugs
:
Depends On:
Blocks: 514500
  Show dependency treegraph
 
Reported: 2010-08-26 03:05 EDT by Andrew Jones
Modified: 2014-02-02 17:38 EST (History)
9 users (show)

See Also:
Fixed In Version: xen-3.0.3-118.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 17:24:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix maxmem handling (4.16 KB, patch)
2010-09-01 11:54 EDT, Michal Novotny
no flags Details | Diff

  None (edit)
Description Andrew Jones 2010-08-26 03:05:46 EDT
From bug 609619 comment 10:

Ballooning up domain0 after restarting xend still doesn't work:

1. # xm mem-max 0 4096

2. # xm li 0 -l | grep mem
    (memory 2049)
    (shadow_memory 0)
    (maxmem 4096)

3. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem
4096

4. # service xend restart
restart xend:                                              [  OK  ]

5. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem
4096

6. # xm li 0 -l | grep mem
    (memory 2049)
    (shadow_memory 0)
    (maxmem 2049)

7.  # xm mem-set 0 3000
Error: Memory size too large. Limit is 2049 MiB
Usage: xm mem-set <Domain> <Mem>
Set the current memory usage for a domain.

Strange thing is that maxmem in 'xm list -l' is not the same value as in
Xenstore. Is it expected?
Comment 1 Andrew Jones 2010-08-26 03:06:28 EDT
It looks we should look in xenstore too. If it's not in the config and
xenstore doesn't have it, then we should default to the value of 'memory'.
Comment 2 Paolo Bonzini 2010-08-26 04:24:49 EDT
Or, on startup the config should be rebuilt from xenstore value (defaulting to the memory value).  Maybe it's the same thing you were talking about. :)
Comment 3 Andrew Jones 2010-08-26 05:11:35 EDT
Actually, I wasn't thinking about rebuilding the config, but you've raised a good point. We should see how the config is currently rebuilt. Without looking at the code, so just based on the problem we see here, it sounds like it isn't, or if it is, it isn't looking in xenstore for anything that doesn't exist in the config.
Comment 7 Michal Novotny 2010-09-01 11:54:24 EDT
Created attachment 442441 [details]
Fix maxmem handling

This is fix for maxmem handling and disallowing the invalid maxmem value (value lower than memory currently allocated to domain).

Michal
Comment 8 Michal Novotny 2010-09-07 04:10:25 EDT
NOTE FOR QE: This patch restricts dom0 memory only. For domU you should be able to set domU's maxmem to higher value than total physical memory available on the host. For dom0 it doesn't make any sense so it's restricted to give dom0 more memory than physical host does have available.
Comment 10 Miroslav Rezanina 2010-11-11 04:02:47 EST
Fix built into xen-3.0.3-118.el5
Comment 12 YangGuang 2010-11-17 00:05:07 EST
Version-Release number of selected component (if applicable):
xen-3.0.3-116.el5
kernel-xen-2.6.18-231.el5

Step to reproduce:
1. # xm li 0 -l | grep mem
    (memory 7345)
    (shadow_memory 0)
    (maxmem 7345)

2. # xm mem-max 0 8000

3. # xm li 0 -l | grep mem
    (memory 7345)
    (shadow_memory 0)
    (maxmem 8000)

4. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem
   8000

5. # service xend restart

6. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem
   8000

7. # xm li 0 -l | grep mem
    (memory 7345)
    (shadow_memory 0)
    (maxmem 7345)

8. # xm mem-set 0 7500
    Error: Memory size too large. Limit is 7345 MiB
    Usage: xm mem-set <Domain> <Mem>

Actual results:
1. maxmem preservation after xend restart.
Comment 13 YangGuang 2010-11-17 00:19:36 EST
Version-Release number of selected component (if applicable):
xen-3.0.3-118.el5
kernel-xen-2.6.18-231.el5

Actual steps:
1. # xm li 0 -l | grep mem
    (memory 6833)
    (shadow_memory 0)
    (maxmem 8187)

2. #  xm mem-max 0 8000

3. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem
   8000

4. # xm li 0 -l | grep mem
    (memory 6833)
    (shadow_memory 0)
    (maxmem 8000)

5. #  service xend restart

6. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem
   8000

7. # xm li 0 -l | grep mem
    (memory 6833)
    (shadow_memory 0)
    (maxmem 8000)

8. # xm mem-set 0 7500

9. # xm li 0 -l | grep mem
    (memory 7500)
    (shadow_memory 0)
    (maxmem 8000)

10. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem
   8000

Actual results:
1. maxmem works well after xend restart.

So I change it to "verified"
Comment 15 errata-xmlrpc 2011-01-13 17:24:05 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0031.html

Note You need to log in before you can comment on or make changes to this bug.