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

Yong Zhao yong.zhao at amd.com
Tue Nov 12 21:35:21 UTC 2019


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 at amd.com>
>
> The series is
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
>
>
>> ---
>>   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.
>>           if (!mqd_mem_obj)
>>               return NULL;
>>           retval = amdgpu_amdkfd_alloc_gtt_mem(kfd->kgd,


More information about the amd-gfx mailing list