freebsd-dev/sys/dev
Robert Watson 5e3f7694b1 Replace custom file descriptor array sleep lock constructed using a mutex
and flags with an sxlock.  This leads to a significant and measurable
performance improvement as a result of access to shared locking for
frequent lookup operations, reduced general overhead, and reduced overhead
in the event of contention.  All of these are imported for threaded
applications where simultaneous access to a shared file descriptor array
occurs frequently.  Kris has reported 2x-4x transaction rate improvements
on 8-core MySQL benchmarks; smaller improvements can be expected for many
workloads as a result of reduced overhead.

- Generally eliminate the distinction between "fast" and regular
  acquisisition of the filedesc lock; the plan is that they will now all
  be fast.  Change all locking instances to either shared or exclusive
  locks.

- Correct a bug (pointed out by kib) in fdfree() where previously msleep()
  was called without the mutex held; sx_sleep() is now always called with
  the sxlock held exclusively.

- Universally hold the struct file lock over changes to struct file,
  rather than the filedesc lock or no lock.  Always update the f_ops
  field last. A further memory barrier is required here in the future
  (discussed with jhb).

- Improve locking and reference management in linux_at(), which fails to
  properly acquire vnode references before using vnode pointers.  Annotate
  improper use of vn_fullpath(), which will be replaced at a future date.

In fcntl(), we conservatively acquire an exclusive lock, even though in
some cases a shared lock may be sufficient, which should be revisited.
The dropping of the filedesc lock in fdgrowtable() is no longer required
as the sxlock can be held over the sleep operation; we should consider
removing that (pointed out by attilio).

Tested by:	kris
Discussed with:	jhb, kris, attilio, jeff
2007-04-04 09:11:34 +00:00
..
aac o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
acpi_support Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpica Optimize sx locks to use simple atomic operations for the common cases of 2007-03-31 23:23:42 +00:00
adlink o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
advansys o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
agp Restore agp aperture size after resume, in case it is modified after boot. 2007-01-06 08:31:31 +00:00
aha o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 15:55:37 +00:00
ahb Handle errors from bus_setup_intr(). 2007-04-01 16:55:31 +00:00
aic o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
aic7xxx o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
amd o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
amr o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
an o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ar Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
arcmsr Freeze the simq, not the devq, if we run out of command slots. This fixes 2007-04-02 03:31:37 +00:00
arl o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
asr o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ata Make it compile 2007-03-14 01:59:00 +00:00
ath Change mtx's to use the formulated name as type so witness does not 2007-03-05 21:56:33 +00:00
atkbdc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
auxio
awi o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
bce Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
bfe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
bge Enable MSI support on RELENG_6. 2007-04-02 19:09:06 +00:00
bktr o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
buslogic o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
cardbus Cope gracefully with device_get_children returning an error. 2007-01-19 08:49:28 +00:00
ce Remove ancient preprocessor code. Fix module compilation. 2007-03-25 20:21:31 +00:00
ciss o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
cm Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cnw Catchup to filters by piso. 2007-02-23 19:27:49 +00:00
cp Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cpufreq
cs o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ct o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ctau Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cx Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cxgb Make DMA tags per-queue to facilate parallel mappings 2007-04-04 05:29:18 +00:00
cy o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
dc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
dcons Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
de o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
digi Fix our ioctl(2) implementation when the argument is "int". New 2006-09-27 19:57:02 +00:00
dpt o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
drm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ed Tell a statistic checker that not checking the return value of the probing 2007-04-01 14:15:26 +00:00
eisa
em Revert previous change and take back a pointy hat. 2007-02-28 09:04:46 +00:00
en o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ep o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 15:55:37 +00:00
esp o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ex o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
exca - Fix exca_(io|mem)_map() to return proper errno values. 2007-03-23 17:15:07 +00:00
fatm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
fb Rototill the sparc64 nexus(4) (actually this brings in the code the 2007-03-07 21:13:51 +00:00
fdc Always protect the kthread flags with the lock and close a race with 2007-02-27 17:16:52 +00:00
fe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
firewire Teardown interrupt only when sc->ih is not NULL. 2007-03-30 22:25:26 +00:00
flash MFp4: 2006-11-29 08:05:55 +00:00
fxp Add support for the 82562GX chip within if_fxp. 2007-03-28 18:10:50 +00:00
gem o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
harp
hatm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
hfa o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
hifn Overhaul driver/subsystem api's: 2007-03-21 03:42:51 +00:00
hme o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
hptmv Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
hwpmc Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
ic
ichsmb o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ichwd Revisit the watchdogs: Resetting the error to EINVAL after failing to set the 2007-03-27 21:03:37 +00:00
ida o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
idt o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ie o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ieee488 Catchup with filters 2007-02-23 19:34:52 +00:00
if_ndis change ic_modecaps to a bit vector and use setbit, et. al. 2007-03-11 22:37:32 +00:00
iicbus New device: icee. Generic i2c eeprom driver. 2007-03-23 23:10:35 +00:00
iir o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
io
ipmi Add constants for the fields in a BAR. Also, add two new macros 2007-03-31 21:39:02 +00:00
ips o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ipw Drop the ipw softc lock before calling back into net80211, fixing a 2007-03-24 18:53:33 +00:00
isp Temporarily desupport simultaneous target and initiator mode. 2007-04-02 01:04:20 +00:00
ispfw The MODULE_NAME should "ispfw" unless overriden, not "isp". 2006-12-10 03:42:57 +00:00
iwi Fix an off-by-one error in iwi_init_fw_dma(). It didn't reuse the existing 2007-03-21 18:40:31 +00:00
ixgb Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
joy
kbd Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
kbdmux Fix our ioctl(2) implementation when the argument is "int". New 2006-09-27 19:57:02 +00:00
le o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
led
lge o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
lmc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
mc146818 Add macros for the individual divisor bits as some MC146818A-compatible 2007-01-20 14:57:51 +00:00
mca
mcd
md Resolve two deadlocks that could be caused by busy md device backed 2006-12-14 11:34:07 +00:00
mem
mfi o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
mii Revert couple of changes from 1.51 and 1.52. Reading link status with BMSR 2007-03-19 23:17:39 +00:00
mk48txx Revisit the watchdogs: Resetting the error to EINVAL after failing to set the 2007-03-27 21:03:37 +00:00
mlx o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
mly o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
mmc Preliminary MMC stack. This stack supports SD 1.0 cards only, but 2006-10-20 06:39:59 +00:00
mpt feedback from RELENG_5 port 2007-03-11 01:59:44 +00:00
mse o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
msk Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
mxge - Fix a bug in the TSO transmit routine where frames which had 2007-04-03 10:41:33 +00:00
my my(4) doesn't need miibus(4). 2007-03-11 15:20:04 +00:00
ncv o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
nfe Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
nge Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
nmdm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nsp o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
null Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nve o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ofw Add missing includes of priv.h. 2006-11-06 17:43:10 +00:00
patm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
pbio
pccard Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
pccbb Use different wait channel name for second of two sleeps. Minor commentary 2007-03-05 05:40:24 +00:00
pcf Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
pci Add constants for the fields in a BAR. Also, add two new macros 2007-03-31 21:39:02 +00:00
pdq o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 20:11:27 +00:00
powermac_nvram
ppbus Remove a useless cast from void * to struct ppb_device *. 2007-03-06 11:44:11 +00:00
ppc Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
pst o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
puc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ral allow net80211 to fillin rate sets 2007-03-11 22:43:35 +00:00
random Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
ray o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
rc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
re Add support for the RTL8110SC driver. 2007-03-28 18:07:12 +00:00
rndtest
rp - Make rp(4) 64-bit- and endian-clean as well as work on strict alignment 2006-11-20 12:59:27 +00:00
rr232x o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
safe Overhaul driver/subsystem api's: 2007-03-21 03:42:51 +00:00
sbni o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
sbsh o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
scc Add method enabled() to the SCC interface. This method can be used 2007-03-28 18:05:17 +00:00
scd Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
sf o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
si o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 20:11:27 +00:00
sio o Revert last. The chip is already supported by puc(4). 2007-03-29 04:26:52 +00:00
sk Use our own timer for watchdog instead of if_watchdog/if_timer 2007-04-02 04:43:41 +00:00
smbus Only support the SMB_OLD_BREAD ioctl if one of COMPAT_FREEBSD[456] is 2006-09-26 14:38:56 +00:00
sn o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
snc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
snp Switch to ANSI function declarations. 2007-03-23 22:48:44 +00:00
sound Revert busy refcount back to int. As a side note, multiple open 2007-04-02 10:24:15 +00:00
speaker
spibus MFp4: when passing the transfer up the foodchain, make sure we go up 2006-10-20 07:11:52 +00:00
sr Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
stg o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
stge Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
streams Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
sym Fix typo in comment. 2007-03-05 21:21:03 +00:00
syscons Optimize set_origin() use in some screensavers to stop them eating 2007-02-21 12:27:12 +00:00
tdfx
ti Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
trm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
twa o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
twe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
tx o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
txp Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
uart Don't use a time-limiting loop that's defined in terms of the baudrate 2007-04-03 01:21:10 +00:00
ubsec Overhaul driver/subsystem api's: 2007-03-21 03:42:51 +00:00
usb Since the driver uses mutexes, remove splusb() and splx(). 2007-04-03 05:59:17 +00:00
utopia
vge Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
vkbd Fix our ioctl(2) implementation when the argument is "int". New 2006-09-27 19:57:02 +00:00
vr o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
vx o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
watchdog Revisit the watchdogs: Resetting the error to EINVAL after failing to set the 2007-03-27 21:03:37 +00:00
wds Catchup with filters 2007-02-23 19:34:52 +00:00
wi o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
wl Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
xe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00