lkml.org 
[lkml]   [2020]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 3/3] lockdep,trace: Expose tracepoints
On Fri, 07 Aug 2020 21:23:39 +0200
Peter Zijlstra <peterz@infradead.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@infradead.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@goodmis.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]++;
> }
>

\
 
 \ /
  Last update: 2020-08-07 22:34    [W:0.096 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site