From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753429AbcHRMLx (ORCPT ); Thu, 18 Aug 2016 08:11:53 -0400 Received: from sender153-mail.zoho.com ([74.201.84.153]:21349 "EHLO sender153-mail.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627AbcHRMLw (ORCPT ); Thu, 18 Aug 2016 08:11:52 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=subject:to:references:cc:from:message-id:date:user-agent:mime-version:in-reply-to:content-type; b=hcQDeLLtE40pBoFha0TyiGorZZQD4xhhF0WEJ7ydkKLI8xIY5gyP9jS4rokRGSgxrKezwBbZYdXr d/IGajhkV1mC++tJiE+oMv3b/lxjBlDb+OKtwaSAN7mtJn61Gaa3 Subject: Re: [PATCH 1/1] rbtree: correct mask for extracting node's parent To: Peter Zijlstra References: <57B56F7E.7090608@zoho.com> <20160818090116.GA25687@twins.programming.kicks-ass.net> Cc: Andrew Morton , dhowells@redhat.com, linux-kernel@vger.kernel.org, zijun_hu@htc.com From: zijun_hu Message-ID: <57B5A5E8.3040606@zoho.com> Date: Thu, 18 Aug 2016 20:11:20 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160818090116.GA25687@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Doesn't matter though, in practise. The remaining bits are always 0. > okay, understand it maybe more readable to replace hard coding numbers by macros