[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <232710bd-dc54-9d77-6f0f-24a91a28cbf6@gmail.com>
Date: Fri, 4 Oct 2019 14:39:40 +0200
From: Christian König <ckoenig.leichtzumerken@...il.com>
To: Michel Lespinasse <walken@...gle.com>,
"Koenig, Christian" <Christian.Koenig@....com>
Cc: Davidlohr Bueso <dave@...olabs.net>,
Davidlohr Bueso <dbueso@...e.de>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Jerome Glisse <jglisse@...hat.com>,
"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
Daniel Vetter <daniel@...ll.ch>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH 03/11] drm/amdgpu: convert amdgpu_vm_it to half closed
intervals
Hi Michel,
Am 04.10.19 um 13:36 schrieb Michel Lespinasse:
> On Fri, Oct 04, 2019 at 06:54:54AM +0000, Koenig, Christian wrote:
>> Am 03.10.19 um 22:18 schrieb Davidlohr Bueso:
>>> The amdgpu_vm interval tree really wants [a, b) intervals,
>> NAK, we explicitly do need an [a, b[ interval here.
> Hi Christian,
>
> Just wanted to confirm where you stand on this patch, since I think
> you reconsidered your initial position after first looking at 9/11
> from this series.
>
> I do not know the amdgpu code well, but I think the changes should be
> fine - in struct amdgpu_bo_va_mapping, the "end" field will hold what
> was previously stored in the "last" field, plus one. The expectation
> is that overflows should not be an issue there, as "end" is explicitly
> declared as an uint64, and as the code was previously computing
> "last + 1" in many places.
>
> Does that seem workable to you ?
No, we computed last + 1 in a couple of debug places were it doesn't
hurt us and IIRC we currently cheat a bit because we use pfn instead of
addresses on some other places.
But that is only a leftover from radeon and we need to fix that sooner
or later, cause essentially the physical address space of the device is
really full 64bits, e.g. 0x0-0xffffffffffffffff.
So that only fits into a 64bit int when we use half open/closed
intervals, but would wrap around to zero if we use a closed interval.
I initially thought that the set was changing the interval tree into
always using a closed interval, but that seems to have been a
misunderstanding.
Regards,
Christian.
>
> Thanks,
>
Powered by blists - more mailing lists