1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/sys/i386
John Baldwin 4e7f640dfb Optimize sx locks to use simple atomic operations for the common cases of
obtaining and releasing shared and exclusive locks.  The algorithms for
manipulating the lock cookie are very similar to that rwlocks.  This patch
also adds support for exclusive locks using the same algorithm as mutexes.

A new sx_init_flags() function has been added so that optional flags can be
specified to alter a given locks behavior.  The flags include SX_DUPOK,
SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature
to the similar flags for mutexes.

Adaptive spinning on select locks may be enabled by enabling the
ADAPTIVE_SX kernel option.  Only locks initialized with the SX_ADAPTIVESPIN
flag via sx_init_flags() will adaptively spin.

The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock()
are now performed inline in non-debug kernels.  As a result, <sys/sx.h> now
requires <sys/lock.h> to be included prior to <sys/sx.h>.

The new kernel option SX_NOINLINE can be used to disable the aforementioned
inlining in non-debug kernels.

The size of struct sx has changed, so the kernel ABI is probably greatly
disturbed.

MFC after:	1 month
Submitted by:	attilio
Tested by:	kris, pjd
2007-03-31 23:23:42 +00:00
..
acpica Optimize sx locks to use simple atomic operations for the common cases of 2007-03-31 23:23:42 +00:00
bios Tweak the probe/attach order of devices on the x86 nexus devices. 2007-03-20 20:21:44 +00:00
compile
conf Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
cpufreq o introduce a flags 'errata' for HW bugs onto the softc. 2007-01-23 19:20:30 +00:00
i386 Correct BB-profiling and adjust comments. 2007-03-31 01:47:37 +00:00
ibcs2 Fix a silly bogon that broke ibcs2_rename(). 2007-03-26 15:39:49 +00:00
include Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
isa Add an interface for drivers to be notified of changes to CPU frequency. 2007-03-26 18:03:29 +00:00
linux Implement the openat() linux syscall 2007-03-29 02:11:46 +00:00
pci Expand the MSI/MSI-X API to address some deficiencies in the MSI-X support. 2007-01-22 21:48:44 +00:00
svr4
xbox - Fix typo in #error pragma: compitable -> compatible 2006-08-15 20:10:49 +00:00
Makefile