Page MenuHomeFreeBSD

Make sure we set up the MCA task queue before cold is changed to 0
AcceptedPublic

Authored by jtl on Sep 8 2017, 3:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 2:42 AM
Unknown Object (File)
Aug 12 2023, 9:09 PM
Unknown Object (File)
Jun 14 2023, 9:31 AM
Unknown Object (File)
Jun 14 2023, 1:17 AM
Unknown Object (File)
Jun 3 2023, 1:34 AM
Unknown Object (File)
May 14 2023, 6:10 AM
Unknown Object (File)
Jan 12 2023, 1:28 AM
Subscribers

Details

Reviewers
jhb
Summary

Currently, the CMCI handler checks the cold variable to determine whether it can schedule a task. The task queue is setup as part of the mca_createtq() function, which is run at startup through the SYSINIT facility with SI_SUB_CONFIGURE and SI_ORDER_ANY.

However, cold is set to 0 by configure_final(), which is also run with SI_SUB_CONFIGURE and SI_ORDER_ANY. Therefore, it appears to be non-deterministic whether the cold variable will be set to 0 before the mca_createtq() function runs.

There are several possible fixes; this change proposes to change the mca_createq() order from SI_ORDER_ANY to SI_ORDER_MIDDLE to ensure it runs before cold is set to 0.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Alternatively we could check some variable that this sysinit sets (like mca_tq) instead of cold, but this is fine.

This revision is now accepted and ready to land.Sep 8 2017, 6:20 PM