Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists

Linus Torvalds (torvalds@transmeta.com)
Sat, 13 Oct 2001 10:23:23 -0700 (PDT)


On Sat, 13 Oct 2001, Paul McKenney wrote:
>
> The reference counts are needed -only- in cases where references to an
> RCU-protected data structure may be held across a sleep.

My point is that
(a) such uses are not very common.
(b) the whole notiong of "scheduling point" is a lot too fragile to be
acceptable for important data structures. It breaks with the
pre-emption patches on UP, and we've seen many times how hard it is
for developers to notice even when there _is_ an explicit "end
critical region now" kind of thing

Have you seen how many uses of implicitly blocking operations there have
been with interrupts disabled or spinlocks held? Now, if the data
structure doesn't even have a "ok, I'm done with you" thing, then those
kinds of mistakes are going to be not only impossible to find
automatically, but they are going to be even easier to make by mistake.

In short, RCU has several problems in my opinion:

- nobody has shown a case where existing normal locking ends up being
really a huge problem, and where RCU clearly helps.

- RCU obviously has major subtle issues, ranging from memory ordering to
"what is quiescent", ie the scheduling points. And "subtlety" directly
translates into bugs and hard-to-debug seldom-seen problems that end up
being "unexplainable".

In short, RCU seems to be a case of "hey, that's cool", but it's a
solution in search of a problem so severe that it is worth it.

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/