[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170201222326.GA2267@bombadil.infradead.org>
Date: Wed, 1 Feb 2017 14:23:26 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Konstantin Khlebnikov <koct9i@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Radix tree range entries
On Wed, Feb 01, 2017 at 10:48:08AM -0800, Dan Williams wrote:
> On Tue, Jan 31, 2017 at 8:59 AM, Matthew Wilcox <willy@...radead.org> wrote:
> > We have a confirmed customer in the shape of devm_memremap_pages(), so
> > add support for range entries. The documentation lists caveats on their
> > use, but none of these caveats apply to the one user.
> >
> > Signed-off-by: Matthew Wilcox <mawilcox@...rosoft.com>
>
> Thanks, I'll take a look. This will let me get rid of the order_at()
> hack I have in devm_memremap_pages(). I assume there's no requirement
> that 'start' be aligned to 'len' when calling
> radix_tree_insert_range()?
No alignment restrictions. If you find something that doesn't work,
let me know. From the test suite:
+ for (start = 0; start < 100; start++) {
+ for (len = 1; len < 100; len++) {
+ range_check_1(&tree, start, len);
+ }
+ }
The only restrictions I have is that len must be >0 and start+len
can't wrap past ~0UL. These seem like reasonable restrictions to me.
Maybe we have some users who want to change the index type from unsigned
long to unsigned long long, but I think 32-bit machines are dying out
fast enough that we don't care.
Powered by blists - more mailing lists