[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1217631869.9016.16.camel@twins>
Date: Sat, 02 Aug 2008 01:04:29 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: paulmck@...ux.vnet.ibm.com
Cc: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org,
Masami Hiramatsu <mhiramat@...hat.com>
Subject: Re: [patch 01/17] RCU read sched
On Fri, 2008-08-01 at 14:10 -0700, Paul E. McKenney wrote:
> On Tue, Jul 15, 2008 at 06:26:05PM -0400, Mathieu Desnoyers wrote:
> > Add rcu_read_lock_sched() and rcu_read_unlock_sched() to rcupdate.h to match the
> > recently added write-side call_rcu_sched() and rcu_barrier_sched(). They also
> > match the no-so-recently-added synchronize_sched().
> >
> > It will help following matching use of the update/read lock primitives. Those
> > new read lock will replace preempt_disable()/enable() used in pair with
> > RCU-classic synchronization.
>
> Looks good, but...
>
> synchronize_sched(), call_rcu_sched(), and rcu_barrier_sched() can also
> pair up with:
>
> o local_irq_save() and local_irq_restore()
> o local_irq_disable() and local_irq_enable()
> o spin_lock_irqsave() and spin_lock_irqrestore()
You can't actually, as on PREEMP_RT these will not actuall disable
preemption.
> o etc. etc.
>
> I do very much like the idea of marking the intent of matching with
> RCU, but am getting a bit queasy about adding rcu_read_lock_sched_irq()
> and so on.
I'm thinking that if you disable interrupts, you're doing that for
another reason than RCU, so I'm not seeing the need for
rcu_read_lock_sched_irq variants.
Also, we should be very careful with using the *sched* RCU variant as it
really relies on disabling preemption - we should only use it when there
really is no other option, as we generally prefer to keep stuff
preemptable.
> Thoughts? Other than having an rcu_read_lock_sched_nop() or some
> other window-dressing macro that doesn't really do anything? (Which
> might really be the right thing to do...)
Afraid you lost me here..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists