Re: [RFC,PATCH] use rcu for fasync_lock

From: Jamie Lokier
Date: Sun Dec 21 2003 - 10:10:02 EST


Manfred Spraul wrote:
> The wakeup happens at irq time. The band info is necessary for
> send_sigio(). Calling f_poll at irq time is not an option - it will
> definitively cause breakage.

Agree * 3.

> schedule_work() for every call is IMHO not an option.

Agree, the latency would suck and it wouldn't even work for RT processes.

> And even that is not reliable: fasync users might expect seperate
> POLL_OUT and POLL_IN signals.

They might, although they probably shouldn't (band is a bitmask for a
reason).

Anyway, you can handle all these problems by computing the band at
signal delivery time. Yes it sounds like it would complicate the
signal delivery code, but sigio should really be handled specially
anyway, so that a signal queue entry for every fd is guaranteed and
queue overflow is not possible. Somebody already has a patch for
that, it might be worth working from.

-- Jamie
-
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/