On Thu, 2003-11-06 at 15:13, Oliver Dain wrote:
It seems to me that it can't loop in user mode forever. There is no way to get data into user mode (the ring buffer) witout going through the kernel. My understanding is that the NIC doesn't transfer directly to the user mode ring buffer, but rather to a different DMA buffer. The kernel must copy it from the DMA buffer to the ring buffer. Thus once the user mode app has processed all the data in the ring buffer the kenel _must_ get involved to get more data to user space. Currently the data gets there because the NIC produces an interrupt for each packet (or for every few packets) and when the kernel handles these the data is copied to user space. Then, as you point out, the cost of the RETI can't be avoided.
yes, in interrupt context. My point is that that *task* will never go in
to kernel mode, it will always be running in user mode.