From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 07:17:15 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40349106564A for ; Wed, 29 Aug 2012 07:17:15 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AAA198FC08 for ; Wed, 29 Aug 2012 07:17:14 +0000 (UTC) Received: by bkcje9 with SMTP id je9so146687bkc.13 for ; Wed, 29 Aug 2012 00:17:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=+CgCMbmjqrI33BYBJZxBYXUh/jsk1YkE5wjkyRkbqAE=; b=AxM4fW05lIX8UPm1LEFYWIg4DmXQNsw+1zhJff1g/rfYyqXse3ki//1Yztxoun460i b2vLHVcmiD4o8a+KrG9YXdZpyplW+Skff2a9bOiwqrba5rU+XJjOymbyxrqQWOIoHrlw ElHLV0u6ynos30OJYJ6jOqygp+vlh1PVNtL34NekPAdsENw5XFFvAYcW27wHbWi1228m BUNrmgtCT++ky6hzDtKVOf5RDvLpOJAxCmNzAenbvk2L186bbb1Xi7zPXp+b0crRzMMB 2/1lwSvI5jBu2MnbWv5xA4+Pf0kxEHrgH90i+xwQBy9MB6Q3u4NfgggI6OeV9kIRpPd3 eTiA== Received: by 10.204.156.87 with SMTP id v23mr280655bkw.0.1346224633133; Wed, 29 Aug 2012 00:17:13 -0700 (PDT) Received: from zont-osx.local (ppp95-165-143-86.pppoe.spdop.ru. [95.165.143.86]) by mx.google.com with ESMTPS id n17sm14140013bks.6.2012.08.29.00.17.11 (version=SSLv3 cipher=OTHER); Wed, 29 Aug 2012 00:17:12 -0700 (PDT) Sender: Andrey Zonov Message-ID: <503DC1F5.1070207@FreeBSD.org> Date: Wed, 29 Aug 2012 11:17:09 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: lev@freebsd.org References: <135297243.20120827061957@serebryakov.spb.ru> <201208271226.03496.jhb@freebsd.org> <1758728845.20120828004713@serebryakov.spb.ru> <201208280744.23419.jhb@freebsd.org> In-Reply-To: <201208280744.23419.jhb@freebsd.org> X-Enigmail-Version: 1.4.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1E23293266A64FE0BE234018" X-Gm-Message-State: ALoCoQmLFch6yLjkV77M/NIjV469I+xoAqM8+Jy+LcTbvmurTMtT6DcS9/O5W4Ykbnp+jLxk6L5Z Cc: freebsd-current@freebsd.org Subject: Re: What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 07:17:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1E23293266A64FE0BE234018 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2012 =D0=B3., = 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 th= at=20 > thread. >> Yep, I've found, that my if_vr uses it. One more question: does ipf= w >> rules works in same thread? I have ``net.isr.dispatch=3D"direct"'' se= t. >=20 > 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. >=20 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=3D$ncpu (2, 4 or whatever you want) net.isr.dispatch=3Ddeferred PS: original patch was written by melifaro. [1] http://people.freebsd.org/~zont/netisr.patch --=20 Andrey Zonov --------------enig1E23293266A64FE0BE234018 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQPcH5AAoJEBWLemxX/CvTcdoH+QFHz7eOQCBkSiaRXJrH38ey giyG+VuW9V5/O8Q4u05hyUbq/af67O1NELiGviXu4mjo+yO7egDBp34LfMIKNtW6 onzMYsS2IYML2518q3TlMfRZu3raQT+/kXJStosAfU3sJUSAS/FO2wIF77Uimeut 48jfh3tTB66VfMu2k9gCMGIVEKL4TnTbfMKG5VkHS/I1EBJcdwYlPSGB3C6ef3qG Yx5AO2KM+ow6MH1k88cT5kpJM4qNUUv83C2FPnWlUAWEVCWednn9lAy9optMqtWj vlY/fBLBcPk7/oFkkhlusuhx+l+d+SmZ5GX0vosipzLcHR/u7s0unDOZ3T4L1Wg= =0g6c -----END PGP SIGNATURE----- --------------enig1E23293266A64FE0BE234018--