Page MenuHomeFreeBSD

LinuxKPI: use LINUXKPI_DEBUG to determine on witness lock tracing
Needs ReviewPublic

Authored by bz on Thu, Aug 27, 8:34 PM.
Referenced Files
Unknown Object (File)
Tue, Sep 1, 8:34 PM
Unknown Object (File)
Tue, Sep 1, 10:14 AM
Unknown Object (File)
Sun, Aug 30, 1:39 PM
Unknown Object (File)
Sat, Aug 29, 7:11 PM
Unknown Object (File)
Sat, Aug 29, 2:25 PM
Unknown Object (File)
Sat, Aug 29, 2:09 PM
Unknown Object (File)
Thu, Aug 27, 9:01 PM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

LinuxKPI by default tells witness to ignore the locks, which is
unhelpful in case of panics like 'panic: sleeping thread holds lnxspin'.
While I have edited the lock initialitzation manually in the past,
make this dependent on both LINUXKPI_DEBUG and WITNESS.
Define an internal _LKPI_MTX_NOWITNESS (and equivalent for other lock
types used) and set them accordingly in kconfig.h, a file automatically
included to all LinuxKPI compiled code (like global.h).
In addition, in the debug case, also define WITNESS_ALL to get file,
line, and lock name as a lock name rather than just, e.g., lnxspin.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 76230
Build 73113: arc lint + arc unit

Event Timeline

bz requested review of this revision.Thu, Aug 27, 8:34 PM
sys/compat/linuxkpi/common/include/linux/kconfig.h
43

Tell witness to not ignore .. probably better phrasing.

57

Excessive blank lines to be removed before commit.