Thread (19 messages) flat view 19 messages, 8 authors, 2006-09-20

Re: [POWERPC] convert string i/o operations to C

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-09-19 23:14:57

On Tue, 2006-09-19 at 20:58 +0200, Matt Sealey wrote:
Shouldn't this stuff be optimized out depending on what processor you're 
ACTUALLY running?

For a generic "powerpc" kernel it can be understood, but when you 
consider that on 970/POWER4 and above they use lwsync instead of sync
(google for them and see the mailing list posts :), just to breathe back 
some performance in spinlocks and so on, surely this can be rejigged so 
that processors don't do more work than necessary..? Even a noop takes 
time doesn't it?
The architecture is precise enough there. It should be twi,isync. The
goal of the isync is to make sure no subsequent instruction can execute
until the previous conditional branch has been fully resolved, which
implies loading the dependent data. An isync is the only instruction in
this specific case that is guaranteed to provide what we need by the
architecture.

Ben
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help