Page MenuHomeFreeBSD

Bug 294513 - hw.ncpu loader(8) tunable for x86 architectures
Needs ReviewPublic

Authored by jim.chen.1827_gmail.com on Wed, May 20, 7:59 PM.

Details

Summary

Most architectures, excluding i386 and amd64, allow you to set artificial limits on the number of logical processors available to FreeBSD through the hw.ncpu variable in loader(8).

This patch increases consistency with other architectures when handling mp_ncpus and mp_maxid through two changes:

  1. Allowing cpu_mp_setmaxid() to read the loader(8) tunable and set mp_ncpus and mp_maxid accordingly
  2. Preventing mp_start() from changing mp_ncpus through the assign_cpu_ids() method after mp_setmaxid() has already done so

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped