[Bug 212592] Default MAKE_JOBS_NUMBER should come from cpuset, not kern.smp.cpus
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Sep 11 23:52:15 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212592
Bug ID: 212592
Summary: Default MAKE_JOBS_NUMBER should come from cpuset, not
kern.smp.cpus
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Ports Framework
Assignee: portmgr at FreeBSD.org
Reporter: cperciva at FreeBSD.org
CC: freebsd-ports-bugs at FreeBSD.org
The default MAKE_JOBS_NUMBER comes from `sysctl -n kern.smp.cpus`. This is
fine in most cases, but if cpuset(1) has been used to limit the CPUs available,
we will end up running too many parallel build steps -- one per CPU present,
rather than one per CPU available.
Unfortunately cpuset(1) doesn't seem to have an obvious "tell me how many CPUs
I have access to" flag, but something like
-_SMP_CPUS!= ${SYSCTL} -n kern.smp.cpus
+_SMP_CPUS!= cpuset -g -p $$ | cut -f 2 -d : | tr , '\n' | wc -l
should probably do the job. (Or, we could just fix cpuset(1) and check
OSVERSION to decide whether to query the sysctl or query cpuset.)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-ports-bugs
mailing list