Re: [RFC PATCH] introduce sys_membarrier(): process-wide memorybarrier

From: Steven Rostedt
Date: Thu Jan 07 2010 - 08:15:40 EST


On Thu, 2010-01-07 at 09:44 +0100, Peter Zijlstra wrote:

> A simple:
>
> for_each_cpu(cpu, current->mm->cpu_vm_mask) {
> if (cpu_curr(cpu)->mm == current->mm)
> smp_call_function_single(cpu, func, NULL, 1);
> }

I like this algorithm the best ;-)

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/