Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1561241 > unrolled thread
| Started by | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| First post | 2017-01-18 04:00 +0100 |
| Last post | 2017-01-24 23:00 +0100 |
| Articles | 20 on this page of 41 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH tip/core/rcu 0/20] Miscellaneous fixes for 4.11 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
[PATCH v2 tip/core/rcu 01/18] rcu: update: Make RCU_EXPEDITE_BOOT be the default "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
[PATCH v2 tip/core/rcu 14/18] rcu: Enable RCU tracepoints by default to aid in debugging "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
[PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:00 +0100
Re: [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
Re: [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-23 20:40 +0100
[PATCH v2 tip/core/rcu 11/18] rcu: Don't wake rcuc/X kthreads on NOCB CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:10 +0100
[PATCH v2 tip/core/rcu 15/18] rcu: Fix comment in rcu_organize_nocb_kthreads() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:30 +0100
[PATCH v2 tip/core/rcu 06/18] rcu: Remove unused but set variable "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:40 +0100
[PATCH v2 tip/core/rcu 13/18] rcu: Make rcu_cpu_starting() use its "cpu" argument "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 04:40 +0100
[PATCH v2 tip/core/rcu 18/18] rcu: Add lockdep checks to synchronous expedited primitives "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:00 +0100
[PATCH v2 tip/core/rcu 03/18] Fix: Disable sys_membarrier when nohz_full is enabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:40 +0100
[PATCH v2 tip/core/rcu 12/18] rcu: Add comment headers to expedited-grace-period counter functions "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:50 +0100
[PATCH v2 tip/core/rcu 17/18] rcu: Eliminate unused expedited_normal counter "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 05:50 +0100
[PATCH v2 tip/core/rcu 16/18] llist: Clarify comments about when locking is needed "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 06:20 +0100
[PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 06:40 +0100
Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-23 20:40 +0100
Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err Josh Triplett <josh@joshtriplett.org> - 2017-01-23 23:40 +0100
Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 01:20 +0100
[PATCH v2 tip/core/rcu 05/18] rcu: Remove unneeded rcu_process_callbacks() declarations "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 07:10 +0100
[PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-18 07:10 +0100
Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-23 20:40 +0100
Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-23 21:30 +0100
Re: [PATCH v2 tip/core/rcu 07/18] rcu: Add long-term CPU kicking Josh Triplett <josh@joshtriplett.org> - 2017-01-21 21:50 +0100
[PATCH v3 tip/core/rcu 0/18] Miscellaneous fixes for 4.11 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 17/18] rcu: Eliminate unused expedited_normal counter "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 04/18] rcu: Only dump stalled-tasks stacks if there was a real stall "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 16/18] llist: Clarify comments about when locking is needed "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 06/18] rcu: Remove unused but set variable "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 05/18] rcu: Remove unneeded rcu_process_callbacks() declarations "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 12/18] rcu: Add comment headers to expedited-grace-period counter functions "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 14/18] rcu: Enable RCU tracepoints by default to aid in debugging "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 07/18] rcu: Add long-term CPU kicking "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 18/18] rcu: Add lockdep checks to synchronous expedited primitives "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 11/18] rcu: Don't wake rcuc/X kthreads on NOCB CPUs "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 13/18] rcu: Make rcu_cpu_starting() use its "cpu" argument "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 10/18] rcu: Re-enable TASKS_RCU for User Mode Linux "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
[PATCH v3 tip/core/rcu 15/18] rcu: Fix comment in rcu_organize_nocb_kthreads() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 23:00 +0100
Page 1 of 3 [1] 2 3 Next page →
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:00 +0100 |
| Subject | Re: [PATCH tip/core/rcu 0/20] Miscellaneous fixes for 4.11 |
| Message-ID | <t0ODD-6Iu-3@gated-at.bofh.it> |
On Sat, Jan 14, 2017 at 01:12:55AM -0800, Paul E. McKenney wrote: Hello! This series provides miscellaneous fixes: 1. Make RCU_EXPEDITE_BOOT be the default in order to speed up boot, courtesy of Sebastian Andrzej Siewior. 2. Make RCU suspicious-access lockdep splats use pr_err(). 3. Disable sys_membarrier when nohz_full is enabled, courtesy of Mathieu Desnoyers. 4. Only dump stalled-tasks stacks if there was a real stall, courtesy of Byungchul Park. 5. Remove unneeded rcu_process_callbacks() declarations. 6. Remove unused but set "mask" variable, courtesy of Tobias Klauser. 7. Add long-term CPU kicking. 8. Remove short-term CPU kicking. 9. Once again use NMI-based stack traces in stall warnings. 10. Re-enable TASKS_RCU for User Mode Linux. 11. Don't wake rcuc/X kthreads on NOCB CPUs. 12. Add comment headers to expedited-grace-period counter functions. 13. Make rcu_cpu_starting() use its "cpu" argument. 14. Enable RCU tracepoints by default to aid in debugging, courtesy of Matt Fleming. 15. Fix comment in rcu_organize_nocb_kthreads(), which no longer spawns kthreads. 16. Clarify comments about when llist locking is needed, courtesy of Joel Fernandes. 17. Eliminate unused expedited_normal counter. 18. Add lockdep checks to synchronous expedited primitives. Changes since v1: o Reverse the order of patches 7 and 8. o Defer the patch adding tests for trivial grace periods. o Defer the patch making cond_resched() provide RCU quiescent states. o Apply other feedback from Josh Triplett, Peter Zijlstra, and Michal Hocko. Thanx, Paul ------------------------------------------------------------------------ Documentation/RCU/trace.txt | 5 +---- include/linux/llist.h | 37 +++++++++++++++++++++---------------- init/Kconfig | 14 -------------- kernel/locking/lockdep.c | 12 ++++++------ kernel/membarrier.c | 4 ++++ kernel/rcu/tiny.c | 2 -- kernel/rcu/tree.c | 35 ++++++++++++++++++----------------- kernel/rcu/tree.h | 1 - kernel/rcu/tree_exp.h | 28 +++++++++++++++++++++++++++- kernel/rcu/tree_plugin.h | 5 +++-- kernel/rcu/tree_trace.c | 3 +-- kernel/rcu/update.c | 6 ++---- lib/Kconfig.debug | 1 + 13 files changed, 84 insertions(+), 69 deletions(-)
[toc] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:00 +0100 |
| Subject | [PATCH v2 tip/core/rcu 01/18] rcu: update: Make RCU_EXPEDITE_BOOT be the default |
| Message-ID | <t0ODD-6Iu-9@gated-at.bofh.it> |
| In reply to | #1561241 |
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
RCU_EXPEDITE_BOOT should speed up the boot process by enforcing
synchronize_rcu_expedited() instead of synchronize_rcu() during the boot
process. There should be no reason why one does not want this and there
is no need worry about real time latency at this point.
Therefore make it default.
Note that users wishing to avoid expediting entirely, for example when
bringing up new hardware possibly having flaky IPIs, can use the
rcu_normal boot parameter to override boot-time expediting.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[ paulmck: Reworded commit log. ]
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
init/Kconfig | 13 -------------
kernel/rcu/update.c | 6 ++----
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index 223b734abccd..96e6d56acd50 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -781,19 +781,6 @@ config RCU_NOCB_CPU_ALL
endchoice
-config RCU_EXPEDITE_BOOT
- bool
- default n
- help
- This option enables expedited grace periods at boot time,
- as if rcu_expedite_gp() had been invoked early in boot.
- The corresponding rcu_unexpedite_gp() is invoked from
- rcu_end_inkernel_boot(), which is intended to be invoked
- at the end of the kernel-only boot sequence, just before
- init is exec'ed.
-
- Accept the default if unsure.
-
endmenu # "RCU Subsystem"
config BUILD_BIN2C
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 4f6db7e6a117..9e03db9ea9c0 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -132,8 +132,7 @@ bool rcu_gp_is_normal(void)
}
EXPORT_SYMBOL_GPL(rcu_gp_is_normal);
-static atomic_t rcu_expedited_nesting =
- ATOMIC_INIT(IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT) ? 1 : 0);
+static atomic_t rcu_expedited_nesting = ATOMIC_INIT(1);
/*
* Should normal grace-period primitives be expedited? Intended for
@@ -182,8 +181,7 @@ EXPORT_SYMBOL_GPL(rcu_unexpedite_gp);
*/
void rcu_end_inkernel_boot(void)
{
- if (IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT))
- rcu_unexpedite_gp();
+ rcu_unexpedite_gp();
if (rcu_normal_after_boot)
WRITE_ONCE(rcu_normal, 1);
}
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:00 +0100 |
| Subject | [PATCH v2 tip/core/rcu 14/18] rcu: Enable RCU tracepoints by default to aid in debugging |
| Message-ID | <t0ODD-6Iu-11@gated-at.bofh.it> |
| In reply to | #1561241 |
From: Matt Fleming <matt@codeblueprint.co.uk> While debugging a performance issue I needed to understand why RCU sofitrqs were firing so frequently. Unfortunately, the RCU callback tracepoints are hidden behind CONFIG_RCU_TRACE which defaults to off in the upstream kernel and is likely to also be disabled in enterprise distribution configs. Enable it by default for CONFIG_TREE_RCU. However, we must keep it disabled for tiny RCU, because it would otherwise pull in a large amount of code that would make tiny RCU less than tiny. I ran some file system metadata intensive workloads (git checkout, FS-Mark) on a variety of machines with this patch and saw no detectable change in performance. Cc: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> --- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b06848a104e6..5655bd95919a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1450,6 +1450,7 @@ config RCU_CPU_STALL_TIMEOUT config RCU_TRACE bool "Enable tracing for RCU" depends on DEBUG_KERNEL + default y if TREE_RCU select TRACE_CLOCK help This option provides tracing in RCU which presents stats -- 2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:00 +0100 |
| Subject | [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking |
| Message-ID | <t0ODD-6Iu-17@gated-at.bofh.it> |
| In reply to | #1561241 |
Commit 4914950aaa12d ("rcu: Stop treating in-kernel CPU-bound workloads
as errors") added a (relatively) short-timeout call to resched_cpu().
This was inspired by as issue that was fixed by b7e7ade34e61 ("sched/core:
Fix remote wakeups"). But given that this issue was fixed, it is time
for the current commit to remove this call to resched_cpu().
Reported-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/rcu/tree.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 0e61b62e3f4a..5a4aaad75e76 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1220,11 +1220,6 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
rdp->rsp->jiffies_resched += 5; /* Re-enable beating. */
}
- /* And if it has been a really long time, kick the CPU as well. */
- if (ULONG_CMP_GE(jiffies,
- rdp->rsp->gp_start + 2 * jiffies_till_sched_qs) ||
- ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs))
- resched_cpu(rdp->cpu); /* Force CPU into scheduler. */
/*
* If more than halfway to RCU CPU stall-warning time, do
* a resched_cpu() to try to loosen things up a bit.
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | Josh Triplett <josh@joshtriplett.org> |
|---|---|
| Date | 2017-01-21 21:50 +0100 |
| Subject | Re: [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking |
| Message-ID | <t2aLM-8sX-19@gated-at.bofh.it> |
| In reply to | #1561244 |
On Tue, Jan 17, 2017 at 06:53:47PM -0800, Paul E. McKenney wrote:
> Commit 4914950aaa12d ("rcu: Stop treating in-kernel CPU-bound workloads
Does this commit ID still match what you have in your tree, post-rebase?
> as errors") added a (relatively) short-timeout call to resched_cpu().
> This was inspired by as issue that was fixed by b7e7ade34e61 ("sched/core:
> Fix remote wakeups"). But given that this issue was fixed, it is time
> for the current commit to remove this call to resched_cpu().
>
> Reported-by: Byungchul Park <byungchul.park@lge.com>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
> kernel/rcu/tree.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 0e61b62e3f4a..5a4aaad75e76 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -1220,11 +1220,6 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
> rdp->rsp->jiffies_resched += 5; /* Re-enable beating. */
> }
>
> - /* And if it has been a really long time, kick the CPU as well. */
> - if (ULONG_CMP_GE(jiffies,
> - rdp->rsp->gp_start + 2 * jiffies_till_sched_qs) ||
> - ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs))
> - resched_cpu(rdp->cpu); /* Force CPU into scheduler. */
> /*
> * If more than halfway to RCU CPU stall-warning time, do
> * a resched_cpu() to try to loosen things up a bit.
> --
> 2.5.2
>
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-23 20:40 +0100 |
| Subject | Re: [PATCH v2 tip/core/rcu 08/18] rcu: Remove short-term CPU kicking |
| Message-ID | <t2SD8-237-13@gated-at.bofh.it> |
| In reply to | #1564242 |
On Sat, Jan 21, 2017 at 12:43:44PM -0800, Josh Triplett wrote:
> On Tue, Jan 17, 2017 at 06:53:47PM -0800, Paul E. McKenney wrote:
> > Commit 4914950aaa12d ("rcu: Stop treating in-kernel CPU-bound workloads
>
> Does this commit ID still match what you have in your tree, post-rebase?
In light of your earlier email, good question! But this one is still
OK because it is already in mainline.
Thanx, Paul
> > as errors") added a (relatively) short-timeout call to resched_cpu().
> > This was inspired by as issue that was fixed by b7e7ade34e61 ("sched/core:
> > Fix remote wakeups"). But given that this issue was fixed, it is time
> > for the current commit to remove this call to resched_cpu().
> >
> > Reported-by: Byungchul Park <byungchul.park@lge.com>
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> > ---
> > kernel/rcu/tree.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index 0e61b62e3f4a..5a4aaad75e76 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -1220,11 +1220,6 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
> > rdp->rsp->jiffies_resched += 5; /* Re-enable beating. */
> > }
> >
> > - /* And if it has been a really long time, kick the CPU as well. */
> > - if (ULONG_CMP_GE(jiffies,
> > - rdp->rsp->gp_start + 2 * jiffies_till_sched_qs) ||
> > - ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs))
> > - resched_cpu(rdp->cpu); /* Force CPU into scheduler. */
> > /*
> > * If more than halfway to RCU CPU stall-warning time, do
> > * a resched_cpu() to try to loosen things up a bit.
> > --
> > 2.5.2
> >
>
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:10 +0100 |
| Subject | [PATCH v2 tip/core/rcu 11/18] rcu: Don't wake rcuc/X kthreads on NOCB CPUs |
| Message-ID | <t0ONj-70P-13@gated-at.bofh.it> |
| In reply to | #1561241 |
Chris Friesen notice that rcuc/X kthreads were consuming CPU even on
NOCB CPUs. This makes no sense because the only purpose or these
kthreads is to invoke normal (non-offloaded) callbacks, of which there
will never be any on NOCB CPUs. This problem was due to a bug in
cpu_has_callbacks_ready_to_invoke(), which should have been checking
->nxttail[RCU_NEXT_TAIL] for NULL, but which was instead (incorrectly)
checking ->nxttail[RCU_DONE_TAIL]. Because ->nxttail[RCU_DONE_TAIL] is
never NULL, the only effect is to cause the rcuc/X kthread to execute
when it should not do so.
This commit therefore checks ->nxttail[RCU_NEXT_TAIL], which is NULL
for NOCB CPUs.
Reported-by: Chris Friesen <chris.friesen@windriver.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/rcu/tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index d7b63b88434b..be2301238a23 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -611,7 +611,7 @@ static int
cpu_has_callbacks_ready_to_invoke(struct rcu_data *rdp)
{
return &rdp->nxtlist != rdp->nxttail[RCU_DONE_TAIL] &&
- rdp->nxttail[RCU_DONE_TAIL] != NULL;
+ rdp->nxttail[RCU_NEXT_TAIL] != NULL;
}
/*
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:30 +0100 |
| Subject | [PATCH v2 tip/core/rcu 15/18] rcu: Fix comment in rcu_organize_nocb_kthreads() |
| Message-ID | <t0P6F-7de-1@gated-at.bofh.it> |
| In reply to | #1561241 |
It used to be that the rcuo callback-offload kthreads were spawned
in rcu_organize_nocb_kthreads(), and the comment before the "for"
loop says as much. However, this spawning has long since moved to
the CPU-hotplug code, so this commit fixes this comment.
Reported-by: Michalis Kokologiannakis <mixaskok@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/rcu/tree_plugin.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 56583e764ebf..2f5541f6f031 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2366,8 +2366,9 @@ static void __init rcu_organize_nocb_kthreads(struct rcu_state *rsp)
}
/*
- * Each pass through this loop sets up one rcu_data structure and
- * spawns one rcu_nocb_kthread().
+ * Each pass through this loop sets up one rcu_data structure.
+ * Should the corresponding CPU come online in the future, then
+ * we will spawn the needed set of rcu_nocb_kthread() kthreads.
*/
for_each_cpu(cpu, rcu_nocb_mask) {
rdp = per_cpu_ptr(rsp->rda, cpu);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:40 +0100 |
| Subject | [PATCH v2 tip/core/rcu 06/18] rcu: Remove unused but set variable |
| Message-ID | <t0Pgl-7ga-1@gated-at.bofh.it> |
| In reply to | #1561241 |
From: Tobias Klauser <tklauser@distanz.ch>
Since commit 7ec99de36f40 ("rcu: Provide exact CPU-online tracking for
RCU"), the variable mask in rcu_init_percpu_data is set but no longer
used. Remove it to fix the following warning when building with 'W=1':
kernel/rcu/tree.c: In function ‘rcu_init_percpu_data’:
kernel/rcu/tree.c:3765:16: warning: variable ‘mask’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/rcu/tree.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 6232d2f9a84e..83bf054e194e 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3765,7 +3765,6 @@ static void
rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
{
unsigned long flags;
- unsigned long mask;
struct rcu_data *rdp = per_cpu_ptr(rsp->rda, cpu);
struct rcu_node *rnp = rcu_get_root(rsp);
@@ -3788,7 +3787,6 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
* of the next grace period.
*/
rnp = rdp->mynode;
- mask = rdp->grpmask;
raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
if (!rdp->beenonline)
WRITE_ONCE(rsp->ncpus, READ_ONCE(rsp->ncpus) + 1);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 04:40 +0100 |
| Subject | [PATCH v2 tip/core/rcu 13/18] rcu: Make rcu_cpu_starting() use its "cpu" argument |
| Message-ID | <t0Pgl-7ga-7@gated-at.bofh.it> |
| In reply to | #1561241 |
The rcu_cpu_starting() function uses this_cpu_ptr() to locate the
incoming CPU's rcu_data structure. This works for the boot CPU and for
all CPUs onlined after rcu_init() executes (during very early boot).
Currently, this is the full set of CPUs, so all is well. But if
anyone ever parallelizes boot before rcu_init() time, it will fail.
This commit therefore substitutes the rcu_cpu_starting() function's
this_cpu_pointer() for per_cpu_ptr(), future-proofing the code and
(arguably) improving readability.
This commit inadvertently fixes a latent bug: If there ever had been
more than just the boot CPU online at rcu_init() time, the old code
would not initialize the non-boot CPUs, but rather would repeatedly
initialize the boot CPU.
Reported-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/rcu/tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index be2301238a23..a4b4762442bb 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3873,7 +3873,7 @@ void rcu_cpu_starting(unsigned int cpu)
struct rcu_state *rsp;
for_each_rcu_flavor(rsp) {
- rdp = this_cpu_ptr(rsp->rda);
+ rdp = per_cpu_ptr(rsp->rda, cpu);
rnp = rdp->mynode;
mask = rdp->grpmask;
raw_spin_lock_irqsave_rcu_node(rnp, flags);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 05:00 +0100 |
| Subject | [PATCH v2 tip/core/rcu 18/18] rcu: Add lockdep checks to synchronous expedited primitives |
| Message-ID | <t0PzH-7mq-7@gated-at.bofh.it> |
| In reply to | #1561241 |
The non-expedited synchronize_*rcu() primitives have lockdep checks, but
their expedited counterparts lack these checks. This commit therefore
adds these checks to the expedited synchronize_*rcu() primitives.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/rcu/tree_exp.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 303df97bbfc5..f3e214898e3a 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -639,6 +639,11 @@ void synchronize_sched_expedited(void)
{
struct rcu_state *rsp = &rcu_sched_state;
+ RCU_LOCKDEP_WARN(lock_is_held(&rcu_bh_lock_map) ||
+ lock_is_held(&rcu_lock_map) ||
+ lock_is_held(&rcu_sched_lock_map),
+ "Illegal synchronize_sched_expedited() in RCU read-side critical section");
+
/* If only one CPU, this is automatically a grace period. */
if (rcu_blocking_is_gp())
return;
@@ -708,6 +713,11 @@ void synchronize_rcu_expedited(void)
{
struct rcu_state *rsp = rcu_state_p;
+ RCU_LOCKDEP_WARN(lock_is_held(&rcu_bh_lock_map) ||
+ lock_is_held(&rcu_lock_map) ||
+ lock_is_held(&rcu_sched_lock_map),
+ "Illegal synchronize_rcu_expedited() in RCU read-side critical section");
+
if (rcu_scheduler_active == RCU_SCHEDULER_INACTIVE)
return;
_synchronize_rcu_expedited(rsp, sync_rcu_exp_handler);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 05:40 +0100 |
| Subject | [PATCH v2 tip/core/rcu 03/18] Fix: Disable sys_membarrier when nohz_full is enabled |
| Message-ID | <t0Qcp-7NG-1@gated-at.bofh.it> |
| In reply to | #1561241 |
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Userspace applications should be allowed to expect the membarrier system
call with MEMBARRIER_CMD_SHARED command to issue memory barriers on
nohz_full CPUs, but synchronize_sched() does not take those into
account.
Given that we do not want unrelated processes to be able to affect
real-time sensitive nohz_full CPUs, simply return ENOSYS when membarrier
is invoked on a kernel with enabled nohz_full CPUs.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Josh Triplett <josh@joshtriplett.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: <stable@vger.kernel.org> [3.10+]
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: Lai Jiangshan <jiangshanlai@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/membarrier.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/membarrier.c b/kernel/membarrier.c
index 536c727a56e9..9f9284f37f8d 100644
--- a/kernel/membarrier.c
+++ b/kernel/membarrier.c
@@ -16,6 +16,7 @@
#include <linux/syscalls.h>
#include <linux/membarrier.h>
+#include <linux/tick.h>
/*
* Bitmask made from a "or" of all commands within enum membarrier_cmd,
@@ -51,6 +52,9 @@
*/
SYSCALL_DEFINE2(membarrier, int, cmd, int, flags)
{
+ /* MEMBARRIER_CMD_SHARED is not compatible with nohz_full. */
+ if (tick_nohz_full_enabled())
+ return -ENOSYS;
if (unlikely(flags))
return -EINVAL;
switch (cmd) {
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 05:50 +0100 |
| Subject | [PATCH v2 tip/core/rcu 12/18] rcu: Add comment headers to expedited-grace-period counter functions |
| Message-ID | <t0Qm6-7Ro-9@gated-at.bofh.it> |
| In reply to | #1561241 |
These functions (rcu_exp_gp_seq_start(), rcu_exp_gp_seq_end(),
rcu_exp_gp_seq_snap(), and rcu_exp_gp_seq_done() seemed too obvious
to comment when written, but not so much when being documented.
This commit therefore adds header comments to each of them.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/rcu/tree_exp.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index e59e1849b89a..303df97bbfc5 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -20,16 +20,26 @@
* Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
*/
-/* Wrapper functions for expedited grace periods. */
+/*
+ * Record the start of an expedited grace period.
+ */
static void rcu_exp_gp_seq_start(struct rcu_state *rsp)
{
rcu_seq_start(&rsp->expedited_sequence);
}
+
+/*
+ * Record the end of an expedited grace period.
+ */
static void rcu_exp_gp_seq_end(struct rcu_state *rsp)
{
rcu_seq_end(&rsp->expedited_sequence);
smp_mb(); /* Ensure that consecutive grace periods serialize. */
}
+
+/*
+ * Take a snapshot of the expedited-grace-period counter.
+ */
static unsigned long rcu_exp_gp_seq_snap(struct rcu_state *rsp)
{
unsigned long s;
@@ -39,6 +49,12 @@ static unsigned long rcu_exp_gp_seq_snap(struct rcu_state *rsp)
trace_rcu_exp_grace_period(rsp->name, s, TPS("snap"));
return s;
}
+
+/*
+ * Given a counter snapshot from rcu_exp_gp_seq_snap(), return true
+ * if a full expedited grace period has elapsed since that snapshot
+ * was taken.
+ */
static bool rcu_exp_gp_seq_done(struct rcu_state *rsp, unsigned long s)
{
return rcu_seq_done(&rsp->expedited_sequence, s);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 05:50 +0100 |
| Subject | [PATCH v2 tip/core/rcu 17/18] rcu: Eliminate unused expedited_normal counter |
| Message-ID | <t0Qm6-7Ro-7@gated-at.bofh.it> |
| In reply to | #1561241 |
Expedited grace periods no longer fall back to normal grace periods
in response to lock contention, given that expedited grace periods
now use the rcu_node tree so as to avoid contention. This commit
therfore removes the expedited_normal counter.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
Documentation/RCU/trace.txt | 5 +----
kernel/rcu/tree.h | 1 -
kernel/rcu/tree_trace.c | 3 +--
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 00a3a38b375a..6549012033f9 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -237,7 +237,7 @@ o "ktl" is the low-order 16 bits (in hexadecimal) of the count of
The output of "cat rcu/rcu_preempt/rcuexp" looks as follows:
-s=21872 wd1=0 wd2=0 wd3=5 n=0 enq=0 sc=21872
+s=21872 wd1=0 wd2=0 wd3=5 enq=0 sc=21872
These fields are as follows:
@@ -249,9 +249,6 @@ o "wd1", "wd2", and "wd3" are the number of times that an attempt
completed an expedited grace period that satisfies the attempted
request. "Our work is done."
-o "n" is number of times that a concurrent CPU-hotplug operation
- forced a fallback to a normal grace period.
-
o "enq" is the number of quiescent states still outstanding.
o "sc" is the number of times that the attempt to start a
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index fe98dd24adf8..8f750dffb0dd 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -521,7 +521,6 @@ struct rcu_state {
struct mutex exp_mutex; /* Serialize expedited GP. */
struct mutex exp_wake_mutex; /* Serialize wakeup. */
unsigned long expedited_sequence; /* Take a ticket. */
- atomic_long_t expedited_normal; /* # fallbacks to normal. */
atomic_t expedited_need_qs; /* # CPUs left to check in. */
struct swait_queue_head expedited_wq; /* Wait for check-ins. */
int ncpus_snap; /* # CPUs seen last time. */
diff --git a/kernel/rcu/tree_trace.c b/kernel/rcu/tree_trace.c
index b1f28972872c..2e932cd1da31 100644
--- a/kernel/rcu/tree_trace.c
+++ b/kernel/rcu/tree_trace.c
@@ -194,9 +194,8 @@ static int show_rcuexp(struct seq_file *m, void *v)
s2 += atomic_long_read(&rdp->exp_workdone2);
s3 += atomic_long_read(&rdp->exp_workdone3);
}
- seq_printf(m, "s=%lu wd0=%lu wd1=%lu wd2=%lu wd3=%lu n=%lu enq=%d sc=%lu\n",
+ seq_printf(m, "s=%lu wd0=%lu wd1=%lu wd2=%lu wd3=%lu enq=%d sc=%lu\n",
rsp->expedited_sequence, s0, s1, s2, s3,
- atomic_long_read(&rsp->expedited_normal),
atomic_read(&rsp->expedited_need_qs),
rsp->expedited_sequence / 2);
return 0;
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 06:20 +0100 |
| Subject | [PATCH v2 tip/core/rcu 16/18] llist: Clarify comments about when locking is needed |
| Message-ID | <t0QP8-8h6-5@gated-at.bofh.it> |
| In reply to | #1561241 |
From: Joel Fernandes <joelaf@google.com> llist.h comments are confusing about when locking is needed versus when it isn't. Clarify these comments by being more descriptive about why locking is needed for llist_del_first. Cc: Ingo Molnar <mingo@kernel.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Paul McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Huang Ying <ying.huang@intel.com> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Joel Fernandes <joelaf@google.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> --- include/linux/llist.h | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/include/linux/llist.h b/include/linux/llist.h index fd4ca0b4fe0f..171baa90f6f6 100644 --- a/include/linux/llist.h +++ b/include/linux/llist.h @@ -3,28 +3,33 @@ /* * Lock-less NULL terminated single linked list * - * If there are multiple producers and multiple consumers, llist_add - * can be used in producers and llist_del_all can be used in - * consumers. They can work simultaneously without lock. But - * llist_del_first can not be used here. Because llist_del_first - * depends on list->first->next does not changed if list->first is not - * changed during its operation, but llist_del_first, llist_add, - * llist_add (or llist_del_all, llist_add, llist_add) sequence in - * another consumer may violate that. - * - * If there are multiple producers and one consumer, llist_add can be - * used in producers and llist_del_all or llist_del_first can be used - * in the consumer. - * - * This can be summarized as follow: + * Cases where locking is not needed: + * If there are multiple producers and multiple consumers, llist_add can be + * used in producers and llist_del_all can be used in consumers simultaneously + * without locking. Also a single consumer can use llist_del_first while + * multiple producers simultaneously use llist_add, without any locking. + * + * Cases where locking is needed: + * If we have multiple consumers with llist_del_first used in one consumer, and + * llist_del_first or llist_del_all used in other consumers, then a lock is + * needed. This is because llist_del_first depends on list->first->next not + * changing, but without lock protection, there's no way to be sure about that + * if a preemption happens in the middle of the delete operation and on being + * preempted back, the list->first is the same as before causing the cmpxchg in + * llist_del_first to succeed. For example, while a llist_del_first operation + * is in progress in one consumer, then a llist_del_first, llist_add, + * llist_add (or llist_del_all, llist_add, llist_add) sequence in another + * consumer may cause violations. + * + * This can be summarized as follows: * * | add | del_first | del_all * add | - | - | - * del_first | | L | L * del_all | | | - * - * Where "-" stands for no lock is needed, while "L" stands for lock - * is needed. + * Where, a particular row's operation can happen concurrently with a column's + * operation, with "-" being no lock needed, while "L" being lock is needed. * * The list entries deleted via llist_del_all can be traversed with * traversing function such as llist_for_each etc. But the list -- 2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-18 06:40 +0100 |
| Subject | [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err |
| Message-ID | <t0R8t-8q4-7@gated-at.bofh.it> |
| In reply to | #1561241 |
This commit switches RCU suspicious-access splats use pr_err()
instead of the current INFO printk()s. This change makes it easier
to automatically classify splats.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/locking/lockdep.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 7c38f8f3d97b..a74c0630172a 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4412,13 +4412,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
#endif /* #ifdef CONFIG_PROVE_RCU_REPEATEDLY */
/* Note: the following can be executed concurrently, so be careful. */
printk("\n");
- printk("===============================\n");
- printk("[ INFO: suspicious RCU usage. ]\n");
+ pr_err("===============================\n");
+ pr_err("[ suspicious RCU usage. ]\n");
print_kernel_ident();
- printk("-------------------------------\n");
- printk("%s:%d %s!\n", file, line, s);
- printk("\nother info that might help us debug this:\n\n");
- printk("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
+ pr_err("-------------------------------\n");
+ pr_err("%s:%d %s!\n", file, line, s);
+ pr_err("\nother info that might help us debug this:\n\n");
+ pr_err("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
!rcu_lockdep_current_cpu_online()
? "RCU used illegally from offline CPU!\n"
: !rcu_is_watching()
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | Josh Triplett <josh@joshtriplett.org> |
|---|---|
| Date | 2017-01-21 21:50 +0100 |
| Subject | Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err |
| Message-ID | <t2aLM-8sX-15@gated-at.bofh.it> |
| In reply to | #1561278 |
On Tue, Jan 17, 2017 at 06:53:41PM -0800, Paul E. McKenney wrote:
> This commit switches RCU suspicious-access splats use pr_err()
> instead of the current INFO printk()s. This change makes it easier
> to automatically classify splats.
>
> Reported-by: Dmitry Vyukov <dvyukov@google.com>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---
> kernel/locking/lockdep.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 7c38f8f3d97b..a74c0630172a 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -4412,13 +4412,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
> #endif /* #ifdef CONFIG_PROVE_RCU_REPEATEDLY */
> /* Note: the following can be executed concurrently, so be careful. */
> printk("\n");
> - printk("===============================\n");
> - printk("[ INFO: suspicious RCU usage. ]\n");
> + pr_err("===============================\n");
> + pr_err("[ suspicious RCU usage. ]\n");
While re-adding the square bracket makes it symmetric, this change still
seems odd, and unrelated to the switch to pr_err. You could change it
to "ERR:" if you want, if "INFO:" feels inaccurate to you.
> print_kernel_ident();
> - printk("-------------------------------\n");
> - printk("%s:%d %s!\n", file, line, s);
> - printk("\nother info that might help us debug this:\n\n");
> - printk("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
> + pr_err("-------------------------------\n");
> + pr_err("%s:%d %s!\n", file, line, s);
> + pr_err("\nother info that might help us debug this:\n\n");
> + pr_err("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
> !rcu_lockdep_current_cpu_online()
> ? "RCU used illegally from offline CPU!\n"
> : !rcu_is_watching()
> --
> 2.5.2
>
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-23 20:40 +0100 |
| Subject | Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err |
| Message-ID | <t2SD8-237-15@gated-at.bofh.it> |
| In reply to | #1564245 |
On Sat, Jan 21, 2017 at 12:40:23PM -0800, Josh Triplett wrote:
> On Tue, Jan 17, 2017 at 06:53:41PM -0800, Paul E. McKenney wrote:
> > This commit switches RCU suspicious-access splats use pr_err()
> > instead of the current INFO printk()s. This change makes it easier
> > to automatically classify splats.
> >
> > Reported-by: Dmitry Vyukov <dvyukov@google.com>
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > ---
> > kernel/locking/lockdep.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > index 7c38f8f3d97b..a74c0630172a 100644
> > --- a/kernel/locking/lockdep.c
> > +++ b/kernel/locking/lockdep.c
> > @@ -4412,13 +4412,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
> > #endif /* #ifdef CONFIG_PROVE_RCU_REPEATEDLY */
> > /* Note: the following can be executed concurrently, so be careful. */
> > printk("\n");
> > - printk("===============================\n");
> > - printk("[ INFO: suspicious RCU usage. ]\n");
> > + pr_err("===============================\n");
> > + pr_err("[ suspicious RCU usage. ]\n");
>
> While re-adding the square bracket makes it symmetric, this change still
> seems odd, and unrelated to the switch to pr_err. You could change it
> to "ERR:" if you want, if "INFO:" feels inaccurate to you.
So this would be OK?
pr_err("[ ERR: suspicious RCU usage. ]\n");
(Changed to this as a best guess, but please let me know.)
Thanx, Paul
> > print_kernel_ident();
> > - printk("-------------------------------\n");
> > - printk("%s:%d %s!\n", file, line, s);
> > - printk("\nother info that might help us debug this:\n\n");
> > - printk("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
> > + pr_err("-------------------------------\n");
> > + pr_err("%s:%d %s!\n", file, line, s);
> > + pr_err("\nother info that might help us debug this:\n\n");
> > + pr_err("\n%srcu_scheduler_active = %d, debug_locks = %d\n",
> > !rcu_lockdep_current_cpu_online()
> > ? "RCU used illegally from offline CPU!\n"
> > : !rcu_is_watching()
> > --
> > 2.5.2
> >
>
[toc] | [prev] | [next] | [standalone]
| From | Josh Triplett <josh@joshtriplett.org> |
|---|---|
| Date | 2017-01-23 23:40 +0100 |
| Subject | Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err |
| Message-ID | <t2Vrk-3Zy-27@gated-at.bofh.it> |
| In reply to | #1565258 |
On Mon, Jan 23, 2017 at 11:30:16AM -0800, Paul E. McKenney wrote:
> On Sat, Jan 21, 2017 at 12:40:23PM -0800, Josh Triplett wrote:
> > On Tue, Jan 17, 2017 at 06:53:41PM -0800, Paul E. McKenney wrote:
> > > This commit switches RCU suspicious-access splats use pr_err()
> > > instead of the current INFO printk()s. This change makes it easier
> > > to automatically classify splats.
> > >
> > > Reported-by: Dmitry Vyukov <dvyukov@google.com>
> > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > > ---
> > > kernel/locking/lockdep.c | 12 ++++++------
> > > 1 file changed, 6 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > > index 7c38f8f3d97b..a74c0630172a 100644
> > > --- a/kernel/locking/lockdep.c
> > > +++ b/kernel/locking/lockdep.c
> > > @@ -4412,13 +4412,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
> > > #endif /* #ifdef CONFIG_PROVE_RCU_REPEATEDLY */
> > > /* Note: the following can be executed concurrently, so be careful. */
> > > printk("\n");
> > > - printk("===============================\n");
> > > - printk("[ INFO: suspicious RCU usage. ]\n");
> > > + pr_err("===============================\n");
> > > + pr_err("[ suspicious RCU usage. ]\n");
> >
> > While re-adding the square bracket makes it symmetric, this change still
> > seems odd, and unrelated to the switch to pr_err. You could change it
> > to "ERR:" if you want, if "INFO:" feels inaccurate to you.
>
> So this would be OK?
>
> pr_err("[ ERR: suspicious RCU usage. ]\n");
>
> (Changed to this as a best guess, but please let me know.)
Yeah, that seems fine. Sorry to nitpick this; it just otherwise seemed
entirely unrelated to the rest of the change.
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-01-24 01:20 +0100 |
| Subject | Re: [PATCH v2 tip/core/rcu 02/18] lockdep: Make RCU suspicious-access splats use pr_err |
| Message-ID | <t2X05-5ci-7@gated-at.bofh.it> |
| In reply to | #1565338 |
On Mon, Jan 23, 2017 at 02:33:19PM -0800, Josh Triplett wrote:
> On Mon, Jan 23, 2017 at 11:30:16AM -0800, Paul E. McKenney wrote:
> > On Sat, Jan 21, 2017 at 12:40:23PM -0800, Josh Triplett wrote:
> > > On Tue, Jan 17, 2017 at 06:53:41PM -0800, Paul E. McKenney wrote:
> > > > This commit switches RCU suspicious-access splats use pr_err()
> > > > instead of the current INFO printk()s. This change makes it easier
> > > > to automatically classify splats.
> > > >
> > > > Reported-by: Dmitry Vyukov <dvyukov@google.com>
> > > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > > > ---
> > > > kernel/locking/lockdep.c | 12 ++++++------
> > > > 1 file changed, 6 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > > > index 7c38f8f3d97b..a74c0630172a 100644
> > > > --- a/kernel/locking/lockdep.c
> > > > +++ b/kernel/locking/lockdep.c
> > > > @@ -4412,13 +4412,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
> > > > #endif /* #ifdef CONFIG_PROVE_RCU_REPEATEDLY */
> > > > /* Note: the following can be executed concurrently, so be careful. */
> > > > printk("\n");
> > > > - printk("===============================\n");
> > > > - printk("[ INFO: suspicious RCU usage. ]\n");
> > > > + pr_err("===============================\n");
> > > > + pr_err("[ suspicious RCU usage. ]\n");
> > >
> > > While re-adding the square bracket makes it symmetric, this change still
> > > seems odd, and unrelated to the switch to pr_err. You could change it
> > > to "ERR:" if you want, if "INFO:" feels inaccurate to you.
> >
> > So this would be OK?
> >
> > pr_err("[ ERR: suspicious RCU usage. ]\n");
> >
> > (Changed to this as a best guess, but please let me know.)
>
> Yeah, that seems fine. Sorry to nitpick this; it just otherwise seemed
> entirely unrelated to the rest of the change.
Might as well get it right... ;-)
Thanx, Paul
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | linux.kernel
csiph-web