Re: [PATCH v3 04/20] lockdep: Add preemption enabled/disabled assertion APIs

2020-07-07 Thread Sebastian A. Siewior
On 2020-07-06 22:50:04 [+0200], Peter Zijlstra wrote: > On Tue, Jun 30, 2020 at 07:44:36AM +0200, Ahmed S. Darwish wrote: > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index d74ac0fd6b2d..e5e2e632b749 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -1118,6 +1118,7

Re: [PATCH v3 04/20] lockdep: Add preemption enabled/disabled assertion APIs

2020-07-06 Thread Peter Zijlstra
On Tue, Jun 30, 2020 at 07:44:36AM +0200, Ahmed S. Darwish wrote: > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index d74ac0fd6b2d..e5e2e632b749 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1118,6 +1118,7 @@ config PROVE_LOCKING > select DEBUG_RWSEMS > selec

[PATCH v3 04/20] lockdep: Add preemption enabled/disabled assertion APIs

2020-06-29 Thread Ahmed S. Darwish
Asserting that preemption is enabled or disabled is a critical sanity check. Developers are usually reluctant to add such a check in a fastpath as reading the preemption count can be costly. Extend the lockdep API with macros asserting that preemption is disabled or enabled. If lockdep is disable