Messages in this thread | | | Date | Tue, 8 Dec 2020 23:31:11 +0800 | From | Boqun Feng <> | Subject | Re: [RFC lockdep 4/4] lockdep/selftest: Add wait context selftests |
| |
On Tue, Dec 08, 2020 at 03:33:24PM +0100, Peter Zijlstra wrote: > On Tue, Dec 08, 2020 at 06:31:12PM +0800, Boqun Feng wrote: > > These tests are added for two purposes: > > > > * Test the implementation of wait context checks and related > > annotations. > > > > * Semi-document the rules for wait context nesting when > > PROVE_RAW_LOCK_NESTING=y. > > Documentation/locking/locktypes.rst should have that. >
Thanks for the pointer!
I miss it before, and it's really a comprehensive document for lock nesting rules. Still I think more rules can be (and should be) put in that document: a broader idea is the context nesting rule (e.g. whether a spinlock_t is allowed in a hard irq handler). And the document reminders me that I'm missing some locks (e.g local_lock) in the test cases. So will improve both the document and the test cases in the next version. In the meanwhile, feel free to point out any mistake or misunderstanding of mine in the rules or the tests, I'm really still learning through these locks with PREEMPT_RT into consideration, thanks!
Regards, Boqun
> > The test cases are only avaible for PROVE_RAW_LOCK_NESTING=y, as wait > > context checking makes more sense for that configuration. > > Looks about right ;-)
| |