Netgraph multithreading
Alexander Motin
mav at FreeBSD.org
Fri Nov 11 20:45:27 UTC 2011
Hi.
> Is Netgraph supports multithreading in FreeBSD 8.1?
Generally yes, but there are many different cases. Netgraph uses direct
function calls to handle traffic. It means that when it is possible it
runs directly in network card interrupt threads contexts, or if
net.isr.direct sysctl set to 0 (default) in network software interrupts
threads context. How many first you have depends on hardware and NIC
drivers. Number of second depends on hardware and OS version. Also when
function call depth is too big or there are other reasons preventing
direct calls, netgraph queues packets, and then, when possible, handles
them using multiple dedicated threads. Unluckily, after packets queued
for some node, all packets for it will be handled only by one thread to
prevent reordering.
--
Alexander Motin
More information about the freebsd-net
mailing list