freebsd-dev/sys/i386
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 Add missing acpi_wakecode.o: assym.s dependency, so that if assym.s 2006-10-19 05:55:09 +00:00
bios First part of a little cleanup in the calendar/timezone/RTC handling. 2006-10-02 12:59:59 +00:00
compile
conf Add msk(4) to the list of drivers supported by GENERIC kernel. 2006-12-13 03:41:47 +00:00
cpufreq Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
i386 Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
ibcs2 Merge posix4/* into normal kernel hierarchy. 2006-11-11 16:26:58 +00:00
include Evidently FreeBSD has long relied on the compiler to treat structures 2006-12-17 05:07:01 +00:00
isa Evidently FreeBSD has long relied on the compiler to treat structures 2006-12-17 05:07:01 +00:00
linux Merge posix4/* into normal kernel hierarchy. 2006-11-11 16:26:58 +00:00
pci Give Host-PCI bridge drivers their own pcib_alloc_msi() and 2006-12-12 19:27:01 +00:00
svr4 Use svr4_si_{addr,code,errno,signo,trap} in preference to si_{...}. 2005-10-19 14:59:54 +00:00
xbox - Fix typo in #error pragma: compitable -> compatible 2006-08-15 20:10:49 +00:00
Makefile