All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH]: Fix xentrace buffer allocation
Date: Mon, 16 Aug 2010 13:23:01 +0200	[thread overview]
Message-ID: <4C691F95.4020606@amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

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@amd.com>

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12

[-- Attachment #2: fix_tinfo_allocation.patch --]
[-- Type: text/x-patch, Size: 666 bytes --]

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 )
     {

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

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

             reply	other threads:[~2010-08-16 11:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 11:23 Andre Przywara [this message]
2010-08-17 10:05 ` [PATCH]: Fix xentrace buffer allocation George Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C691F95.4020606@amd.com \
    --to=andre.przywara@amd.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.