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


Groups > linux.kernel > #1589948

Re: Please pull IDR rewrite

From Matthew Wilcox <willy@infradead.org>
Newsgroups linux.kernel
Subject Re: Please pull IDR rewrite
Date 2017-03-01 03:30 +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>
Organization linux.* mail to news gateway

Show all headers | 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 | NextPrevious 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