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)
Sat, Apr 6, 2:06 AM
Unknown Object (File)
Feb 21 2024, 2:32 AM
Unknown Object (File)
Jan 15 2024, 7:34 AM
Unknown Object (File)
Jan 14 2024, 5:37 AM
Unknown Object (File)
Dec 20 2023, 2:48 AM
Unknown Object (File)
Dec 16 2023, 2:21 AM
Unknown Object (File)
Oct 8 2023, 8:57 AM
Unknown Object (File)
Sep 13 2023, 8:01 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.