Listening on a socket in kernel space

From: Daniel Shane (
Date: Mon Feb 26 2001 - 20:43:02 EST

I am currently writing a device driver that must listen to a socket
connection in kernel space. By looking at various code, I found out that
many drivers in the kernel use the socket->sk->sleep wait queue to queue
themselves on that list and get waken_up() by the socket.

My question is : if I expect to receive *a lot* of traffic, isnt this
sleep/wake_up a little slow? Maybe it cant be done, but is it possible for
the socket to generate an interrupt whenever some data arrives instead of
sleeping the the sockets queue?

I'm a little afraid of loosing some packets because the wake_up call doesnt
garantee that I will be waken_up any time soon (or will the kernel
automaticlaly schedule the kernel thread first when the data arrives because
it's always highest priority?).

Daniel Shane

GNU/Linux programmer
iNsu Innovations Inc.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Feb 28 2001 - 21:00:11 EST