login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
19
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs rcu_read_lock()
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Paul E. McKenney <paulmck@...>
To: Dmitry Torokhov <dmitry.torokhov@...>
Cc: Peter Zijlstra <a.p.zijlstra@...>, <linux-kernel@...>, Ingo Molnar <mingo@...>, Andrew Morton <akpm@...>, Nick Piggin <nickpiggin@...>
Subject:
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs rcu_read_lock()
Date: Wednesday, September 19, 2007 - 1:32 pm
On Wed, Sep 19, 2007 at 12:59:10PM -0400, Dmitry Torokhov wrote:
quoted text
> On 9/19/07, Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote: > > On Wed, Sep 19, 2007 at 11:16:21AM -0400, Dmitry Torokhov wrote: > > > On 9/19/07, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote: > > > > On Wed, 19 Sep 2007 10:17:25 -0400 "Dmitry Torokhov" > > > > <dmitry.torokhov@gmail.com> wrote: > > > > > > > > > Hi Peter, > > > > > > > > > > On 9/19/07, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote: > > > > > > Warn when rcu_dereference() is not used in combination with rcu_read_lock() > > > > > > > > > > > > > > > > According to Paul it is fine to use RCU primitives (when accompanied > > > > > with proper comments) when the read-size critical section is guarded > > > > > by spin_lock_irqsave()/spin_lock_irqsrestore() instead of > > > > > rcu_read_lock()/rcu_read_unlock() and writers synchronize with > > > > > synchronize_sched(), not synchronize_rcu(). Your patch will trigger > > > > > warnign on such valid usages. > > > > > > > > > > > > > Sounds fragile to begin with. But you're right in that that is valid > > > > for Linux as you know it. However in -rt most/all spinlocks are > > > > converted to sleeping locks. In that case sync_sched() is not enough. > > > > > > OK, then it goes beyond RCU... We need to come up with something that > > > can be used to synchronize with IRQ handlers (quite often in driver > > > code one needs to be sure that current invocation of IRQ handler > > > completed before doing something). And once we have it splinlock + RCU > > > users can just use that method. > > > > But Peter's approach would not cause a problem here -- you wouldn't be > > doing an rcu_dereference from within the IRQ handler in this case, right? > > Yes I do. Along with list_for_each_rcu().
OK, in that case it does indeed need to be handled. Thanx, Paul
quoted text
> > That said, we will need something to handle threaded interrupts, since > > synchronize_sched() only waits for hardirq, NMI, SMI, etc., and not > > threaded IRQs. > > > > Thanx, Paul > > > > -- > Dmitry
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs rcu_...
, Peter Zijlstra
, (Wed Sep 19, 6:41 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Wed Sep 19, 10:17 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Peter Zijlstra
, (Wed Sep 19, 10:31 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Wed Sep 19, 11:16 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Paul E. McKenney
, (Wed Sep 19, 11:37 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Wed Sep 19, 12:59 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Paul E. McKenney
, (Wed Sep 19, 1:32 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Paul E. McKenney
, (Wed Sep 19, 1:48 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Wed Sep 19, 2:49 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Peter Zijlstra
, (Wed Sep 19, 3:41 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Wed Sep 19, 3:49 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Paul E. McKenney
, (Wed Sep 19, 4:48 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Peter Zijlstra
, (Wed Sep 19, 4:13 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Wed Sep 19, 4:41 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Peter Zijlstra
, (Wed Sep 19, 5:19 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Wed Sep 19, 5:29 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Peter Zijlstra
, (Wed Sep 19, 5:47 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Thu Sep 20, 1:31 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Paul E. McKenney
, (Thu Sep 20, 8:01 pm)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Dmitry Torokhov
, (Fri Sep 21, 10:15 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Peter Zijlstra
, (Fri Sep 21, 10:30 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs ...
, Peter Zijlstra
, (Wed Sep 19, 11:25 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
David Miller
Re: Slow DOWN, please!!!
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
Heiko Carstens
Re: -mm merge plans for 2.6.23 -- sys_fallocate
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
[GIT]: Networking
Jan Engelhardt
Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
1048 guests
online.
Online users
hamidmushtaq
Syndicate