Skip to contentSkip to conversation

Disable auto-balloon on ia64

PATCH In review Tian, Kevin 3 participants 5 messages May 22, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable auto-balloon on ia64

Quoted 21 lines

From: Alex Williamson
Sent: 2006年5月22日 6:30

Quoted 2 lines · Alex Williamson

diff -r 4dcb93547710 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Sun May 21 09:55:15 2006

+0100

Quoted 1 line

+++ b/tools/python/xen/xend/image.py Sun May 21 14:25:19 2006

-0600

Review class ImageHandler: · line 146

Quoted 2 lines
(quoted diff) +0 -0
@@ -146,7 +146,7 @@ class ImageHandler:
         """@return The memory required, in KiB, by the domain to

store the

Review class ImageHandler: · line 147

Quoted 1 line
(quoted diff) +0 -0
         given amount, also in KiB.  This is normally just mem, but if

HVM is

Review class ImageHandler: · line 149

Quoted 3 lines
(quoted diff) +1 -1
         supported, keep a little extra free."""
-        if 'hvm' in xc.xeninfo()['xen_caps']:
+        if 'hvm' in xc.xeninfo()['xen_caps'] and os.uname()[4] !=

'ia64':

Review class ImageHandler: · line 151

Quoted 2 lines
(quoted diff) +0 -0
             mem_kb += 4*1024;
         return mem_kb
Quoted 6 lines

Looks like this is just a partial solution, VTi guests are still
broken with only this change. Instead, we probably need to look at cset 10040. I suspect we don't yet have the ballooning support and need to do the allocation up front. Thanks,

Alex

We just need to reverse the whole change for ia64, since both domU and domVTI are insert a hole by this auto-balloon patch. Due to missing balloon support on xen/ia64 as you said, both domU and domVTI failed due to this change.

Patch attached.

Thanks,
Kevin

Following auto-balloon doesn't work for xen/ia64, since balloon doesn't work yet. Patch's a bit dirty, which however promises ia64 domU and domVTI to boot again.

(Based on fix from Alex)
Signed-off-by Kevin Tian <[email protected]>

tools/python/xen/xend/XendDomainInfo.py +5 -2
diff -r 14717dedba02 tools/python/xen/xend/XendDomainInfo.py
@@ -29,6 +29,7 @@ import string
 import string
 import time
 import threading
+import os
 
 import xen.lowlevel.xc
 from xen.util import asserts
@@ -1264,8 +1265,10 @@ class XendDomainInfo:
             m = self.image.getDomainMemory(self.info['memory'] * 1024)
             balloon.free(m)
             xc.domain_setmaxmem(self.domid, m)
-            xc.domain_memory_increase_reservation(self.domid, self.info['memory'] * 1024, 0, 0)
-
+            if os.uname()[4]!='ia64':
+                xc.domain_memory_increase_reservation(self.domid, self.info['memory'] * 1024, 0, 0)
+            else:
+                xc.domain_memory_increase_reservation(self.domid, m, 0, 0)
             self.createChannels()
 
             channel_details = self.image.createImage()
tools/python/xen/xend/image.py +1 -1
diff -r 14717dedba02 tools/python/xen/xend/image.py
@@ -146,7 +146,7 @@ class ImageHandler:
         """@return The memory required, in KiB, by the domain to store the
         given amount, also in KiB.  This is normally just mem, but if HVM is
         supported, keep a little extra free."""
-        if 'hvm' in xc.xeninfo()['xen_caps']:
+        if 'hvm' in xc.xeninfo()['xen_caps'] and os.uname()[4]!='ia64':
             mem_kb += 4*1024;
         return mem_kb
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 2 lines · Kevin

We just need to reverse the whole change for ia64, since both domU
and domVTI are insert a hole by this auto-balloon patch. Due to missing balloon support on xen/ia64 as you said, both domU and domVTI failed due to this change.

The first patch that you work around seems okay to me. That is, it seems correct that we make initial reservation exclude 'getDomainMemory headroom'. Shouldn't ia64 reserve extra memory as it needs it, as x86 does, rather than up front?

The second bit of your workaround, which applies to getDomainMemory: I'll wait and see if Charles has anything to say, but otherwise I'll remove the code that adds the extra slack entirely.

-- Keir

#2 lore raw
Quoted 6 lines · Keir Fraser
Quoted 2 lines

We just need to reverse the whole change for ia64, since both domU
and domVTI are insert a hole by this auto-balloon patch. Due to missing balloon support on xen/ia64 as you said, both domU and domVTI failed due to this change.

The first patch that you work around seems okay to me. That is, it seems correct that we make initial reservation exclude 'getDomainMemory headroom'. Shouldn't ia64 reserve extra memory as it needs it, as x86 does, rather than up front?

The second bit of your workaround, which applies to getDomainMemory: I'll wait and see if Charles has anything to say, but otherwise I'll remove the code that adds the extra slack entirely.

Thinking about it, that slack might have been added to give enough space for shadow page tables for live migration. Also, it shouldn't give you any problems if you weren't allocating headroom up front -- if you can fix ia64 to allocate the extra memory as needed then you shouldn't need either of your workarounds?

-- Keir

#3 lore raw

Overcommitting memory (was: Disable auto-balloon on ia64)

In reply to Keir Fraser
Quoted 1 line
Quoted 1 line
Quoted 1 line

On Mon, May 22, 2006 at 3:37 AM, in message

<[email protected]>, Keir Fraser

Quoted 3 lines · <[email protected]> wrote:
Quoted 1 line · Kevin

We just need to reverse the whole change for ia64, since both

domU

Quoted 2 lines
Quoted 2 lines

and domVTI are insert a hole by this auto- balloon patch. Due to missing balloon support on xen/ia64 as you said, both domU and

domVTI

Quoted 4 lines
Quoted 1 line

failed due to this change.

The first patch that you work around seems okay to me. That is, it seems correct that we make initial reservation exclude

'getDomainMemory

Quoted 9 lines

headroom'. Shouldn't ia64 reserve extra memory as it needs it, as x86

does, rather than up front?

The second bit of your workaround, which applies to getDomainMemory:

I'll wait and see if Charles has anything to say, but otherwise I'll

remove the code that adds the extra slack entirely.

I think we have a more general problem here.

Xen, historically, hasn't overcommitted memory. But with shadow page tables and HVM, that's not really true, is it?

Suppose I start up a 256 MB HVM domain running, say, a forking web server. How much physical RAM does this take? Depends on the load, doesn't it?

Unless I'm missing something, there is no "big enough" amount of slack, if you care about reliability. With Yunhong's BUG -> domain_crash patch, the box shouldn't crash, but the domain still might.

In shadow32.c, I see a FIXME comment that refers to "shadow flush". Even if such things are done, can you put an upper limit on the runtime memory overhead for an HVM domain?

#4 lore raw

Re: Overcommitting memory (was: Disable auto-balloon on ia64)

Quoted 3 lines · Charles Coffing

In shadow32.c, I see a FIXME comment that refers to "shadow flush". Even if such things are done, can you put an upper limit on the runtime memory overhead for an HVM domain?

Yes, it ought to be a space/time tradeoff. The shadow pagetables should be regarded merely as a cache. However, the current shadow mode's memory handling sucks.

-- Keir