From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751313AbdLZRV7 (ORCPT ); Tue, 26 Dec 2017 12:21:59 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36299 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbdLZRV4 (ORCPT ); Tue, 26 Dec 2017 12:21:56 -0500 X-Google-Smtp-Source: ACJfBov8Ho5ysINnSX3Tn/N/KIkr6pGmfDyay7h1abFtI7ecE0DIZZz749HVckP+cbalAdGalseF9w== Date: Tue, 26 Dec 2017 20:21:53 +0300 From: "Kirill A. Shutemov" To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, Matthew Wilcox , Ross Zwisler , David Howells , Shaohua Li , Jens Axboe , Rehas Sachdeva , Marc Zyngier , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nilfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-usb@vger.kernel.org, linux-raid@vger.kernel.org Subject: Re: [PATCH v5 06/78] xarray: Change definition of sibling entries Message-ID: <20171226172153.pylgdefajcrthe3b@node.shutemov.name> References: <20171215220450.7899-1-willy@infradead.org> <20171215220450.7899-7-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171215220450.7899-7-willy@infradead.org> User-Agent: NeoMutt/20171208 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 15, 2017 at 02:03:38PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Instead of storing a pointer to the slot containing the canonical entry, > store the offset of the slot. Produces slightly more efficient code > (~300 bytes) and simplifies the implementation. > > Signed-off-by: Matthew Wilcox > --- > include/linux/xarray.h | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ > lib/radix-tree.c | 65 +++++++++++---------------------------- > 2 files changed, 100 insertions(+), 47 deletions(-) > > diff --git a/include/linux/xarray.h b/include/linux/xarray.h > index 49fffc354431..f175350560fd 100644 > --- a/include/linux/xarray.h > +++ b/include/linux/xarray.h > @@ -49,6 +49,17 @@ static inline bool xa_is_value(const void *entry) > return (unsigned long)entry & 1; > } > > +/** > + * xa_is_internal() - Is the entry an internal entry? > + * @entry: Entry retrieved from the XArray > + * > + * Return: %true if the entry is an internal entry. > + */ What does it mean "internal entry"? Is it just a term for non-value and non-data pointer entry? Do we allow anybody besides xarray implementation to use internal entires? Do we have it documented? -- Kirill A. Shutemov