Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs rcu_read_lock()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Thursday, September 20, 2007 - 5:01 pm

On Thu, Sep 20, 2007 at 01:31:35PM -0400, Dmitry Torokhov wrote:

To wait for all preempt-disable, irq-disable, hard-irq, and SMI/NMI code
sequences to complete.


I did look at making a synchronize_all_irq() some time back, and all
the approaches I came up with at the time were busted.

But I just took another look, and I think I see a way to handle it.
Either that, or I simply forgot the way in which this approach is
broken...

I will stare at is some more.


Yep, looks that way to me.  The only difference that I can see is that
in -rt, concurrent synchronize_irq() calls on the same descriptor mean
that the guy that gets there second has to wait for the next interrupt
to happen.


Agreed!

On the other hand, udelay(10) is more than two orders of magnitude
slower than an rcu_read_lock() / rcu_read_unlock() round trip in -rt,
and a full three orders of magnitude slower in CONFIG_PREEMPT.
As for non-CONFIG_PREEMPT, well, "free is a very good price".  ;-)

						Thanx, Paul
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() v ..., Paul E. McKenney, (Wed Sep 19, 10:32 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() v ..., Paul E. McKenney, (Wed Sep 19, 10:48 am)
Re: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() v ..., Paul E. McKenney, (Thu Sep 20, 5:01 pm)