On Sun, 12 May 2002, David S. Miller wrote:
>
> If the coder doesn't lock his data structures, it doesn't matter _what_
> order we execute the list modifications in - different architectures will
> do different thing with inter-CPU memory ordering, and trying to order
> memory accesses on a source level is futile.
>
> However, if the list manipulation had some memory barriers
> added to it...
That would just make _those_ much slower, with some very doubtful end
results.
Show me numbers, and show me readable source, and show me a proof that the
memory ordering actually works, and I may consider lockless algorithms
worthwhile. As it is, they are damn fragile and require more care that I
personally care to expect out of 99.9% of all programmers.
And I'm sure as hell not going to put any lockless stuff in functions
meant for "normal human consumption". If we create list macros like that,
they had better be called "lockless_list_add_be_damn_careful_about_it()"
rather than "list_add()".
Linus
-
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 : Tue May 14 2002 - 12:00:19 EST