[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1263079000.28171.3795.camel@gandalf.stny.rr.com>
Date: Sat, 09 Jan 2010 18:16:40 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
akpm@...ux-foundation.org, josh@...htriplett.org,
tglx@...utronix.de, Valdis.Kletnieks@...edu, dhowells@...hat.com,
laijs@...fujitsu.com, dipankar@...ibm.com
Subject: Re: [RFC PATCH] introduce sys_membarrier(): process-wide memory
barrier
On Sat, 2010-01-09 at 18:05 -0500, Steven Rostedt wrote:
> Then we should have O(tasks) for spinlocks taken, and
> O(min(tasks, CPUS)) for IPIs.
>
And for nr tasks >> CPUS, this may help too:
> cpumask = 0;
> foreach task {
if (cpumask == online_cpus)
break;
> spin_lock(task_rq(task)->rq->lock);
> if (task_rq(task)->curr == task)
> cpu_set(task_cpu(task), cpumask);
> spin_unlock(task_rq(task)->rq->lock);
> }
> send_ipi(cpumask);
>
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists