From: Davidlohr Bueso Subject: Re: [PATCH 09/11] lib/interval-tree: convert interval_tree to half closed intervals Date: Tue, 8 Oct 2019 09:59:42 -0700 Message-ID: <20191008165942.vxfwbectycuersdx@linux-p48b> References: <20191003201858.11666-1-dave@stgolabs.net> <20191003201858.11666-10-dave@stgolabs.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "Koenig, Christian" Cc: "akpm@linux-foundation.org" , "walken@google.com" , "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "dri-devel@lists.freedesktop.org" , "linux-rdma@vger.kernel.org" , "Deucher, Alexander" , David Airlie , Daniel Vetter , Doug Ledford , Joerg Roedel , J?r?me Glisse , Davidlohr Bueso List-Id: dri-devel@lists.freedesktop.org On Fri, 04 Oct 2019, Koenig, Christian wrote: >Am 04.10.19 um 08:57 schrieb Christian König: >> Am 03.10.19 um 22:18 schrieb Davidlohr Bueso: >>> The generic tree tree really wants [a, b) intervals, not fully closed. >>> As such convert it to use the new interval_tree_gen.h. Most of the >>> conversions are straightforward, with the exception of perhaps >>> radeon_vm_bo_set_addr(), but semantics have been tried to be left >>> untouched. >> >> NAK, the whole thing won't work. >> >> See we need to handle the full device address space which means we >> have values in the range of 0x0-0xffffffff. >> >> If you make this a closed interval then the end would wrap around to >> 0x0 if long is only 32bit. > >Well I've just now re-read the subject line. From that it sounds like >you are actually trying to fix the interval tree to use a half closed >interval, e.g. something like [a, b[ Correct. > >But your code changes sometimes doesn't seem to reflect that. Hmm the change simply aims at avoiding the end - 1 trick when dealing with interval_tree insertions and lookups; the rest of the series converts other interval tree users in a similar way, albeit some errors which will be updated. What are your concerns about this patch? Thanks, Davidlohr