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)
Tue, Aug 4, 3:36 AM
Unknown Object (File)
Thu, Jul 30, 5:24 PM
Unknown Object (File)
Mon, Jul 27, 3:26 AM
Unknown Object (File)
Tue, Jul 21, 4:25 AM
Unknown Object (File)
Tue, Jul 21, 3:04 AM
Unknown Object (File)
Thu, Jul 9, 7:48 PM
Unknown Object (File)
Jul 5 2026, 6:20 PM
Unknown Object (File)
Jul 3 2026, 11:51 PM
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.