[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200807163422.02bae823@oasis.local.home>
Date: Fri, 7 Aug 2020 16:34:22 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: tglx@...utronix.de, mingo@...nel.org, will@...nel.org,
x86@...nel.org, linux-kernel@...r.kernel.org, elver@...gle.com,
paulmck@...nel.org, rjw@...ysocki.net
Subject: Re: [RFC][PATCH 3/3] lockdep,trace: Expose tracepoints
On Fri, 07 Aug 2020 21:23:39 +0200
Peter Zijlstra <peterz@...radead.org> wrote:
> The lockdep tracepoints are under the lockdep recursion counter, this
> has a bunch of nasty side effects:
>
> - TRACE_IRQFLAGS doesn't work across the entire tracepoint, leading to
> all sorts of dodgy complaints.
>
> - RCU-lockdep doesn't see the tracepoints either, hiding numerous
> "suspicious RCU usage" warnings.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> kernel/locking/lockdep.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -5000,8 +5000,9 @@ void lock_acquire(struct lockdep_map *lo
> raw_local_irq_save(flags);
> check_flags(flags);
>
> - current->lockdep_recursion++;
> trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
> +
> + current->lockdep_recursion++;
> __lock_acquire(lock, subclass, trylock, read, check,
> irqs_disabled_flags(flags), nest_lock, ip, 0, 0);
> lockdep_recursion_finish();
> @@ -5016,10 +5017,13 @@ void lock_release(struct lockdep_map *lo
> if (unlikely(current->lockdep_recursion))
> return;
>
> +
Superfluous space.
Other than that:
Reviewed-by: Steven Rosted (VMware) <rostedt@...dmis.org>
-- Steve
> raw_local_irq_save(flags);
> check_flags(flags);
> - current->lockdep_recursion++;
> +
> trace_lock_release(lock, ip);
> +
> + current->lockdep_recursion++;
> if (__lock_release(lock, ip))
> check_chain_key(current);
> lockdep_recursion_finish();
> @@ -5171,7 +5175,7 @@ __lock_contended(struct lockdep_map *loc
> stats->bounces[bounce_contended + !!hlock->read]++;
> }
>
Powered by blists - more mailing lists