freebsd-dev/sys
David Xu 17ce606321 umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses
a mutex after a thread has unlocked it, it event writes data to the mutex
memory to clear contention bit, there is a race that other threads
can lock it and unlock it, then destroy it, so it should not write
data to the mutex memory if there isn't any waiter.
The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It
requires thread library to clear the lock word entirely, then
call the WAKE2 operation to check if there is any waiter in kernel,
and try to wake up a thread, if necessary, the contention bit is set again
by the operation. This also mitgates the chance that other threads find
the contention bit and try to enter kernel to compete with each other
to wake up sleeping thread, this is unnecessary. With this change, the
mutex owner is no longer holding the mutex until it reaches a point
where kernel umtx queue is locked, it releases the mutex as soon as
possible.
Performance is improved when the mutex is contensted heavily.  On Intel
i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds
to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is
deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c
2012-04-05 02:24:08 +00:00
..
amd64 Add descriptions after the 'device' line for several NICs to match the 2012-04-04 13:49:22 +00:00
arm Add software PMC support. 2012-03-28 20:58:30 +00:00
boot Fix build after changes to trap headers. 2012-03-29 16:04:42 +00:00
bsm
cam Be more conservative in using READ CAPACITY(16) command. Previous code 2012-03-31 11:23:09 +00:00
cddl Instead of only iterating over the set of known SDT probes when sdt.ko is 2012-03-27 15:07:43 +00:00
compat Remove some unnecessary includes. 2012-03-18 19:15:11 +00:00
conf Disable INET6 support in modules when building the LINT-NOINET6 kernel. 2012-04-04 21:31:20 +00:00
contrib Merge from OpenBSD: 2012-04-04 14:47:59 +00:00
crypto
ddb
dev Implement BAR TX. 2012-04-04 23:45:15 +00:00
fs Add sysctl vfs.nfs.nfs_keep_dirty_on_error to switch the nfs client 2012-03-17 23:03:20 +00:00
gdb
geom VMDB offset should be greater than logical volume size only for MBR. 2012-03-29 07:29:27 +00:00
gnu/fs Make ReiserFS MPSAFE 2012-03-27 20:36:03 +00:00
i386 Add descriptions after the 'device' line for several NICs to match the 2012-04-04 13:49:22 +00:00
ia64 Remove pty(4) from our kernel configurations. 2012-03-21 08:38:42 +00:00
isa
kern umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses 2012-04-05 02:24:08 +00:00
kgssapi
libkern Remove second consts in r233288 in order to appease C++ compilers. 2012-03-26 18:22:04 +00:00
mips Reinstate the XTLB handler for CPU_NLM and CPU_RMI 2012-04-02 11:41:33 +00:00
modules MFhead_mfi r227068 2012-03-30 23:05:48 +00:00
net Retire the IF_ADDR_LOCK() and IF_ADDR_UNLOCK() compat macros from HEAD. 2012-03-19 21:09:12 +00:00
net80211 Add basic HT channel setup to ieee80211_init_channels(), this will be 2012-04-03 17:48:42 +00:00
netatalk
netgraph Fix compiler warnings, mostly signed issues, 2012-04-02 10:50:42 +00:00
netinet Don't check malloc(M_WAITOK) results. 2012-03-31 11:20:48 +00:00
netinet6 in6_pcblookup_local() still can return a pcb with NULL 2012-03-21 08:43:38 +00:00
netipsec
netipx
netnatm
netncp
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Fix build on i386. 2012-04-04 11:55:20 +00:00
opencrypto
pc98 Move the legacy(4) driver to x86. 2012-03-30 19:10:14 +00:00
pci
powerpc - Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to 2012-03-29 16:51:22 +00:00
rpc
security
sparc64 Remove checks that are redundant due to tf_type being unsigned. 2012-03-31 14:03:16 +00:00
sys umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses 2012-04-05 02:24:08 +00:00
teken
tools
ufs Add a check for unsupported file flags to ufs_setattr(). 2012-04-04 14:50:21 +00:00
vm Keep track of the mount point associated with a special device 2012-03-28 20:49:11 +00:00
x86 Further tweak the changes made in r233709. The kernel doesn't permit 2012-04-02 17:26:21 +00:00
xdr
xen
Makefile Add sys/ofed to the 'make cscope' target. 2012-03-20 18:05:15 +00:00