All of lore.kernel.org
 help / color / mirror / Atom feed
* 32bit-pv-VM 128G memory limited
@ 2009-11-02  7:49 James Song
  2009-11-02  7:55 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: James Song @ 2009-11-02  7:49 UTC (permalink / raw)
  To: xen-devel; +Cc: Jan Beulich


[-- Attachment #1.1: Type: text/plain, Size: 5447 bytes --]

Hi, 
 
 
    Since 32-bit pv-domUs require memory below the 128G boundary (IIRC) but tools don't enforce this.  So we need a "memory pool" for 32bit pv-domUs. When starting a 32-bit domU, allocate memory from this pool.  If starting a 64-bit domUs or 32bit hvm dom (which don't suffer the 128G boundary limitation), allocate memory from above the boundary first, only allocating from the lower pool when needed.
 
Thanks,
James (Song Wei)
 
Signed-off-by: James Song Wei <jsong@novell.com>
diff -r 059c01d69a08 tools/libxc/xc_dom_x86.c
--- a/tools/libxc/xc_dom_x86.c Thu Oct 29 14:48:28 2009 +0000
+++ b/tools/libxc/xc_dom_x86.c Mon Nov 02 15:37:42 2009 +0800
@@ -639,7 +639,7 @@
     xc_dom_register_arch_hooks(&xc_dom_64);
 }
 
-static int x86_compat(int xc, domid_t domid, char *guest_type)
+static int x86_compat(int xc, domid_t domid, char *guest_type, int *guest_size)
 {
     static const struct {
         char           *guest;
@@ -660,6 +660,7 @@
     if ( domctl.u.address_size.size == 0 )
         /* nothing to do */
         return 0;
+    *guest_size = domctl.u.address_size.size;
 
     xc_dom_printf("%s: guest %s, address size %" PRId32 "\n", __FUNCTION__,
                   guest_type, domctl.u.address_size.size);
@@ -696,10 +697,11 @@
 
 int arch_setup_meminit(struct xc_dom_image *dom)
 {
-    int rc;
+    int rc, host_64bit=0, mem_128_limit=0, guest_size=0;
     xen_pfn_t pfn, allocsz, i, j, mfn;
+    xc_physinfo_t put_info;
 
-    rc = x86_compat(dom->guest_xc, dom->guest_domid, dom->guest_type);
+    rc = x86_compat(dom->guest_xc, dom->guest_domid, dom->guest_type, &guest_size);
     if ( rc )
         return rc;
     if ( xc_dom_feature_translated(dom) )
@@ -740,6 +742,12 @@
         for ( pfn = 0; pfn < dom->total_pages; pfn++ )
             dom->p2m_host[pfn] = pfn;
         
+        xc_physinfo(dom->guest_xc, &put_info);
+        if((put_info.total_pages * (XC_PAGE_SIZE / 1024))/(1024*1024) > 128)
+            mem_128_limit = 1;
+
+        if(strstr(dom->xen_caps, "x86_64") != NULL)
+            host_64bit=1;
         /* allocate guest memory */
         for ( i = rc = allocsz = 0;
               (i < dom->total_pages) && !rc;
@@ -751,6 +759,22 @@
             rc = xc_domain_memory_populate_physmap(
                 dom->guest_xc, dom->guest_domid, allocsz,
                 0, 0, &dom->p2m_host[i]);
+            if((host_64bit == 1) && (mem_128_limit))
+            {
+                if( (guest_size == 32) )// 32bit guest 
+                    rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, XENMEMF_address_bits(37), &dom->p2m_host[i]);
+                else if( (guest_size == 64) );//64bit 
+                    rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, XENMEMF_address_bits(37) | XENMEMF_above_bits, &dom->p2m_host[i]);
+                if( rc != 0 )
+                    rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, 0, &dom->p2m_host[i]);
+            } 
+            else
+                rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, 0, &dom->p2m_host[i]);
+ 
         }
     }
 
diff -r 059c01d69a08 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c Thu Oct 29 14:48:28 2009 +0000
+++ b/xen/common/page_alloc.c Mon Nov 02 15:37:42 2009 +0800
@@ -1085,9 +1085,9 @@
     struct page_info *pg = NULL;
     unsigned int bits = memflags >> _MEMF_bits, zone_hi = NR_ZONES - 1;
     unsigned int node = (uint8_t)((memflags >> _MEMF_node) - 1), dma_zone;
+    unsigned int is_limit_lo = memflags & _MEMF_above_bit;
 
     ASSERT(!in_irq());
-
     if ( (node == NUMA_NO_NODE) && (d != NULL) )
         node = domain_to_node(d);
 
@@ -1099,8 +1099,9 @@
         pg = alloc_heap_pages(dma_zone + 1, zone_hi, node, order, memflags);
 
     if ( (pg == NULL) &&
-         ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi,
-                                 node, order, memflags)) == NULL) )
+         ((pg = alloc_heap_pages(is_limit_lo ? bits : (MEMZONE_XEN + 1), 
+              is_limit_lo ? min_t(unsigned int, bits_to_zone(BITS_PER_LONG+PAGE_SHIFT),NR_ZONES-1) :zone_hi, 
+                  node, order,memflags)) == NULL) )
          return NULL;
 
     if ( (d != NULL) && assign_pages(d, pg, order, memflags) )
diff -r 059c01d69a08 xen/include/public/memory.h
--- a/xen/include/public/memory.h Thu Oct 29 14:48:28 2009 +0000
+++ b/xen/include/public/memory.h Mon Nov 02 15:37:42 2009 +0800
@@ -52,6 +52,8 @@
 #define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
 /* Flag to populate physmap with populate-on-demand entries */
 #define XENMEMF_populate_on_demand (1<<16)
+/* Allocate the pages above the bits */
+#define XENMEMF_above_bits (1<<7)
 #endif
 
 struct xen_memory_reservation {
diff -r 059c01d69a08 xen/include/xen/mm.h
--- a/xen/include/xen/mm.h Thu Oct 29 14:48:28 2009 +0000
+++ b/xen/include/xen/mm.h Mon Nov 02 15:37:42 2009 +0800
@@ -81,6 +81,7 @@
 #define _MEMF_node        8
 #define  MEMF_node(n)     ((((n)+1)&0xff)<<_MEMF_node)
 #define _MEMF_bits        24
+#define _MEMF_above_bit   (1<<7)
 #define  MEMF_bits(n)     ((n)<<_MEMF_bits)
 
 #ifdef CONFIG_PAGEALLOC_MAX_ORDER

[-- Attachment #1.2: Type: text/html, Size: 9884 bytes --]

[-- Attachment #2: mem_32bit_128G_limit.patch --]
[-- Type: text/plain, Size: 4948 bytes --]

diff -r 059c01d69a08 tools/libxc/xc_dom_x86.c
--- a/tools/libxc/xc_dom_x86.c	Thu Oct 29 14:48:28 2009 +0000
+++ b/tools/libxc/xc_dom_x86.c	Mon Nov 02 15:37:42 2009 +0800
@@ -639,7 +639,7 @@
     xc_dom_register_arch_hooks(&xc_dom_64);
 }
 
-static int x86_compat(int xc, domid_t domid, char *guest_type)
+static int x86_compat(int xc, domid_t domid, char *guest_type, int *guest_size)
 {
     static const struct {
         char           *guest;
@@ -660,6 +660,7 @@
     if ( domctl.u.address_size.size == 0 )
         /* nothing to do */
         return 0;
+    *guest_size = domctl.u.address_size.size;
 
     xc_dom_printf("%s: guest %s, address size %" PRId32 "\n", __FUNCTION__,
                   guest_type, domctl.u.address_size.size);
@@ -696,10 +697,11 @@
 
 int arch_setup_meminit(struct xc_dom_image *dom)
 {
-    int rc;
+    int rc, host_64bit=0, mem_128_limit=0, guest_size=0;
     xen_pfn_t pfn, allocsz, i, j, mfn;
+    xc_physinfo_t put_info;
 
-    rc = x86_compat(dom->guest_xc, dom->guest_domid, dom->guest_type);
+    rc = x86_compat(dom->guest_xc, dom->guest_domid, dom->guest_type, &guest_size);
     if ( rc )
         return rc;
     if ( xc_dom_feature_translated(dom) )
@@ -740,6 +742,12 @@
         for ( pfn = 0; pfn < dom->total_pages; pfn++ )
             dom->p2m_host[pfn] = pfn;
         
+        xc_physinfo(dom->guest_xc, &put_info);
+        if((put_info.total_pages * (XC_PAGE_SIZE / 1024))/(1024*1024) > 128)
+            mem_128_limit = 1;
+
+        if(strstr(dom->xen_caps, "x86_64") != NULL)
+            host_64bit=1;
         /* allocate guest memory */
         for ( i = rc = allocsz = 0;
               (i < dom->total_pages) && !rc;
@@ -751,6 +759,22 @@
             rc = xc_domain_memory_populate_physmap(
                 dom->guest_xc, dom->guest_domid, allocsz,
                 0, 0, &dom->p2m_host[i]);
+            if((host_64bit == 1) && (mem_128_limit))
+            {
+                if( (guest_size == 32) )// 32bit guest 
+                    rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, XENMEMF_address_bits(37), &dom->p2m_host[i]);
+                else if( (guest_size == 64) );//64bit 
+                    rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, XENMEMF_address_bits(37) | XENMEMF_above_bits, &dom->p2m_host[i]);
+                if( rc != 0 )
+                    rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, 0, &dom->p2m_host[i]);
+            } 
+            else
+                rc = xc_domain_memory_populate_physmap(
+                        dom->guest_xc, dom->guest_domid, allocsz, 0, 0, &dom->p2m_host[i]);
+ 
         }
     }
 
diff -r 059c01d69a08 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c	Thu Oct 29 14:48:28 2009 +0000
+++ b/xen/common/page_alloc.c	Mon Nov 02 15:37:42 2009 +0800
@@ -1085,9 +1085,9 @@
     struct page_info *pg = NULL;
     unsigned int bits = memflags >> _MEMF_bits, zone_hi = NR_ZONES - 1;
     unsigned int node = (uint8_t)((memflags >> _MEMF_node) - 1), dma_zone;
+    unsigned int is_limit_lo = memflags & _MEMF_above_bit;
 
     ASSERT(!in_irq());
-
     if ( (node == NUMA_NO_NODE) && (d != NULL) )
         node = domain_to_node(d);
 
@@ -1099,8 +1099,9 @@
         pg = alloc_heap_pages(dma_zone + 1, zone_hi, node, order, memflags);
 
     if ( (pg == NULL) &&
-         ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi,
-                                 node, order, memflags)) == NULL) )
+         ((pg = alloc_heap_pages(is_limit_lo ? bits : (MEMZONE_XEN + 1), 
+              is_limit_lo ? min_t(unsigned int, bits_to_zone(BITS_PER_LONG+PAGE_SHIFT),NR_ZONES-1) :zone_hi, 
+                  node, order,memflags)) == NULL) )
          return NULL;
 
     if ( (d != NULL) && assign_pages(d, pg, order, memflags) )
diff -r 059c01d69a08 xen/include/public/memory.h
--- a/xen/include/public/memory.h	Thu Oct 29 14:48:28 2009 +0000
+++ b/xen/include/public/memory.h	Mon Nov 02 15:37:42 2009 +0800
@@ -52,6 +52,8 @@
 #define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
 /* Flag to populate physmap with populate-on-demand entries */
 #define XENMEMF_populate_on_demand (1<<16)
+/* Allocate the pages above the bits */
+#define XENMEMF_above_bits (1<<7)
 #endif
 
 struct xen_memory_reservation {
diff -r 059c01d69a08 xen/include/xen/mm.h
--- a/xen/include/xen/mm.h	Thu Oct 29 14:48:28 2009 +0000
+++ b/xen/include/xen/mm.h	Mon Nov 02 15:37:42 2009 +0800
@@ -81,6 +81,7 @@
 #define _MEMF_node        8
 #define  MEMF_node(n)     ((((n)+1)&0xff)<<_MEMF_node)
 #define _MEMF_bits        24
+#define _MEMF_above_bit   (1<<7)
 #define  MEMF_bits(n)     ((n)<<_MEMF_bits)
 
 #ifdef CONFIG_PAGEALLOC_MAX_ORDER

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 32bit-pv-VM 128G memory limited
  2009-11-02  7:49 32bit-pv-VM 128G memory limited James Song
@ 2009-11-02  7:55 ` Keir Fraser
  2009-11-03  6:14   ` James (song wei)
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2009-11-02  7:55 UTC (permalink / raw)
  To: James Song, xen-devel; +Cc: Jan Beulich

This should all already happen by default.

 -- Keir

On 02/11/2009 07:49, "James Song" <jsong@novell.com> wrote:

> Hi, 
>  
>  
>     Since 32-bit pv-domUs require memory below the 128G boundary (IIRC) but
> tools don't enforce this.  So we need a "memory pool" for 32bit pv-domUs.
> When starting a 32-bit domU, allocate memory from this pool.  If starting a
> 64-bit domUs or 32bit hvm dom (which don't suffer the 128G boundary
> limitation), allocate memory from above the boundary first, only allocating
> from the lower pool when needed.
>  
> Thanks,
> James (Song Wei)
>  
> Signed-off-by: James Song Wei <jsong@novell.com>
> diff -r 059c01d69a08 tools/libxc/xc_dom_x86.c
> --- a/tools/libxc/xc_dom_x86.c Thu Oct 29 14:48:28 2009 +0000
> +++ b/tools/libxc/xc_dom_x86.c Mon Nov 02 15:37:42 2009 +0800
> @@ -639,7 +639,7 @@
>      xc_dom_register_arch_hooks(&xc_dom_64);
>  }
>  
> -static int x86_compat(int xc, domid_t domid, char *guest_type)
> +static int x86_compat(int xc, domid_t domid, char *guest_type, int
> *guest_size)
>  {
>      static const struct {
>          char           *guest;
> @@ -660,6 +660,7 @@
>      if ( domctl.u.address_size.size == 0 )
>          /* nothing to do */
>          return 0;
> +    *guest_size = domctl.u.address_size.size;
>  
>      xc_dom_printf("%s: guest %s, address size %" PRId32 "\n", __FUNCTION__,
>                    guest_type, domctl.u.address_size.size);
> @@ -696,10 +697,11 @@
>  
>  int arch_setup_meminit(struct xc_dom_image *dom)
>  {
> -    int rc;
> +    int rc, host_64bit=0, mem_128_limit=0, guest_size=0;
>      xen_pfn_t pfn, allocsz, i, j, mfn;
> +    xc_physinfo_t put_info;
>  
> -    rc = x86_compat(dom->guest_xc, dom->guest_domid, dom->guest_type);
> +    rc = x86_compat(dom->guest_xc, dom->guest_domid, dom->guest_type,
> &guest_size);
>      if ( rc )
>          return rc;
>      if ( xc_dom_feature_translated(dom) )
> @@ -740,6 +742,12 @@
>          for ( pfn = 0; pfn < dom->total_pages; pfn++ )
>              dom->p2m_host[pfn] = pfn;
>          
> +        xc_physinfo(dom->guest_xc, &put_info);
> +        if((put_info.total_pages * (XC_PAGE_SIZE / 1024))/(1024*1024) > 128)
> +            mem_128_limit = 1;
> +
> +        if(strstr(dom->xen_caps, "x86_64") != NULL)
> +            host_64bit=1;
>          /* allocate guest memory */
>          for ( i = rc = allocsz = 0;
>                (i < dom->total_pages) && !rc;
> @@ -751,6 +759,22 @@
>              rc = xc_domain_memory_populate_physmap(
>                  dom->guest_xc, dom->guest_domid, allocsz,
>                  0, 0, &dom->p2m_host[i]);
> +            if((host_64bit == 1) && (mem_128_limit))
> +            {
> +                if( (guest_size == 32) )// 32bit guest
> +                    rc = xc_domain_memory_populate_physmap(
> +                        dom->guest_xc, dom->guest_domid, allocsz, 0,
> XENMEMF_address_bits(37), &dom->p2m_host[i]);
> +                else if( (guest_size == 64) );//64bit
> +                    rc = xc_domain_memory_populate_physmap(
> +                        dom->guest_xc, dom->guest_domid, allocsz, 0,
> XENMEMF_address_bits(37) | XENMEMF_above_bits, &dom->p2m_host[i]);
> +                if( rc != 0 )
> +                    rc = xc_domain_memory_populate_physmap(
> +                        dom->guest_xc, dom->guest_domid, allocsz, 0, 0,
> &dom->p2m_host[i]);
> +            } 
> +            else
> +                rc = xc_domain_memory_populate_physmap(
> +                        dom->guest_xc, dom->guest_domid, allocsz, 0, 0,
> &dom->p2m_host[i]);
> + 
>          }
>      }
>  
> diff -r 059c01d69a08 xen/common/page_alloc.c
> --- a/xen/common/page_alloc.c Thu Oct 29 14:48:28 2009 +0000
> +++ b/xen/common/page_alloc.c Mon Nov 02 15:37:42 2009 +0800
> @@ -1085,9 +1085,9 @@
>      struct page_info *pg = NULL;
>      unsigned int bits = memflags >> _MEMF_bits, zone_hi = NR_ZONES - 1;
>      unsigned int node = (uint8_t)((memflags >> _MEMF_node) - 1), dma_zone;
> +    unsigned int is_limit_lo = memflags & _MEMF_above_bit;
>  
>      ASSERT(!in_irq());
> -
>      if ( (node == NUMA_NO_NODE) && (d != NULL) )
>          node = domain_to_node(d);
>  
> @@ -1099,8 +1099,9 @@
>          pg = alloc_heap_pages(dma_zone + 1, zone_hi, node, order, memflags);
>  
>      if ( (pg == NULL) &&
> -         ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi,
> -                                 node, order, memflags)) == NULL) )
> +         ((pg = alloc_heap_pages(is_limit_lo ? bits : (MEMZONE_XEN + 1),
> +              is_limit_lo ? min_t(unsigned int,
> bits_to_zone(BITS_PER_LONG+PAGE_SHIFT),NR_ZONES-1) :zone_hi,
> +                  node, order,memflags)) == NULL) )
>           return NULL;
>  
>      if ( (d != NULL) && assign_pages(d, pg, order, memflags) )
> diff -r 059c01d69a08 xen/include/public/memory.h
> --- a/xen/include/public/memory.h Thu Oct 29 14:48:28 2009 +0000
> +++ b/xen/include/public/memory.h Mon Nov 02 15:37:42 2009 +0800
> @@ -52,6 +52,8 @@
>  #define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
>  /* Flag to populate physmap with populate-on-demand entries */
>  #define XENMEMF_populate_on_demand (1<<16)
> +/* Allocate the pages above the bits */
> +#define XENMEMF_above_bits (1<<7)
>  #endif
>  
>  struct xen_memory_reservation {
> diff -r 059c01d69a08 xen/include/xen/mm.h
> --- a/xen/include/xen/mm.h Thu Oct 29 14:48:28 2009 +0000
> +++ b/xen/include/xen/mm.h Mon Nov 02 15:37:42 2009 +0800
> @@ -81,6 +81,7 @@
>  #define _MEMF_node        8
>  #define  MEMF_node(n)     ((((n)+1)&0xff)<<_MEMF_node)
>  #define _MEMF_bits        24
> +#define _MEMF_above_bit   (1<<7)
>  #define  MEMF_bits(n)     ((n)<<_MEMF_bits)
>  
>  #ifdef CONFIG_PAGEALLOC_MAX_ORDER
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 32bit-pv-VM 128G memory limited
  2009-11-02  7:55 ` Keir Fraser
@ 2009-11-03  6:14   ` James (song wei)
  2009-11-03  7:48     ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: James (song wei) @ 2009-11-03  6:14 UTC (permalink / raw)
  To: xen-devel


Keir 
 could you please say it in more detail? 

Thanks,
James 

Keir Fraser-3 wrote:
> 
> This should all already happen by default.
> 
>  -- Keir
> 
> On 02/11/2009 07:49, "James Song" <jsong@novell.com> wrote:
> 
>> Hi, 
>>  
>>  
>>     Since 32-bit pv-domUs require memory below the 128G boundary (IIRC)
>> but
>> tools don't enforce this.  So we need a "memory pool" for 32bit pv-domUs.
>> When starting a 32-bit domU, allocate memory from this pool.  If starting
>> a
>> 64-bit domUs or 32bit hvm dom (which don't suffer the 128G boundary
>> limitation), allocate memory from above the boundary first, only
>> allocating
>> from the lower pool when needed.
>>  
>> Thanks,
>> James (Song Wei)
>>  
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 
> 

-- 
View this message in context: http://old.nabble.com/32bit-pv-VM-128G-memory-limited-tp26159377p26159985.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 32bit-pv-VM 128G memory limited
  2009-11-03  6:14   ` James (song wei)
@ 2009-11-03  7:48     ` Keir Fraser
  2009-11-03  8:19       ` James Song
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2009-11-03  7:48 UTC (permalink / raw)
  To: James (song wei), xen-devel

Xen's allocation policy is to allocate larger addresses before smaller
addresses (although allocating from closer NUMA node may dominate this). So
memory over 128G should get allocated first, for guests that can use it. If
the NUMA allocation policy is getting in the way, and you want to reserve
say 64G of memory always to be allocated last, irrespective of NUMA policy,
try adding dma_bitsize=36 as a Xen boot parameter.

For 32-bit PV guests, Xen already maintains a maximum-address-size: see
implementation and use of domain_clamp_alloc_bitsize().

 -- Keir

On 03/11/2009 06:14, "James (song wei)" <jsong@novell.com> wrote:

> 
> Keir 
>  could you please say it in more detail?
> 
> Thanks,
> James 
> 
> Keir Fraser-3 wrote:
>> 
>> This should all already happen by default.
>> 
>>  -- Keir
>> 
>> On 02/11/2009 07:49, "James Song" <jsong@novell.com> wrote:
>> 
>>> Hi, 
>>>  
>>>  
>>>     Since 32-bit pv-domUs require memory below the 128G boundary (IIRC)
>>> but
>>> tools don't enforce this.  So we need a "memory pool" for 32bit pv-domUs.
>>> When starting a 32-bit domU, allocate memory from this pool.  If starting
>>> a
>>> 64-bit domUs or 32bit hvm dom (which don't suffer the 128G boundary
>>> limitation), allocate memory from above the boundary first, only
>>> allocating
>>> from the lower pool when needed.
>>>  
>>> Thanks,
>>> James (Song Wei)
>>>  
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>> 
>> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 32bit-pv-VM 128G memory limited
  2009-11-03  7:48     ` Keir Fraser
@ 2009-11-03  8:19       ` James Song
  0 siblings, 0 replies; 5+ messages in thread
From: James Song @ 2009-11-03  8:19 UTC (permalink / raw)
  To: Keir Fraser, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1711 bytes --]

Thank Keir very much for detailed explaining.

>>> Keir Fraser <keir.fraser@eu.citrix.com> 2009-11-3 15:48 >>>
Xen's allocation policy is to allocate larger addresses before smaller
addresses (although allocating from closer NUMA node may dominate this). So
memory over 128G should get allocated first, for guests that can use it. If
the NUMA allocation policy is getting in the way, and you want to reserve
say 64G of memory always to be allocated last, irrespective of NUMA policy,
try adding dma_bitsize=36 as a Xen boot parameter.

For 32-bit PV guests, Xen already maintains a maximum-address-size: see
implementation and use of domain_clamp_alloc_bitsize().

-- Keir

On 03/11/2009 06:14, "James (song wei)" <jsong@novell.com> wrote:

> 
> Keir 
>  could you please say it in more detail?
> 
> Thanks,
> James 
> 
> Keir Fraser-3 wrote:
>> 
>> This should all already happen by default.
>> 
>>  -- Keir
>> 
>> On 02/11/2009 07:49, "James Song" <jsong@novell.com> wrote:
>> 
>>> Hi, 
>>>  
>>>  
>>>     Since 32-bit pv-domUs require memory below the 128G boundary (IIRC)
>>> but
>>> tools don't enforce this.  So we need a "memory pool" for 32bit pv-domUs.
>>> When starting a 32-bit domU, allocate memory from this pool.  If starting
>>> a
>>> 64-bit domUs or 32bit hvm dom (which don't suffer the 128G boundary
>>> limitation), allocate memory from above the boundary first, only
>>> allocating
>>> from the lower pool when needed.
>>>  
>>> Thanks,
>>> James (Song Wei)
>>>  
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>> 
>> 



[-- Attachment #1.2: Type: text/html, Size: 2487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-03  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-02  7:49 32bit-pv-VM 128G memory limited James Song
2009-11-02  7:55 ` Keir Fraser
2009-11-03  6:14   ` James (song wei)
2009-11-03  7:48     ` Keir Fraser
2009-11-03  8:19       ` James Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.