Page MenuHomeFreeBSD

witness: report a thread that can't sleep in WITNESS_WARN
ClosedPublic

Authored by glebius on Mon, Feb 16, 10:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 8, 5:55 AM
Unknown Object (File)
Tue, Feb 24, 10:34 PM
Unknown Object (File)
Tue, Feb 24, 5:13 PM
Unknown Object (File)
Tue, Feb 24, 2:20 PM
Unknown Object (File)
Tue, Feb 24, 2:01 AM
Unknown Object (File)
Mon, Feb 23, 9:54 PM
Unknown Object (File)
Mon, Feb 23, 9:54 PM
Unknown Object (File)
Sun, Feb 22, 10:36 AM
Subscribers

Details

Summary

Although this is not related to locking, but seems to be the right
place to catch violators, given that WITNESS_WARN is already used
widely in the kernel.

Diff Detail

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

Event Timeline

Immediately caught in bridge(4):

NET_EPOCH_ENTER(et);

callout_drain(&sc->sc_brcallout);
kib added inline comments.
sys/kern/subr_witness.c
2140

IMO it is cleaner to inline THREAD_CAN_SLEEP() because the whole function operates on td.
The right hand of && is not style-compliant.

This revision is now accepted and ready to land.Tue, Feb 17, 2:53 AM
markj added inline comments.
sys/kern/subr_witness.c
2144

Immediately caught in bridge(4):

NET_EPOCH_ENTER(et);

callout_drain(&sc->sc_brcallout);

Are we waiting for this?
Do you want me to work on bridge?

  • Apply Kostik's & Mark's suggestions
This revision now requires review to proceed.Thu, Mar 5, 6:42 PM
This revision was not accepted when it landed; it landed in state Needs Review.Thu, Mar 5, 6:44 PM
This revision was automatically updated to reflect the committed changes.