diff --git a/src/util/u_thread.h b/src/util/u_thread.h index af44bcfc1bd..917ffead6a5 100644 --- a/src/util/u_thread.h +++ b/src/util/u_thread.h @@ -117,39 +117,6 @@ util_pin_thread_to_L3(thrd_t thread, unsigned L3_index, unsigned cores_per_L3) #endif } -/** - * Return the index of L3 that the thread is pinned to. If the thread is - * pinned to multiple L3 caches, return -1. - * - * \param thread thread - * \param cores_per_L3 number of CPU cores shared by one L3 - */ -static inline int -util_get_L3_for_pinned_thread(thrd_t thread, unsigned cores_per_L3) -{ -#if defined(HAVE_PTHREAD_SETAFFINITY) - cpu_set_t cpuset; - - if (pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset) == 0) { - int L3_index = -1; - - for (unsigned i = 0; i < CPU_SETSIZE; i++) { - if (CPU_ISSET(i, &cpuset)) { - int x = i / cores_per_L3; - - if (L3_index != x) { - if (L3_index == -1) - L3_index = x; - else - return -1; /* multiple L3s are set */ - } - } - } - return L3_index; - } -#endif - return -1; -} /* * Thread statistics.