public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection
Date: Thu, 16 Apr 2009 12:15:45 -0400	[thread overview]
Message-ID: <20090416161746.831882528@goodmis.org> (raw)
In-Reply-To: 20090416161543.199331330@goodmis.org

[-- Attachment #1: 0002-tracing-events-lockdep-move-tracepoints-within-recu.patch --]
[-- Type: text/plain, Size: 1696 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

With the current location of the tracepoints in lockdep, the system
can hard lockup in minutes when the tracepoints are enabled.

Moving the tracepoints outside inside the lockdep protection solves
the issue.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/lockdep.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 47b201e..53b887a 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2941,11 +2941,11 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 {
 	unsigned long flags;
 
-	trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
-
 	if (unlikely(current->lockdep_recursion))
 		return;
 
+	trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
+
 	raw_local_irq_save(flags);
 	check_flags(flags);
 
@@ -2962,11 +2962,11 @@ void lock_release(struct lockdep_map *lock, int nested,
 {
 	unsigned long flags;
 
-	trace_lock_release(lock, nested, ip);
-
 	if (unlikely(current->lockdep_recursion))
 		return;
 
+	trace_lock_release(lock, nested, ip);
+
 	raw_local_irq_save(flags);
 	check_flags(flags);
 	current->lockdep_recursion = 1;
@@ -3118,14 +3118,14 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip)
 {
 	unsigned long flags;
 
+	if (unlikely(current->lockdep_recursion))
+		return;
+
 	trace_lock_contended(lock, ip);
 
 	if (unlikely(!lock_stat))
 		return;
 
-	if (unlikely(current->lockdep_recursion))
-		return;
-
 	raw_local_irq_save(flags);
 	check_flags(flags);
 	current->lockdep_recursion = 1;
-- 
1.6.2.1

-- 

  parent reply	other threads:[~2009-04-16 16:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 16:15 [PATCH 0/2] [GIT PULL] updates for event tester and lockdep tracer Steven Rostedt
2009-04-16 16:15 ` [PATCH 1/2] tracing/events: perform function tracing in event selftests Steven Rostedt
2009-04-17 16:10   ` [tip:tracing/core] " tip-bot for Steven Rostedt
2009-04-16 16:15 ` Steven Rostedt [this message]
2009-04-16 16:47   ` [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection Peter Zijlstra
2009-04-16 17:03     ` Steven Rostedt
2009-04-16 17:20       ` Peter Zijlstra
2009-04-16 17:38         ` Steven Rostedt
2009-04-16 17:49           ` Peter Zijlstra
2009-04-16 17:58             ` Steven Rostedt
2009-04-16 18:06               ` Peter Zijlstra
2009-04-16 18:12                 ` Steven Rostedt
2009-04-16 18:29                   ` Mathieu Desnoyers
2009-04-16 18:22               ` Mathieu Desnoyers
2009-04-16 17:45     ` Steven Rostedt
2009-04-16 17:53       ` Peter Zijlstra
2009-04-17  3:03         ` Steven Rostedt
2009-04-17  3:24           ` Steven Rostedt
2009-04-17  7:40             ` Peter Zijlstra
2009-04-17 16:03               ` [tip:core/urgent] lockdep: more robust lockdep_map init sequence tip-bot for Peter Zijlstra
2009-04-17  4:16           ` [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection Steven Rostedt
2009-04-17  4:36             ` Steven Rostedt
2009-04-17  4:52             ` Mathieu Desnoyers
2009-04-17 11:09               ` Steven Rostedt
2009-04-17 22:19                 ` [PATCH] x86 entry_64.S lockdep fix Mathieu Desnoyers
2009-04-18 13:54                   ` Steven Rostedt
2009-04-19  4:11                     ` Mathieu Desnoyers
2009-04-19  9:10                       ` Ingo Molnar
2009-04-17  7:44             ` [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection Peter Zijlstra
2009-04-16 16:40 ` [PATCH 0/2] [GIT PULL] updates for event tester and lockdep tracer Ingo Molnar

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=20090416161746.831882528@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox