Page MenuHomeFreeBSD

x86: change ap_boot_mtx from spinlock mutex to naive lock
ClosedPublic

Authored by kib on Sat, Jan 3, 1:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 10, 4:48 AM
Unknown Object (File)
Fri, Jan 9, 8:21 PM
Unknown Object (File)
Thu, Jan 8, 8:20 PM
Unknown Object (File)
Thu, Jan 8, 5:03 PM
Unknown Object (File)
Thu, Jan 8, 8:18 AM
Unknown Object (File)
Mon, Jan 5, 12:17 AM
Unknown Object (File)
Sun, Jan 4, 6:23 PM
Unknown Object (File)
Sun, Jan 4, 4:46 AM
Subscribers

Details

Summary
Problem is that the printfs done under the spinlock might be very slow,
then spinlock triggers the panic due to some AP holding the mutex too
long.  We do want to ensure that the printfs are serialized, still.

Also, reduce the scope of the lock. The local APIC and MTRR
initializations are local to the AP, while mca_init() protects the
shared state with mca-private spinlock.

PR:     289297

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Sat, Jan 3, 1:15 AM
markj added inline comments.
sys/x86/x86/mp_x86.c
1099
This revision is now accepted and ready to land.Sat, Jan 3, 3:00 PM
kib marked an inline comment as done.

Fix grammar in the comment.
Use PAUSE if CAS failed.

This revision now requires review to proceed.Sat, Jan 3, 11:41 PM
This revision is now accepted and ready to land.Mon, Jan 5, 2:00 PM