Re: generic rwsem [Re: Alpha "process table hang"]

From: D.W.Howells (dhowells@astarte.free-online.co.uk)
Date: Tue Apr 17 2001 - 14:18:57 EST


Andrea,

> As said the design of the framework to plugin per-arch rwsem implementation
> isn't flexible enough and the generic spinlocks are as well broken, try to
> use them if you can (yes I tried that for the alpha, it was just a mess and
> it was more productive to rewrite than to fix).

Having thought about the matter a bit, I know what the problem is:

As stated in the email with the latest patch, I haven't yet extended this to
cover any architecture but i386. That patch was actually put up for comments,
though it got included anyway.

Therefore, all other archs use the old (and probably) broken implementations!

I'll quickly knock up a patch to fix the other archs. This should also fix
the alpha problem.

As for making the stuff I had done less generic, and more specific, I only
made it more generic because I got asked to by a number of people. It was
suggested that I move the contention functions into lib/rwsem.c and make them
common.

As far as using atomic_add_return() goes, the C compiler cannot make the
fastpath anywhere near as efficient, because amongst other things, I can make
use of the condition flags set in EFLAGS and the compiler can't.

> And it's also more readable and it's not bloated code, 65+110 lines
> compared to 156+148+174 lines.

You do my code an injustice there... I've put comments in mine.

David
-
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 : Mon Apr 23 2001 - 21:00:23 EST