Re: [PATCH 1/2] rbtree_latch: quit searching when reaching to maximum depth

2020-05-15 Thread Peter Zijlstra
On Fri, May 15, 2020 at 10:39:25PM +0800, Lai Jiangshan wrote: > On Fri, May 15, 2020 at 9:04 PM Peter Zijlstra wrote: > > On Fri, May 15, 2020 at 12:47:06PM +, Lai Jiangshan wrote: > > > lib/rbtree.c has ensured that there is not possible to > > > inadvertently cause (temporary) loops in the

Re: [PATCH 1/2] rbtree_latch: quit searching when reaching to maximum depth

2020-05-15 Thread Lai Jiangshan
On Fri, May 15, 2020 at 9:04 PM Peter Zijlstra wrote: > > On Fri, May 15, 2020 at 12:47:06PM +, Lai Jiangshan wrote: > > lib/rbtree.c has ensured that there is not possible to > > inadvertently cause (temporary) loops in the tree structure > > as seen in program order of the modifier. But

Re: [PATCH 1/2] rbtree_latch: quit searching when reaching to maximum depth

2020-05-15 Thread Mathieu Desnoyers
- On May 15, 2020, at 8:47 AM, Lai Jiangshan la...@linux.alibaba.com wrote: [...] > So the serarch should stop when diving down up to > 2*BITS_PER_LONG depth. serarch -> search Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [PATCH 1/2] rbtree_latch: quit searching when reaching to maximum depth

2020-05-15 Thread Peter Zijlstra
On Fri, May 15, 2020 at 12:47:06PM +, Lai Jiangshan wrote: > lib/rbtree.c has ensured that there is not possible to > inadvertently cause (temporary) loops in the tree structure > as seen in program order of the modifier. But loop is still > possible to be seen in searcher due to CPU's