freebsd-skq/sys
Attilio Rao 49aead8a10 Simplify the adaptive spinning algorithm in rwlock and mutex:
currently, before to spin the turnstile spinlock is acquired and the
waiters flag is set.
This is not strictly necessary, so just spin before to acquire the
spinlock and to set the flags.
This will simplify a lot other functions too, as now we have the waiters
flag set only if there are actually waiters.
This should make wakeup/sleeping couplet faster under intensive mutex
workload.
This also fixes a bug in rw_try_upgrade() in the adaptive case, where
turnstile_lookup() will recurse on the ts_lock lock that will never be
really released [1].

[1] Reported by: jeff with Nokia help
Tested by: pho, kris (earlier, bugged version of rwlock part)
Discussed with: jhb [2], jeff
MFC after: 1 week

[2] John had a similar patch about 6.x and/or 7.x about mutexes probabilly
2007-11-26 22:37:35 +00:00
..
amd64 MFP4: Add assembly language symbols used by hwpmc(4)'s callchain capture. 2007-11-23 03:03:30 +00:00
arm Prevent the leakage of wired pages in the following circumstances: 2007-11-17 22:52:29 +00:00
boot Add a note to indicate that these files do borrow in part from mbr.s and 2007-11-26 21:29:59 +00:00
bsm Merge OpenBSM 1.0 changes to src/sys/bsm: 2007-10-29 18:47:25 +00:00
cam Fix a change in the previous commit that was actually a type-o. 2007-11-15 16:23:38 +00:00
cddl Warn if kmem_map size is set to less than 512MB. Previous warning was a bit 2007-11-07 14:44:31 +00:00
compat Implement LINUX_SIOCGIFCOUNT and LINUX_SIOCGIFINDEX/LINUX_SIOGIFINDEX. 2007-11-07 16:42:52 +00:00
conf Alphabetize pts before pty. 2007-11-21 21:42:55 +00:00
contrib Fix 3 issues relating to the use of "auth" rules in IPFilter, from sourceforge: 2007-11-26 08:18:19 +00:00
crypto Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC 2007-07-03 12:13:45 +00:00
ddb Make the examine command honor db_pager_quit so you can use 'q' or 'x' 2007-10-27 20:19:11 +00:00
dev Add the Intel 82801FB (ICH6) SMBus controller and the 2007-11-26 19:54:54 +00:00
fs o English lesson from bde@: "iff" is not a typo, it means "if and only if". 2007-11-18 09:21:30 +00:00
gdb Add kdb_cpu_sync_icache(), intended to synchronize instruction 2007-06-09 21:55:17 +00:00
geom On some arches, openssl is built with OPENSSL_NO_CAMELLIA, so the 2007-11-19 08:59:32 +00:00
gnu Remove duplicate "union" from ext2_opts. 2007-10-27 16:14:33 +00:00
i4b Spelling fix for interupt -> interrupt 2007-10-12 06:03:46 +00:00
i386 Implement read_default_ldt in linux_modify_ldt(). It copies out zeroed 2007-11-26 11:06:19 +00:00
ia64 Extend critical section coverage in the low-level interrupt handlers to 2007-11-21 04:03:51 +00:00
isa Split /dev/nvram driver out of isa/clock.c for i386 and amd64. I have not 2007-10-26 03:23:54 +00:00
kern Simplify the adaptive spinning algorithm in rwlock and mutex: 2007-11-26 22:37:35 +00:00
libkern Do not use __XSCALE__ to detect if clz is available, use _ARM_ARCH_5 instead. 2007-10-13 12:05:36 +00:00
modules Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version was 2007-11-12 21:51:38 +00:00
net pfil(9) locking take 3: Switch to rmlock(9) 2007-11-25 12:41:47 +00:00
net80211 Be more careful handling off-channel frames: if the driver (wrongly) 2007-11-26 21:28:18 +00:00
netatalk Annotate two possible bugs in a comment: (1) we allocate and explicitly 2007-11-20 18:50:54 +00:00
netatm Disconnect netatm from the build as it is not MPSAFE and relies on 2007-07-14 21:49:24 +00:00
netgraph - Merge all the ng_send_fn2* functions into one - ng_send_fn2(), 2007-11-14 11:25:58 +00:00
netinet More carefully handle various cases in sysctl_drop(), such as unlocking 2007-11-24 18:43:59 +00:00
netinet6 Instead of manually freeing the packet options structure (and not even doing 2007-11-21 16:01:42 +00:00
netipsec Move the priv check before the malloc call for so_pcb. 2007-11-16 22:35:33 +00:00
netipx Make tcpstates[] static, and make sure TCPSTATES is defined before 2007-07-30 11:06:42 +00:00
netnatm s/destory/destroy/ (except for the code in contrib/). 2007-04-16 12:31:35 +00:00
netncp Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
netsmb Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
nfs
nfs4client Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
nfsclient Remove hacks from the NFSv2/3 client intended to handle a lack of a 2007-11-19 16:03:21 +00:00
nfsserver Garbage collect now-unused nfsrv_setcred() -- it's not only unused, but 2007-11-04 19:20:33 +00:00
opencrypto Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
pc98 MFi386: revision 1.661 2007-11-14 12:29:09 +00:00
pccard
pci Add the FNW3603TX Planex NIC. 2007-11-26 18:25:07 +00:00
powerpc Implement the _long functions using u_long rather than trying to 2007-11-26 05:52:45 +00:00
rpc Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which 2007-08-06 14:26:03 +00:00
security Implement per-object type consistency checks for labels passed to 2007-10-30 00:01:28 +00:00
sparc64 Extend critical section coverage in the low-level interrupt handlers to 2007-11-21 04:03:51 +00:00
sun4v __builtin_stdarg_start was renamed to __builtin_va_start a long 2007-11-19 07:34:57 +00:00
sys transferlockers() is a very dangerous and hack-ish function as waiters 2007-11-24 04:22:28 +00:00
tools Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
ufs Fix build without INVARIANTS and update a comment to match 2007-11-09 11:04:36 +00:00
vm Make contigmalloc(9)'s page laundering more robust. Specifically, use 2007-11-25 20:37:29 +00:00
Makefile Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/coda 2007-07-12 21:04:58 +00:00