Page MenuHomeFreeBSD

Enable nomatch events when one_nomatch is empty
Needs ReviewPublic

Authored by iciliaat_gmail.com on Apr 29 2024, 8:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 23, 5:23 AM
Unknown Object (File)
Jun 3 2024, 3:06 AM
Unknown Object (File)
May 18 2024, 6:02 AM
Unknown Object (File)
May 3 2024, 4:42 AM
Unknown Object (File)
Apr 30 2024, 10:04 PM
Unknown Object (File)
Apr 30 2024, 5:55 PM
Unknown Object (File)
Apr 30 2024, 5:46 PM
Unknown Object (File)
Apr 30 2024, 2:00 PM
Subscribers

Details

Reviewers
cperciva
imp
Summary

To avoid redundant nomatch events on boot, a new sysctl is introduced, which is set to 0 initially. This blocks nomatch events within devctl_nomatch_handler in /sys/kern/devctl.c. When $one_nomatch in /etc/rc.d/devmatch is empty, the value of the sysctl is set to 1, allowing nomatch events to be processed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 57539
Build 54427: arc lint + arc unit

Event Timeline

Minor nits.

libexec/rc/rc.d/devmatch
49

The -w option is not needed (and does nothing on FreeBSD).

sys/kern/kern_devctl.c
93

Please wrap this at 78 columns, with a 4-space indent on the second line (like the hw.bus.devctl_queue declaration is formatted).

214–215

The == 1 is not needed, just make this if (nomatch_enabled).

217

No need for the else return, we're doing that anyway. ;-)

Fixed formatting, and unneccessary parts

iciliaat_gmail.com marked an inline comment as done.
iciliaat_gmail.com edited the summary of this revision. (Show Details)

Updated commit message to include boot speed improvement

Add Warner as a reviewer in case he has any comments on this before I commit it.