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

Re: [Xen-ia64-devel] [PATCH 14/14] memmap: allow huge size efi memory ma

To: Jes Sorensen <jes@xxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH 14/14] memmap: allow huge size efi memory map of real machine
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 6 Jun 2007 17:37:31 +0900
Cc: Alex Williamson <alex.williamson@xxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 06 Jun 2007 01:35:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <yq0fy551prz.fsf@xxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070517104357.GA14091%yamahata@xxxxxxxxxxxxx> <1179883948.6134.182.camel@bling> <20070523121444.GC4949%yamahata@xxxxxxxxxxxxx> <yq0fy551prz.fsf@xxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Wed, Jun 06, 2007 at 03:54:40AM -0400, Jes Sorensen wrote:
> >>>>> "Isaku" == Isaku Yamahata <yamahata@xxxxxxxxxxxxx> writes:
> 
> Isaku> On Tue, May 22, 2007 at 07:32:28PM -0600, Alex Williamson
> Isaku> wrote:
> >> In this case NUM_MEM_DESCS should be very small since it's only
> >> adding the descriptors we add for xen and the rest is dynamically
> >> sized based on the number of entries in the MDT provided by
> >> firmware.  Thanks,
> 
> Isaku> I'll postpone reducing NUM_MEM_DESCS until memory corruption
> Isaku> fix.
> 
> Hi Isaku,

Hi Jes.


> Just catching up on old mail - I'm not really happy with this part
> from the current tree:
> 
> #define NUM_MEM_DESCS           64 //large enough
> 
> Is that what you are trying to reduce? Sorry I'm a bit behind on my
> email. Basically for dom0 thats a problem since on larger multi-node
> systems we easily have far more and we need at least one per node.

Before the patch, it is statically allocated as NUM_MEM_DESCS-sized array.
With the patch, the array is dynamically allocated.
So NUM_MEM_DESCS isn't necessary to be so large.
It can be reduced safely.

Probably you may want to check c/s 15155:c0cdcebc0377
of xen-ia64-unstable.hg.
I cite the essential part of it. Notice efi_memmap member.


+               fw_tables_size = sizeof(*fw_tables) +
+                       (ia64_boot_param->efi_memmap_size /
+                        ia64_boot_param->efi_memdesc_size + NUM_MEM_DESCS) *
+                       sizeof(fw_tables->efi_memmap[0]);
...
+               fw_tables =
+                   (struct fw_tables *)_xmalloc(fw_tables_size,
+                                                __alignof__(*fw_tables));
...
diff -r b46c2ff6dfb0 -r c0cdcebc0377 xen/include/asm-ia64/dom_fw_common.h
--- a/xen/include/asm-ia64/dom_fw_common.h      Thu May 31 14:47:08 2007 -0600
+++ b/xen/include/asm-ia64/dom_fw_common.h      Mon Jun 04 13:57:08 2007 -0600
@@ -64,16 +64,26 @@ struct fw_tables {
     /* End of SAL descriptors.  Do not forget to update checkum bound.  */
 
     fpswa_interface_t                   fpswa_inf;
-    efi_memory_desc_t                   efi_memmap[NUM_MEM_DESCS];
     unsigned long                       func_ptrs[2*NFUNCPTRS];
     struct xen_sal_data                 sal_data;
     unsigned char                       fw_vendor[sizeof(FW_VENDOR)];
+
+    /*
+     * These four member for domain builder internal use at virtualized
+     * efi memmap creation. They should be zero-cleared after use.
+     */
+    unsigned long                       fw_tables_size;
+    unsigned long                       fw_end_paddr;   
+    unsigned long                       fw_tables_end_paddr;
+    unsigned long                       num_mds;
+
+    efi_memory_desc_t                   efi_memmap[0];
 };
 #define FW_FIELD_MPA(field)                                     \
     FW_TABLES_BASE_PADDR + offsetof(struct fw_tables, field)


-- 
yamahata

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