Re: [patch 14/22] pollfs: pollable futex

From: Davi Arnaut
Date: Wed May 02 2007 - 13:00:09 EST


Ulrich Drepper wrote:
On 5/2/07, Eric Dumazet <dada1@xxxxxxxxxxxxx> wrote:
I understand your concerns, but *this* patch bundle extends poll()/select()/epoll, and is not an alternative to kevent or other work in progress, (and linux centered)

It is adding huge amounts of complexity and at the same time is not
future-safe. I consider this enough reason to reject this approach.
Huge amounts of complexity? It just _moves_ some futex code around!
The intended use is not for locking, but for event signaling. Why can't
it be future-safe? It just needs a address and a value! Pseudocode:

thread A:
int fd = plfutex(addr, 0);
do
poll(fdset+fd);
process network events
queue obj to thread B
if fd:
job processed

thread B:
wait_job();
process_job();
raise_event(addr);
You never can get rid of the interface. It's much cleaner and safer
to do it right instead of piling on more and more workarounds for
special situations.
It simple as is, there is no need to overdesign.

--
Davi Arnaut
-
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/