Page MenuHomeFreeBSD

Fix panic in sched_setup_smp when some apics are disabled
Needs ReviewPublic

Authored by on Wed, May 20, 2:39 PM.



when some apics are disabled and only one is left in
a caches group, an inconsistent topology may be created
and smp_topo_find does not find a group. This has been
fixed by ignoring nodes with empty cpusets. additionally
the tree will flatened to lowest cache level over the
entire topology tree.

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 31196
Build 28852: arc lint + arc unit

Event Timeline requested review of this revision.Wed, May 20, 2:39 PM created this revision.

This is a bugfix we use for TwinCAT/BSD. In our environment it's pretty common to isolate single CPU cores from the operating system and let them run application specific code.
Again, I found both of you in the history of the changed file and want to ask for your feedback.
We would like to have this issue solved in upstream FreeBSD to keep our vendor diff small and are willing to improve our implementation, if it doesn't meet your standards.

kib added reviewers: avg, cem.Sat, May 23, 7:20 PM
cem added a reviewer: jeff.Sun, May 24, 3:31 AM
cem added a comment.Sun, May 24, 2:33 PM

FWIW, there is the vaguely related D23659, which I did not have time to rework correctly. Some of Jeff's feedback there may be useful here.

(For evaluation purposes, we had a 2P configuration and were attempting to disable all CPUs in the first socket except for the BSP — just because boot relies on the BSP. Mostly we wanted to qualify the second socket CPU device latency.)

kib added a comment.Sun, May 24, 6:40 PM

This looks fine to me, mostly. Lets wait for Jeff.