Page MenuHomeFreeBSD

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

Authored by kaktus on Feb 11 2020, 9:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 23, 6:41 AM
Unknown Object (File)
Fri, Jan 17, 5:33 PM
Unknown Object (File)
Dec 26 2024, 1:18 PM
Unknown Object (File)
Nov 22 2024, 9:53 AM
Unknown Object (File)
Oct 28 2024, 2:10 PM
Unknown Object (File)
Oct 23 2024, 5:58 AM
Unknown Object (File)
Oct 22 2024, 11:10 AM
Unknown Object (File)
Oct 22 2024, 11:10 AM
Subscribers
None

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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

All sysctls in USB drivers are MPSAFE including uaudio.c .

Mark the nodes as MPSAFE.

SYSCTL_ADD_NODE() and SYSCTL_NODE() are always MPSAFE.

I suggest putting this in by default, instead of everywhere in the code:

CTASSERT(((access) & (CTLFLAG_MPSAFE | CTLFLAG_NEEDGIANT)) == 0);
(access) | CTLFLAG_MPSAFE

--HPS

SYSCTL_*_NODE is MPSAFE if the handler is NULL (what is true for most of them) or if the handler takes care of locking internally.

It is fine to commit after hselasky accepts the revision.

This revision is now accepted and ready to land.Feb 13 2020, 5:02 PM

That was committed in rS357972 and should be auto-closed.