* [PATCH 1/2] drm/amdkfd: Use QUEUE_IS_ACTIVE macro in mqd v10
@ 2019-11-12 21:26 Yong Zhao
2019-11-12 21:26 ` Yong Zhao
[not found] ` <20191112212641.4643-1-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
0 siblings, 2 replies; 10+ messages in thread
From: Yong Zhao @ 2019-11-12 21:26 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Yong Zhao
This is done for other GFX in commit bb2d2128a54c4. Port it to GFX10.
Change-Id: I9e04872be3af0e90f5f6930226896b1ea545f3d9
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 11 ++---------
1 file changed, 2 insertions(+), 9 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 954dc8ac4ff1..46ddb33b624a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
@@ -213,10 +213,7 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,
update_cu_mask(mm, mqd, q);
set_priority(m, q);
- q->is_active = (q->queue_size > 0 &&
- q->queue_address != 0 &&
- q->queue_percent > 0 &&
- !q->is_evicted);
+ q->is_active = QUEUE_IS_ACTIVE(*q);
}
static int destroy_mqd(struct mqd_manager *mm, void *mqd,
@@ -348,11 +345,7 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd,
m->sdma_queue_id = q->sdma_queue_id;
m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT;
-
- q->is_active = (q->queue_size > 0 &&
- q->queue_address != 0 &&
- q->queue_percent > 0 &&
- !q->is_evicted);
+ q->is_active = QUEUE_IS_ACTIVE(*q);
}
/*
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/2] drm/amdkfd: Use QUEUE_IS_ACTIVE macro in mqd v10
2019-11-12 21:26 [PATCH 1/2] drm/amdkfd: Use QUEUE_IS_ACTIVE macro in mqd v10 Yong Zhao
@ 2019-11-12 21:26 ` Yong Zhao
[not found] ` <20191112212641.4643-1-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
1 sibling, 0 replies; 10+ messages in thread
From: Yong Zhao @ 2019-11-12 21:26 UTC (permalink / raw)
To: amd-gfx; +Cc: Yong Zhao
This is done for other GFX in commit bb2d2128a54c4. Port it to GFX10.
Change-Id: I9e04872be3af0e90f5f6930226896b1ea545f3d9
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 11 ++---------
1 file changed, 2 insertions(+), 9 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 954dc8ac4ff1..46ddb33b624a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
@@ -213,10 +213,7 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,
update_cu_mask(mm, mqd, q);
set_priority(m, q);
- q->is_active = (q->queue_size > 0 &&
- q->queue_address != 0 &&
- q->queue_percent > 0 &&
- !q->is_evicted);
+ q->is_active = QUEUE_IS_ACTIVE(*q);
}
static int destroy_mqd(struct mqd_manager *mm, void *mqd,
@@ -348,11 +345,7 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd,
m->sdma_queue_id = q->sdma_queue_id;
m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT;
-
- q->is_active = (q->queue_size > 0 &&
- q->queue_address != 0 &&
- q->queue_percent > 0 &&
- !q->is_evicted);
+ q->is_active = QUEUE_IS_ACTIVE(*q);
}
/*
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
[not found] ` <20191112212641.4643-1-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
@ 2019-11-12 21:26 ` Yong Zhao
2019-11-12 21:26 ` Yong Zhao
[not found] ` <20191112212641.4643-2-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
0 siblings, 2 replies; 10+ messages in thread
From: Yong Zhao @ 2019-11-12 21:26 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Yong Zhao
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@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);
if (!mqd_mem_obj)
return NULL;
retval = amdgpu_amdkfd_alloc_gtt_mem(kfd->kgd,
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
2019-11-12 21:26 ` [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10 Yong Zhao
@ 2019-11-12 21:26 ` Yong Zhao
[not found] ` <20191112212641.4643-2-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
1 sibling, 0 replies; 10+ messages in thread
From: Yong Zhao @ 2019-11-12 21:26 UTC (permalink / raw)
To: amd-gfx; +Cc: Yong Zhao
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@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);
if (!mqd_mem_obj)
return NULL;
retval = amdgpu_amdkfd_alloc_gtt_mem(kfd->kgd,
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
[not found] ` <20191112212641.4643-2-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
@ 2019-11-12 21:30 ` Felix Kuehling
2019-11-12 21:30 ` Felix Kuehling
[not found] ` <4e5a3723-4b61-e76c-dc96-dafdec51f099-5C7GfCeVMHo@public.gmane.org>
0 siblings, 2 replies; 10+ messages in thread
From: Felix Kuehling @ 2019-11-12 21:30 UTC (permalink / raw)
To: Yong Zhao, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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@amd.com>
The series is
Reviewed-by: Felix Kuehling <Felix.Kuehling@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);
> if (!mqd_mem_obj)
> return NULL;
> retval = amdgpu_amdkfd_alloc_gtt_mem(kfd->kgd,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
2019-11-12 21:30 ` Felix Kuehling
@ 2019-11-12 21:30 ` Felix Kuehling
[not found] ` <4e5a3723-4b61-e76c-dc96-dafdec51f099-5C7GfCeVMHo@public.gmane.org>
1 sibling, 0 replies; 10+ messages in thread
From: Felix Kuehling @ 2019-11-12 21:30 UTC (permalink / raw)
To: Yong Zhao, amd-gfx
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@amd.com>
The series is
Reviewed-by: Felix Kuehling <Felix.Kuehling@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);
> if (!mqd_mem_obj)
> return NULL;
> retval = amdgpu_amdkfd_alloc_gtt_mem(kfd->kgd,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
[not found] ` <4e5a3723-4b61-e76c-dc96-dafdec51f099-5C7GfCeVMHo@public.gmane.org>
@ 2019-11-12 21:35 ` Yong Zhao
2019-11-12 21:35 ` Yong Zhao
[not found] ` <e585e540-5edf-52b1-4fcf-48f1e98a2dd2-5C7GfCeVMHo@public.gmane.org>
0 siblings, 2 replies; 10+ messages in thread
From: Yong Zhao @ 2019-11-12 21:35 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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@amd.com>
>
> The series is
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@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,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
2019-11-12 21:35 ` Yong Zhao
@ 2019-11-12 21:35 ` Yong Zhao
[not found] ` <e585e540-5edf-52b1-4fcf-48f1e98a2dd2-5C7GfCeVMHo@public.gmane.org>
1 sibling, 0 replies; 10+ messages in thread
From: Yong Zhao @ 2019-11-12 21:35 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx
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@amd.com>
>
> The series is
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@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,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
[not found] ` <e585e540-5edf-52b1-4fcf-48f1e98a2dd2-5C7GfCeVMHo@public.gmane.org>
@ 2019-11-12 21:46 ` Felix Kuehling
2019-11-12 21:46 ` Felix Kuehling
0 siblings, 1 reply; 10+ messages in thread
From: Felix Kuehling @ 2019-11-12 21:46 UTC (permalink / raw)
To: Yong Zhao, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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@amd.com>
>>
>> The series is
>>
>> Reviewed-by: Felix Kuehling <Felix.Kuehling@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.
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10
2019-11-12 21:46 ` Felix Kuehling
@ 2019-11-12 21:46 ` Felix Kuehling
0 siblings, 0 replies; 10+ messages in thread
From: Felix Kuehling @ 2019-11-12 21:46 UTC (permalink / raw)
To: Yong Zhao, amd-gfx
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@amd.com>
>>
>> The series is
>>
>> Reviewed-by: Felix Kuehling <Felix.Kuehling@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.
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-11-12 21:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 21:26 [PATCH 1/2] drm/amdkfd: Use QUEUE_IS_ACTIVE macro in mqd v10 Yong Zhao
2019-11-12 21:26 ` Yong Zhao
[not found] ` <20191112212641.4643-1-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
2019-11-12 21:26 ` [PATCH 2/2] drm/amdkfd: Stop using GFP_NOIO explicitly for GFX10 Yong Zhao
2019-11-12 21:26 ` Yong Zhao
[not found] ` <20191112212641.4643-2-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
2019-11-12 21:30 ` Felix Kuehling
2019-11-12 21:30 ` Felix Kuehling
[not found] ` <4e5a3723-4b61-e76c-dc96-dafdec51f099-5C7GfCeVMHo@public.gmane.org>
2019-11-12 21:35 ` Yong Zhao
2019-11-12 21:35 ` Yong Zhao
[not found] ` <e585e540-5edf-52b1-4fcf-48f1e98a2dd2-5C7GfCeVMHo@public.gmane.org>
2019-11-12 21:46 ` Felix Kuehling
2019-11-12 21:46 ` Felix Kuehling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).