Re: [PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-28 Thread Joel Fernandes
On Mon, May 28, 2018 at 09:17:51AM +0200, Peter Zijlstra wrote: > On Sun, May 27, 2018 at 10:19:36PM -0700, Joel Fernandes wrote: > > > > +static inline void __rt_mutex_lock(struct rt_mutex *lock, unsigned int > > > subclass) > > > +{ > > > + might_sleep(); > > > + > > > +

Re: [PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-28 Thread Joel Fernandes
On Mon, May 28, 2018 at 09:17:51AM +0200, Peter Zijlstra wrote: > On Sun, May 27, 2018 at 10:19:36PM -0700, Joel Fernandes wrote: > > > > +static inline void __rt_mutex_lock(struct rt_mutex *lock, unsigned int > > > subclass) > > > +{ > > > + might_sleep(); > > > + > > > +

Re: [PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-28 Thread Peter Zijlstra
On Sun, May 27, 2018 at 10:19:36PM -0700, Joel Fernandes wrote: > > +static inline void __rt_mutex_lock(struct rt_mutex *lock, unsigned int > > subclass) > > +{ > > + might_sleep(); > > + > > + mutex_acquire(>dep_map, subclass, 0, _RET_IP_); > > + rt_mutex_fastlock(lock,

Re: [PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-28 Thread Peter Zijlstra
On Sun, May 27, 2018 at 10:19:36PM -0700, Joel Fernandes wrote: > > +static inline void __rt_mutex_lock(struct rt_mutex *lock, unsigned int > > subclass) > > +{ > > + might_sleep(); > > + > > + mutex_acquire(>dep_map, subclass, 0, _RET_IP_); > > + rt_mutex_fastlock(lock,

Re: [PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-27 Thread Joel Fernandes
On Thu, May 24, 2018 at 03:52:39PM +0200, Peter Rosin wrote: > Needed for annotating rt_mutex locks. > > Signed-off-by: Peter Rosin > --- > include/linux/rtmutex.h | 7 +++ > kernel/locking/rtmutex.c | 29 + > 2 files changed, 32 insertions(+),

Re: [PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-27 Thread Joel Fernandes
On Thu, May 24, 2018 at 03:52:39PM +0200, Peter Rosin wrote: > Needed for annotating rt_mutex locks. > > Signed-off-by: Peter Rosin > --- > include/linux/rtmutex.h | 7 +++ > kernel/locking/rtmutex.c | 29 + > 2 files changed, 32 insertions(+), 4 deletions(-) >

[PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-24 Thread Peter Rosin
Needed for annotating rt_mutex locks. Signed-off-by: Peter Rosin --- include/linux/rtmutex.h | 7 +++ kernel/locking/rtmutex.c | 29 + 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/include/linux/rtmutex.h

[PATCH v3 1/2] rtmutex: allow specifying a subclass for nested locking

2018-05-24 Thread Peter Rosin
Needed for annotating rt_mutex locks. Signed-off-by: Peter Rosin --- include/linux/rtmutex.h | 7 +++ kernel/locking/rtmutex.c | 29 + 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h index