Re: spin_lock forgets to clobber memory and other smp fixes [was Re: [patch] waitqueue optimization, 2.4.0-test7]

From: David Woodhouse (dwmw2@infradead.org)
Date: Fri Sep 08 2000 - 05:03:14 EST


lk@tantalophile.demon.co.uk said:
> I tried it with two compilers, one older than yours and one newer:
> In both cases, the memory read occurs before "zzz".

andrea@suse.de said:
> I guess Alexey point is that the current compiler doesn't notice
> that.

I don't understand why we're bringing empirical evidence into this
discussion. Didn't we get into the horrible mess we've already got w.r.t.
compilers by relying on the existing behaviour never changing?

The GCC documentation exists. If it is unclear, file a bug, and/or obtain
clarification from the developers or the C specifications.

Once that is done, code the kernel to that specification, without heed to
the current _implementation_ of GCC.

Separately, you may wish to test that your particular version of GCC, on
your architecture, with this phase of the moon, conforms to that
specification. If it doesn't, file another bug.

Do not use the ambiguity of the specification as an excuse for coding to
today's GCC implementation. We should have learned that lesson by now.

Please - come to a clear conclusion about the behaviour _permitted_ by the
GCC documentation, and _then_ attempt to test it.

--
dwmw2

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



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:10 EST