[PATCH 0/2] [radeon] Getting rid of GUP and use HMM for user ptr features.

Christian König christian.koenig at amd.com
Mon Sep 10 07:00:20 UTC 2018


Am 10.09.2018 um 02:57 schrieb jglisse at redhat.com:
> From: Jérôme Glisse <jglisse at redhat.com>
>
> [This depends on some HMM patchset queued upstream see branch [1]]
>
> This is simple change to switch to use HMM for user ptr buffer object
> which conveniently avoid to pin pages. I have more things in the pipe
> to make HMM more usefull for such cases (like sharing more resources
> accross multiple mirror of a same process).
>
> Beside avoiding pining, this is also an attempt to isolate core mm
> from device drivers by having clearly define API and boundary where
> we can set expection of everyone and thus having mm folks to have to
> read and understand driver code and conversly having driver folks
> understand mm maze.
>
> This is also part of what i want to discuss during XDC2018.
>
> Consider this as an RFC to start the discussion.

Looks good on first glance, but please drop support for radeon and use 
amdgpu instead.

The radeon implementation has quite a number of bugs which aren't fixed 
upstream and I actually considered to drop it again.

We can add it back as soon as the HMM implementation works as expected.

Thanks,
Christian.

>
> [1] https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-radeon-v00
>
> Cc: dri-devel at lists.freedesktop.org
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Felix Kuehling <Felix.Kuehling at amd.com>
> Cc: David (ChunMing) Zhou <David1.Zhou at amd.com>
> Cc: Nicolai Hähnle <nicolai.haehnle at amd.com>
> Cc: amd-gfx at lists.freedesktop.org
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
>
> Jérôme Glisse (2):
>    gpu/radeon: use HMM mirror instead of mmu_notifier
>    gpu/radeon: use HMM mirror for userptr buffer object.
>
>   drivers/gpu/drm/radeon/radeon.h     |  14 +-
>   drivers/gpu/drm/radeon/radeon_gem.c |  16 +-
>   drivers/gpu/drm/radeon/radeon_mn.c  | 283 +++++++++++++++++++++-------
>   drivers/gpu/drm/radeon/radeon_ttm.c | 129 ++-----------
>   4 files changed, 259 insertions(+), 183 deletions(-)
>



More information about the amd-gfx mailing list