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-devel

[Xen-devel] [PATCH]: Fix xentrace buffer allocation

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: Fix xentrace buffer allocation
From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Mon, 16 Aug 2010 13:23:01 +0200
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 16 Aug 2010 04:26:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090820)
Hi,

during experiments with xentrace we found that the t_info buffer allocation does not match the constants describing the buffer size. Attached patch fixes this, so changes of the buffer size only requires a single line change in the future. Thanks to Uwe for reporting this.

Regards,
Andre.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
diff -r 774dfc178c39 xen/common/trace.c
--- a/xen/common/trace.c        Thu Aug 12 17:06:21 2010 +0100
+++ b/xen/common/trace.c        Mon Aug 16 13:22:47 2010 +0200
@@ -321,9 +321,9 @@
     /* Calculate offset in u32 of first mfn */
     calc_tinfo_first_offset();
 
-    /* t_info size fixed at 2 pages for now.  That should be big enough / 
small enough
-     * until it's worth making it dynamic. */
-    t_info = alloc_xenheap_pages(1, 0);
+    /* t_info size is fixed for now. Currently this works great, so there
+     * seems to be no need to make it dynamic. */
+    t_info = alloc_xenheap_pages(get_order_from_pages(T_INFO_PAGES), 0);
 
     if ( t_info == NULL )
     {
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>