freebsd-dev/sys/ia64
David Xu 4e32b7b3cc Add a lwpid field into per-cpu structure, the lwpid represents current
running thread's id on each cpu. This allow us to add in-kernel adaptive
spin for user level mutex. While spinning in user space is possible,
without correct thread running state exported from kernel, it hardly
can be implemented efficiently without wasting cpu cycles, however
exporting thread running state unlikely will be implemented soon as
it has to design and stablize interfaces. This implementation is
transparent to user space, it can be disabled dynamically. With this
change, mutex ping-pong program's performance is improved massively on
SMP machine. performance of mysql super-smack select benchmark is increased
about 7% on Intel dual dual-core2 Xeon machine, it indicates on systems
which have bunch of cpus and system-call overhead is low (athlon64, opteron,
and core-2 are known to be fast), the adaptive spin does help performance.

Added sysctls:
    kern.threads.umtx_dflt_spins
        if the sysctl value is non-zero, a zero umutex.m_spincount will
        cause the sysctl value to be used a spin cycle count.
    kern.threads.umtx_max_spins
        the sysctl sets upper limit of spin cycle count.

Tested on: Athlon64 X2 3800+, Dual Xeon 5130
2006-12-20 04:40:39 +00:00
..
acpica Canonize the include of acpi.h. 2005-09-11 18:39:03 +00:00
compile
conf Remove the KDTRACE option again because of the complaints about having 2006-11-04 23:50:12 +00:00
disasm Update to SDM 2.2: 2006-06-24 19:21:11 +00:00
ia32 Include freebsd32_signal.h now that signal-related definitions are 2006-10-06 19:33:44 +00:00
ia64 Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
include Now that printf() needs the PCPU, set it up before we call printf(). 2006-11-18 21:52:26 +00:00
isa - Move bus dependent defines to {isa,cbus}_dmareg.h. 2005-05-14 10:14:56 +00:00
pci