Re: [DRIVER SUBMISSION] DRBD wants to go mainline



Hi Kyle.

On Wed, Jul 25, 2007 at 11:43:38PM -0400, Kyle Moffett (mrlinuxman@xxxxxxx) wrote:
If you made all your sockets and inter-thread pipes nonblocking then
in userspace you would just epoll_wait() on the sockets and pipes and
be easily able to react to any IO from anywhere.

In kernel space there are similar nonblocking interfaces, although it
would probably be easier just to use a couple threads.

There are no such interfaces in kernel - one must create own state
machine on top of ->poll() callback, or use sys_poll()/epoll, but likely
it is not what one wants for high-performance in-kernel event processing
engine. Having two threads does not solve the problem - eventually one
needs to send a header before receiving data. So, the solution would
either to use always-blocking mode like in NBD, or create own state
machine using ->poll() callbacks.

Cheers,
Kyle Moffett

--
Evgeniy Polyakov
-
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/