Re: [PATCH 1/1] rbtree: correct mask for extracting node's parent

2016-08-18 Thread zijun_hu
On 08/18/2016 05:01 PM, Peter Zijlstra wrote: > On Thu, Aug 18, 2016 at 04:19:10PM +0800, zijun_hu wrote: >> From: zijun_hu >> >> for LP64 ABI, struct rb_node aligns at 8 bytes boundary due to >> sizeof(long) == 8 normally, so 0x07 should be used to extract >> node's parent

Re: [PATCH 1/1] rbtree: correct mask for extracting node's parent

2016-08-18 Thread zijun_hu
On 08/18/2016 05:01 PM, Peter Zijlstra wrote: > On Thu, Aug 18, 2016 at 04:19:10PM +0800, zijun_hu wrote: >> From: zijun_hu >> >> for LP64 ABI, struct rb_node aligns at 8 bytes boundary due to >> sizeof(long) == 8 normally, so 0x07 should be used to extract >> node's parent rather than 0x03 > >

Re: [PATCH 1/1] rbtree: correct mask for extracting node's parent

2016-08-18 Thread Peter Zijlstra
On Thu, Aug 18, 2016 at 04:19:10PM +0800, zijun_hu wrote: > From: zijun_hu > > for LP64 ABI, struct rb_node aligns at 8 bytes boundary due to > sizeof(long) == 8 normally, so 0x07 should be used to extract > node's parent rather than 0x03 Doesn't matter though, in practise.

Re: [PATCH 1/1] rbtree: correct mask for extracting node's parent

2016-08-18 Thread Peter Zijlstra
On Thu, Aug 18, 2016 at 04:19:10PM +0800, zijun_hu wrote: > From: zijun_hu > > for LP64 ABI, struct rb_node aligns at 8 bytes boundary due to > sizeof(long) == 8 normally, so 0x07 should be used to extract > node's parent rather than 0x03 Doesn't matter though, in practise. The remaining bits