Page MenuHomeFreeBSD

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

Authored by kaktus on Feb 26 2020, 3:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 18 2024, 11:40 AM
Unknown Object (File)
Feb 2 2024, 9:19 AM
Unknown Object (File)
Jan 15 2024, 5:20 PM
Unknown Object (File)
Dec 25 2023, 3:20 AM
Unknown Object (File)
Dec 25 2023, 3:20 AM
Unknown Object (File)
Dec 25 2023, 3:20 AM
Unknown Object (File)
Dec 25 2023, 3:20 AM
Unknown Object (File)
Dec 25 2023, 3:01 AM
Subscribers

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.
Mark obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

cem added a subscriber: cem.
cem added inline comments.
sys/dev/random/fortuna.c
305

I think mpsafe is fine here.

sys/dev/random/random_harvestq.c
114

Kinda feels like NODE type sysctls should be MPSAFE globally. The weird exceptions with handlers should have to opt out of mpsafe. Imo.

309

Sure. There is some trivial conversion to atomic update here but that’s not the goal of this patch series.

331

MPSAFE

393

MPSAFE

This revision is now accepted and ready to land.Feb 26 2020, 4:56 PM

OK, I'll mark them as mpsafe in a commit.

sys/dev/random/random_harvestq.c
114

Too late, this is the last patch in the whole series of adding NEEDGIANT :-)
I'll invite you to a brainstorming review for a proposed decoupling of nodes with handlers so this mess could be removed.