WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-devel] [PATCH] Fix "xm restore" require 4 times amount of memory on

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix "xm restore" require 4 times amount of memory on ia64.
From: Masayuki Igawa <igawa@xxxxxxxxxxxxxxxxx>
Date: Fri, 17 Aug 2007 15:53:49 +0900 (JST)
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 16 Aug 2007 23:55:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

When restoring a guest on ia64, xen tries to allocate 4 times amount
of memory as large as that of the guest.
(For example:
 If your guest memory size is 5GB, 'xm restore' will need 20GB!)

In XendCheckpoint.py, the page size is hard coded to 4KB.
That is:
    nr_pfns = (dominfo.getMemoryTarget() + 3) / 4

But page size is 16KB on ia64 system.

This patch fixes the problem.


Thanks.
-- 
Masayuki Igawa
# HG changeset patch
# User igawa@xxxxxxxxxxxxxxxxx
# Node ID 6945bc171e1c218129cc43619617dd79e0041220
# Parent  256160ff19b74057f5819af20d68e6e3388c80e3
Fix "xm restore" require 4 times amount of memory on ia64.

Signed-off-by: Masayuki Igawa <igawa@xxxxxxxxxxxxxxxxx>

diff -r 256160ff19b7 -r 6945bc171e1c tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Thu Aug 16 12:27:59 2007
+++ b/tools/python/xen/xend/XendCheckpoint.py   Fri Aug 17 04:10:20 2007
@@ -181,7 +181,8 @@
     assert store_port
     assert console_port
 
-    nr_pfns = (dominfo.getMemoryTarget() + 3) / 4 
+    page_size_kib = xc.pages_to_kib(1)
+    nr_pfns = (dominfo.getMemoryTarget() + page_size_kib - 1) / page_size_kib 
 
     # if hvm, pass mem size to calculate the store_mfn
     image_cfg = dominfo.info.get('image', {})
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix "xm restore" require 4 times amount of memory on ia64., Masayuki Igawa <=