Re: VM-related Oops: 2.4.15pre1

From: kuznet@ms2.inr.ac.ru
Date: Mon Nov 19 2001 - 13:40:41 EST


Hello!

> Oh, and I bet TCP would break horribly if gcc wrote internal temporary
> values to the socket sequence numbers.

Actually tcp does not depend on gcc idiosyncrasies. It works under
socket lock.

Well, all these things sort of read-copy updates, relying on memory
ordering etc. may be very good, but:

- I do not know the rules of the game.
- Nobody seems to knows them.
- Anyway, I do not have enough of brain cells to keep this under control.

So, networking relies only on explicit locks and barriers and gcc may do
everything except for splitting "optimizations" of this kind over barriers.

The most dangerous thing, which could harm 2.2 a lot is intuitively
natural:

static int a;
auto int b;

b = a;
do_something_with_b;

Goal of this code is clear, to get snapshot of "a"
and to do anything with "b", assuming it does not change.
In 2.2 we rely on this in many places.

I do not see anything which could prohibit gcc to eliminate register
allocated for "b" while CSE and to use "a" directly f.e. when b does
not fit to hardware register set in any case. Actually, gcc
does not make this to our luck, but I suspect it is only because
it is too stupid.

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



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:20 EST