linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: Nikolay Borisov <nborisov@suse.com>,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Josh Triplett <josh@joshtriplett.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-doc@vger.kernel.org,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH RFC] doc: rcu: remove obsolete (non-)requirement about disabling preemption
Date: Mon, 15 Oct 2018 14:08:56 -0700	[thread overview]
Message-ID: <20181015210856.GE2674@linux.ibm.com> (raw)
In-Reply-To: <20181015201556.GA43575@joelaf.mtv.corp.google.com>

On Mon, Oct 15, 2018 at 01:15:56PM -0700, Joel Fernandes wrote:
> On Mon, Oct 15, 2018 at 12:54:26PM -0700, Paul E. McKenney wrote:
> [...]
> > > > In any case, please don't spin for milliseconds with preemption disabled.
> > > > The real-time guys are unlikely to be happy with you if you do this!
> > > 
> > > Well just to clarify, I was just running Oleg's test which did this. This
> > > test was mentioned in the original documentation that I deleted. Ofcourse I
> > > would not dare do such a thing in production code :-D. I guess to Oleg's
> > > defense, he did it to very that synchronize_rcu() was not blocked on
> > > preempt-disable sections which was a different test.
> > 
> > Understood!  Just pointing out that RCU's tolerating a given action does
> > not necessarily mean that it is a good idea to take that action.  ;-)
> 
> Makes sense :-) thanks.

Don't worry, that won't happen again.  ;-)

> > > > > > +		pr_crit("SPIN done!\n");
> > > > > > +		preempt_enable();
> > > > > > +		break;
> > > > > > +	case 777:
> > > > > > +		pr_crit("SYNC start\n");
> > > > > > +		synchronize_rcu();
> > > > > > +		pr_crit("SYNC done!\n");
> > > > > 
> > > > > But you are using the console printing infrastructure which is rather
> > > > > heavyweight. Try replacing pr_* calls with trace_printk so that you
> > > > > write to the lock-free ring buffer, this will reduce the noise from the
> > > > > heavy console printing infrastructure.
> > > > 
> > > > And this might be a problem as well.
> > > 
> > > This was not the issue (or atleast not fully the issue) since I saw the same
> > > thing with trace_printk. It was exactly what you said - which is the
> > > excessively long preempt disabled times.
> > 
> > One approach would be to apply this patch against (say) v4.18, which
> > does not have consolidated grace periods.  You might then be able to
> > tell if the pr_crit() calls make any difference.
> 
> I could do that, yeah. But since the original problem went away due to
> disabling preempts for a short while, I will move on and continue to focus on
> updating other parts of the documenation. Just to mention I
> brought this up because I thought its better to do that than not to, just
> incase there is any lurking issue with the consolidation. Sorry if that ended
> up with me being noisy.

Not a problem, no need to apologize!

> Just curious, while I am going through the documentation, is there anything
> in particular that particularly sticks out to you that needs updating? I
> think I am around 50% there with the last several rounds of doc patches but I
> have lot more to go through. "Just keep doing what you're doing" is also a
> perfectly valid answer ;-)

It is the things needing updating that I do not yet know about that worry
the most, so "Just keep doing what you're doing" seems most appropriate.  ;-)

							Thanx, Paul


  reply	other threads:[~2018-10-15 21:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-14 21:29 [PATCH RFC] doc: rcu: remove obsolete (non-)requirement about disabling preemption Joel Fernandes (Google)
2018-10-14 23:17 ` Paul E. McKenney
2018-10-15  2:08   ` Joel Fernandes
2018-10-15  2:13     ` Joel Fernandes
2018-10-15  2:33       ` Paul E. McKenney
2018-10-15  2:47         ` Joel Fernandes
2018-10-15  2:50           ` Joel Fernandes
2018-10-15  6:05           ` Nikolay Borisov
2018-10-15 11:21             ` Paul E. McKenney
2018-10-15 19:39               ` Joel Fernandes
2018-10-15 19:54                 ` Paul E. McKenney
2018-10-15 20:15                   ` Joel Fernandes
2018-10-15 21:08                     ` Paul E. McKenney [this message]
2018-10-16 11:26                       ` Paul E. McKenney
2018-10-16 20:41                         ` Joel Fernandes
2018-10-17 16:11                           ` Paul E. McKenney
2018-10-17 18:15                             ` Joel Fernandes
2018-10-17 20:33                               ` Paul E. McKenney
2018-10-18  2:07                                 ` Joel Fernandes
2018-10-18 14:46                                   ` Paul E. McKenney
2018-10-19  0:03                                     ` Joel Fernandes
2018-10-19  0:19                                       ` Paul E. McKenney
2018-10-19  1:12                                         ` Steven Rostedt
2018-10-19  1:27                                           ` Joel Fernandes
2018-10-19  1:26                                         ` Joel Fernandes
2018-10-19  1:50                                           ` Steven Rostedt
2018-10-19  2:25                                             ` Joel Fernandes
2018-10-19  2:52                                               ` Steven Rostedt
2018-10-19  3:58                                                 ` Joel Fernandes
2018-10-19 12:07                                                   ` Paul E. McKenney
2018-10-19 17:24                                                     ` Joel Fernandes
2018-10-19 18:11                                                       ` 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=20181015210856.GE2674@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=corbet@lwn.net \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=nborisov@suse.com \
    --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).