From: Matthew Wilcox <willy@infradead.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Radix tree range entries
Date: Wed, 1 Feb 2017 14:23:26 -0800 [thread overview]
Message-ID: <20170201222326.GA2267@bombadil.infradead.org> (raw)
In-Reply-To: <CAPcyv4i=h_OBFyUfWhCXk7pyZZFafQjowrmx4LeHm_E9TOrEnw@mail.gmail.com>
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@infradead.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@microsoft.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.
prev parent reply other threads:[~2017-02-01 22:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 16:59 Matthew Wilcox
2017-02-01 18:48 ` Dan Williams
2017-02-01 22:23 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170201222326.GA2267@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=dan.j.williams@intel.com \
--cc=koct9i@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®