Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rather?than rcu

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nick Piggin <nickpiggin@...>
Cc: Christoph Lameter <cl@...>, Peter Zijlstra <peterz@...>, Pekka Enberg <penberg@...>, Ingo Molnar <mingo@...>, Jeremy Fitzhardinge <jeremy@...>, Andi Kleen <andi@...>, Pallipadi, Venkatesh <venkatesh.pallipadi@...>, Suresh Siddha <suresh.b.siddha@...>, Jens Axboe <jens.axboe@...>, Rusty Russell <rusty@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Tuesday, August 26, 2008 - 9:40 am

On Tue, Aug 26, 2008 at 03:13:40PM +1000, Nick Piggin wrote:

Indeed!

But if you were in a situation where read-side overhead was irrelevant
(perhaps a mythical machine with zero-cost atomics and cache misses),
then one approach would be to combine Oleg Nesterov's QRCU with the
callback processing from Andrea Arcangeli's implementation from the 2001
timeframe.  Of course, if your cache misses really were zero cost,
then you wouldn't care about the data remaining in cache.  So maybe
a machine were cache misses to other CPUs' caches are free, but misses
to main memory are horribly expensive?

Anyway, the trick would be to adapt QRCU (http://lkml.org/lkml/2007/2/25/18)
to store the index in the task structure (as opposed to returning it
from rcu_read_lock()), and have a single global queue of callbacks,
guarded by a global lock.  Then rcu_read_unlock() can initiate callback
processing if the counter decrements down to zero, and call_rcu() would
also initiate a counter switch in the case where the non-current counter
was zero -- and this operation would be guarded by the same lock that
guards the callback queue.

But I doubt that this would be satisfactory on 4,096-CPU machines.
At least not in most cases.  ;-)

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

Messages in current thread:
[PATCH 2/2] smp_call_function: use rwlocks on queues rather ..., Jeremy Fitzhardinge, (Thu Aug 21, 8:29 pm)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Christoph Lameter, (Fri Aug 22, 10:01 am)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Paul E. McKenney, (Fri Aug 22, 11:11 am)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Christoph Lameter, (Fri Aug 22, 1:14 pm)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Christoph Lameter, (Fri Aug 22, 2:36 pm)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Christoph Lameter, (Fri Aug 22, 4:03 pm)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Paul E. McKenney, (Mon Aug 25, 11:12 am)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Christoph Lameter, (Mon Aug 25, 11:44 am)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Christoph Lameter, (Mon Aug 25, 11:46 am)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Paul E. McKenney, (Tue Aug 26, 9:40 am)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Paul E. McKenney, (Wed Aug 27, 11:16 am)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Jeremy Fitzhardinge, (Fri Aug 22, 2:35 pm)
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rat..., Jeremy Fitzhardinge, (Sun Aug 24, 12:55 am)