kernel - Fix startup race in usched_dfly
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 26 Aug 2018 18:52:59 +0000 (11:52 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 29 Aug 2018 15:27:26 +0000 (08:27 -0700)
commitca50f0d271948b08f961108a838a9ccce8634e1b
tree4855e8c2583fe0414071b840f78ba6745a239528
parentd89a0e31a842d13f34830f543170e9d31a70afd9
kernel - Fix startup race in usched_dfly

* Use a master configuration lock for usched_dfly's thread
  creation, ensuring that no thread tries to check dfly_pcpu[]
  until the whole thing has been initialized.

* Fixes occassional panic in usched_dfly on boot on many-cores
  systems due to a lower-numbered usched thread triggering before
  dfly_pcpu is completely initialized.
sys/kern/usched_dfly.c