Starting APs earlier during boot

John Baldwin jhb at freebsd.org
Fri Apr 22 19:33:59 UTC 2016


On Tuesday, February 16, 2016 12:50:22 PM John Baldwin wrote:
> Currently the kernel bootstraps the non-boot processors fairly early in the
> SI_SUB_CPU SYSINIT.  The APs then spin waiting to be "released".  We currently
> release the APs as one of the last steps at SI_SUB_SMP.  On the one hand this
> removes much of the need for synchronization while SYSINITs are running since
> SYSINITs basically assume they are single-threaded.  However, it also enforces
> some odd quirks.  Several places that deal with per-CPU resources have to
> split initialization up so that the BSP init happens in one SYSINIT and the
> initialization of the APs happens in a second SYSINIT at SI_SUB_SMP.

I've posted a review of the final set of changes here:

https://reviews.freebsd.org/D6069

To permit a smoother transition, the earlier startup is temporarily controlled
by a kernel option (EARLY_AP_STARTUP) so that it can be easily disabled if there
are regressions and to allow individual platforms to have time to port over.
My plan is to enablet his by default on x86 once it is in the tree.  I would
like to have all platforms cut over for 11.0.

-- 
John Baldwin


More information about the freebsd-arch mailing list