Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Sep 2016 23:52:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 212592] Default MAKE_JOBS_NUMBER should come from cpuset, not kern.smp.cpus
Message-ID:  <bug-212592-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212592

            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@FreeBSD.org
          Reporter: cperciva@FreeBSD.org
                CC: freebsd-ports-bugs@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 availa=
ble,
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 C=
PUs
I have access to" flag, but something like

-_SMP_CPUS!=3D             ${SYSCTL} -n kern.smp.cpus
+_SMP_CPUS!=3D             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.)

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212592-13>