Page MenuHomeFreeBSD

Use nproc(1) instead of sysctl kern.smp.cpus
ClosedPublic

Authored by mjg on Feb 8 2023, 9:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 28 2023, 4:38 AM
Unknown Object (File)
Dec 28 2023, 4:38 AM
Unknown Object (File)
Dec 28 2023, 4:38 AM
Unknown Object (File)
Dec 28 2023, 4:38 AM
Unknown Object (File)
Dec 25 2023, 9:37 AM
Unknown Object (File)
Dec 22 2023, 11:20 PM
Unknown Object (File)
Nov 8 2023, 6:46 AM
Unknown Object (File)
Oct 16 2023, 6:13 PM
Subscribers

Details

Summary

The former respects cpuset, while the latter does not.

$ cpuset -l 1 -- make -V MAKE_JOBS_NUMBER
1

As nproc is newly introduced, keep the previous variant as a fallback for the time being.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Feb 8 2023, 9:30 PM
mjg created this revision.
This revision is now accepted and ready to land.Feb 9 2023, 12:37 AM
mandree added a subscriber: mandree.
This comment was removed by mandree.
bdrewery requested changes to this revision.Feb 9 2023, 6:32 PM
bdrewery added a subscriber: bdrewery.
bdrewery added inline comments.
Mk/bsd.port.mk
2044

This should be ${NPROC} and a new NPROC?= line added in Mk/bsd.commands.mk.

This revision now requires changes to proceed.Feb 9 2023, 6:32 PM
mjg marked an inline comment as done.Feb 9 2023, 6:45 PM
This revision is now accepted and ready to land.Feb 9 2023, 6:46 PM

I didn't mean to "accept as portmgr".

Note this introduces an extra PATH search for systems that do NOT yet have nproc so perhaps we need to add some OSVERSION switch here.

This revision was automatically updated to reflect the committed changes.