From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, mingo@kernel.org,
laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, dhowells@redhat.com,
edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com,
oleg@redhat.com, bobby.prani@gmail.com
Subject: Re: [PATCH v5 tip/core/rcu 15/16] rcu: Make RCU-tasks wait for idle tasks
Date: Wed, 13 Aug 2014 07:43:32 -0700 [thread overview]
Message-ID: <20140813144332.GW4752@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140813101301.08019895@gandalf.local.home>
On Wed, Aug 13, 2014 at 10:13:01AM -0400, Steven Rostedt wrote:
> On Wed, 13 Aug 2014 16:07:05 +0200
> Peter Zijlstra <peterz@infradead.org> wrote:
>
> > On Wed, Aug 13, 2014 at 09:51:32AM -0400, Steven Rostedt wrote:
> >
> > > I still need to look at the patches, but if this is just for the idle
> > > case, then we don't need it. The idle case can be solved with a simple
> > > sched_on_each_cpu(). I need a way to solve waiting for processes to
> > > finish from a preemption point.
> > >
> > > That's all I want, and if we can remove the "idle" case and document it
> > > well that it's not covered and a sched_on_each_cpu() may be needed,
> > > then I'm fine with that.
> > >
> > > sched_on_each_cpu(dummy_op);
> > > call_rcu_tasks(free_tramp);
> >
> > Sure, but why not dtrt and push rcu_idle hooks all the way down into the
> > idle drivers if and where appropriate?
> >
> > There isn't _that_ much idle driver code. Also, some stuff should be
> > cleaned up; we're already calling stop_critical_timings() in the generic
> > idle code, and then calling it again in the cpuidle drivers.
>
> True, perhaps the rcu code should hook into the stop_critical_timings
> code?
Is that safe given that stop_critical_timings() is invoked around other things?
Let's see...
o drivers/acpi/acpi_pad.c, power_saving_thread().
Looks like a kthread that does idle injection. Currently, RCU
sees it as not a quiescent state. Would it kill these guys to
put in a comment or two about what this is for???
So adding rcu_idle_enter() and rcu_idle_exit() here might
actually fix a bug, though it is not clear how long this thing
actually runs. If only for a few milliseconds, no harm done.
o drivers/acpi/processor_idle.c, acpi_idle_do_entry().
Hmmm... Is the idle loop really simpler these days? Or is the
complexity just better hidden? :-/
So acpi_idle_do_entry() is called from several places, will chase
them down later. Does stop_critical_timings() nest?
o drivers/thermal/intel_powerclamp.c, clamp_thread().
Looks similar to power_saving_thread(), but for thermal control.
Probably short term, shouldn't be a problem either way.
o kernel/printk/printk.c, console_cont_flush().
call_console_drivers() certainly isn't idle. Might not use
RCU read sides, but...
o kernel/printk/printk.c, console_unlock()
Same as console_cont_flush().
So the first three look OK to hook rcu_idle_enter() and rcu_idle_exit()
into, but the last two don't look so good.
That said, if you are OK not tracing the stuff under stop_critical_timings(),
then I can use the RCU dyntick-idle state and not wake anything up.
Thanx, Paul
next prev parent reply other threads:[~2014-08-13 14:43 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 22:48 [PATCH tip/core/rcu 0/16] RCU-tasks implementation Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 01/16] rcu: Add call_rcu_tasks() Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 02/16] rcu: Provide cond_resched_rcu_qs() to force quiescent states in long loops Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 03/16] rcu: Add synchronous grace-period waiting for RCU-tasks Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 04/16] rcu: Make TASKS_RCU handle tasks that are almost done exiting Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 05/16] rcu: Export RCU-tasks APIs to GPL modules Paul E. McKenney
2014-08-14 19:08 ` Pranith Kumar
2014-08-14 21:29 ` Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 06/16] rcutorture: Add torture tests for RCU-tasks Paul E. McKenney
2014-08-14 21:34 ` Pranith Kumar
2014-08-14 21:44 ` Paul E. McKenney
2014-08-14 21:49 ` Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 07/16] rcutorture: Add RCU-tasks test cases Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 08/16] rcu: Add stall-warning checks for RCU-tasks Paul E. McKenney
2014-08-14 21:39 ` Pranith Kumar
2014-08-14 21:59 ` Paul E. McKenney
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 09/16] rcu: Improve RCU-tasks energy efficiency Paul E. McKenney
2014-08-14 21:42 ` Pranith Kumar
2014-08-14 21:55 ` Paul E. McKenney
2014-08-14 22:00 ` Pranith Kumar
2014-08-11 22:48 ` [PATCH v5 tip/core/rcu 10/16] documentation: Add verbiage on RCU-tasks stall warning messages Paul E. McKenney
2014-08-11 22:49 ` [PATCH v5 tip/core/rcu 11/16] rcu: Defer rcu_tasks_kthread() creation till first call_rcu_tasks() Paul E. McKenney
2014-08-14 22:28 ` Pranith Kumar
2014-08-14 22:53 ` Paul E. McKenney
2014-08-11 22:49 ` [PATCH v5 tip/core/rcu 12/16] rcu: Make TASKS_RCU handle nohz_full= CPUs Paul E. McKenney
2014-08-14 22:55 ` Pranith Kumar
2014-08-14 23:16 ` Paul E. McKenney
2014-08-11 22:49 ` [PATCH v5 tip/core/rcu 13/16] rcu: Make rcu_tasks_kthread()'s GP-wait loop allow preemption Paul E. McKenney
2014-08-11 22:49 ` [PATCH v5 tip/core/rcu 14/16] rcu: Remove redundant preempt_disable() from rcu_note_voluntary_context_switch() Paul E. McKenney
2014-08-13 10:56 ` Peter Zijlstra
2014-08-13 14:07 ` Paul E. McKenney
2014-08-13 14:33 ` Peter Zijlstra
2014-08-13 20:06 ` Paul E. McKenney
2014-08-11 22:49 ` [PATCH v5 tip/core/rcu 15/16] rcu: Make RCU-tasks wait for idle tasks Paul E. McKenney
2014-08-13 8:12 ` Peter Zijlstra
2014-08-13 12:48 ` Paul E. McKenney
2014-08-13 13:40 ` Peter Zijlstra
2014-08-13 13:51 ` Steven Rostedt
2014-08-13 14:07 ` Peter Zijlstra
2014-08-13 14:13 ` Steven Rostedt
2014-08-13 14:43 ` Paul E. McKenney [this message]
2014-08-13 16:30 ` Peter Zijlstra
2014-08-13 16:43 ` Jacob Pan
2014-08-13 18:24 ` Paul E. McKenney
2014-08-13 16:35 ` Peter Zijlstra
2014-08-13 18:25 ` Paul E. McKenney
2014-08-13 14:43 ` Peter Zijlstra
2014-08-13 20:56 ` Paul E. McKenney
2014-08-13 14:12 ` Paul E. McKenney
2014-08-13 14:42 ` Peter Zijlstra
2014-08-13 17:24 ` Peter Zijlstra
2014-08-13 17:30 ` Peter Zijlstra
2014-08-13 18:16 ` Peter Zijlstra
2014-08-13 18:20 ` Paul E. McKenney
2014-08-13 18:55 ` Peter Zijlstra
2014-08-13 19:54 ` Paul E. McKenney
2014-08-11 22:49 ` [PATCH v5 tip/core/rcu 16/16] rcu: Additional information on RCU-tasks stall-warning messages Paul E. McKenney
2014-08-14 20:46 ` [PATCH v5 tip/core/rcu 01/16] rcu: Add call_rcu_tasks() Pranith Kumar
2014-08-14 21:22 ` Paul E. McKenney
2014-08-12 23:57 ` [PATCH tip/core/rcu 0/16] RCU-tasks implementation Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140813144332.GW4752@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bobby.prani@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhart@linux.intel.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).