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

Re: [Xen-devel] RE: [PATCH] Make lock profiling usable again

To: "Hao, Xudong" <xudong.hao@xxxxxxxxx>
Subject: Re: [Xen-devel] RE: [PATCH] Make lock profiling usable again
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Date: Mon, 07 Nov 2011 06:52:06 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 06 Nov 2011 21:53:00 -0800
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=juergen.gross@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1320645127; x=1352181127; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to:content-transfer-encoding; bh=SSLsC1b9j78sEFbStmpj/uM9rK0MrJSx4T2aeSJ7LaY=; b=ZOuU3fcBWxafsNUcH2nB7R7AXZuoduQ4THB3r+6ZpcvAZa/H9bCP0EIA mbVQoo/W+mf9h9XIZDFT7CrNJ1a9OoBiLlBbM2YT2jNY72RvEiv1/xsYl 90V7jyURDqm5mincG+bAyd6n537OtMipnnH/heO6jOYt1lGG3F4IKyszX VBdZj7yapKES46FuB8SwFHCmeKfyJL/eCD3YhMcsL+2o3tcKl8DONECQM D+q4bahXRR+7sf/QtuGFA1EepVFaf;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=tLMIw4Qn3wNH9IIOh08h+AiYB6sQniT3NbZrlJbd0ED1OHIq/cgTtzju qkkhnbFqIuU+aRJf78mcTg8UU0A8X8TK/179y9N63LxjOTqCdKiE7W9Rf 4QkG8g4RppIqGVPbdFzSmYg4XnpJtG9je2pCaFS/IJ/L/fhRdF68mOu4o vfLAdPs3A0X1J9eI1G1EbbqUiHdP0ALcm6R6ryhGaN1Iu1qqh/NwOjiuv 1agwaPBmkholitEcGb1bNlVYFJ+jj;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BC00F5384FCFC9499AF06F92E8B78A9E281497FD88@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Organization: Fujitsu Technology Solutions
References: <df918a251d01d3ac6267.1320411162@nehalem1> <BC00F5384FCFC9499AF06F92E8B78A9E281497FD88@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Iceowl/1.0b2 Icedove/3.1.15
Xudong,

I found that bug after sending you the patch and included the correction
already in the version sent to xen-devel.


Juergen

On 11/05/2011 05:10 AM, Hao, Xudong wrote:
Initialize profile to NULL when lock profiling is not enabled.

diff -r 068d3d55ce6e xen/include/xen/spinlock.h
--- a/xen/include/xen/spinlock.h        Tue Nov 01 19:03:38 2011 +0000
+++ b/xen/include/xen/spinlock.h        Sat Nov 05 11:57:38 2011 +0800
@@ -108,7 +108,7 @@ struct lock_profile_qhead { };
  struct lock_profile_qhead { };

  #define SPIN_LOCK_UNLOCKED                                                    
\
-    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, { } }
+    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, NULL }
  #define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED

  #define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))


Thanks,
-Xudong


-----Original Message-----
From: Juergen Gross [mailto:juergen.gross@xxxxxxxxxxxxxx]
Sent: Friday, November 04, 2011 8:53 PM
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Cc: Hao, Xudong
Subject: [PATCH] Make lock profiling usable again

Using lock profiling (option lock_profile in xen/Rules.mk) resulted in build 
errors.
Changes:
- Include public/sysctl.h in spinlock.h when using lock profiling.
- Allocate profile data in an own structure to avoid struct domain becoming
   larger then one page

Signed-off-by: juergen.gross@xxxxxxxxxxxxxx


2 files changed, 44 insertions(+), 24 deletions(-)
xen/common/spinlock.c      |   34 +++++++++++++++++++++-------------
xen/include/xen/spinlock.h |   34 +++++++++++++++++++++++-----------


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




--
Juergen Gross                 Principal Developer Operating Systems
PDG ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@xxxxxxxxxxxxxx
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html


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

<Prev in Thread] Current Thread [Next in Thread>