Re: [PATCH 2/2] rtmutex: Reduce top-waiter blocking on a lock

From: kbuild test robot
Date: Wed Apr 11 2018 - 08:52:02 EST


Hi Davidlohr,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16 next-20180411]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Davidlohr-Bueso/locking-rtmutex-Delete-save_state-member-of-struct-rt_mutex/20180411-155733
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> kernel/locking/rtmutex_common.h:62:9: sparse: context imbalance in '__rt_mutex_slowlock' - unexpected unlock

vim +/__rt_mutex_slowlock +62 kernel/locking/rtmutex_common.h

23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 51
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 52 static inline struct rt_mutex_waiter *
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 53 rt_mutex_top_waiter(struct rt_mutex *lock)
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 54 {
c28d62cf5 kernel/locking/rtmutex_common.h Peter Zijlstra 2018-03-27 55 struct rb_node *leftmost = rb_first_cached(&lock->waiters);
c28d62cf5 kernel/locking/rtmutex_common.h Peter Zijlstra 2018-03-27 56 struct rt_mutex_waiter *w = NULL;
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 57
c28d62cf5 kernel/locking/rtmutex_common.h Peter Zijlstra 2018-03-27 58 if (leftmost) {
c28d62cf5 kernel/locking/rtmutex_common.h Peter Zijlstra 2018-03-27 59 w = rb_entry(leftmost, struct rt_mutex_waiter, tree_entry);
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 60 BUG_ON(w->lock != lock);
c28d62cf5 kernel/locking/rtmutex_common.h Peter Zijlstra 2018-03-27 61 }
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 @62 return w;
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 63 }
23f78d4a0 kernel/rtmutex_common.h Ingo Molnar 2006-06-27 64

:::::: The code at line 62 was first introduced by commit
:::::: 23f78d4a03c53cbd75d87a795378ea540aa08c86 [PATCH] pi-futex: rt mutex core

:::::: TO: Ingo Molnar <mingo@xxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation