What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?)

Andrey Zonov zont at FreeBSD.org
Wed Aug 29 07:17:15 UTC 2012


On 8/28/12 3:44 PM, John Baldwin wrote:
> On Monday, August 27, 2012 4:47:13 pm Lev Serebryakov wrote:
>> Hello, John.
>> You wrote 27 августа 2012 г., 20:26:03:
>>
>>>>  What "fast tasks" are performed via this queue? Under network load it
>>>> is main consumer of CPU.
>> JB> Certain NIC drivers perform much of their interrupt handling in that 
> thread.
>>   Yep,  I've found, that my if_vr uses it. One more question: does ipfw
>>  rules works in same thread? I have ``net.isr.dispatch="direct"'' set.
> 
> Yes, with the default setting of direct dispatch, all of the receive
> side of the network stack runs in the driver's interrupt handler.  In
> the case of vr(4) that would be in this thread.
> 

Lev,

If you have more than one CPU, you can try this patch [1].  It adds
flowid in mbufs and makes possible to use multiple netisr threads.
Apply the patch and put in your loader.conf the following:

net.isr.maxthreads=$ncpu (2, 4 or whatever you want)
net.isr.dispatch=deferred

PS: original patch was written by melifaro.

[1] http://people.freebsd.org/~zont/netisr.patch

-- 
Andrey Zonov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 535 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120829/9d91f82d/signature.pgp


More information about the freebsd-current mailing list