Re: [PATCH] Fast Userspace Mutexes III.

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Mon Mar 04 2002 - 20:34:29 EST


In message <1015271393.15277.112.camel@phantasy> you write:
> > +static spinlock_t futex_lock = SPIN_LOCK_UNLOCKED;
>
> Could we make this per-waitqueue?

Yes, once someone gives benchmarks proving it's worth doing the whole
"multiple locks and cache aligned" thing. Until then, it's premature
optimization.

> We should do:
>
> #define FUTEX_UP 1
> #define FUTEX_DOWN -1

Ack. Definitely.

> here. The preempt statements compile away if CONFIG_PREEMPT is not set,
> so you can just put them in, even on arches that don't do preemption
> yet.

Oops, that code shouldn't have been in patch, and the only reason that
preempt_disable() was commented out is that I tested the patch on 2.4.

> ... oh, and I would love an example of using it in userspace ;)

I'll throw it in for patch IV. 8)

> Nice work, Rusty.

I don't know if I can accept the kudos: it's now hovering at about 70%
my code, but only 20% my ideas.

Cheers,
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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 : Thu Mar 07 2002 - 21:00:37 EST