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

xen-devel

[Top] [All Lists]

RE: [Xen-devel] [PATCH] linux/balloon: don't allow ballooning down a dom

To: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] linux/balloon: don't allow ballooning down a domain below a reasonable limit
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: 2008年5月13日 08:08:15 +0100
Cc: Ky Srinivasan <KSrinivasan@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "keir.fraser@xxxxxxxxxxxxx" <keir.fraser@xxxxxxxxxxxxx>, "garloff@xxxxxxx" <garloff@xxxxxxx>
Delivery-date: 2008年5月13日 00:08:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080509143852937.00000000936@djm-pc >
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>
References: <481B7A01020000780004B919@xxxxxxxxxxxxxxxxxx> <20080509143852937.00000000936@djm-pc >
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> 09.05.08 22:38 >>>
>Hmmm... it appears to me that minimum_target() doesn't
>work when balloon.c is built as a module (always returns 0).
>
>Can you confirm/deny?
Yes, that's a change Keir did after noticing that I used an improper
variable (totalram_pages) to base the calculation upon in the modular case
(max_pfn is not exported anymore in newer kernels). It should be possible
though to base the calculation on num_physpages, as in the patch below.
Jan
--- head-2008年04月15日.orig/drivers/xen/balloon/balloon.c
+++ head-2008年04月15日/drivers/xen/balloon/balloon.c
@@ -198,8 +198,8 @@ static unsigned long current_target(void
 static unsigned long minimum_target(void)
 {
 #ifndef CONFIG_XEN
- return 0;
-#else
+#define max_pfn num_physpages
+#endif
 unsigned long min_pages, curr_pages = current_target();
 
 #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT))
@@ -227,7 +227,7 @@ static unsigned long minimum_target(void
 
 /* Don't enforce growth */
 return min(min_pages, curr_pages);
-#endif
+#undef max_pfn
 }
 
 static int increase_reservation(unsigned long nr_pages)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] VMX status report. Xen: #17617 & Xen0: #537 -- blocked , Li, Haicheng
Next by Date: Re: [Xen-devel][PATCH 0/5] Add cpufreq pwr mgmt to Xen , Jan Beulich
Previous by Thread: RE: [Xen-devel] [PATCH] linux/balloon:don't allow ballooningdowna domain below a reasonable limit , Dan Magenheimer
Next by Thread: RE: [Xen-devel] [PATCH] linux/balloon: don't allow ballooning down a domain below a reasonable limit , Dan Magenheimer
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /