From: Steven Rostedt <rostedt@goodmis.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com,
oleg@redhat.com, Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH tip/core/rcu 06/10] trace: Eliminate cond_resched_rcu_qs() in favor of cond_resched()
Date: Sat, 24 Feb 2018 15:12:40 -0500 [thread overview]
Message-ID: <20180224151240.0d63a059@vmware.local.home> (raw)
In-Reply-To: <1512156104-20104-6-git-send-email-paulmck@linux.vnet.ibm.com>
On Fri, 1 Dec 2017 11:21:40 -0800
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> Now that cond_resched() also provides RCU quiescent states when
> needed, it can be used in place of cond_resched_rcu_qs(). This
> commit therefore makes this change.
Are you sure this is true?
I just bisected a lock up on my machine down to this commit.
With CONFIG_TRACEPOINT_BENCHMARK=y
# cd linux.git/tools/testing/selftests/ftrace/
# ./ftracetest test.d/ftrace/func_traceonoff_triggers.tc
Locks up with a backtrace of:
[ 614.186509] INFO: rcu_tasks detected stalls on tasks:
[ 614.192253] 000000005834f2a5: .. nvcsw: 2/2 holdout: 1 idle_cpu: -1/1
[ 614.199385] event_benchmark R running task 15264 1507 2 0x90000000
[ 614.207159] Call Trace:
[ 614.210335] ? trace_hardirqs_on_thunk+0x1a/0x1c
[ 614.215653] ? retint_kernel+0x2d/0x2d
[ 614.220101] ? ring_buffer_set_clock+0x10/0x10
[ 614.225232] ? benchmark_event_kthread+0x35/0x2d0
[ 614.230624] ? kthread+0x129/0x140
[ 614.234708] ? trace_benchmark_reg+0x80/0x80
[ 614.239646] ? kthread_create_worker_on_cpu+0x50/0x50
[ 614.245361] ? ret_from_fork+0x3a/0x50
The comment in the benchmark code that this commit affects is:
*
* Note the _rcu_qs() version of cond_resched() will
* notify synchronize_rcu_tasks() that this thread has
* passed a quiescent state for rcu_tasks. Otherwise
* this thread will never voluntarily schedule which would
* block synchronize_rcu_tasks() indefinitely.
*/
cond_resched();
Seems to me that cond_resched() isn't the same as cond_resched_rcu_qs().
-- Steve
>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> ---
> kernel/trace/trace_benchmark.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_benchmark.c b/kernel/trace/trace_benchmark.c
> index 79f838a75077..22fee766081b 100644
> --- a/kernel/trace/trace_benchmark.c
> +++ b/kernel/trace/trace_benchmark.c
> @@ -165,7 +165,7 @@ static int benchmark_event_kthread(void *arg)
> * this thread will never voluntarily schedule which would
> * block synchronize_rcu_tasks() indefinitely.
> */
> - cond_resched_rcu_qs();
> + cond_resched();
> }
>
> return 0;
> -
next prev parent reply other threads:[~2018-02-24 20:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 19:21 [PATCH tip/core/rcu 0/10] Don not IPI offline CPUs, de-emphasize cond_resched_rcu_qs() Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 01/10] sched: Stop resched_cpu() from sending IPIs to offline CPUs Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 02/10] sched: Stop switched_to_rt() " Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 03/10] netfilter: Eliminate cond_resched_rcu_qs() in favor of cond_resched() Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 04/10] mm: " Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 05/10] workqueue: " Paul E. McKenney
2017-12-02 1:06 ` Lai Jiangshan
2017-12-04 18:28 ` Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 06/10] trace: " Paul E. McKenney
2018-02-24 20:12 ` Steven Rostedt [this message]
2018-02-25 17:49 ` Paul E. McKenney
2018-02-25 18:17 ` Paul E. McKenney
2018-02-25 18:39 ` Paul E. McKenney
2018-02-27 2:29 ` Steven Rostedt
2018-02-27 15:36 ` Paul E. McKenney
2018-02-28 23:12 ` Steven Rostedt
2018-03-01 1:21 ` Paul E. McKenney
2018-03-01 5:04 ` Steven Rostedt
2018-03-01 20:48 ` Paul E. McKenney
2018-03-02 20:06 ` Steven Rostedt
2018-03-03 0:54 ` Paul E. McKenney
2018-02-26 4:57 ` Steven Rostedt
2018-02-26 5:47 ` Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 07/10] softirq: " Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 08/10] fs: " Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 09/10] doc: " Paul E. McKenney
2017-12-01 19:21 ` [PATCH tip/core/rcu 10/10] rcu: Account for rcu_all_qs() in cond_resched() Paul E. McKenney
2017-12-02 8:56 ` Peter Zijlstra
2017-12-02 12:22 ` Paul E. McKenney
2017-12-02 13:55 ` Peter Zijlstra
2018-02-24 20:18 ` Steven Rostedt
2018-02-25 17:52 ` 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=20180224151240.0d63a059@vmware.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.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).