Page MenuHomeFreeBSD

ULE: provide defaults to ts_cpu
ClosedPublic

Authored by wma on Jan 16 2018, 7:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 6, 3:08 AM
Unknown Object (File)
Aug 13 2025, 12:03 PM
Unknown Object (File)
Aug 11 2025, 4:03 PM
Unknown Object (File)
Jul 22 2025, 6:37 AM
Unknown Object (File)
Jul 5 2025, 5:47 PM
Unknown Object (File)
Jul 5 2025, 5:09 AM
Unknown Object (File)
Jul 2 2025, 5:52 AM
Unknown Object (File)
Jun 30 2025, 3:41 AM
Subscribers

Details

Summary

Fix a bug when the system has no CPU 0. When created, threads were implicitly assigned to CPU 0. This had no practical effect since a real CPU was chosen immediately by the scheduler. However, on systems without a CPU 0, sched_ule attempted to access the scheduler queue of the "old" CPU when assigned the initial choice of the old one. This caused an attempt to use illegal memory and a crash (or, more usually, a deadlock). Fix this by assigned new threads to the BSP explicitly and add some asserts to see that this problem does not recur.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jan 24 2018, 7:54 AM
Closed by commit rS328320: ULE: provide defaults to ts_cpu (authored by wma). · Explain Why
This revision was automatically updated to reflect the committed changes.

This patch is wrong. See discussions around r326218 on FreeBSD SVN mailing list.