[Openmp-commits] [PATCH] D34118: Reset initial affinity in children processes
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 13 10:16:52 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL305306: Reset initial affinity in children processes (authored by jlpeyton).
Changed prior to commit:
https://reviews.llvm.org/D34118?vs=102234&id=102361#toc
Repository:
rL LLVM
https://reviews.llvm.org/D34118
Files:
openmp/trunk/runtime/src/kmp.h
openmp/trunk/runtime/src/z_Linux_util.cpp
Index: openmp/trunk/runtime/src/z_Linux_util.cpp
===================================================================
--- openmp/trunk/runtime/src/z_Linux_util.cpp
+++ openmp/trunk/runtime/src/z_Linux_util.cpp
@@ -1280,6 +1280,12 @@
++__kmp_fork_count;
+#if KMP_AFFINITY_SUPPORTED && KMP_OS_LINUX
+ // reset the affinity in the child to the initial thread
+ // affinity in the parent
+ kmp_set_thread_affinity_mask_initial();
+#endif
+
__kmp_init_runtime = FALSE;
#if KMP_USE_MONITOR
__kmp_init_monitor = 0;
Index: openmp/trunk/runtime/src/kmp.h
===================================================================
--- openmp/trunk/runtime/src/kmp.h
+++ openmp/trunk/runtime/src/kmp.h
@@ -3268,6 +3268,9 @@
extern int __kmp_aux_unset_affinity_mask_proc(int proc, void **mask);
extern int __kmp_aux_get_affinity_mask_proc(int proc, void **mask);
extern void __kmp_balanced_affinity(int tid, int team_size);
+#if KMP_OS_LINUX
+extern int kmp_set_thread_affinity_mask_initial(void);
+#endif
#endif /* KMP_AFFINITY_SUPPORTED */
extern void __kmp_cleanup_hierarchy();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34118.102361.patch
Type: text/x-patch
Size: 1085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170613/7e537d0f/attachment-0001.bin>
More information about the Openmp-commits
mailing list