Felix Kuehling
2021-Apr-07 19:49 UTC
[Nouveau] [PATCH 3/8] drm/amdgpu: Implement mmap as GEM object function
On 2021-04-07 3:34 p.m., Felix Kuehling wrote:> On 2021-04-07 7:25 a.m., Christian K?nig wrote: >>>>>> +??? /* >>>>>> +???? * Don't verify access for KFD BOs. They don't have a GEM >>>>>> +???? * object associated with them. >>>>>> +???? */ >>>>>> +??? if (bo->kfd_bo) >>>>>> +??????? goto out; >>>>> Who does the access verification now? >>>> This is somewhat confusing. >>>> >>>> I took this check as-is, including the comment, from amdgpu's >>>> verify_access function. The verify_access function was called by >>>> ttm_bo_mmap. It returned 0 and ttm_bo_mmap did the mapping. >>> This is probably a left-over from when we mapped BOs using /dev/kfd. We >>> changed this to use /dev/dri/renderD* a long time ago to fix CPU >>> mapping >>> invalidations on memory evictions. I think we can let GEM do the access >>> check. >> >> Ok, good to know. >> >> Thomas can you remove the extra handling in a separate prerequisite >> patch? >> >> If anybody then bisects to this patch we at least know what to do to >> get it working again. > > FWIW, I ran KFDTest test with this shortcut removed on current > amd-staging-drm-next + my HMM patch series, and it didn't seem to > cause any issues.Wait, I celebrated too soon. I was running the wrong kernel. I do see some failures where access is being denied. I need to do more debugging to figure out what's causing that. Regards, ? Felix> > Regards, > ? Felix > > >> >> Regards, >> Christian.
Thomas Zimmermann
2021-Apr-08 04:45 UTC
[Nouveau] [PATCH 3/8] drm/amdgpu: Implement mmap as GEM object function
Hi Am 07.04.21 um 21:49 schrieb Felix Kuehling:> On 2021-04-07 3:34 p.m., Felix Kuehling wrote: >> On 2021-04-07 7:25 a.m., Christian K?nig wrote: >>>>>>> +??? /* >>>>>>> +???? * Don't verify access for KFD BOs. They don't have a GEM >>>>>>> +???? * object associated with them. >>>>>>> +???? */ >>>>>>> +??? if (bo->kfd_bo) >>>>>>> +??????? goto out; >>>>>> Who does the access verification now? >>>>> This is somewhat confusing. >>>>> >>>>> I took this check as-is, including the comment, from amdgpu's >>>>> verify_access function. The verify_access function was called by >>>>> ttm_bo_mmap. It returned 0 and ttm_bo_mmap did the mapping. >>>> This is probably a left-over from when we mapped BOs using /dev/kfd. We >>>> changed this to use /dev/dri/renderD* a long time ago to fix CPU >>>> mapping >>>> invalidations on memory evictions. I think we can let GEM do the access >>>> check. >>> >>> Ok, good to know. >>> >>> Thomas can you remove the extra handling in a separate prerequisite >>> patch? >>> >>> If anybody then bisects to this patch we at least know what to do to >>> get it working again. >> >> FWIW, I ran KFDTest test with this shortcut removed on current >> amd-staging-drm-next + my HMM patch series, and it didn't seem to >> cause any issues. > > Wait, I celebrated too soon. I was running the wrong kernel. I do see > some failures where access is being denied. I need to do more debugging > to figure out what's causing that.OK, thanks for looking into this. I'll wait a bit before sending out the new patchset. Best regards Thomas> > Regards, > ? Felix > > >> >> Regards, >> ? Felix >> >> >>> >>> Regards, >>> Christian.-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N?rnberg, Germany (HRB 36809, AG N?rnberg) Gesch?ftsf?hrer: Felix Imend?rffer -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20210408/d4fe652e/attachment.sig>
Thomas Zimmermann
2021-Apr-14 07:44 UTC
[Nouveau] [PATCH 3/8] drm/amdgpu: Implement mmap as GEM object function
Hi Am 07.04.21 um 21:49 schrieb Felix Kuehling:> On 2021-04-07 3:34 p.m., Felix Kuehling wrote: >> On 2021-04-07 7:25 a.m., Christian K?nig wrote: >>>>>>> +??? /* >>>>>>> +???? * Don't verify access for KFD BOs. Theydon't have a GEM>>>>>>> +???? * object associated with them. >>>>>>> +???? */ >>>>>>> +??? if (bo->kfd_bo) >>>>>>> +??????? goto out; >>>>>> Who does the access verification now? >>>>> This is somewhat confusing. >>>>> >>>>> I took this check as-is, including the comment, from amdgpu's >>>>> verify_access function. The verify_access function was called by >>>>> ttm_bo_mmap. It returned 0 and ttm_bo_mmap did the mapping. >>>> This is probably a left-over from when we mapped BOs using /dev/kfd.We>>>> changed this to use /dev/dri/renderD* a long time ago to fix CPU >>>> mapping >>>> invalidations on memory evictions. I think we can let GEM do the access >>>> check. >>> >>> Ok, good to know. >>> >>> Thomas can you remove the extra handling in a separate prerequisite >>> patch? >>> >>> If anybody then bisects to this patch we at least know what to do to >>> get it working again. >> >> FWIW, I ran KFDTest test with this shortcut removed on current >> amd-staging-drm-next + my HMM patch series, and it didn't seem to >> cause any issues. > > Wait, I celebrated too soon. I was running the wrong kernel. I do see > some failures where access is being denied. I need to do more debugging> to figure out what's causing that.Any news here? I saw the patch at [1], which removes the kfd_bo test. Can I assume that the series addresses the issue? Best regards Thomas [1] https://patchwork.freedesktop.org/patch/427516/?series=88822&rev=1> > Regards, > ? Felix > > >> >> Regards, >> ? Felix >> >> >>> >>> Regards, >>> Christian. > _______________________________________________ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N?rnberg, Germany (HRB 36809, AG N?rnberg) Gesch?ftsf?hrer: Felix Imend?rffer -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20210414/c4809228/attachment.sig>