> > > Maybe we could do the same for sockets? When data is available on a > > > socket (or when it becomes writable), write to a user memory location. > > > > > > I, too, have an interest in polling; in my situation most of the polling > > > happens in userspace. > > > > You are trying to improve on the latency of non-blocking > > ppoll(2)/epoll_wait(2) call? > > Yes, but the concern is for throughput, not latency. > > My main loop looks like > > execute some tasks > poll from many sources > > Since epoll_wait(..., 0) has non-trivial costs, I have to limit the > polling rate, and even so it shows up in the profile. If the cost were > lower, I could poll at a higher frequency, resulting in lower worst-case > latencies for high-priority tasks.
IMHO, the ideal model wouldn't enter the kernel at all unless you _want_ to go to sleep. Paolo