Re: [PATCH -v2] use per cpu data for single cpu ipi calls
From: Linus Torvalds
Date: Thu Jan 29 2009 - 13:09:21 EST
On Thu, 29 Jan 2009, Steven Rostedt wrote:
>
> Actually, we are locking against the destination CPU.
Oh.
THAT'S JUST INCOMPETENT.
What the *fuck* is the point of having per-CPU data, and then using it for
the wrong CPU?
Stop doing that idiocy. Put the per-cpu data on the senders side, and stop
the idiocy. You are going to get cross-CPU cacheline bouncing anyway,
there's no way to avoid it, but as long as you do it on the wrong CPU's
local data, you're missing the whole POINT of having per-cpu data in the
first place.
But yeah, that explains the locking. One stupid design mistake leads to
another.
And are you really sure it cannot be called from within interrupts? I'm
finding a lot of callers of smp_call_function_single(), and while I
couldn't find any that look like interrupts, I also couldn't find any
indication that it never happens.
Linus
--
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/