[tip:locking/core] futex: Replace spin_is_locked() with lockdep

2018-10-09 Thread tip-bot for Lance Roy
Commit-ID: 4de1a293a08bdf8ec1530e02163930ac86f80ea2 Gitweb: https://git.kernel.org/tip/4de1a293a08bdf8ec1530e02163930ac86f80ea2 Author: Lance Roy AuthorDate: Tue, 2 Oct 2018 22:38:57 -0700 Committer: Thomas Gleixner CommitDate: Tue, 9 Oct 2018 13:19:28 +0200 futex: Replace

[PATCH] TTY: Replace spin_is_locked() with spin_trylock()

2018-10-04 Thread Lance Roy
sn_sal_console_write() used spin_is_locked() + spin_lock() to get achieve the same thing as a spin_trylock(), so simplify it by using that instead. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: --- drivers

Re: [PATCH 01/16] x86/PCI: Replace spin_is_locked() with lockdep

2018-10-03 Thread Lance Roy
On Wed, Oct 03, 2018 at 11:00:51AM -0500, Bjorn Helgaas wrote: > On Tue, Oct 02, 2018 at 10:38:47PM -0700, Lance Roy wrote: > > lockdep_assert_held() is better suited to checking locking requirements, > > since it won't get confused when someone else holds the lock. This is >

[PATCH 01/16] x86/PCI: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Bjorn Helgaas Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Bor

[PATCH 10/16] userfaultfd: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Alexander Viro Cc: --- fs/userfaultfd.c | 2 +- 1 file chang

Using lockdep instead of spin_is_locked()

2018-10-02 Thread Lance Roy
One of the main uses of spin_is_locked() is to require that a lock is held when a function is called, for debugging, but lockdep_assert_held() is better for this purpose since it won't make a mistake when someone else is holding the lock. This patch series replaces all of this kind of use of spin_i

[PATCH 08/16] wireless: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Daniel Drake Cc: Ulrich Kunitz Cc: Kalle Valo Cc: &qu

[PATCH 14/16] netfilter: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westpha

[PATCH 04/16] i40e: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Jeff Kirsher Cc: "David S. Miller"

[PATCH 03/16] sgi-xp: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Cliff Whickman Cc: Robin Holt Cc: Arnd Bergmann Cc: Greg

[PATCH 12/16] locking/mutex: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon --- k

[PATCH 07/16] smsc: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Steve Glendinning Cc: "David S. Miller" Cc: -

[PATCH 02/16] hv_balloon: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephe

[PATCH 11/16] futex: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: D

[PATCH 13/16] mm: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Andrew Morton Cc: "Kirill A. Shutemov" Cc: Yang S

[PATCH 15/16] apparmor: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: John Johansen Cc: James Morris Cc: "Serge E. H

Re: [PATCH v1 1/1] srcu-cbmc: Use /usr/bin/awk instead of /bin/awk

2017-04-23 Thread Lance Roy
Acked-by: Lance Roy On Sat, 22 Apr 2017 10:17:11 -0700 priyalee.kushw...@intel.com wrote: > From: Priyalee Kushwaha > > Most OS distribution have awk in /usr/bin not in /bin > Without this patch, kernel-devsrc fails to build as > runtime dependency for srcu-cbmc script /bin/awk

Re: [PATCH v1 1/1] srcu-cbmc: Use /usr/bin/awk instead of /bin/awk

2017-04-23 Thread Lance Roy
This is fine with me. I didn't notice that /bin/awk was just a symlink on the distro I was using when I wrote the script. Thanks, Lance On Fri, 21 Apr 2017 10:50:42 -0700 "Paul E. McKenney" wrote: > On Sat, Apr 22, 2017 at 10:17:11AM -0700, priyalee.kushw...@intel.com wrote: > > From: Priyalee

Re: srcu: BUG in __synchronize_srcu

2017-03-14 Thread Lance Roy
I am not sure how the rcu_scheduler_active changes in __synchronize_srcu work, but there seem to be a few problems in them. First, "if (done && likely(!driving))" on line 453 doesn't appear to ever happen, as driving doesn't get set to false when srcu_reschedule is called. This seems like it could

Re: [PATCH v3 tip/core/rcu 1/4] srcu: Implement more-efficient reader counts

2017-01-25 Thread Lance Roy
Could you please use the new patch? The remark about ULONG_MAX - NR_CPUS is incorrect in this one. Thanks, Lance On Tue, 24 Jan 2017 14:00:26 -0800 "Paul E. McKenney" wrote: > From: Lance Roy > > SRCU uses two per-cpu counters: a nesting counter to count the number o

Re: [PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Lance Roy
arrier should be necessary. Thanks, Lance Begin forwarded message: Date: Fri, 18 Nov 2016 16:54:42 -0800 From: Lance Roy To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, mi...@kernel.org, jiangshan...@gmail.com, dipan...@in.ibm.com, a...@linux-foundation.org, mathieu.desnoy...@ef

Re: [PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Lance Roy
On Mon, 23 Jan 2017 16:42:52 -0800 "Paul E. McKenney" wrote: > On Mon, Jan 23, 2017 at 01:35:18PM -0800, Lance Roy wrote: > > SRCU uses two per-cpu counters: a nesting counter to count the number of > > active critical sections, and a sequence counter to ensure that

[PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Lance Roy
y: Mathieu Desnoyers Signed-off-by: Lance Roy Cc: Paul E. McKenney Cc: Lai Jiangshan Cc: Peter Zijlstra --- include/linux/srcu.h| 10 ++-- kernel/rcu/rcutorture.c | 19 +++- kernel/rcu/srcu.c | 122 +--- 3 files changed, 66 inserti

Re: [PATCH] SRCU: More efficient reader counts.

2017-01-23 Thread Lance Roy
On Mon, 23 Jan 2017 12:35:08 -0800 "Paul E. McKenney" wrote: > On Mon, Jan 23, 2017 at 12:17:25PM -0800, Lance Roy wrote: > > SRCU uses two per-cpu counters: a nesting counter to count the number of > > active critical sections, and a sequence counter to ensure that

[PATCH] SRCU: More efficient reader counts.

2017-01-23 Thread Lance Roy
ggested-by: Mathieu Desnoyers Signed-off-by: Lance Roy --- include/linux/srcu.h| 4 +- kernel/rcu/rcutorture.c | 20 - kernel/rcu/srcu.c | 116 ++-- 3 files changed, 63 insertions(+), 77 deletions(-) diff --git a/include/linux/srcu.h

[PATCH v2 tip/core/rcu 1/3] srcu: Implement more-efficient reader counts

2017-01-23 Thread Lance Roy
Here is a more recent version of the patch. It has more accurate comments.

Re: [PATCH v2 tip/core/rcu 2/3] srcu: Force full grace-period ordering

2017-01-23 Thread Lance Roy
On Mon, 23 Jan 2017 11:12:07 -0800 "Paul E. McKenney" wrote: > On Mon, Jan 23, 2017 at 12:38:29AM -0800, Lance Roy wrote: > > On Sun, 15 Jan 2017 14:42:34 -0800 > > "Paul E. McKenney" wrote: > > > > > @@ -413,6 +415,8 @@ static void __

Re: [PATCH v2 tip/core/rcu 2/3] srcu: Force full grace-period ordering

2017-01-23 Thread Lance Roy
riod and > the code following the synchronize_srcu(). Similarly, there can be a > lack of ordering between the end of the SRCU grace period and callback > invocation. > > This commit adds the necessary ordering. > > Reported-by: Lance Roy > Signed-off-by: Paul E. McKen

Re: [RFC PATCH] SRCU: More efficient reader counts.

2016-11-18 Thread Lance Roy
On Fri, 18 Nov 2016 15:13:45 -0800 "Paul E. McKenney" wrote: > On Fri, Nov 18, 2016 at 12:33:00PM -0800, Lance Roy wrote: > > The trouble is that disabling preemption is not enough to ensure that there > > is at most one srcu_read_lock() call per CPU that missed the src

Re: [RFC PATCH] SRCU: More efficient reader counts.

2016-11-18 Thread Lance Roy
On Fri, 18 Nov 2016 06:08:45 -0800 "Paul E. McKenney" wrote: > However, let's first take a look at the overflow issue. > > If a given program could have ULONG_MAX or more readers at any given > time, there would of course be overflow. However, each read must have > an srcu_read_lock() outstandin

[RFC PATCH] SRCU: More efficient reader counts.

2016-11-17 Thread Lance Roy
ggested-by: Mathieu Desnoyers Signed-off-by: Lance Roy --- include/linux/srcu.h| 4 +- kernel/rcu/rcutorture.c | 20 - kernel/rcu/srcu.c | 116 ++-- 3 files changed, 63 insertions(+), 77 deletions(-) diff --git a/include/linux/srcu.h

Re: [PATCH RFC tip/core/rcu] SRCU rewrite

2016-11-17 Thread Lance Roy
On Thu, 17 Nov 2016 23:07:02 +0800 Lai Jiangshan wrote: > On Thu, Nov 17, 2016 at 10:31 PM, Boqun Feng wrote: > > After reading the comment for a while, I actually got a question, maybe > > I miss something ;-) > > > > Why "at most NR_CPUS worth of readers using the old index haven't > > increme

Re: [PATCH RFC tip/core/rcu] SRCU rewrite

2016-11-17 Thread Lance Roy
On Thu, 17 Nov 2016 21:58:34 +0800 Lai Jiangshan wrote: > from the changelog, it sounds like that "ULONG_MAX - NR_CPUS" is the limit > of the implements(old or this one). but actually the real max number of > active readers is much smaller, I think ULONG_MAX/4 can be used here instead > and that p