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: <paulmck@...>
Cc: Christoph Lameter <cl@...>, Pekka Enberg <penberg@...>, Ingo Molnar <mingo@...>, Jeremy Fitzhardinge <jeremy@...>, Nick Piggin <nickpiggin@...>, 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 - 10:07 am

On Tue, 2008-08-26 at 06:43 -0700, Paul E. McKenney wrote:

right - while the local count will be balanced and will always end up on
zero, you have to check remote counts for zero as well.

But after a counter flip, the dying counter will only reach zero once
per cpu.

So each cpu gets to tickle a softirq once per cycle. That softirq can
then check all remote counters, and kick off the callback list when it
finds them all zero.

Of course, this scan is very expensive, n^2 at worst, each cpu
triggering a full scan, until finally the last cpu is done.

We could optimize this by keeping cpu masks of cpus found to have !0
counts - those who were found to have 0, will always stay zero, so we'll
not have to look at them again.

Another is making use of a scanning hierarchy.

--
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..., Peter Zijlstra, (Tue Aug 26, 10:07 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)