Bug 627480 - maxmem preservation after xend restart
Summary: maxmem preservation after xend restart
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Michal Novotny
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 514500
TreeView+ depends on / blocked
 
Reported: 2010-08-26 07:05 UTC by Andrew Jones
Modified: 2014-02-02 22:38 UTC (History)
9 users (show)

Fixed In Version: xen-3.0.3-118.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-13 22:24:05 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0031 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2011-01-12 15:59:24 UTC

Description Andrew Jones 2010-08-26 07:05:46 UTC
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 07:06:28 UTC
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 08:24:49 UTC
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 09:11:35 UTC
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 15:54:24 UTC
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 08:10:25 UTC
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 09:02:47 UTC
Fix built into xen-3.0.3-118.el5

Comment 12 YangGuang 2010-11-17 05:05:07 UTC
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 05:19:36 UTC
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 22:24:05 UTC
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.