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


Groups > linux.kernel > #1543970

RE: [RFC 00/10] implement alternative and much simpler id allocator

From Matthew Wilcox <mawilcox@microsoft.com>
Newsgroups linux.kernel
Subject RE: [RFC 00/10] implement alternative and much simpler id allocator
Date 2016-12-17 14:30 +0100
Message-ID <sPndL-1Js-7@gated-at.bofh.it> (permalink)
References <sLVH4-7S3-13@gated-at.bofh.it> <sMBwB-mk-3@gated-at.bofh.it> <sP7sm-8pG-21@gated-at.bofh.it> <sP7sm-8pG-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Matthew Wilcox
> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> > This sounds good. I think there may still be a lot of users that never
> > allocate more than a handful of IDAs, making a 128 byte allocation still
> > somewhat excessive. One thing I considered was (exactly as it's done for
> > file descriptor tables) to embed a single word in the struct ida and
> > use that initially; I haven't looked closely at newIDA, so I don't know
> > how easy that would be or if its worth the complexity.
> 
> Heh, I was thinking about that too.  The radix tree supports "exceptional
> entries" which have the bottom bit set.  On a 64-bit machine, we could use 62
> of the bits in the radix tree root to store the ID bitmap.  I'm a little wary of the
> potential complexity, but we should try it out.

Test patch here: http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/idr-2016-12-16
It passes the test suite ... which I actually had to adjust because it now succeeds in cases where it hadn't (allocating ID 0 without preallocating), and it will now fail in cases where it hadn't previously (assuming a single preallocation would be enough).  There shouldn't be any examples of that in the kernel proper; it was simply me being lazy when I wrote the test suite.

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


Thread

Re: [RFC 00/10] implement alternative and much simpler id allocator Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-12-16 21:40 +0100
  RE: [RFC 00/10] implement alternative and much simpler id allocator Matthew Wilcox <mawilcox@microsoft.com> - 2016-12-16 22:30 +0100
  RE: [RFC 00/10] implement alternative and much simpler id allocator Matthew Wilcox <mawilcox@microsoft.com> - 2016-12-17 14:30 +0100
    Re: [RFC 00/10] implement alternative and much simpler id allocator Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-12-23 00:50 +0100
      RE: [RFC 00/10] implement alternative and much simpler id allocator Matthew Wilcox <mawilcox@microsoft.com> - 2016-12-23 18:20 +0100
  RE: [RFC 00/10] implement alternative and much simpler id allocator Matthew Wilcox <mawilcox@microsoft.com> - 2016-12-18 03:50 +0100

csiph-web