On Fri, May 04, 2001 at 04:33:59PM +0200, Andrea Arcangeli wrote:
> the 2^16 limit is not a per-user limit it is a global one so the max
> user process ulimit is irrelevant.
>
> Only the number of pid and the max number of tasks supported by the
> architecture is a relevant limit for this.
Thanks for the correction. I thought about a case where one user could
exhaust 2^16 limit.
> > b. "long" count would cost extra 8 bytes in the struct rw_semaphore;
>
> correct but that's the "feature" to be able to support 2^32 concurrent
> sleepers at not relevant runtime cost 8).
But I can't imagine how this "feature" could be useful in a real life :-)
> > c. I can use existing atomic routines which deal with ints.
>
> I was thinking at a dedicated routine that implements the slow path by
> hand as well like x86 just do. Then using ldq instead of ldl isn't
> really a big deal programmer wise.
You meant "the fast path", I guess? Then it's true. However with those
atomic functions code is much more readable.
Anyway, I've attached asm-alpha/rwsem_xchgadd.h for your implementation.
However I got processes in D state early on boot with it -- maybe
I've made a typo somewhere...
Ivan.
This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:20 EST