Skip to contentSkip to conversation

drm/amdkfd: Only apply TLB flush optimization on ALdebaran

PATCH Superseded Eric Huang 2 participants 2 messages Jun 30, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Eric Huang

author
#0 lore raw

PATCH 1/1 drm/amdkfd: Only apply TLB flush optimization on ALdebaran

It is based on reverting two patches back.
drm/amdkfd: Make TLB flush conditional on mapping drm/amdgpu: Add table_freed parameter to amdgpu_vm_bo_update

---
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +6 -0
index cfaa5f88e630..f859ee7e8c13 100644
@@ -1659,6 +1659,12 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
 		goto sync_memory_failed;
 	}
 
+	/* Only apply no TLB flush on Aldebaran to
+	 * workaround regressions on other Asics
+	 */
+	if (dev->device_info->asic_family != CHIP_ALDEBARAN)
+		table_freed = true;
+
 	/* Flush TLBs after waiting for the page table updates to complete */
 	if (table_freed) {
 		for (i = 0; i < args->n_devices; i++) {
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer
#1 lore raw
Quoted 5 lines · Eric Huang

It is based on reverting two patches back.
drm/amdkfd: Make TLB flush conditional on mapping drm/amdgpu: Add table_freed parameter to amdgpu_vm_bo_update

I'd prefer to put HW-specific workarounds in amdgpu_amdkfd_gpuvm_map_memory_to_gpu.

Regards,
  Felix

Quoted 11 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +0 -0
index cfaa5f88e630..f859ee7e8c13 100644
@@ -1659,6 +1659,12 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
  		goto sync_memory_failed;
  	}

drivers/gpu/drm/amd/amdkfd/kfd_chardev.c static int kfd_ioctl_map_memory_to_gpu(struct file *filep, · line 1670

Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +6 -0
 
+	/* Only apply no TLB flush on Aldebaran to
+	 * workaround regressions on other Asics
+	 */
+	if (dev->device_info->asic_family != CHIP_ALDEBARAN)
+		table_freed = true;
+
  	/* Flush TLBs after waiting for the page table updates to complete */
  	if (table_freed) {
  		for (i = 0; i < args->n_devices; i++) {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx