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] Re: [PATCH] xentrace: dynamic tracebuffer size allocation

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [PATCH] xentrace: dynamic tracebuffer size allocation
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Sat, 5 Feb 2011 17:32:39 +0100
Delivery-date: Sat, 05 Feb 2011 08:33:32 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1296923563; l=1045; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=1XEPi/pQhu4T6/1niyrGlG6lut8=; b=Y+dXH7wsB1IT1zAbFQxrQoURKqBbk6l1hoTCYGLYvrdIGmXhgq5b9pUQQqA1DYU6TmI lhTX5DN5krbsQlU4YPqUD6LjqkpMS/rgkFT7klx7fTeitvrVPK8Ef+m+C7ZMXBC6letnO cD30fBDmMZU5I1pq9SxlK/iaCkgThXsTjHo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110205140717.GA3224@xxxxxxxxx>
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>
References: <20110205140717.GA3224@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
On Sat, Feb 05, Olaf Hering wrote:

> 
> Allocate tracebuffers dynamically, based on the requested buffer size.
> Calculate t_info_size from requested t_buf size.
> Fix allocation failure path, free pages without the spinlock.
> The spinlock is not needed since tracing is not yet enabled.
> Remove casts for rawbuf, it can be a void pointer since no math is done.
> 
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

plus this change to fix a compile error after spinlock removal..


Index: xen-unstable.hg-4.1.22870/xen/common/trace.c
===================================================================
--- xen-unstable.hg-4.1.22870.orig/xen/common/trace.c
+++ xen-unstable.hg-4.1.22870/xen/common/trace.c
@@ -185,7 +185,6 @@ static int alloc_trace_bufs(unsigned int
      */
     for_each_online_cpu(cpu)
     {
-        int flags;
         void *rawbuf;
         struct t_buf *buf;
 
@@ -243,7 +242,6 @@ static int alloc_trace_bufs(unsigned int
 out_dealloc:
     for_each_online_cpu(cpu)
     {
-        int flags;
         void *rawbuf;
 
         rawbuf = per_cpu(t_bufs, cpu);

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