Re: [PATCH] lockdep: Optimize the memory usage of circular queue

2020-09-28 Thread Peter Zijlstra
On Mon, Sep 28, 2020 at 05:47:38PM +0800, Boqun Feng wrote: > I think your version is better and should be functionally identical to > mine, also FWIW, I tested with a lockdep boot selftests, everything > worked fine. Excellent, thanks! I'll go feed it to the robots.

Re: [PATCH] lockdep: Optimize the memory usage of circular queue

2020-09-28 Thread Boqun Feng
On Mon, Sep 28, 2020 at 10:51:04AM +0200, Peter Zijlstra wrote: > On Thu, Sep 17, 2020 at 04:01:50PM +0800, Boqun Feng wrote: > > > __cq_init(cq); > > __cq_enqueue(cq, source_entry); > > > > + while (lock || (lock = __cq_dequeue(cq))) { > > + if (!lock->class) > > +

Re: [PATCH] lockdep: Optimize the memory usage of circular queue

2020-09-28 Thread Peter Zijlstra
On Thu, Sep 17, 2020 at 04:01:50PM +0800, Boqun Feng wrote: > __cq_init(cq); > __cq_enqueue(cq, source_entry); > > + while (lock || (lock = __cq_dequeue(cq))) { > + if (!lock->class) > + return BFS_EINVALIDNODE; > > /* > +

Re: [PATCH] lockdep: Optimize the memory usage of circular queue

2020-09-28 Thread Dmitry Vyukov
On Mon, Sep 28, 2020 at 10:08 AM Boqun Feng wrote: > > On Mon, Sep 28, 2020 at 10:03:19AM +0200, Dmitry Vyukov wrote: > > On Thu, Sep 24, 2020 at 5:13 PM Boqun Feng wrote: > > > > > > Ping ;-) > > > > > > Regards, > > > Boqun > > > > Hi Boqun, > > > > Peter says this may also fix this issue: > >

Re: [PATCH] lockdep: Optimize the memory usage of circular queue

2020-09-28 Thread Boqun Feng
On Mon, Sep 28, 2020 at 10:03:19AM +0200, Dmitry Vyukov wrote: > On Thu, Sep 24, 2020 at 5:13 PM Boqun Feng wrote: > > > > Ping ;-) > > > > Regards, > > Boqun > > Hi Boqun, > > Peter says this may also fix this issue: > https://syzkaller.appspot.com/bug?extid=62ebe501c1ce9a91f68c > please add th

Re: [PATCH] lockdep: Optimize the memory usage of circular queue

2020-09-28 Thread Dmitry Vyukov
On Thu, Sep 24, 2020 at 5:13 PM Boqun Feng wrote: > > Ping ;-) > > Regards, > Boqun Hi Boqun, Peter says this may also fix this issue: https://syzkaller.appspot.com/bug?extid=62ebe501c1ce9a91f68c please add the following tag to the patch so that the bug report will be closed on merge: Reported-b

Re: [PATCH] lockdep: Optimize the memory usage of circular queue

2020-09-24 Thread Boqun Feng
Ping ;-) Regards, Boqun On Thu, Sep 17, 2020 at 04:01:50PM +0800, Boqun Feng wrote: > Qian Cai reported a BFS_EQUEUEFULL warning [1] after read recursive > deadlock detection merged into tip tree recently. Unlike the previous > lockep graph searching, which iterate every lock class (every node in