From b7877c45fc7fe47709c963e15214a3dd5fc71e32 Mon Sep 17 00:00:00 2001 From: Wessel Dankers Date: Sun, 30 Oct 2022 20:04:05 +0100 Subject: Only use available CPUs Not all CPUs may be available for the current process. Some CPUs may be offline, others may not be included in the process affinity mask. In such cases too many threads will be created, which will then compete unnecessarily for CPU time. Use sched_getaffinity() to determine the correct number of threads to create. --- configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bc7db61..29e28c9 100644 --- a/configure.ac +++ b/configure.ac @@ -287,10 +287,9 @@ AS_IF([test "x$have_compressor" != "xyes"], ##### additional checks ##### AC_CHECK_HEADERS([sys/xattr.h], [], []) -AC_CHECK_HEADERS([sys/sysinfo.h], [], []) AC_CHECK_HEADERS([alloca.h], [], []) -AC_CHECK_FUNCS([strndup getopt getopt_long getsubopt fnmatch strchrnul]) +AC_CHECK_FUNCS([strndup getopt getopt_long getsubopt fnmatch strchrnul sched_getaffinity]) ##### generate output ##### -- cgit v1.2.3