Page MenuHomeFreeBSD

LinuxKPI: use LINUXKPI_DEBUG to determine on witness lock tracing
AcceptedPublic

Authored by bz on Thu, Aug 27, 8:34 PM.
Referenced Files
Unknown Object (File)
Sat, Sep 19, 11:35 PM
Unknown Object (File)
Thu, Sep 17, 2:43 AM
Unknown Object (File)
Wed, Sep 16, 8:21 PM
Unknown Object (File)
Tue, Sep 15, 8:16 AM
Unknown Object (File)
Sat, Sep 12, 2:16 PM
Unknown Object (File)
Fri, Sep 11, 3:26 PM
Unknown Object (File)
Wed, Sep 9, 1:38 PM
Unknown Object (File)
Wed, Sep 9, 12:00 AM
Subscribers

Details

Reviewers
dumbbell
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.

This revision is now accepted and ready to land.Thu, Sep 10, 6:39 PM

I will hold back on this one for a bit until my WITNESS mystery posted on current (and hackers previously) is solved unless someone can assure me turning this on will not immediately kill drm-kmod (drivers).

Otherwise I'll make those variables and tunables allowing us to turn them on or off or something more selectively.

Anyone care to look at the parent in the stack which adds option LINUXKPI_DEBUG to the build system, etc.?