lkml.org 
[lkml]   [2008]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 01/17] RCU read sched
From
Date
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..



\
 
 \ /
  Last update: 2008-08-02 01:09    [W:0.072 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site