Re: [PATCH 3/7] barrier: a scalable synchonisation barrier

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Christoph Hellwig <hch@...>, Peter Zijlstra <a.p.zijlstra@...>, Andrew Morton <akpm@...>, <linux-kernel@...>, <oleg@...>
Date: Wednesday, January 31, 2007 - 3:12 pm

On Sun, Jan 28, 2007 at 04:24:35PM +0100, Ingo Molnar wrote:

Would it be possible to come up with something common between this primitive
and the one that Oleg Nesterov put together for Jens Axboe?

	http://lkml.org/lkml/2006/11/29/330

Oleg's approach acquires a lock on the update side, which Peter would
not want in the uncontended case -- but perhaps there is some way to
make Oleg's approach be able to safely test both counters so as to
avoid acquiring the lock if there are no readers.

Oleg, any chance of this working?  I believe it does, but have not
thought it through fully.

If it does turn out that we cannot converge these, I believe that
Peter's implementation needs an smp_mb() at both the beginning
and the end of barrier_sync().  Without the first smp_mb(), the
test in barrier_sync() might precede the prior change, and without
the second smp_mb() the barrier_sync() might slide after the following
cleanup code.  (But I could easily be misunderstanding the code
using barrier_sync().)

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

Messages in current thread:
[PATCH 3/7] barrier: a scalable synchonisation barrier, Peter Zijlstra, (Sun Jan 28, 7:51 am)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Christoph Hellwig, (Sun Jan 28, 10:39 am)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Paul E. McKenney, (Wed Jan 31, 3:12 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Peter Zijlstra, (Wed Jan 31, 5:48 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Paul E. McKenney, (Wed Jan 31, 7:32 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Peter Zijlstra, (Wed Jan 31, 8:03 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Paul E. McKenney, (Wed Jan 31, 8:48 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Paul E. McKenney, (Sat Feb 3, 8:23 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Paul E. McKenney, (Sun Feb 4, 1:46 am)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Paul E. McKenney, (Thu Feb 1, 5:38 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Paul E. McKenney, (Fri Feb 2, 1:13 pm)
Re: [PATCH 3/7] barrier: a scalable synchonisation barrier, Christoph Hellwig, (Sun Jan 28, 11:34 am)