From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
rcu <rcu@vger.kernel.org>
Subject: Re: [attn: Steve] Re: Normal RCU grace period can be stalled for long because need-resched flags not set?
Date: Sat, 6 Jul 2019 11:05:32 -0700 [thread overview]
Message-ID: <20190706180532.GX26519@linux.ibm.com> (raw)
In-Reply-To: <20190706121807.GB200542@google.com>
On Sat, Jul 06, 2019 at 08:18:07AM -0400, Joel Fernandes wrote:
> On Thu, Jul 04, 2019 at 06:57:26PM -0700, Paul E. McKenney wrote:
> [snip]
> > > I tried again, if I make sure the ftrace dump absolutely does not happen
> > > until the preempt-disable loop is done marked by a new global variable as you
> > > pointed, then it fixes it. And I don't need any set_preempt_need_resched() or
> > > rcu_perf_shutdown_wait() in my preempt disable loop to fix it. Basically the
> > > below diff. However, it still does answer the question about why a parallel
> > > ftrace dump running in parallel with the still running preempt-disable loop
> > > caused some writers to have multi-second grace periods. I think something
> > > during the ftrace dump prevented the tick path of that loop CPU to set the
> > > need-resched flag. It is quite hard to trace because the problem itself is
> > > caused by tracing, so by the time the dump starts, the traces cannot be seen
> > > after that which are what would give a clue here.
> >
> > Hmmm... Doesn't ftrace_dump() iterate through the trace buffer with
> > interrupts disabled or some such? If so, that would fully explain
> > its delaying RCU grace periods.
>
> Looking through the ftrace_dump() code, I don't see any interrupt disabled
> happening, and in this case it would be happening on a different CPU than my
> preempt disable loop anyway since that loop runs on a CPU I reserved, and the
> writer thread doing the dump runs on a different CPU. So it is a bit odd that
> the presence of my preempt disable loop effects anything. No having the
> preempt disable loop in the first place, does not have this issue.
>
> (Also added "attn: Steve" for the tracing question, to get his attention
> since this thread is very long).
> Steven, any thoughts on how rcu_ftrace_dump() can affect grace-period
> durations or other RCU parts? Do you see how it could impact the RCU GP
> thread if at all? I did setup RT priority 10 for the thread.
I see a local_irq_save() a few lines into ftrace_dump() itself. Am I
missing where interrupts are being re-enabled prior to the trace-dump
loop?
Thanx, Paul
next prev parent reply other threads:[~2019-07-06 18:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 15:25 Normal RCU grace period can be stalled for long because need-resched flags not set? Joel Fernandes
2019-07-03 15:30 ` Steven Rostedt
2019-07-03 16:41 ` Joel Fernandes
2019-07-03 16:43 ` Joel Fernandes
2019-07-03 17:39 ` Paul E. McKenney
2019-07-03 21:24 ` Joel Fernandes
2019-07-03 21:57 ` Paul E. McKenney
2019-07-03 22:24 ` Joel Fernandes
2019-07-03 23:01 ` Paul E. McKenney
2019-07-04 0:21 ` Joel Fernandes
2019-07-04 0:32 ` Joel Fernandes
2019-07-04 0:50 ` Paul E. McKenney
2019-07-04 3:24 ` Joel Fernandes
2019-07-04 17:13 ` Paul E. McKenney
2019-07-04 18:50 ` Joel Fernandes
2019-07-04 22:17 ` Paul E. McKenney
2019-07-05 0:08 ` Joel Fernandes
2019-07-05 1:30 ` Joel Fernandes
2019-07-05 1:57 ` Paul E. McKenney
2019-07-06 12:18 ` [attn: Steve] " Joel Fernandes
2019-07-06 18:05 ` Paul E. McKenney [this message]
2019-07-06 23:25 ` Steven Rostedt
2019-07-06 12:02 ` Joel Fernandes
2019-07-06 18:21 ` Paul E. McKenney
2019-07-06 23:03 ` Joel Fernandes
2019-07-07 11:19 ` Paul E. McKenney
2019-07-04 0:47 ` Paul E. McKenney
2019-07-04 16:49 ` Joel Fernandes
2019-07-04 17:08 ` Paul E. McKenney
2019-07-03 16:10 ` 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=20190706180532.GX26519@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=joel@joelfernandes.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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).