Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589948

Re: Please pull IDR rewrite

Path csiph.com!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!news.spin.it!bofh.it!news.nic.it!robomod
From Matthew Wilcox <willy@infradead.org>
Newsgroups linux.kernel
Subject Re: Please pull IDR rewrite
Date Wed, 01 Mar 2017 03:30:01 +0100
Message-ID <tg2bD-4Ar-5@gated-at.bofh.it> (permalink)
References <tfYhH-21y-9@gated-at.bofh.it> <tg09P-3hb-1@gated-at.bofh.it>
X-Original-To Linus Torvalds <torvalds@linux-foundation.org>
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TPVAfruLEsuNJJHhjYVv2OXeseCDYTESrfSok5963Q8=; b=OnUuXDVWj/Tyf0RJVVbPPWHMV 1z450zWxbKVxTEm2oAWg3VhchnwGbyhpZV5/XlpBMxDTVYa0BpQtY/ruPc62YmeyaNzoccAHsPI2V 27VmsAw+YQ6AASbjKVuZM3ldXjTSb4niscloxGaLlwvKOueNByUOLTAjcO+x8HOmyjbE4DCIZzddl H2wdSqD5WWS3wjV1ggDF2vjZxUkrvJjRXHEYX5UP9ktXK4Lw5Z4fsAhgMwpHl7ED7YPELIk3GpSOm Pw3SrlLHCqW9eQniwvQZlS/qL2S0yQg8NVxJ++LGg6qLAjG0QUqW3Ny6cYI3acLI/ha4oKhxODhWm 8ilimL79A==;
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.1 (2016-10-04)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
X-Original-Date Tue, 28 Feb 2017 16:06:32 -0800
X-Original-Message-ID <20170301000632.GJ16328@bombadil.infradead.org>
X-Original-References <20170228211143.GH16328@bombadil.infradead.org> <CA+55aFwUN7U5KJPc+Ybc-oDN2GQ8AFsjbSWhwSrGXy6=06uPtw@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1589948

Show key headers only | View raw


On Tue, Feb 28, 2017 at 03:38:09PM -0800, Linus Torvalds wrote:
> On Tue, Feb 28, 2017 at 1:11 PM, Matthew Wilcox <willy@infradead.org> wrote:
> >
> > The most significant part of the following is the patch to rewrite the
> > IDR & IDA to be clients of the radix tree.
> 
> Could you give a bit more details about what this rewrite brings with
> it, for the merge message and peoples edification?

Certainly!

The radix tree and the IDR use very similar data structures.  Merging the
two codebases lets us share the memory allocation pools, and results in
a net deletion of 500 lines of code.  It also opens up the possibility
of exposing more of the features of the radix tree to users of the IDR
(and I have some interesting patches along those lines waiting for 4.12).
It also shrinks the size of the 'struct idr' from 40 bytes to 24 which
will shrink a fair few data structures that embed an IDR.

 include/linux/idr.h        |  145 +++---
 include/linux/radix-tree.h |   49 +-
 lib/idr.c                  | 1175 +++++++++-----------------------------------
 lib/radix-tree.c           |  375 ++++++++++----
 4 files changed, 627 insertions(+), 1117 deletions(-)

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Please pull IDR rewrite Matthew Wilcox <willy@infradead.org> - 2017-02-28 23:20 +0100
  Re: Please pull IDR rewrite Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-01 01:20 +0100
    Re: Please pull IDR rewrite Matthew Wilcox <willy@infradead.org> - 2017-03-01 03:30 +0100

csiph-web