[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM2PR21MB0089501B7E0815B731DDBE5DCBE30@DM2PR21MB0089.namprd21.prod.outlook.com>
Date: Wed, 31 Aug 2016 14:57:17 +0000
From: Matthew Wilcox <mawilcox@...rosoft.com>
To: Dan Williams <dan.j.williams@...el.com>,
Ross Zwisler <ross.zwisler@...ux.intel.com>
CC: Konstantin Khlebnikov <koct9i@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH RFC 1/4] lib/radix: add universal radix_tree_fill_range
I'm not at all against the idea of having a tree which supports ranges, except that we already have one; the interval tree. Did you investigate using the interval tree for your use case?
-----Original Message-----
From: Dan Williams [mailto:dan.j.williams@...el.com]
Sent: Tuesday, August 30, 2016 6:21 PM
To: Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc: Matthew Wilcox <mawilcox@...rosoft.com>; Konstantin Khlebnikov <koct9i@...il.com>; linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 1/4] lib/radix: add universal radix_tree_fill_range
On Tue, Aug 30, 2016 at 3:03 PM, Ross Zwisler <ross.zwisler@...ux.intel.com> wrote:
> On Tue, Aug 30, 2016 at 02:56:17PM -0700, Dan Williams wrote:
>> On Mon, Aug 29, 2016 at 11:52 AM, Matthew Wilcox <mawilcox@...rosoft.com> wrote:
>> > It may be protected by the mapping lock in the current code, but I would it expect it to become an RCU lookup + lock eventually. No mapping lock, just like the page cache.
>> >
>> > Even if we can work around it, why do we want to? What's the compelling reason to change from the current radix tree representation of order-N entries to an arbitrary range? There are no in-kernel users right now; is there a performance reason to change? We don't usually change an API in anticipation of future users appearing, particularly when the API makes it harder for the existing users to use it.
>>
>> I'd use a fill range api for the radix backing get_dev_pagemap() and
>> potentially another use in device-dax. It centralizes the common
>> routine of breaking down a range into its constituent power-of-2
>> ranges.
>
> Does your usage not work with the current sibling & canonical entry model?
It does, but I find myself writing code to walk a range and determine the order of each entry as I insert them. I can see other users needing the same sort of insert helper and the aspect I like of Konstantin's proposed change is that the functionality is part of the core implementation rather than left to be duplicated in each user.
Powered by blists - more mailing lists