Re: rcu_preempt caused oom

2018-12-07 Thread Paul E. McKenney
k interrupt should also check for this, and should push things > forward if need be. > > If RCU managed to put all of its callbacks into the RCU_NEXT_READY_TAIL > bucket on all CPUs, that would defeat the wakeup-if-no-grace-period checks > (RCU is supposed to have started the rele

Re: [PATCH] Linux: Implement membarrier function

2018-12-06 Thread Paul E. McKenney
(Of course, without the > kernel itself committing to a rigorous semantics, anything specified > on top of it will be on slightly shaky ground). > > - David > > On Thu, Nov 29, 2018 at 7:04 AM Paul E. McKenney > wrote: > > > > On Thu, Nov 29, 2018 at 09:

Re: rcu_preempt caused oom

2018-12-06 Thread Paul E. McKenney
ier, to see something interesting, you will need to start the > ftrace before the grace period starts. This would probably mean having > ftrace running before starting the test. Starting the ftrace after the hang > commences is unlikely to produce useful information. > >

Re: [tip:core/rcu] rcutorture: Make initrd/init execute in userspace

2018-12-05 Thread Paul E. McKenney
On Wed, Dec 05, 2018 at 04:58:27PM -0800, Josh Triplett wrote: > On Thu, Dec 06, 2018 at 01:51:47AM +0100, Andrea Parri wrote: > > > commit 4f8f751961b536f77c8f82394963e8e2d26efd84 > > > Author: Paul E. McKenney > > > Date: Tue Dec 4 14:59:12 2018 -0800 >

Re: [tip:core/rcu] rcutorture: Make initrd/init execute in userspace

2018-12-05 Thread Paul E. McKenney
On Thu, Dec 06, 2018 at 01:51:47AM +0100, Andrea Parri wrote: > > commit 4f8f751961b536f77c8f82394963e8e2d26efd84 > > Author: Paul E. McKenney > > Date: Tue Dec 4 14:59:12 2018 -0800 > > > > torture: Explain and simplify odd "for" loop in mkinitr

Re: [tip:core/rcu] rcutorture: Make initrd/init execute in userspace

2018-12-05 Thread Paul E. McKenney
On Wed, Dec 05, 2018 at 04:27:38PM -0800, Josh Triplett wrote: > On Wed, Dec 05, 2018 at 04:08:09PM -0800, Paul E. McKenney wrote: > > On Wed, Dec 05, 2018 at 02:25:24PM -0800, Josh Triplett wrote: > > > On Tue, Dec 04, 2018 at 03:04:23PM -0800, Paul E. McKenney wrote: > >

Re: [tip:core/rcu] rcutorture: Make initrd/init execute in userspace

2018-12-05 Thread Paul E. McKenney
On Wed, Dec 05, 2018 at 02:25:24PM -0800, Josh Triplett wrote: > On Tue, Dec 04, 2018 at 03:04:23PM -0800, Paul E. McKenney wrote: > > On Tue, Dec 04, 2018 at 02:24:13PM -0800, Josh Triplett wrote: > > > On Tue, Dec 04, 2018 at 02:09:42PM -0800, tip-bot for Paul E. McK

Re: rcu_preempt caused oom

2018-12-05 Thread Paul E. McKenney
Thanx, Paul > -Original Message- > From: Paul E. McKenney > Sent: Wednesday, December 5, 2018 3:50 AM > To: He, Bo > Cc: Steven Rostedt ; linux-kernel@vger.kernel.org; > j...@joshtriplett.org; mathieu.desnoy...@efficios.com; > jiangshan

Re: [tip:core/rcu] rcutorture: Make initrd/init execute in userspace

2018-12-04 Thread Paul E. McKenney
On Tue, Dec 04, 2018 at 02:24:13PM -0800, Josh Triplett wrote: > On Tue, Dec 04, 2018 at 02:09:42PM -0800, tip-bot for Paul E. McKenney wrote: > > --- a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh > > +++ b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh > > @@ -39

[tip:core/rcu] tools/kernel.h: Replace synchronize_sched() with synchronize_rcu()

2018-12-04 Thread tip-bot for Paul E. McKenney
Commit-ID: 4a67e3a79e3bdc47dfd0c85a1888067d95a0282c Gitweb: https://git.kernel.org/tip/4a67e3a79e3bdc47dfd0c85a1888067d95a0282c Author: Paul E. McKenney AuthorDate: Wed, 7 Nov 2018 15:25:13 -0800 Committer: Paul E. McKenney CommitDate: Sat, 1 Dec 2018 12:38:51 -0800 tools/kernel.h

[tip:core/rcu] tracing: Replace synchronize_sched() and call_rcu_sched()

2018-12-04 Thread tip-bot for Paul E. McKenney
Commit-ID: 7440172974e85b1828bdd84ac6b23b5bcad9c5eb Gitweb: https://git.kernel.org/tip/7440172974e85b1828bdd84ac6b23b5bcad9c5eb Author: Paul E. McKenney AuthorDate: Tue, 6 Nov 2018 18:44:52 -0800 Committer: Paul E. McKenney CommitDate: Tue, 27 Nov 2018 09:21:41 -0800 tracing: Replace

Re: [GIT PULL rcu/next] RCU commits for 4.21/5.0

2018-12-04 Thread Paul E. McKenney
On Tue, Dec 04, 2018 at 02:38:17PM +0100, Willy Tarreau wrote: > Hi Ingo, > > On Tue, Dec 04, 2018 at 09:08:37AM +0100, Ingo Molnar wrote: > > I noticed this bit from Willy: > > > > > tools/testing/selftests/rcutorture/bin/nolibc.h| 2197 > > > > > > > So is a rather

Re: rcu_preempt caused oom

2018-12-04 Thread Paul E. McKenney
kthread (the rcu_preempt, rcu_sched, and rcu_bh tasks, all of which execute in the rcu_gp_kthread() function) was being starved of CPU time. Does that sound likely? Thanx, Paul > -Original Message----- > From: Paul E. McKenney > Se

Re: [RFC PATCH 1/1] epoll: use rwlock in order to reduce ep_poll_callback() contention

2018-12-04 Thread Paul E. McKenney
any epoll performance degradations in other benchmarks. > > > > Also I'm not quite sure where to put very special lockless variant > > of adding element to the list (list_add_tail_lockless() in this > > patch). Seems keeping it locally is safer

Re: [PATCH memory-model 0/3] Updates to the formal memory model

2018-12-04 Thread Paul E. McKenney
On Wed, Dec 05, 2018 at 12:40:01AM +0900, Akira Yokosawa wrote: > On 2018/12/03 15:51:27 -0800, Paul E. McKenney wrote: > > On Tue, Dec 04, 2018 at 08:28:03AM +0900, Akira Yokosawa wrote: > >> On 2018/12/03 15:04:11 -0800, Paul E. McKenney wrote: > >>> Hello, Ingo! &g

[tip:locking/core] tools/memory-model: Make scripts take "-j" abbreviation for "--jobs"

2018-12-03 Thread tip-bot for Paul E. McKenney
Commit-ID: a6f1de04276d036b61c4d1dbd0367e6b430d8783 Gitweb: https://git.kernel.org/tip/a6f1de04276d036b61c4d1dbd0367e6b430d8783 Author: Paul E. McKenney AuthorDate: Mon, 3 Dec 2018 15:04:51 -0800 Committer: Ingo Molnar CommitDate: Tue, 4 Dec 2018 07:29:52 +0100 tools/memory-model

[tip:locking/core] tools/memory-model: Add scripts to check github litmus tests

2018-12-03 Thread tip-bot for Paul E. McKenney
Commit-ID: e188d24a382d609ec7ca6c1a00396202565b7831 Gitweb: https://git.kernel.org/tip/e188d24a382d609ec7ca6c1a00396202565b7831 Author: Paul E. McKenney AuthorDate: Mon, 3 Dec 2018 15:04:50 -0800 Committer: Ingo Molnar CommitDate: Tue, 4 Dec 2018 07:29:52 +0100 tools/memory-model: Add

Re: [PATCH memory-model 0/3] Updates to the formal memory model

2018-12-03 Thread Paul E. McKenney
On Tue, Dec 04, 2018 at 08:28:03AM +0900, Akira Yokosawa wrote: > On 2018/12/03 15:04:11 -0800, Paul E. McKenney wrote: > > Hello, Ingo! > > > > This series contains updates to the Linux kernel's formal memory model > > in tools/memory-model. These patches are re

[PATCH memory-model 1/3] tools/memory-model: Model smp_mb__after_unlock_lock()

2018-12-03 Thread Paul E. McKenney
jlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: Akira Yokosawa Cc: Daniel Lustig Signed-off-by: Paul E. McKenney --- tools/memory-model/linux-kernel.bell | 3 ++- tools/memory-model/linux-kernel.cat | 4 +++-

[PATCH memory-model 2/3] EXP tools/memory-model: Add scripts to check github litmus tests

2018-12-03 Thread Paul E. McKenney
From: "Paul E. McKenney" The https://github.com/paulmckrcu/litmus repository contains a large number of C-language litmus tests that include "Result:" comments predicting the verification result. This commit adds a number of scripts that run tests on these litmus test

[PATCH memory-model 3/3] EXP tools/memory-model: Make scripts take "-j" abbreviation for "--jobs"

2018-12-03 Thread Paul E. McKenney
From: "Paul E. McKenney" The "--jobs" argument to the litmus-test scripts is similar to the "-jN" argument to "make", so this commit allows the "-jN" form as well. While in the area, it also prohibits the various forms of "-j0"

[PATCH memory-model 0/3] Updates to the formal memory model

2018-12-03 Thread Paul E. McKenney
Hello, Ingo! This series contains updates to the Linux kernel's formal memory model in tools/memory-model. These patches are ready for inclusion into -tip. 1. Model smp_mb__after_unlock_lock(), courtesy of Andrea Parri. 2. Add scripts to check github litmus tests. 3. Make

[GIT PULL rcu/next] RCU commits for 4.21/5.0

2018-12-03 Thread Paul E. McKenney
with lockdep KVM: arm/arm64: vgic: Replace spin_is_locked() with lockdep Paul E. McKenney (77): rcu: Eliminate BUG_ON() for sync.c rcu: Eliminate BUG_ON() for kernel/rcu/tree.c rcu: Eliminate synchronize_rcu_mult() rcu: Consolidate the RCU update functions invoked by sync.

Re: rcu_preempt caused oom

2018-12-03 Thread Paul E. McKenney
> /proc/sys/kernel/panic_on_rcu_stall Looking forward to seeing what is going on! Of course, to reproduce, you will need to again build with CONFIG_RCU_BOOST=n. Thanx, Paul > -Original Message- > From: Paul E. McKenney &

Re: [PATCH] locktorture: style fix - spaces required around

2018-12-01 Thread Paul E. McKenney
k ? " [debug]": "", >^ > > Signed-off-by: Wen Yang > CC: Davidlohr Bueso > CC: "Paul E. McKenney" > CC: Josh Triplett > CC: linux-kernel@vger.kernel.org Adding the current maintainers on CC.

Re: [PATCH] locktorture: Fix assignment of boolean variables

2018-12-01 Thread Paul E. McKenney
to 0/1 > kernel/locking/locktorture.c:654:2-20: WARNING: Assignment of bool to 0/1 > > This patch also makes the code more readable. > > Signed-off-by: Wen Yang > CC: Davidlohr Bueso > CC: "Paul E. McKenney" > CC: Josh Triplett > CC: linux

Re: rcu_preempt caused oom

2018-11-30 Thread Paul E. McKenney
This would set the stall timeout to seven seconds. Note that timeouts less than three seconds are silently interpreted as three seconds. Thanx, Paul > -Original Message- > From: Steven Rostedt > Sent: Friday, November 30

Re: rcu_preempt caused oom

2018-11-30 Thread Paul E. McKenney
cted an RCU CPU stall warning in that case, so it might well be that something else is going on. Could you please send me your list of kernel boot parameters? They usually appear near the start of your console output. Thanx, Paul > -Or

Re: rcu_preempt caused oom

2018-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2018 at 05:06:47AM -0800, Paul E. McKenney wrote: > On Thu, Nov 29, 2018 at 08:49:35AM +, He, Bo wrote: > > Hi, > > we test on kernel 4.19.0 on android, after run more than 24 Hours > > monkey stress test, we see OOM on 1/10 2G memory board, the i

Re: rcu_preempt caused oom

2018-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2018 at 08:49:35AM +, He, Bo wrote: > Hi, > we test on kernel 4.19.0 on android, after run more than 24 Hours > monkey stress test, we see OOM on 1/10 2G memory board, the issue is not seen > on the 4.14 kernel. > we have done some debugs: > 1. OOM is due to the filp

Re: [PATCH 0/3] tools/memory-model: Add SRCU support

2018-11-27 Thread Paul E. McKenney
On Wed, Nov 28, 2018 at 07:34:14AM +0900, Akira Yokosawa wrote: > On 2018/11/27 09:17:46 -0800, Paul E. McKenney wrote: > > On Tue, Nov 27, 2018 at 01:26:42AM +0100, Andrea Parri wrote: > >>> commit 72f61917f12236514a70017d1ebafb9b8d34a9b6 > >>> Author: Paul E. M

Re: [PATCH 0/3] tools/memory-model: Add SRCU support

2018-11-27 Thread Paul E. McKenney
On Tue, Nov 27, 2018 at 01:26:42AM +0100, Andrea Parri wrote: > > commit 72f61917f12236514a70017d1ebafb9b8d34a9b6 > > Author: Paul E. McKenney > > Date: Mon Nov 26 14:26:43 2018 -0800 > > > > tools/memory-model: Update README for addition of SRCU > &

Re: [PATCH 0/3] tools/memory-model: Add SRCU support

2018-11-26 Thread Paul E. McKenney
gt; > > The code does not check that the index argument passed to > > srcu_read_unlock() is the same as the value returned by the > > corresponding srcu_read_lock() call. This is deemed to be a semantic > > issue, not directly relevant to the memory model. > > >

Re: [REGRESSION 4.20-rc1] 45975c7d21a1 ("rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds")

2018-11-26 Thread Paul E. McKenney
On Wed, Nov 14, 2018 at 12:20:13PM -0800, Paul E. McKenney wrote: > On Tue, Nov 13, 2018 at 07:10:37AM -0800, Paul E. McKenney wrote: > > On Tue, Nov 13, 2018 at 03:54:53PM +0200, Ville Syrjälä wrote: > > > Hi Paul, > > > > > > After 4.20-rc1 some of my 32bit U

Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu()

2018-11-26 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 02:21:12PM -0800, Paul E. McKenney wrote: > On Mon, Nov 12, 2018 at 07:17:41PM +0100, Peter Zijlstra wrote: > > On Mon, Nov 12, 2018 at 05:28:52AM -0800, Paul E. McKenney wrote: > > > On Mon, Nov 12, 2018 at 10:00:47AM +0100, Peter Zijlstra wrote: > >

Re: [PATCH tip/core/rcu 02/19] rcu: Defer reporting RCU-preempt quiescent states when disabled

2018-11-26 Thread Paul E. McKenney
Thanx, Paul > > > > > > > > commit 970cab5d3d206029ed27274a98ea1c3d7e780e53 > > Author: Paul E. McKenney > > Date: Mon Oct 29 07:36:50 2018 -0700 > > > > rcu: Avoid signed integer overflow in rcu_preempt_deferred_qs() > > > > Sub

Re: Function rcu_dynticks_eqs_exit spent more cycles to processor

2018-11-25 Thread Paul E. McKenney
On Sun, Nov 25, 2018 at 09:41:26PM +0200, Corcodel Marian wrote: > Hi below , in modified func from kernel/rcu/tree.c and not stall proc, > run perf for more info. > Item type atomic_t dynticks from rcu_dynticks stucture can bee replaced > with u8 type, because Intel guarrantee atomic operations

Re: dyntick-idle CPU and node's qsmask

2018-11-21 Thread Paul E. McKenney
On Tue, Nov 20, 2018 at 08:37:22PM -0800, Joel Fernandes wrote: > On Tue, Nov 20, 2018 at 06:41:07PM -0800, Paul E. McKenney wrote: > [...] > > > > > I was thinking if we could simplify rcu_note_context_switch (the > > > > > parts that > > > &g

Re: dyntick-idle CPU and node's qsmask

2018-11-20 Thread Paul E. McKenney
On Tue, Nov 20, 2018 at 06:06:12PM -0800, Joel Fernandes wrote: > On Tue, Nov 20, 2018 at 02:28:14PM -0800, Paul E. McKenney wrote: > > On Tue, Nov 20, 2018 at 12:42:43PM -0800, Joel Fernandes wrote: > > > On Sun, Nov 11, 2018 at 10:36:18AM -0800, Paul E. McKenney wrote: >

Re: dyntick-idle CPU and node's qsmask

2018-11-20 Thread Paul E. McKenney
On Tue, Nov 20, 2018 at 02:28:13PM -0800, Paul E. McKenney wrote: > On Tue, Nov 20, 2018 at 12:42:43PM -0800, Joel Fernandes wrote: > > On Sun, Nov 11, 2018 at 10:36:18AM -0800, Paul E. McKenney wrote: > > > On Sun, Nov 11, 2018 at 10:09:16AM -0800, Joel Fernandes wrote: >

Re: dyntick-idle CPU and node's qsmask

2018-11-20 Thread Paul E. McKenney
On Tue, Nov 20, 2018 at 12:42:43PM -0800, Joel Fernandes wrote: > On Sun, Nov 11, 2018 at 10:36:18AM -0800, Paul E. McKenney wrote: > > On Sun, Nov 11, 2018 at 10:09:16AM -0800, Joel Fernandes wrote: > > > On Sat, Nov 10, 2018 at 08:22:10PM -0800, Paul E. McKenney wrote: >

Re: [PATCH tip/core/rcu 6/7] mm: Replace spin_is_locked() with lockdep

2018-11-15 Thread Paul E. McKenney
On Thu, Nov 15, 2018 at 10:49:17AM -0800, Davidlohr Bueso wrote: > On Sun, 11 Nov 2018, Paul E. McKenney wrote: > > >From: Lance Roy > > > >lockdep_assert_held() is better suited to checking locking requirements, > >since it only checks if the current th

Re: [PATCH 0/3] tools/memory-model: Add SRCU support

2018-11-15 Thread Paul E. McKenney
On Thu, Nov 15, 2018 at 11:19:24AM -0500, Alan Stern wrote: > Paul and other LKMM maintainers: > > The following series of patches adds support for SRCU to the Linux > Kernel Memory Model. That is, it adds the srcu_read_lock(), > srcu_read_unlock(), and synchronize_srcu() primitives to the

Q from "Concurrency with tools/memory-model"

2018-11-15 Thread Paul E. McKenney
Hello! Good turnout and some good questions here in Vancouver BC, please see below for rough notes. ;-) Thanx, Paul "Concurrency with tools/memory-model" Andrea

Re: [REGRESSION 4.20-rc1] 45975c7d21a1 ("rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds")

2018-11-14 Thread Paul E. McKenney
On Tue, Nov 13, 2018 at 07:10:37AM -0800, Paul E. McKenney wrote: > On Tue, Nov 13, 2018 at 03:54:53PM +0200, Ville Syrjälä wrote: > > Hi Paul, > > > > After 4.20-rc1 some of my 32bit UP machines no longer reboot/shutdown. > > I bisected this down to commit 45975c7d2

Re: KMSAN: uninit-value in rcu_accelerate_cbs / KMSAN: uninit-value in rcu_process_callbacks

2018-11-14 Thread Paul E. McKenney
On Wed, Nov 14, 2018 at 04:31:11PM +0100, Alexander Potapenko wrote: > On Wed, Nov 14, 2018 at 4:09 PM Paul E. McKenney > wrote: > > > > On Wed, Nov 14, 2018 at 04:03:33AM -0500, Kyungtae Kim wrote: > > > We report two crashes in v4.19-rc8 (4.20-rc1 as well, I g

Re: KMSAN: uninit-value in rcu_accelerate_cbs / KMSAN: uninit-value in rcu_process_callbacks

2018-11-14 Thread Paul E. McKenney
On Wed, Nov 14, 2018 at 04:03:33AM -0500, Kyungtae Kim wrote: > We report two crashes in v4.19-rc8 (4.20-rc1 as well, I guess): > (Unfortunately, there is no repro for those.) > > The two crashes seem to share the same issue. > In both cases, (uninitialized) memory access violation occurs > when

Re: [PATCH tip/core/rcu 20/41] kprobes: eplace synchronize_sched() with synchronize_rcu()

2018-11-13 Thread Paul E. McKenney
On Tue, Nov 13, 2018 at 10:08:36AM -0800, Masami Hiramatsu wrote: > On Sun, 11 Nov 2018 19:19:16 -0800 > "Paul E. McKenney" wrote: > > > On Mon, Nov 12, 2018 at 12:00:48PM +0900, Masami Hiramatsu wrote: > > > On Sun, 11 Nov 2018 11:43:49 -0800 > > > &q

Re: [PATCH tip/core/rcu 25/41] workqueue: Replace call_rcu_sched() with call_rcu()

2018-11-13 Thread Paul E. McKenney
On Tue, Nov 13, 2018 at 07:48:03AM -0800, Tejun Heo wrote: > On Sun, Nov 11, 2018 at 11:43:54AM -0800, Paul E. McKenney wrote: > > Now that call_rcu()'s callback is not invoked until after all > > preempt-disable regions of code have completed (in addition to explicitly > >

Re: [REGRESSION 4.20-rc1] 45975c7d21a1 ("rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds")

2018-11-13 Thread Paul E. McKenney
On Tue, Nov 13, 2018 at 03:54:53PM +0200, Ville Syrjälä wrote: > Hi Paul, > > After 4.20-rc1 some of my 32bit UP machines no longer reboot/shutdown. > I bisected this down to commit 45975c7d21a1 ("rcu: Define RCU-sched > API in terms of RCU for Tree RCU PREEMPT builds"). > > I traced the hang

Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu()

2018-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 07:17:41PM +0100, Peter Zijlstra wrote: > On Mon, Nov 12, 2018 at 05:28:52AM -0800, Paul E. McKenney wrote: > > On Mon, Nov 12, 2018 at 10:00:47AM +0100, Peter Zijlstra wrote: > > > > Still, better safe than sorry. It was a rather big change i

Re: [PATCH tip/core/rcu 0/41] More RCU flavor consolidation cleanup for v4.21/v5.0

2018-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 04:40:23PM -0500, Sasha Levin wrote: > On Mon, Nov 12, 2018 at 08:01:37AM -0800, Paul E. McKenney wrote: > >On Mon, Nov 12, 2018 at 09:07:50AM -0500, Mathieu Desnoyers wrote: > >>- On Nov 11, 2018, at 2:41 PM, paulmck paul...@linux.ibm.com wrote

Re: [PATCH tip/core/rcu 24/41] modules: Replace synchronize_sched() and call_rcu_sched()

2018-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 01:48:52PM +0100, Jessica Yu wrote: > +++ Paul E. McKenney [11/11/18 11:43 -0800]: > >Now that synchronize_rcu() waits for preempt-disable regions of code > >as well as RCU read-side critical sections, synchronize_sched() can > >be replaced by synchron

Re: [PATCH tip/core/rcu 0/41] More RCU flavor consolidation cleanup for v4.21/v5.0

2018-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 09:07:50AM -0500, Mathieu Desnoyers wrote: > - On Nov 11, 2018, at 2:41 PM, paulmck paul...@linux.ibm.com wrote: > > > Hello! > > > > This series does additional cleanup for the RCU flavor consolidation, > > focusing primarily on uses of old API members, for example,

Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu()

2018-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 10:00:47AM +0100, Peter Zijlstra wrote: > On Sun, Nov 11, 2018 at 06:24:55PM -0800, Paul E. McKenney wrote: > > > > > There were quite a few commits involved in making this happen. Perhaps > > > > the most pertinent are these: > > &g

Re: [PATCH tip/core/rcu 20/41] kprobes: eplace synchronize_sched() with synchronize_rcu()

2018-11-11 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 12:00:48PM +0900, Masami Hiramatsu wrote: > On Sun, 11 Nov 2018 11:43:49 -0800 > "Paul E. McKenney" wrote: > > > Now that synchronize_rcu() waits for preempt-disable regions of code > > as well as RCU read-side critical sections, synchron

Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu()

2018-11-11 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 03:07:10AM +0100, Peter Zijlstra wrote: > On Sun, Nov 11, 2018 at 05:47:36PM -0800, Paul E. McKenney wrote: > > On Mon, Nov 12, 2018 at 01:53:29AM +0100, Peter Zijlstra wrote: > > > On Sun, Nov 11, 2018 at 04:45:28PM -0800, Paul E. McKenney wrote: >

Re: [PATCH tip/core/rcu 1/4] rcu: Eliminate BUG_ON() for sync.c

2018-11-11 Thread Paul E. McKenney
On Sun, Nov 11, 2018 at 09:07:04PM -0500, Steven Rostedt wrote: > On Sun, 11 Nov 2018 11:32:14 -0800 > "Paul E. McKenney" wrote: > > > The sync.c file has a number of calls to BUG_ON(), which panics the > > kernel, which is not a good strategy for devices (lik

Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu()

2018-11-11 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 01:53:29AM +0100, Peter Zijlstra wrote: > On Sun, Nov 11, 2018 at 04:45:28PM -0800, Paul E. McKenney wrote: > > On Mon, Nov 12, 2018 at 01:12:33AM +0100, Peter Zijlstra wrote: > > > On Sun, Nov 11, 2018 at 11:43:52AM -0800, Paul E. McKenney

Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu()

2018-11-11 Thread Paul E. McKenney
On Mon, Nov 12, 2018 at 01:12:33AM +0100, Peter Zijlstra wrote: > On Sun, Nov 11, 2018 at 11:43:52AM -0800, Paul E. McKenney wrote: > > Now that synchronize_rcu() waits for preempt-disable regions of code > > as well as RCU read-side critical sections, synchronize_sched() can

[PATCH tip/core/rcu 03/20] doc: Remove rcu_preempt_state reference in stallwarn

2018-11-11 Thread Paul E. McKenney
ccordingly. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney --- Documentation/RCU/stallwarn.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index 491043fd976f..b01bcafc6

[PATCH tip/core/rcu 04/20] doc: rcu: Update information about resched_cpu

2018-11-11 Thread Paul E. McKenney
From: "Joel Fernandes (Google)" Since commit fced9c8cfe6b ("rcu: Avoid resched_cpu() when rescheduling the current CPU"), resched_cpu is not directly called from sync_sched_exp_handler. Update the documentation about the same. Signed-off-by: Joel Fernandes (Google) Cc: S

[PATCH tip/core/rcu 01/20] doc: Set down forward-progress requirements

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" This commit adds a section to the requirements documentation setting down requirements for grace-period and callback-invocation forward progress. Signed-off-by: Paul E. McKenney --- .../RCU/Design/Requirements/Requirements.html | 110 +- 1 fi

[PATCH RFC LKMM 1/3] tools/memory-model: Model smp_mb__after_unlock_lock()

2018-11-11 Thread Paul E. McKenney
jlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: Akira Yokosawa Cc: Daniel Lustig Signed-off-by: Paul E. McKenney --- tools/memory-model/linux-kernel.bell | 3 ++- tools/memory-model/linux-kernel.cat | 4 +++-

[PATCH RFC LKMM 3/3] EXP tools/memory-model: Make scripts take "-j" abbreviation for "--jobs"

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" The "--jobs" argument to the litmus-test scripts is similar to the "-jN" argument to "make", so this commit allows the "-jN" form as well. While in the area, it also prohibits the various forms of "-j0"

[PATCH RFC LKMM 2/3] EXP tools/memory-model: Add scripts to check github litmus tests

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" The https://github.com/paulmckrcu/litmus repository contains a large number of C-language litmus tests that include "Result:" comments predicting the verification result. This commit adds a number of scripts that run tests on these litmus test

[PATCH RFC memory-model 0/3] LKMM updates for v4.21/v5.0

2018-11-11 Thread Paul E. McKenney
Hello! This series contains updates for the Linux-kernel memory model: 1. Model smp_mb__after_unlock_lock(), courtesy of Andrea Parri. 2. Add scripts to check github litmus tests. 3. Make scripts take "-j" abbreviation for "--jobs".

[PATCH tip/core/rcu 0/7] Use lockdep instead of asserting spin_is_locked() for v4.21/v5.0

2018-11-11 Thread Paul E. McKenney
Hello! This series converts assertions of spin_is_locked() into lockdep_assert_held(), all courtesy of Lance Roy. Thanx, Paul arch/x86/pci/i386.c |

[PATCH tip/core/rcu 5/7] locking/mutex: Replace spin_is_locked() with lockdep

2018-11-11 Thread Paul E. McKenney
Zijlstra Cc: Ingo Molnar Cc: Will Deacon Signed-off-by: Paul E. McKenney --- kernel/locking/mutex-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c index 9aa713629387..771d4ca96dda 100644 --- a/kernel/locking

[PATCH tip/core/rcu 4/7] userfaultfd: Replace spin_is_locked() with lockdep

2018-11-11 Thread Paul E. McKenney
Viro Cc: Signed-off-by: Paul E. McKenney --- fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 356d2b8568c1..681881dc8a9d 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -926,7 +926,7 @@ static inline struct

[PATCH tip/core/rcu 03/17] rcutorture: Remove cbflood facility

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" Now that the forward-progress code does a full-bore continuous callback flood lasting multiple seconds, there is little point in also posting a mere 60,000 callbacks every second or so. This commit therefore removes the old cbflood testing. Over ti

[PATCH tip/core/rcu 2/7] sfc: Replace spin_is_locked() with lockdep

2018-11-11 Thread Paul E. McKenney
linux maintainers Cc: Edward Cree Cc: Bert Kenward Cc: "David S. Miller" Cc: Signed-off-by: Paul E. McKenney --- drivers/net/ethernet/sfc/efx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 98

[PATCH tip/core/rcu 6/7] mm: Replace spin_is_locked() with lockdep

2018-11-11 Thread Paul E. McKenney
Cc: "Kirill A. Shutemov" Cc: Yang Shi Cc: Matthew Wilcox Cc: Mel Gorman Acked-by: Vlastimil Babka Cc: Jan Kara Cc: Shakeel Butt Cc: Signed-off-by: Paul E. McKenney --- mm/khugepaged.c | 4 ++-- mm/swap.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff

[PATCH tip/core/rcu 11/17] rcutorture: Print GP age upon forward-progress failure

2018-11-11 Thread Paul E. McKenney
Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index cef7d9867508..95a3825b1b19 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2679,6 +2679,8 @@ void rcu_fwd_progress_check(unsigned

[PATCH tip/core/rcu 13/17] rcutorture: Print time since GP end upon forward-progress failure

2018-11-11 Thread Paul E. McKenney
If rcutorture's forward-progress tests fail while a grace period is not in progress, it is useful to print the time since the last grace period ended as a way to detect failure to launch a new grace period. This commit therefore makes this change. Signed-off-by: Paul E. McKenney --- kernel/rcu

[PATCH tip/core/rcu 05/17] rcutorture: Affinity forward-progress test to avoid housekeeping CPUs

2018-11-11 Thread Paul E. McKenney
This commit affinities the forward-progress tests to avoid hogging a housekeeping CPU on the theory that the offloaded callbacks will be running on those housekeeping CPUs. Signed-off-by: Paul E. McKenney [ paulmck: Fix NULL-pointer issue located by kbuild test robot. ] Tested-by: Rong Chen

[PATCH tip/core/rcu 09/17] rcu: Account for nocb-CPU callback counts in RCU CPU stall warnings

2018-11-11 Thread Paul E. McKenney
see). Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c| 19 +++ kernel/rcu/tree.h| 1 + kernel/rcu/tree_plugin.h | 24 +++- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 6f0435201

[PATCH tip/core/rcu 16/17] rcutorture: Use 100ms buckets for forward-progress callback histograms

2018-11-11 Thread Paul E. McKenney
This commit narrows the scope of each bucket of the forward-progress callback-invocation histograms from one second to 100 milliseconds, which aids debugging of forward-progress problems by making shorter-duration callback-invocation stalls visible. Signed-off-by: Paul E. McKenney --- kernel

[PATCH tip/core/rcu 15/17] rcutorture: Recover from OOM during forward-progress tests

2018-11-11 Thread Paul E. McKenney
, greatly reducing the required testing time. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 60 + 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 080b5ac6340c..afa98162575d

[PATCH tip/core/rcu 12/17] rcutorture: Print histogram of CB invocation at OOM time

2018-11-11 Thread Paul E. McKenney
One reason why a forward-progress test might fail would be if something prevented or delayed callback invocation. This commit therefore adds a callback-invocation histogram printout when OOM is reported to rcutorture. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 24

[PATCH tip/core/rcu 10/17] rcu: Print per-CPU callback counts for forward-progress failures

2018-11-11 Thread Paul E. McKenney
This commit prints out the non-zero per-CPU callback counts when a forware-progress error (OOM event) occurs. Signed-off-by: Paul E. McKenney [ paulmck: Fix a pair of uninitialized locals spotted by kbuild test robot. ] --- kernel/rcu/tree.c | 18 ++ 1 file changed, 18

[PATCH tip/core/rcu 17/17] rcutorture: Don't do busted forward-progress testing

2018-11-11 Thread Paul E. McKenney
d-progress testing of the "busted" rcutorture type. Reported-by: kernel test robot Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index a4c4a24bdcaa.

[PATCH tip/core/rcu 14/17] rcutorture: Print forward-progress test age upon failure

2018-11-11 Thread Paul E. McKenney
This commit prints the age of the forward-progress test in jiffies, in order to allow better interpretation of the callback-invocation histograms. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/rcu

[PATCH tip/core/rcu 01/17] rcutorture: Add call_rcu() flooding forward-progress tests

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" This commit adds a call_rcu() flooding loop to the forward-progress test. This emulates tight userspace loops that force call_rcu() invocations, for example, the infamous loop containing close(open()) that instigated the addition of blimit. If RCU doe

[PATCH tip/core/rcu 07/17] rcutorture: Prepare for asynchronous access to rcu_fwd_startat

2018-11-11 Thread Paul E. McKenney
Because rcutorture's forward-progress checking will trigger from an OOM notifier, this notifier will introduce asynchronous concurrent access to the rcu_fwd_startat variable. This commit therefore prepares for this by converting updates to WRITE_ONCE(). Signed-off-by: Paul E. McKenney

[PATCH tip/core/rcu 04/17] rcutorture: Break up too-long rcu_torture_fwd_prog() function

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" This commit splits rcu_torture_fwd_prog_nr() and rcu_torture_fwd_prog_cr() functions out of rcu_torture_fwd_prog() in order to reduce indentation pain and because rcu_torture_fwd_prog() was getting a bit too long. In addition, this will enable easier c

[PATCH tip/core/rcu 06/17] torture: Remove unnecessary "ret" variables

2018-11-11 Thread Paul E. McKenney
s as false, the constant initially stored in the return variable at declaration is returned instead. Signed-off-by: Pierce Griffiths Signed-off-by: Paul E. McKenney --- kernel/torture.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/kernel/torture.c b/kernel

[PATCH tip/core/rcu 08/17] rcutorture: Dump grace-period diagnostics upon forward-progress OOM

2018-11-11 Thread Paul E. McKenney
This commit adds an OOM notifier during rcutorture forward-progress testing. If this notifier is invoked, it dumps out some grace-period state to help debug the forward-progress problem. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcu.h| 2 ++ kernel/rcu/rcutorture.c | 31

[PATCH tip/core/rcu 02/17] torture: Bring any extra CPUs online during kernel startup

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" Currently, the torture scripts rely on the initrd/init script to bring any extra CPUs online, for example, in the case where the kernel and qemu have different ideas about how many CPUs are present. This works, but is an unnecessary dependency on initrd, w

[PATCH tip/core/rcu 0/17] Torture-test updates for v4.21/v5.0

2018-11-11 Thread Paul E. McKenney
Hello! This series contains torture-test updates: 1. Add call_rcu() flooding forward-progress tests. If people are going to be seeing forward-progress issues with RCU, then rcutorture needs to up its game. 2. Bring any extra CPUs online during kernel startup. 3.

[PATCH tip/core/rcu 3/4] srcu: Lock srcu_data structure in srcu_gp_start()

2018-11-11 Thread Paul E. McKenney
rate(), thus preventing this corruption. Reported-by: Bart Van Assche Reported-by: Christoph Hellwig Reported-by: Sebastian Kuzminsky Signed-off-by: Dennis Krein Signed-off-by: Paul E. McKenney Tested-by: Dennis Krein Cc: # 4.12.x --- kernel/rcu/srcutree.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH tip/core/rcu 2/4] srcu: Prevent __call_srcu() counter wrap with read-side critical section

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" Ever since cdf7abc4610a ("srcu: Allow use of Tiny/Tree SRCU from both process and interrupt context"), it has been permissible to use SRCU read-side critical sections in interrupt context. This allows __call_srcu() to use SRCU read-side critical secti

[PATCH tip/core/rcu 4/4] srcu: Use "ssp" instead of "sp" for srcu_struct pointer

2018-11-11 Thread Paul E. McKenney
s "ssp" for srcu_struct pointer, "snp" for srcu_node pointer, and "sdp" for srcu_data pointer. Signed-off-by: Paul E. McKenney --- include/linux/srcu.h | 78 +++ include/linux/srcutiny.h | 24 +- include/linux/srcutree.h | 8 +- kernel/rcu/srcutiny.c| 120

[PATCH tip/core/rcu 1/4] srcu: Fix kernel-doc missing notation

2018-11-11 Thread Paul E. McKenney
in 'srcu_dereference_notrace' Fixes: 0b764a6e4e19d ("srcu: Add notrace variant of srcu_dereference") Signed-off-by: Randy Dunlap Cc: Lai Jiangshan Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Joel Fernandes (Google) Signed-off-by: Paul E. Mc

[PATCH tip/core/rcu 0/4] SRCU updates for v4.21/v5.0

2018-11-11 Thread Paul E. McKenney
Hello! This series contains SRCU updates: 1. Fix kernel-doc missing notation, courtesy of Randy Dunlap. 2. Prevent __call_srcu() counter wrap with read-side critical section. 3. Lock srcu_data structure in srcu_gp_start(), fixing a an extremely rare but also extremely

[PATCH tip/core/rcu 3/7] smsc: Replace spin_is_locked() with lockdep

2018-11-11 Thread Paul E. McKenney
Glendinning Cc: "David S. Miller" Cc: Signed-off-by: Paul E. McKenney --- drivers/net/ethernet/smsc/smsc911x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/smsc/smsc911x.h b/drivers/net/ethernet/smsc/smsc911x.h index 8d75508acd2b..51b2fc1a3

[PATCH tip/core/rcu 1/7] x86/PCI: Replace spin_is_locked() with lockdep

2018-11-11 Thread Paul E. McKenney
Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Cc: Signed-off-by: Paul E. McKenney --- arch/x86/pci/i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 8cd66152cdb0..9df652d3d

[PATCH tip/core/rcu 2/8] rcutorture: Add initrd support for systems lacking dracut

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" The support for creating initrd directories using dracut is a great improvement over having to always hand-create them, it is a bit annoying to have to install some otherwise irrelevant package just to be able to run rcutorture. This commit therefore ad

[PATCH tip/core/rcu 3/8] rcutorture: Make initrd/init execute in userspace

2018-11-11 Thread Paul E. McKenney
From: "Paul E. McKenney" Currently, the initrd/init script and executable remain blocked almost all the time. However, it is necessary to test nohz_full userspace execution, which both variants of initrd/init fail to do. This commit therefore causes initrd/init to spend about a milli

[PATCH tip/core/rcu 5/8] rcutorture: Always strip using the cross-compiler

2018-11-11 Thread Paul E. McKenney
From: Willy Tarreau Strip using -s on the compiler command line instead of calling the "strip" utility as the latter isn't necessarily compatible with the target arch. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/testing/selftests/rcutorture/bin/mkini

  1   2   3   4   5   6   7   8   9   10   >