summaryrefslogtreecommitdiff
path: root/lang/gcc/files/patch-libgomp-posix-affinity
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2015-04-27 04:08:01 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2015-04-27 04:08:01 +0000
commitb359a55a8261b43bd6011b73f6785a708ec20137 (patch)
tree5d424d635c28623c343d98368803b8ffed5097bd /lang/gcc/files/patch-libgomp-posix-affinity
parentUpgrae to 4.0. (diff)
Implement the FreeBSD specific pieces for thread affinity for OpenMP.
Upstream gcc 4.8 doesn't have support for this - it'll create threads, but it won't do any of the thread affinity stuff for FreeBSD. This allows for OMP_PROC_BIND=true to bind threads to their initial CPUs, leading to some pretty drastic improvements in performance for certain NUMA workloads. Approved by: gerald
Notes
Notes: svn path=/head/; revision=384814
Diffstat (limited to 'lang/gcc/files/patch-libgomp-posix-affinity')
-rw-r--r--lang/gcc/files/patch-libgomp-posix-affinity18
1 files changed, 18 insertions, 0 deletions
diff --git a/lang/gcc/files/patch-libgomp-posix-affinity b/lang/gcc/files/patch-libgomp-posix-affinity
new file mode 100644
index 000000000000..c4ab742f061b
--- /dev/null
+++ b/lang/gcc/files/patch-libgomp-posix-affinity
@@ -0,0 +1,18 @@
+--- libgomp/config/posix/affinity.c.orig 2015-04-26 05:29:27.925344000 -0700
++++ libgomp/config/posix/affinity.c 2015-04-26 05:29:44.449277000 -0700
+@@ -26,6 +26,10 @@
+
+ #include "libgomp.h"
+
++#ifdef __FreeBSD__
++#include "../bsd/freebsd_affinity.c"
++#else
++
+ void
+ gomp_init_affinity (void)
+ {
+@@ -36,3 +40,4 @@
+ {
+ (void) attr;
+ }
++#endif