INP_INFO_WLOCK(&tcbinfo) bottleneck

Keith Arner vornum at gmail.com
Thu Mar 1 15:11:52 UTC 2007


I'm working on a project that needs high throughput, low latency TCP
traffic.
I'd like to be able to parallelize as much of the processing as possible,
across
several cores.

I've done some early investigation in FreeBSD with direct dispatch enabled
(`sysctl net.isr.direct=1`).  What I've discovered is that the system tends
to bottleneck with a lot of contention for INP_INFO_WLOCK(&tcbinfo).
Looking at the source code, it's apparent why this is; both tcp_input()
and tcp_usr_send() hold this mutex for the majority of their processing,
which effectively means that TCP input and output becomes single threaded.
(Though I see that this is relaxed in the output path in -CURRENT.)

I see from Robert Watson's todo list (at http://wiki.freebsd.org/NetworkTodo
)
that using a read/write lock over the pcb list is a work in progress.  Are
there
any patches available that reflect whatever work has been done so far?  Or
even any descriptions of what has been tried, and what the hard parts are?

Keith


More information about the freebsd-smp mailing list