From 8ba312a3fafbcf0d11c3d02bdd95d42bea14b81e Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Mon, 27 Apr 2015 04:50:20 +0000 Subject: 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. --- lang/gcc48/files/patch-libgomp-posix-affinity | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lang/gcc48/files/patch-libgomp-posix-affinity (limited to 'lang/gcc48/files/patch-libgomp-posix-affinity') 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 -- cgit v1.2.3