Re: SSE in libthr

From: Eric van Gyzen <vangyzen_at_FreeBSD.org>
Date: Fri, 27 Mar 2015 17:43:56 -0400
On 03/27/2015 16:49, Rui Paulo wrote:
>
> Regarding your patch, I think we should disable even more, if possible.  How about:
>
> CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3

Yes, I was considering copying all of the similar flags that we use in the
kernel.  That seems wise.  According to comments in sys/conf/kern.mk, only
no-mmx and no-sse would be necessary, as they imply the others.

dim_at_ raised the possibility of CPUTYPE=foo on i386, so I would also apply this
change to i386.

An updated patch is below.

Eric


Index: base/head/lib/libthr/arch/amd64/Makefile.inc
===================================================================
--- base/head/lib/libthr/arch/amd64/Makefile.inc    (revision 280703)
+++ base/head/lib/libthr/arch/amd64/Makefile.inc    (working copy)
_at__at_ -1,3 +1,8 _at__at_
 #$FreeBSD$
 
 SRCS+=    _umtx_op_err.S
+
+# Using SSE incurs extra overhead per context switch,
+# which measurably impacts performance when the application
+# does not otherwise use FP/SSE.
+CFLAGS+=-mno-sse -mno-mmx
Index: base/head/lib/libthr/arch/i386/Makefile.inc
===================================================================
--- base/head/lib/libthr/arch/i386/Makefile.inc    (revision 280703)
+++ base/head/lib/libthr/arch/i386/Makefile.inc    (working copy)
_at__at_ -1,3 +1,8 _at__at_
 # $FreeBSD$
 
 SRCS+=    _umtx_op_err.S
+
+# Using SSE incurs extra overhead per context switch,
+# which measurably impacts performance when the application
+# does not otherwise use FP/SSE.
+CFLAGS+=-mno-sse -mno-mmx
Received on Fri Mar 27 2015 - 20:45:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:56 UTC