On Fri, Jul 16, 2021 at 6:57 AM Larry McVoy <lm(a)mcvoy.com> wrote:
On Fri, Jul 16, 2021 at 09:00:58AM -0400, Theodore Y. Ts'o wrote:
The trick that I used was two have two "flip
buffers" which were
dedicated for each serial port. One buffer would be filled by the
interrupt handler, while the other would be buffer would be processed
by the bottom half (read: software interrupt) handler. When the
bottom half handler had emptied one buffer, it would check to see if
there were any characters in the other buffer, and if so, flip the two
and process the characters in that buffer.
I'm pretty sure SGI used a similar approach for networking packets.
Yup was just going to say this is standard in the modern BSD network
drivers, looks like Clem says it's older. There are recent
optimizations to help the CPU with prefetch, and some ideas around
vectors of mbufs. What's remarkable is the mbuf design scales to
200gbps in practice, it must feel great to design something like that
so long ago :)