Page MenuHomeFreeBSD

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (M of N)
ClosedPublic

Authored by kaktus on Tue, Feb 11, 9:02 PM.

Details

Summary

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.

You’re asked for a review based on src/MAINTAINERS entry.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kaktus created this revision.Tue, Feb 11, 9:02 PM
kaktus edited the summary of this revision. (Show Details)Tue, Feb 11, 9:04 PM
kib added a comment.Tue, Feb 11, 11:23 PM

I believe all sysctls in vmm/ can be safely marked as MPSAFE.

kaktus updated this revision to Diff 68253.Thu, Feb 13, 4:48 PM

Mark the nodes as MPSAFE.

kib accepted this revision.Thu, Feb 13, 5:01 PM

Again, wait some limited time for somebody from bhyve, then commit.

This revision is now accepted and ready to land.Thu, Feb 13, 5:01 PM
jhb added a subscriber: jhb.Thu, Feb 13, 5:23 PM

Generally looks fine. Only weirdness is having to mark SYSCTL_NODE()'s with MPSAFE. A SYSCTL_NODE without an explicit handler (so handler set to NULL) is inherently MPSAFE, and it'd be nice to adjust the assertions to special case that to avoid adding churn since eventually once al sysctls are safe we will go through and remove all the CTLFLAG_MPSAFE flags.