diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2015-04-27 04:50:20 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2015-04-27 04:50:20 +0000 |
commit | 8ba312a3fafbcf0d11c3d02bdd95d42bea14b81e (patch) | |
tree | a221277bbc5d4c9a757434fe645fcef16a321e90 /lang/gcc48/files/patch-libgomp-posix-affinity | |
parent | Implement the FreeBSD specific pieces for thread affinity for OpenMP. (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
Sponsored by: Norse Corp, Inc.
Notes
Notes:
svn path=/head/; revision=384815
Diffstat (limited to 'lang/gcc48/files/patch-libgomp-posix-affinity')
-rw-r--r-- | lang/gcc48/files/patch-libgomp-posix-affinity | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lang/gcc48/files/patch-libgomp-posix-affinity b/lang/gcc48/files/patch-libgomp-posix-affinity new file mode 100644 index 000000000000..c4ab742f061b --- /dev/null +++ b/lang/gcc48/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 |