lkml.org 
[lkml]   [2018]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked()
On Tue, Apr 03, 2018 at 08:03:56AM -0700, Paul E. McKenney wrote:
> On Tue, Apr 03, 2018 at 04:43:00PM +0200, Peter Zijlstra wrote:
> > On Tue, Apr 03, 2018 at 07:17:18AM -0700, Paul E. McKenney wrote:
> > > Suggestions for a fix? Clearly great care is required when using it
> > > in things like WARN_ON()...
> >
> > Yeah, don't use it there, use lockdep_assert_held().
>
> Good point, -ETOOEARLY. ;-)
>
> > As I stated before in this thread, ideally we'd make *_is_locked() go
> > away entirely.
>
> After being reminded of the issues on UP systems, I now have much more
> sympathy for that view...

And so the main remaining use case is debug prints on !PROVE_LOCKING
builds. Which need some thought about the UP case.

Or am I missing something here?

Thanx, Paul

\
 
 \ /
  Last update: 2018-04-03 18:11    [W:0.047 / U:1.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site