Re: down_timeout

From: Ingo Oeser
Date: Sat Oct 04 2003 - 02:58:15 EST


Hi Andrew,

On Friday 03 October 2003 20:03, Grover, Andrew wrote:
> > From: linux-kernel-owner@xxxxxxxxxxxxxxx
> > [mailto:linux-kernel-owner@xxxxxxxxxxxxxxx] On Behalf Of
> > Matthew Wilcox
> > It's still not great because it doesn't preserve ordering.
> > down_timeout()
> > would be a much better primitive. We have down_interruptible() which
> > could be used for this purpose. Something like (completely
> > uncompiled):
>
> Yeah we proposed this 2 years ago and someone (don't remember who) shot
> us down.

It was me.

Reason:
I misunderstood your suggestion down_timeout() as "down and hold
a semaphore until timeout" instead of "try until timeout to get
the semaphore". I suggested using waitqueues for this.

But now that I understand, what you really want, I agree that this is
very useful and also agree that the kernel should provide it.

I don't think that I prevented it from being accepted, but my opinion
about it might had have the wrong influence.

I'm really sorry, that this simple communication problem caused you,
the ACPI development and users such a big pain.

PS: And I still think that semaphores with a maximum hold time are a bad
idea in the linux kernel. But this is just *my* opinion ;-)

Regards

Ingo Oeser


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/