On Thu, Apr 05, 2018 at 12:47:49AM -0700, Christoph Hellwig wrote:
> Can't we just kill off spin_is_locked? It seems pretty much all uses
> should simply be replaced with lockdep annotations, and there aren't
> many to start with.
Yeah, this is not the first time such a question has been raised
On Thu, Apr 05, 2018 at 12:47:49AM -0700, Christoph Hellwig wrote:
> Can't we just kill off spin_is_locked? It seems pretty much all uses
> should simply be replaced with lockdep annotations, and there aren't
> many to start with.
Yeah, this is not the first time such a question has been raised
Can't we just kill off spin_is_locked? It seems pretty much all uses
should simply be replaced with lockdep annotations, and there aren't
many to start with.
Can't we just kill off spin_is_locked? It seems pretty much all uses
should simply be replaced with lockdep annotations, and there aren't
many to start with.
Randy Dunlap wrote:
> > * Note that the function only tells you that the CPU is seen to be locked,
>
> the CPU is locked??
>
> > * not that it is locked on your CPU.
Sorry, yes: "... that the lock is seen to be locked, not that it is locked on
your CPU".
Randy Dunlap wrote:
> > * Note that the function only tells you that the CPU is seen to be locked,
>
> the CPU is locked??
>
> > * not that it is locked on your CPU.
Sorry, yes: "... that the lock is seen to be locked, not that it is locked on
your CPU".
On Tue, Apr 03, 2018 at 10:43:14PM +0100, David Howells wrote:
> Alan Stern wrote:
>
> > + * Returns: 1 if @lock is locked, 0 otherwise.
> > + * However, on !CONFIG_SMP builds with !CONFIG_DEBUG_SPINLOCK,
> > + * the return value is always 0 (see
On Tue, Apr 03, 2018 at 10:43:14PM +0100, David Howells wrote:
> Alan Stern wrote:
>
> > + * Returns: 1 if @lock is locked, 0 otherwise.
> > + * However, on !CONFIG_SMP builds with !CONFIG_DEBUG_SPINLOCK,
> > + * the return value is always 0 (see include/linux/spinlock_up.h).
> > + * Therefore
On 04/03/2018 02:43 PM, David Howells wrote:
> Alan Stern wrote:
>
>> + * Returns: 1 if @lock is locked, 0 otherwise.
>> + * However, on !CONFIG_SMP builds with !CONFIG_DEBUG_SPINLOCK,
>> + * the return value is always 0 (see include/linux/spinlock_up.h).
>> + *
On 04/03/2018 02:43 PM, David Howells wrote:
> Alan Stern wrote:
>
>> + * Returns: 1 if @lock is locked, 0 otherwise.
>> + * However, on !CONFIG_SMP builds with !CONFIG_DEBUG_SPINLOCK,
>> + * the return value is always 0 (see include/linux/spinlock_up.h).
>> + * Therefore you should not rely
Alan Stern wrote:
> + * Returns: 1 if @lock is locked, 0 otherwise.
> + * However, on !CONFIG_SMP builds with !CONFIG_DEBUG_SPINLOCK,
> + * the return value is always 0 (see include/linux/spinlock_up.h).
> + * Therefore you should not rely heavily on the return value.
Alan Stern wrote:
> + * Returns: 1 if @lock is locked, 0 otherwise.
> + * However, on !CONFIG_SMP builds with !CONFIG_DEBUG_SPINLOCK,
> + * the return value is always 0 (see include/linux/spinlock_up.h).
> + * Therefore you should not rely heavily on the return value.
Seems reasonable.
It
On Tue, 3 Apr 2018, Andrea Parri wrote:
> On Tue, Apr 03, 2018 at 04:23:07PM +0100, David Howells wrote:
> > Andrea Parri wrote:
> >
> > > Sorry, but I don't understand your objection: are you suggesting to add
> > > something like "Always return 0 on !SMP" to
On Tue, 3 Apr 2018, Andrea Parri wrote:
> On Tue, Apr 03, 2018 at 04:23:07PM +0100, David Howells wrote:
> > Andrea Parri wrote:
> >
> > > Sorry, but I don't understand your objection: are you suggesting to add
> > > something like "Always return 0 on !SMP" to the comment? what else?
> >
> >
On Tue, Apr 03, 2018 at 04:23:07PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > Sorry, but I don't understand your objection: are you suggesting to add
> > something like "Always return 0 on !SMP" to the comment? what else?
>
> Something like that,
On Tue, Apr 03, 2018 at 04:23:07PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > Sorry, but I don't understand your objection: are you suggesting to add
> > something like "Always return 0 on !SMP" to the comment? what else?
>
> Something like that, possibly along with a warning that
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
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
Andrea Parri wrote:
> Sorry, but I don't understand your objection: are you suggesting to add
> something like "Always return 0 on !SMP" to the comment? what else?
Something like that, possibly along with a warning that this might not be what
you want. You
Andrea Parri wrote:
> Sorry, but I don't understand your objection: are you suggesting to add
> something like "Always return 0 on !SMP" to the comment? what else?
Something like that, possibly along with a warning that this might not be what
you want. You might actually want it to return
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().
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().
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().
As I stated before in this thread, ideally we'd make *_is_locked() go
away
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().
As I stated before in this thread, ideally we'd make *_is_locked() go
away
On Tue, Apr 03, 2018 at 02:52:33PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > > It's more complicated than that. This function is dangerous and should be
> > > used with extreme care. In the case where CONFIG_SMP=n the value is
> > > locked
> >
On Tue, Apr 03, 2018 at 02:52:33PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > > It's more complicated than that. This function is dangerous and should be
> > > used with extreme care. In the case where CONFIG_SMP=n the value is
> > > locked
> > > one way or the other and it might
On Tue, Apr 03, 2018 at 02:52:33PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > > It's more complicated than that. This function is dangerous and should be
> > > used with extreme care. In the case where CONFIG_SMP=n the value is
> > > locked
> >
On Tue, Apr 03, 2018 at 02:52:33PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > > It's more complicated than that. This function is dangerous and should be
> > > used with extreme care. In the case where CONFIG_SMP=n the value is
> > > locked
> > > one way or the other and it might
Andrea Parri wrote:
> > It's more complicated than that. This function is dangerous and should be
> > used with extreme care. In the case where CONFIG_SMP=n the value is locked
> > one way or the other and it might be the wrong way.
>
> You mean "unlocked"?
Andrea Parri wrote:
> > It's more complicated than that. This function is dangerous and should be
> > used with extreme care. In the case where CONFIG_SMP=n the value is locked
> > one way or the other and it might be the wrong way.
>
> You mean "unlocked"? (aka, return 0)
No, I mean
On Tue, Apr 03, 2018 at 01:49:09PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > +/**
> > + * spin_is_locked() - Check whether a spinlock is locked.
> > + * @lock: Pointer to the spinlock.
> > + *
> > + * This function is NOT required to provide any
On Tue, Apr 03, 2018 at 01:49:09PM +0100, David Howells wrote:
> Andrea Parri wrote:
>
> > +/**
> > + * spin_is_locked() - Check whether a spinlock is locked.
> > + * @lock: Pointer to the spinlock.
> > + *
> > + * This function is NOT required to provide any memory ordering
> > + * guarantees;
Andrea Parri wrote:
> +/**
> + * spin_is_locked() - Check whether a spinlock is locked.
> + * @lock: Pointer to the spinlock.
> + *
> + * This function is NOT required to provide any memory ordering
> + * guarantees; it could be used for debugging purposes or,
Andrea Parri wrote:
> +/**
> + * spin_is_locked() - Check whether a spinlock is locked.
> + * @lock: Pointer to the spinlock.
> + *
> + * This function is NOT required to provide any memory ordering
> + * guarantees; it could be used for debugging purposes or, when
> + * additional
On Mon, Apr 02, 2018 at 10:03:22AM -0400, Alan Stern wrote:
> On Sun, 1 Apr 2018, Andrea Parri wrote:
>
> > There appeared to be a certain, recurrent uncertainty concerning the
> > semantics of spin_is_locked(), likely a consequence of the fact that
> > this semantics remains undocumented or that
On Mon, Apr 02, 2018 at 10:03:22AM -0400, Alan Stern wrote:
> On Sun, 1 Apr 2018, Andrea Parri wrote:
>
> > There appeared to be a certain, recurrent uncertainty concerning the
> > semantics of spin_is_locked(), likely a consequence of the fact that
> > this semantics remains undocumented or that
On Sun, 1 Apr 2018, Andrea Parri wrote:
> There appeared to be a certain, recurrent uncertainty concerning the
> semantics of spin_is_locked(), likely a consequence of the fact that
> this semantics remains undocumented or that it has been historically
> linked to the (likewise unclear) semantics
On Sun, 1 Apr 2018, Andrea Parri wrote:
> There appeared to be a certain, recurrent uncertainty concerning the
> semantics of spin_is_locked(), likely a consequence of the fact that
> this semantics remains undocumented or that it has been historically
> linked to the (likewise unclear) semantics
There appeared to be a certain, recurrent uncertainty concerning the
semantics of spin_is_locked(), likely a consequence of the fact that
this semantics remains undocumented or that it has been historically
linked to the (likewise unclear) semantics of spin_unlock_wait().
A recent auditing [1] of
There appeared to be a certain, recurrent uncertainty concerning the
semantics of spin_is_locked(), likely a consequence of the fact that
this semantics remains undocumented or that it has been historically
linked to the (likewise unclear) semantics of spin_unlock_wait().
A recent auditing [1] of
40 matches
Mail list logo