Re: [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-11-12 4:35 p.m., Yong Zhao wrote:
Hi Felix,

See one thing inline I am not too sure.

Yong

On 2019-11-12 4:30 p.m., Felix Kuehling wrote:
On 2019-11-12 4:26 p.m., Yong Zhao wrote:
Adapt the change from 1cd106ecfc1f04

The change is:

     drm/amdkfd: Stop using GFP_NOIO explicitly

     This is no longer needed with the memalloc_nofs_save/restore in
     dqm_lock/unlock

Change-Id: I42450b2c149d2b1842be99a8f355c829a0079e7c
Signed-off-by: Yong Zhao <Yong.Zhao@xxxxxxx>

The series is

Reviewed-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>


---
  drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 2 +-
  drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c  | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
index 46ddb33b624a..579c5ffcfa79 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
@@ -393,7 +393,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
      if (WARN_ON(type >= KFD_MQD_TYPE_MAX))
          return NULL;
  -    mqd = kzalloc(sizeof(*mqd), GFP_NOIO);
+    mqd = kzalloc(sizeof(*mqd), GFP_KERNEL);
      if (!mqd)
          return NULL;
  diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
index be27ff01cdb8..22a819c888d8 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
@@ -92,7 +92,7 @@ static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd,
       * instead of sub-allocation function.
       */
      if (kfd->cwsr_enabled && (q->type == KFD_QUEUE_TYPE_COMPUTE)) {
-        mqd_mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_NOIO);
+        mqd_mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_KERNEL);
[yz] This should be kept probably. With the latest code, allocate_mqd() is called outside of the dqm. So now the situation is different from the original one.

Memory allocations outside the DQM lock are not problematic. Only memory allocations under the DQM lock need to be careful to avoid FS reclaim, because that can lead to deadlocks with MMU notifiers. GFP_NOIO is no longer needed for that.

Regards,
  Felix

          if (!mqd_mem_obj)
              return NULL;
          retval = amdgpu_amdkfd_alloc_gtt_mem(kfd->kgd,
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux