Date: Mon, 3 Dec 2001 22:17:42 -0800 From: Luigi Rizzo <luigi@freebsd.org> To: net@freebsd.org Subject: HEADS-UP: net polling code now in STABLE. Message-ID: <20011203221742.A50473@iguana.aciri.org>
next in thread | raw e-mail | index | archive | help
[Bcc to -stable because of relevance there] With the approval of the release engineer, a revised version of the network polling code is now in STABLE. It would be great if you could try it out and send feedback, so we con sort out issues (if any) before the release of 4.5. Do not be afraid to upgrade, because unless you explicitly enable the new code with the kernel option mentioned below, your kernel will not be affected by the patch. The code is only for i386 architecture, non-SMP (it would be rather useless on SMP boxes, anyways). Devices supported so far are "dc", "fxp" and "sis". I can patch more drivers if you ask, but you need to test the patches yourself because i do not have access to other 100M and 1G cards (except perhaps "xl"). [As a side note -- there have been significant performance improvement changes to the "dc" and "sis" drivers recently, so if you have one of these two cards, it might be worthwhile to upgrade]. The commit message follows. Have fun. cheers luigi ----- Forwarded message from Luigi Rizzo <luigi@FreeBSD.org> ----- Date: Mon, 3 Dec 2001 21:57:49 -0800 (PST) From: Luigi Rizzo <luigi@FreeBSD.org> Subject: cvs commit: src/sys/conf options.i386 src/sys/i386/i386 swtch.s trap.c src/sys/net if.h netisr.h src/sys/sys systm.h src/sys/i386/include asnames.h src/sys/kern kern_clock.c src/sys/dev/fxp if_fxp.c src/sys/pci if_dc.c if_dcreg.h if_sis.c ... To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org luigi 2001/12/03 21:57:49 PST Modified files: (Branch: RELENG_4) sys/conf options.i386 sys/i386/i386 swtch.s trap.c sys/net if.h netisr.h sys/sys systm.h sys/i386/include asnames.h sys/kern kern_clock.c sys/dev/fxp if_fxp.c sys/pci if_dc.c if_dcreg.h if_sis.c if_sisreg.h Log: As approved by the Release Engineer, here comes the code for polling in network device drivers (x86, non-SMP only at the moment, for reasons that I have extensively explained on the -net mailing list). This code lets network devices operate in a semi-polling mode, which makes systems much more resilient to attacks and overloads. If you don't enable it with an appropriate kernel option, your kernel will be exactly the same as before this commit. No userland code is affected. To use polling you have to put the following options in your kernel config file: options DEVICE_POLLING options HZ=1000 # not compulsory but strongly recommended and enable it at runtime as follows (by default it is disabled): sysctl kern.polling.enable=1 There are basically no other tunables related to this code, though you might have a look at "sysctl kern.polling" to see what other variables are there. The device drivers supported at the moment are "dc", "fxp" and "sis", with more to come (but this code only makes sense for 100M and Gigabit devices). Unmodified drivers will continue to operate as before. Under little or moderate load you should see no difference in the behaviour of your system. Under load, you should experience a moderate improvement in peak performance, and a lot more stability and responsiveness. A quick description of the files affected (all in sys/) conf/options.i386 DEVICE_POLLING option i386/i386/swtch.s i386/i386/trap.c hooks to call the polling code net/if.h net/netisr.h sys/systm.h i386/include/asnames.h misc. constants and variable definitions (mostly one-liner). kern/kern_clock.c The bulk of the polling code. Probably this code will be moved to a separate file once equivalent functionality is added to -current. dev/fxp/if_fxp.c pci/if_dc.c pci/if_dcreg.h pci/if_sis.c pci/if_sisreg.h device driver modifications Reviewed-by: -net Approved by: jkh Revision Changes Path 1.132.2.9 +6 -1 src/sys/conf/options.i386 1.110.2.9 +56 -2 src/sys/dev/fxp/if_fxp.c 1.89.2.5 +5 -1 src/sys/i386/i386/swtch.s 1.147.2.6 +6 -1 src/sys/i386/i386/trap.c 1.44.2.4 +2 -1 src/sys/i386/include/asnames.h 1.105.2.5 +253 -1 src/sys/kern/kern_clock.c 1.58.2.3 +10 -1 src/sys/net/if.h 1.21.2.3 +2 -1 src/sys/net/netisr.h 1.9.2.25 +72 -0 src/sys/pci/if_dc.c 1.4.2.12 +7 -0 src/sys/pci/if_dcreg.h 1.13.4.10 +66 -0 src/sys/pci/if_sis.c 1.1.4.5 +3 -0 src/sys/pci/if_sisreg.h 1.111.2.11 +14 -0 src/sys/sys/systm.h ----- End forwarded message ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011203221742.A50473>