freebsd-dev/sys/dev
Luigi Rizzo 01faf54bb0 For i386 architecture, remove an expensive m_devget() (and the
underlying unaligned bcopy) on incoming packets that are already
available (albeit unaligned) in a buffer.
The performance improvement varies, depending on CPU and memory
speed, but can be quite large especially on slow CPUs. I have seen
over 50% increase on forwarding speed on the sis driver for the
486/133 (embedded systems), which does exactly the same thing.

The behaviour is controlled by a sysctl variable, hw.dc_quick which
defaults to 1. Set it to 0 to restore the old behaviour.

After running a few experiments (in userland, though) I am convinced
that doing the m_devget() is detrimental to performance in almost
all cases.

Even if your CPU has degraded performance with misaligned data,
the bcopy() in the driver has the same overhead due to misaligment
as the one that you save in the uiomove(), plus you do one extra
copy and pollute the cache.

But more often than not, you do not even have to touch the payload,
e.g. when you are forwarding packets, and even in the often-cited
case of NFS, you often end up passing a pointer to the payload to
the disk controller.

In any case, you can play with the sysctl variable to toggle between
the two behaviours, and see if it makes a difference.

MFC-after: 3 days
2001-11-29 22:46:48 +00:00
..
aac Fix a signed bug in the crashdump code for systems with > 2GB of ram. 2001-11-13 01:08:54 +00:00
acpica Yet another synch with minor changes in the ACPI CA 20011120 snapshot. 2001-11-28 12:09:42 +00:00
advansys Restore I/O port resources to the condition before adv_isa_probe() is 2001-05-06 09:28:18 +00:00
agp Don't automatically unbind/deallocate memory when releasing. 2001-11-27 14:12:21 +00:00
aha Turn on interrupt-entropy harvesting for all/any mass storage devices 2001-03-01 17:09:09 +00:00
ahb Turn on interrupt-entropy harvesting for all/any mass storage devices 2001-03-01 17:09:09 +00:00
aic Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
aic7xxx Restore initialization of ahc->unpause lost in rev 1.76. ahc->unpause 2001-08-17 04:22:50 +00:00
amd Move unused functions into #if 0 ... #endif. 2001-05-06 08:07:10 +00:00
amr - Change the taskqueue locking to protect the necessary parts of a task 2001-10-26 18:46:48 +00:00
an Minor style problem I introduced recently 2001-11-15 06:44:43 +00:00
ar Move the isa parts to a separate file. 2001-04-16 13:20:39 +00:00
asr Put a Band-Aid over the asr driver so that it hopefully won't cause 2001-10-30 21:13:39 +00:00
ata Add yet another VIA ATA100 southbridge. 2001-11-13 11:37:23 +00:00
atkbdc Hack for the "out-of-sync" error. 2001-10-13 10:28:02 +00:00
awi Add NEWCARD support to awi. 2001-11-19 06:42:11 +00:00
bge Do not call mii_polltick() immediately after mii_tick(). 2001-09-29 19:31:29 +00:00
bktr o Add #include <sys/systm.h> to fix a warning about printf() being 2001-11-26 04:06:47 +00:00
buslogic The EXTENDED_GEOMETRY flag is really bit 7. This affects >2GB drives. 2001-08-26 21:51:35 +00:00
cardbus Part two of this NEWCARD update: 2001-08-27 00:09:42 +00:00
ccd Return EOPNOTSUPP for unknown module events. 2001-11-17 00:46:08 +00:00
ciss Add the 'ciss' driver, which supports the Compaq SmartRAID 5* family of 2001-11-27 23:08:37 +00:00
cnw Use enumeration types for CARD_SET_RES_FLAGS. 2001-05-08 23:57:32 +00:00
cs Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
ct Added Logitec LHA-301 pnp id. 2001-10-09 15:30:19 +00:00
cy Call to cdevsw_add() no longer needed. 2001-11-04 08:49:51 +00:00
dc For i386 architecture, remove an expensive m_devget() (and the 2001-11-29 22:46:48 +00:00
de No FreeBSD/vax here either. 2001-11-03 08:32:28 +00:00
dec Introduce a boot environment variable (clock_compat_osf1) which can 2001-11-03 17:22:50 +00:00
dgb Don't call cdevsw_add(). 2001-11-04 09:09:41 +00:00
digi devsw_add() and cdevsw_remove() are no longer needed. 2001-11-04 15:52:44 +00:00
dpt This file is a 2.2 vintage pre-CAM file of no current value. 2001-11-06 07:24:54 +00:00
ed Patch to allow the ed driver interrupt routine to terminate if the 2001-11-24 16:15:18 +00:00
eisa Unbreak EISA. The PCI-EISA bridge bus is named eisab', not isab'. 2001-02-09 16:33:53 +00:00
en Lock down the network interface queues. The queue mutex must be obtained 2000-11-25 07:35:38 +00:00
ep More devices. Obtained from NetBSD. 2001-11-15 07:57:38 +00:00
ex Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
fb syscons' set_border() is now named sc_set_border(), so there is no longer 2001-11-06 02:36:26 +00:00
fdc KSE Milestone 2 2001-09-12 08:38:13 +00:00
fe Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
fxp Emit a warning if the mbuf or mbuf cluster allocation failed. 2001-11-02 05:10:40 +00:00
gfb We need to operate on struct thread now, not struct proc. 2001-11-08 01:49:06 +00:00
gx Remove unused headers that were breaking LINT. 2001-10-22 16:35:15 +00:00
hea Fix typo: seperate -> separate. 2001-02-06 11:21:58 +00:00
hfa Applied the patch to fix HARP ATM that was broken when KAME IPv6 came 2001-06-20 17:09:14 +00:00
ic Moved the wd33c93 specific file to sys/dev/ic. 2001-06-14 11:05:48 +00:00
ichsmb Catch up to header include changes: 2001-03-28 09:17:56 +00:00
ida Fix a signed bug in the crashdump code for systems with > 2GB of ram. 2001-11-13 01:08:54 +00:00
ie Repo copy i82586.h to dev/ic/i82586.h. 2001-07-02 05:29:58 +00:00
iicbus KSE Milestone 2 2001-09-12 08:38:13 +00:00
isp Tra-La, another QLogic f/w funny- this time with the 2300. 2001-10-23 23:05:20 +00:00
ispfw Update to latest 12160 f/w. 2001-10-20 21:47:58 +00:00
joy KSE Milestone 2 2001-09-12 08:38:13 +00:00
kbd Refine ACPI/PnP BIOS probe/attach routines a bit. 2001-09-15 04:38:20 +00:00
lge Do not call mii_polltick() immediately after mii_tick(). 2001-09-29 19:31:29 +00:00
lmc Fix typo: seperate -> separate. 2001-02-06 11:21:58 +00:00
lnc - Don't overwrite inb, inw and outw. 2001-07-04 13:00:21 +00:00
mc146818
mca - Remove an unused write_ivars function that didn't do anything anyway. 2001-01-19 09:29:34 +00:00
mcd Don't call cdevsw_add(). 2001-11-04 08:58:22 +00:00
md Implement IO_NOWDRAIN and B_NOWDRAIN - prevents the buffer cache from blocking 2001-11-05 18:48:54 +00:00
mii Fix declaration disagreement. 2001-10-11 22:02:14 +00:00
mlx KSE Milestone 2 2001-09-12 08:38:13 +00:00
mly - Change the taskqueue locking to protect the necessary parts of a task 2001-10-26 18:46:48 +00:00
mse KSE Milestone 2 2001-09-12 08:38:13 +00:00
musycc Fix warnings: 2001-06-15 00:19:43 +00:00
ncv Remove PAO3 dependent part. 2001-11-03 08:55:34 +00:00
nge Do not call mii_polltick() immediately after mii_tick(). 2001-09-29 19:31:29 +00:00
nmdm Don't call cdevsw_add(). 2001-11-04 15:55:17 +00:00
nsp Remove PAO3 dependent part. 2001-11-03 08:55:34 +00:00
null Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
ofw 1. Add ofw_pci.h with definitions for the OpenFirmware PCI bindings 2001-11-18 20:38:44 +00:00
pccard Sync to 1.24 2001-11-28 08:33:41 +00:00
pccbb Make the start memory address that we use configurable via a boot 2001-11-26 07:17:09 +00:00
pcf Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
pci Experimental patch to try to properly clip the range of the memory 2001-11-26 07:12:35 +00:00
pcic Add PC-9821RA-E01. This appears that PC-9821 Ra20 has this either 2001-06-16 06:10:53 +00:00
pdq Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
ppbus Give the pps driver an additional 8 inputs if we can persuade the 2001-09-22 16:34:59 +00:00
ppc Add ACPI attachments. 2001-08-30 09:17:03 +00:00
random o Modify open() and close() for /dev/random to use securelevel_gt() instead 2001-09-26 20:15:42 +00:00
ray Primary purpose of this commit is to enable support for the Aviator 2001-05-17 22:23:49 +00:00
rc KSE Milestone 2 2001-09-12 08:38:13 +00:00
rp Force the RxBuf and TxBuf arrays to be aligned on 16-bit boundaries to 2001-11-05 12:57:46 +00:00
sbni Add driver for Granch SBNI12-xx ISA and PCI network adapters. 2001-11-21 22:29:35 +00:00
scd Don't call cdevsw_add() 2001-11-04 08:54:15 +00:00
sf Do not call mii_pollstat() from within device tick routines; the status 2001-09-29 19:28:31 +00:00
si KSE Milestone 2 2001-09-12 08:38:13 +00:00
sio Split the sio driver for pc98 into bus front end and back end. 2001-11-26 12:29:53 +00:00
sk Do not call mii_pollstat() from within device tick routines; the status 2001-09-29 19:28:31 +00:00
smbus SMBus support for the AMD 756 power management unit. See smbus(4), 2001-09-16 22:35:07 +00:00
sn Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
snc Convert if_multiaddrs from LIST to TAILQ so that it can be traversed 2001-02-06 10:12:15 +00:00
snp Check the return value of tsleep() in snpread(). This may be 2001-11-24 15:59:46 +00:00
sound Add suspend/resume support. 2001-11-24 18:00:33 +00:00
speaker KSE Milestone 2 2001-09-12 08:38:13 +00:00
sr Fix clock selection for X.21 interfaces. 2001-02-26 16:30:02 +00:00
stg Remove PAO3 dependent part. 2001-11-03 08:55:34 +00:00
streams cast dev_t to int in printf to fix warning. 2001-10-29 01:22:15 +00:00
sym Submitted by:David E. O'Brien 2001-11-24 12:35:48 +00:00
syscons Fix POLA - when selecting line into syscons' cut'n'paste buffer (double 2001-11-25 22:51:30 +00:00
tdfx KSE Milestone 2 2001-09-12 08:38:13 +00:00
tga Add the TGA video driver. This is a great accomplishtment and will help 2001-11-01 08:26:30 +00:00
ti Have the driver advertise that it is capable of hardware checksums, and 2001-09-18 18:40:22 +00:00
twe Fix a signed bug in the crashdump code for systems with > 2GB of ram. 2001-11-13 01:08:54 +00:00
tx Update tx(4) to always enable vlan(4) support. 2001-09-05 23:04:53 +00:00
txp Have the driver announce what capabilities it supports. These are 2001-09-18 18:41:39 +00:00
usb Regen after addition of the Mustek 1200 CU Plus scanner. 2001-11-28 12:38:15 +00:00
vinum Don't call cdevsw_{add,remove}(). 2001-11-04 11:55:19 +00:00
vr Apply patch supplied by Jonathan Chen: use the correct arguments to 2001-07-09 17:58:42 +00:00
vx Quiet a variable format-string warning. 2001-07-19 02:16:24 +00:00
wds Turn on interrupt-entropy harvesting for all/any mass storage devices 2001-03-01 17:09:09 +00:00
wi Add Buffalo AirStation 11Mbps CF WLAN card. 2001-11-28 08:35:08 +00:00
wl KSE Milestone 2 2001-09-12 08:38:13 +00:00
xe Add some seat belts. If we set the error rc, then return it and don't 2001-08-29 05:11:44 +00:00