Skip to contentSkip to conversation

x86: don't limit dom0's maximum reservation by the available memory

PATCH In review David Vrabel 2 participants 2 messages Aug 23, 2011 – Aug 24, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: don't limit dom0's maximum reservation by the available memory

# HG changeset patch
# User David Vrabel <[email protected]>
# Date 1314119246 -3600
# Node ID b0f7a5b68726672c131f0a12a819941b4a56a4df
# Parent 1ec6c392d40f37032b0c845094c7ee6ba69740fd
x86: don't limit dom0's maximum reservation by the available memory

Set dom0's initial maximum reservation using the max value supplied in the dom0_mem command line option without limiting it by the available memory.

This allows dom0 to make use of any hotplugged memory without having to also adjust the maximum reservation.

Cc Jan Beulich <[email protected]>
Cc Keir Fraser <[email protected]>

---
Please consider for Xen 4.1.2.

xen/arch/x86/domain_build.c +1 -1
diff -r 1ec6c392d40f -r b0f7a5b68726 xen/arch/x86/domain_build.c
@@ -254,7 +254,7 @@ static unsigned long __init compute_dom0
     }
 #endif
 
-    d->max_pages = min(max_pages, avail);
+    d->max_pages = min_t(unsigned long, max_pages, UINT_MAX);
 
     return nr_pages;
 }
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines
Quoted 1 line
Quoted 1 line · David Vrabel

# HG changeset patch
# User David Vrabel <[email protected]>
# Date 1314119246 -3600
# Node ID b0f7a5b68726672c131f0a12a819941b4a56a4df
# Parent 1ec6c392d40f37032b0c845094c7ee6ba69740fd
x86: don't limit dom0's maximum reservation by the available memory

Set dom0's initial maximum reservation using the max value supplied in the dom0_mem command line option without limiting it by the available memory.

Quoted 5 lines

This allows dom0 to make use of any hotplugged memory without having to also adjust the maximum reservation.

Quoted 21 lines
Cc Keir Fraser <[email protected]>

---
Please consider for Xen 4.1.2.

diff -r 1ec6c392d40f -r b0f7a5b68726 xen/arch/x86/domain_build.c

xen/arch/x86/domain_build.c +1 -1
@@ -254,7 +254,7 @@ static unsigned long __init compute_dom0
     }
 #endif
 
-    d->max_pages = min(max_pages, avail);
+    d->max_pages = min_t(unsigned long, max_pages, UINT_MAX);
 
     return nr_pages;
 }

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