freebsd-nq/libexec
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 Add META_MODE support. 2015-06-13 19:20:56 +00:00
atrun Call /etc/crontab the "system crontab", not "root's crontab". While 2015-06-22 20:24:59 +00:00
bootpd Add META_MODE support. 2015-06-13 19:20:56 +00:00
casper Let the nv.h and dnv.h includes be only in sys directory. 2015-07-02 21:58:10 +00:00
comsat Add META_MODE support. 2015-06-13 19:20:56 +00:00
dma Convert to LIBADD 2014-11-25 21:18:18 +00:00
dma-mbox-create NO_MAN= has been deprecated in favor of MAN= for some time, go ahead 2014-04-13 05:21:56 +00:00
fingerd Add META_MODE support. 2015-06-13 19:20:56 +00:00
ftpd Needs libxo 2015-06-14 03:31:23 +00:00
getty Add META_MODE support. 2015-06-13 19:20:56 +00:00
hyperv Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, 2014-09-13 02:15:31 +00:00
mail.local Add META_MODE support. 2015-06-13 19:20:56 +00:00
mknetid Add META_MODE support. 2015-06-13 19:20:56 +00:00
pppoed Add META_MODE support. 2015-06-13 19:20:56 +00:00
rbootd Add META_MODE support. 2015-06-13 19:20:56 +00:00
revnetgroup Add META_MODE support. 2015-06-13 19:20:56 +00:00
rlogind Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rquotad Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rstatd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rusersd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rwalld Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.sprayd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rshd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rtld-aout
rtld-elf Disable SSE in libthr 2015-08-05 12:53:55 +00:00
save-entropy Add META_MODE support. 2015-06-13 19:20:56 +00:00
smrsh Add META_MODE support. 2015-06-13 19:20:56 +00:00
talkd Add META_MODE support. 2015-06-13 19:20:56 +00:00
tcpd Add META_MODE support. 2015-06-13 19:20:56 +00:00
telnetd Add META_MODE support. 2015-06-13 19:20:56 +00:00
tests Build and install the atf tests. 2013-11-08 14:33:41 +00:00
tftp-proxy Add META_MODE support. 2015-06-13 19:20:56 +00:00
tftpd Add META_MODE support. 2015-06-13 19:20:56 +00:00
ulog-helper Add META_MODE support. 2015-06-13 19:20:56 +00:00
ypxfr Staticfy and constify some variables and clean up the code a bit to make it 2015-07-28 02:32:40 +00:00
Makefile Add the following options to enable/disable several features in the base system 2015-02-04 10:19:32 +00:00
Makefile.amd64 HYPERV isn't available on all architectures, but just on by default 2014-10-16 00:33:06 +00:00
Makefile.i386 HYPERV isn't available on all architectures, but just on by default 2014-10-16 00:33:06 +00:00
Makefile.inc
Makefile.pc98 Add an "empty" Makefile.pc98 because it doesn't need/want HYPERV. It 2014-10-16 14:08:59 +00:00