1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/lib
Eric van Gyzen ddab052725 Disable SSE in libthr
Clang emits SSE instructions on amd64 in the common path of
pthread_mutex_unlock.  If the thread does not otherwise use SSE,
this usage incurs a context-switch of the FPU/SSE state, which
reduces the performance of multiple real-world applications by a
non-trivial amount (3-5% in one application).

Instead of this change, I experimented with eagerly switching the
FPU state at context-switch time.  This did not help.  Most of the
cost seems to be in the read/write of memory--as kib@ stated--and
not in the #NM handling.  I tested on machines with and without
XSAVEOPT.

One counter-argument to this change is that most applications already
use SIMD, and the number of applications and amount of SIMD usage
are only increasing.  This is absolutely true.  I agree that--in
general and in principle--this change is in the wrong direction.
However, there are applications that do not use enough SSE to offset
the extra context-switch cost.  SSE does not provide a clear benefit
in the current libthr code with the current compiler, but it does
provide a clear loss in some cases.  Therefore, disabling SSE in
libthr is a non-loss for most, and a gain for some.

I refrained from disabling SSE in libc--as was suggested--because
I can't make the above argument for libc.  It provides a wide variety
of code; each case should be analyzed separately.

https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html

Suggestions from:	dim, jmg, rpaulo
Approved by:	kib (mentor)
MFC after:	2 weeks
Sponsored by:	Dell Inc.
2015-08-05 12:53:55 +00:00
..
atf
clang new depends 2015-06-16 23:37:19 +00:00
csu Force the dynamic linker to resolve _end early so we pick up the correct 2015-07-02 15:02:59 +00:00
libalias Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libarchive MFV r285970: 2015-07-28 18:41:28 +00:00
libauditd
libbegemot new depends 2015-06-16 23:37:19 +00:00
libblocksruntime
libbluetooth
libbsdstat
libbsm
libbsnmp
libbz2
libc Make it possible to implement poll(2) on top of kqueue(2). 2015-08-05 07:34:29 +00:00
libc_nonshared
libc++
libcalendar
libcam Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libcapsicum Let the nv.h and dnv.h includes be only in sys directory. 2015-07-02 21:58:10 +00:00
libcasper Let the nv.h and dnv.h includes be only in sys directory. 2015-07-02 21:58:10 +00:00
libclang_rt
libcom_err new depends 2015-06-16 23:37:19 +00:00
libcompat
libcompiler_rt
libcrypt new depends 2015-06-16 23:37:19 +00:00
libcuse
libcxxrt Add __cxa_deleted_virtual to libcxxrt's version map. 2015-06-23 17:54:24 +00:00
libdevctl
libdevinfo
libdevstat
libdpv
libdwarf new depends 2015-06-16 23:37:19 +00:00
libedit Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libefi
libelf
libelftc Pay attention to MK_ELFTOOLCHAIN_TOOLS so we build the desired tools. 2015-06-15 20:11:15 +00:00
libevent
libexecinfo
libexpat Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libfetch Remove unused variable to silence clang warning. 2015-07-04 17:22:07 +00:00
libfigpar
libgeom Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libgpib
libgpio Bump .Dd for the example code update. 2015-07-01 16:50:01 +00:00
libgssapi
libiconv_modules Bump GCC max-inline-insns-single in libiconv_modules and grep 2015-07-26 00:11:04 +00:00
libipsec New AES modes for IPSec, user space components. 2015-07-03 20:09:14 +00:00
libjail Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libkiconv Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libkvm The si_status field of the siginfo_t, provided by the waitid(2) and 2015-07-18 09:02:50 +00:00
libldns new depends 2015-06-16 23:37:19 +00:00
liblzma only enable immintrin when clang is used. The base gcc does not support it. 2015-07-08 18:36:37 +00:00
libmagic new depends 2015-06-16 23:37:19 +00:00
libmd Add new include path for sha256.h 2015-07-12 03:39:36 +00:00
libmemstat
libmilter
libmp new depends 2015-06-16 23:37:19 +00:00
libmt Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libnandfs
libnetbsd
libnetgraph
libngatm
libnv Move the nvlist source and private includes from sys/kern to seperate 2015-07-04 16:33:37 +00:00
libohash
libopie new depends 2015-06-16 23:37:19 +00:00
libpam new depends 2015-06-16 23:37:19 +00:00
libpcap Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libpjdlog Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libpmc
libproc Make libproc compilable on AArch64. 2015-07-01 13:59:26 +00:00
libprocstat
libradius new depends 2015-06-16 23:37:19 +00:00
librpcsec_gss
librpcsvc
librt
librtld_db
libsbuf new depends 2015-06-16 23:37:19 +00:00
libsdp
libsm libsm/path.c is about to disappear in the merge of sendmail 8.15.2. It is an 2015-07-07 02:35:06 +00:00
libsmb
libsmdb
libsmutil
libsqlite3
libstand
libstdbuf
libstdthreads
libtacplus
libtelnet
libthr Disable SSE in libthr 2015-08-05 12:53:55 +00:00
libthread_db new depends 2015-06-16 23:37:19 +00:00
libucl
libufs Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libugidfw Set some internal helpers as static and initialize few variables to silence 2015-06-24 01:48:44 +00:00
libulog Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libunbound
libusb libusb: Fix minor cast-qual warning. 2015-07-20 16:15:56 +00:00
libusbhid
libutil Bump .Dd due to changes made in r285050 and r285053 2015-07-02 19:41:08 +00:00
libvgl
libvmmapi Move the 'devmem' device nodes from /dev/vmm to /dev/vmm.io 2015-07-06 19:41:43 +00:00
libwrap
libxo Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
liby
libypclnt new depends 2015-06-16 23:37:19 +00:00
libz new depends 2015-06-16 23:37:19 +00:00
msun .ie is not supposed to be used in manpages 2015-07-14 15:21:00 +00:00
ncurses Install ncurses html documentation again after r284345 2015-06-22 05:41:13 +00:00
tests
Makefile First cut of DTrace for AArch64. 2015-07-01 15:51:11 +00:00
Makefile.inc