Page MenuHomeFreeBSD

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

Authored by glebius on Mon, Feb 16, 10:55 PM.
Tags
None
Referenced Files
F145822201: D55316.diff
Tue, Feb 24, 10:34 PM
F145804799: D55316.diff
Tue, Feb 24, 5:13 PM
F145794522: D55316.id.diff
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
Unknown Object (File)
Sun, Feb 22, 12:40 AM
Subscribers

Details

Reviewers
kib
markj
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 70717
Build 67600: 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?