NetBSD/sys/dev
ozaki-r 9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
..
acpi The new acpi code tries to read the pci configuration registers in the 2016-01-26 22:52:14 +00:00
adb We don't have Debugger if we don't have DDB. 2015-07-29 08:45:28 +00:00
altmem Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
apm More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
arcbios
ata include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
bi Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
bluetooth STRENGHT -> STRENGTH and misc spelling/whitespace. no functional change 2015-12-13 21:13:00 +00:00
bus_dma
cadence Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
cardbus Convert sys/dev to use <sys/rndsource.h>. 2015-04-13 16:33:23 +00:00
clk Add basic clock device infrastructure. 2015-12-05 13:31:07 +00:00
dec Patches from Björ Johannesson to fix DEC LK201 keyboards, this time 2015-01-02 21:32:26 +00:00
dkwedge Allow dump to raidframe component which is a wedge. 2016-01-15 07:48:22 +00:00
dm More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
dmover include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
drm
dtv
ebus
eisa
fdt FDT Interrupt handling - change memory allocation 2016-01-10 23:01:29 +00:00
filemon Take a reference on the (activity log) file itself, and not on the 2016-01-11 01:37:36 +00:00
flash
gpib More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
gpio pull in sysmon_taskq 2015-10-15 09:07:49 +00:00
hdaudio get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack 2015-12-23 12:45:06 +00:00
hdmicec add makefile for installing hdmicecio.h 2015-08-02 21:22:34 +00:00
hil
hpc include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
i2c Increase the number of read retries (to 5). 2016-01-11 18:23:52 +00:00
i2o More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
ic Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
ieee1394
if_ndis Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
ir More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
isa Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
isapnp regen 2015-11-19 19:16:28 +00:00
iscsi fix amd64/conf/ALL build failure 2015-12-24 03:41:03 +00:00
marvell Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
mca Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
microcode two changes to radeon drm firmware: 2015-04-26 21:37:22 +00:00
mii igphy(4),ukphy(4): Set mii_mpd_* entries. 2015-10-30 07:35:30 +00:00
mscp Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
mvme
nand include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
news
nor Size of erase block is 128 bytes when sector density (z) is zero. 2015-09-18 21:30:02 +00:00
ofisa Convert sys/dev to use <sys/rndsource.h>. 2015-04-13 16:33:23 +00:00
ofw Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
onewire
pad Wrap up calls to sc_intr in kpreempt[en/dis]able. 2015-07-10 21:58:56 +00:00
pci Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
pckbport Disambiguate debug message. 2015-07-16 15:01:04 +00:00
pcmcia Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
podulebus
ppbus More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
pud Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead of 2015-12-08 20:36:14 +00:00
putter
qbus Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
raidframe Don't use for (...); by using an explicit continue as body. 2016-01-07 21:57:00 +00:00
rasops add "best match" algorithm to wsfont and use this instead of a private 2015-04-18 11:23:58 +00:00
rcons
sbus Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
scsipi Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
sdmmc add support iMX6 uSDHC 2015-12-31 11:53:18 +00:00
smbus
spi use workqueue(9) 2015-12-14 10:31:38 +00:00
splash Clean up splash image build. Print messages when creating files. 2015-09-15 02:22:43 +00:00
stbi PR/50686: David Binderman: fix memory leak 2016-01-21 17:17:53 +00:00
std
sun avoid conflicts with our own ioctls 2015-09-26 03:31:52 +00:00
sysmon sysmon's components need to be MODULE_CLASS_DRIVER so they will get 2015-12-14 01:08:47 +00:00
tc More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
tprof include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
usb Introduce softint-based if_input 2016-02-09 08:32:07 +00:00
videomode
vme More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
wscons Untangle. 2015-11-08 16:49:41 +00:00
wsfb Fix splashscreen on resolutions where text is centered. 2015-06-01 20:47:59 +00:00
wsfont include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
xmi
auconv.c
auconv.h
audio_if.h
audio.c
audiobell.c
audiobellvar.h
audiovar.h
aurateconv.c
auvolconv.c
auvolconv.h
bio.c include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
biovar.h More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
ccd.c Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead of 2015-12-08 20:36:14 +00:00
ccdvar.h More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
cgd_crypto.c Sprinkle const into cgd crypto API. 2015-04-25 12:55:04 +00:00
cgd_crypto.h Sprinkle const into cgd crypto API. 2015-04-25 12:55:04 +00:00
cgd.c Remove bogus dk_getdisklabel call. 2015-11-28 21:06:30 +00:00
cgdvar.h More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
clock_subr.c use symbolic constants (Kamil Rytarowski) 2014-12-22 18:09:20 +00:00
clock_subr.h
clockctl.c Simplify and fix the unload to destroy the mutex. To reproduce, configure 2016-01-06 18:06:38 +00:00
cninit.c
cons.c for some reason the previous commit causes ARCS firmware on sgimips64 to 2015-05-29 16:26:45 +00:00
cons.h
dev_verbose.c PR/50749: David Binderman: check bounds before dereference. 2016-02-03 05:29:43 +00:00
dev_verbose.h remove extra semicolons. 2015-11-13 01:37:19 +00:00
devlist2h.awk
DEVNAMES Add ismt. 2016-01-05 13:16:37 +00:00
dksubr.c erase dangling pointer to prevent reuse 2016-01-04 10:02:15 +00:00
dkvar.h support deferral of diskstart to a separate thread. 2015-12-21 12:33:12 +00:00
files.audio
files.dev Move dev/ definitions out of files.kern. 2015-08-21 02:18:18 +00:00
firmload.c nuke superfluous SYSCTL_SETUP_PROTO 2015-01-04 19:25:32 +00:00
firmload.h
fss.c include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
fssvar.h More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00
keylock.c
keylock.h
kloader.c Move declaration of avail_start, avail_end to <machine/kloader.h> 2015-06-11 08:14:38 +00:00
kloader.h
kttcp.c include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
kttcpio.h
ld.c move entropy gathering into dksubr. 2015-08-28 17:41:49 +00:00
ldvar.h move entropy gathering into dksubr. 2015-08-28 17:41:49 +00:00
lockstat.c include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
lockstat.h Fix non-cpu counter build. 2016-01-24 01:01:11 +00:00
Makefile Install hdmicecio.h 2015-08-02 11:09:05 +00:00
md_root.c Put back MEMORY_DISK_IMAGE logic, but use generated opt_memory_root_image.h 2015-08-30 05:24:03 +00:00
md.c Notify disk subsystem of the current geometry. 2016-01-04 16:24:52 +00:00
md.h
midi_if.h fix some comments about MP midi. 2015-03-01 00:34:14 +00:00
midi.c - check sc->dying after sleeping in several more places, and 2014-12-30 07:28:34 +00:00
midictl.c Don't left-shift negative numbers by making them unsigned. 2015-08-28 13:04:29 +00:00
midictl.h
midisyn.c
midisynvar.h
midivar.h various clean ups for midi and sequencer: 2014-12-22 07:02:22 +00:00
mm.c add /dev/full 2016-01-17 23:16:46 +00:00
mm.h
mulaw.c
mulaw.h
nullcons_subr.c
radio_if.h
radio.c
rnd_private.h Move RND_EXTRACT_{ANY,GOOD} to rndpool.h whose API they are part of. 2015-04-14 13:14:20 +00:00
rndpseudo.c include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
sequencer.c include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
sequencervar.h various clean ups for midi and sequencer: 2014-12-22 07:02:22 +00:00
veriexec.c Rename verified_exec.c -> veriexec.c. 2015-12-09 18:25:32 +00:00
video_if.h
video.c
vnd.c Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead of 2015-12-08 20:36:14 +00:00
vndvar.h More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00