All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-rt-users@vger.kernel.org, mingo@elte.hu,
	tglx@linutronix.de, dvhltc@us.ibm.com, tytso@us.ibm.com,
	akpm@linux-foundation.org, nickpiggin@yahoo.com.au
Subject: Re: [PATCH RFC -rt] updated synchronize_all_irqs implementation
Date: Wed, 26 Sep 2007 14:22:45 -0700	[thread overview]
Message-ID: <20070926212245.GB10544@linux.vnet.ibm.com> (raw)
In-Reply-To: <1190840086.18147.38.camel@lappy>

On Wed, Sep 26, 2007 at 10:54:46PM +0200, Peter Zijlstra wrote:
> 
> On Wed, 2007-09-26 at 12:55 -0700, Paul E. McKenney wrote:
> 
> > Well, we could make spin_lock_irqsave() invoke rcu_read_lock() and
> > spin_lock_irqrestore() invoke rcu_read_unlock(), with similar adjustments
> > to the other primitives in this group.  Then RCU priority boosting would
> > kick in if configured.
> 
> Might be me, but 'hiding' the RCU scope like that makes my skin crawl.
> What is wrong with using rcu_read_lock() explicitly where you depend on
> it? It even makes the code cleaner in that it documents the usage.
> 
> These blanket locks like lock_kernel(), preempt_disable(),
> local_irq_disable() etc. are very hard to get rid of because they don't
> document what is protected.
> 
> Please lets not add to this mess and keep all this explicit.
> 
> Yes, -rt changes the preemption model, and that has concequences. But
> IMHO the resulting code is cleaner in most cases.

I am not going to argue with you on this one!!!

But it is not me that needs convincing.

> I'd go as far as to depricate synchronize_sched() and replace all its
> users with proper RCU.

But this might be going too far, though you might well be able to
convince me.  Reducing RCU API proliferation would be a good thing
in general...

> The more I think of it, the more I dislike this synchronize_all_irqs()
> and the 'magic' property of irq handlers.

So I produced a 'magic' patch?  Cool!!!  ;-)

Seriously, I agree that using explicit rcu_read_lock() where needed would
be much better from a readability and robustness viewpoint.  However,
if the goal is to support the existing code unmodified, then this patch
is one solution.  I would be just as happy to see it become unnecessary
as to see it go in, as long as the problem is solved one way or another.

							Thanx, Paul

      parent reply	other threads:[~2007-09-26 21:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-21  5:46 [PATCH RFC -rt] synchronize_all_irqs implementation Paul E. McKenney
2007-09-23 17:34 ` [PATCH RFC -rt] updated " Paul E. McKenney
2007-09-25 17:22   ` Steven Rostedt
2007-09-25 19:34     ` Paul E. McKenney
2007-09-25 20:02       ` Steven Rostedt
2007-09-25 23:24         ` Peter Zijlstra
2007-09-26  1:11           ` Paul E. McKenney
2007-09-26  8:28             ` Peter Zijlstra
2007-09-26 13:03               ` Paul E. McKenney
2007-09-26 13:16                 ` Dmitry Torokhov
2007-09-26 15:56                   ` Paul E. McKenney
2007-09-26 17:19                     ` Dmitry Torokhov
2007-09-26 17:43                       ` Paul E. McKenney
2007-09-26 17:47                         ` Steven Rostedt
2007-09-26 17:44                       ` Steven Rostedt
2007-09-26 19:55                         ` Paul E. McKenney
2007-09-26 20:54                           ` Peter Zijlstra
2007-09-26 21:07                             ` Steven Rostedt
2007-09-26 21:42                               ` Paul E. McKenney
2007-09-27 14:24                                 ` Dmitry Torokhov
2007-09-27 14:28                                   ` Steven Rostedt
2007-09-27 14:32                                     ` Dmitry Torokhov
2007-09-26 21:22                             ` Paul E. McKenney [this message]

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=20070926212245.GB10544@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dvhltc@us.ibm.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tytso@us.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.