diff mbox series

[3/4] drm/xe: Mark G2H work queue with WQ_MEM_RECLAIM

Message ID 20241021175705.1584521-4-matthew.brost@intel.com (mailing list archive)
State New
Headers show
Series Mark work queues with WQ_MEM_RECLAIM | expand

Commit Message

Matthew Brost Oct. 21, 2024, 5:57 p.m. UTC
G2H work queue can be used to free memory thus we should allow this work
queue to run during reclaim. Mark with G2H work queue with
WQ_MEM_RECLAIM appropriately.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ghimiray, Himal Prasad Oct. 22, 2024, 5:06 a.m. UTC | #1
On 21-10-2024 23:27, Matthew Brost wrote:
> G2H work queue can be used to free memory thus we should allow this work
> queue to run during reclaim. Mark with G2H work queue with
> WQ_MEM_RECLAIM appropriately.
> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_guc_ct.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index c260d8840990..1b5d8fb1033a 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -213,7 +213,7 @@ int xe_guc_ct_init(struct xe_guc_ct *ct)
>   
>   	xe_gt_assert(gt, !(guc_ct_size() % PAGE_SIZE));
>   
> -	ct->g2h_wq = alloc_ordered_workqueue("xe-g2h-wq", 0);
> +	ct->g2h_wq = alloc_ordered_workqueue("xe-g2h-wq", WQ_MEM_RECLAIM);

LGTM
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>


>   	if (!ct->g2h_wq)
>   		return -ENOMEM;
>
Nilawar, Badal Oct. 22, 2024, 5:32 a.m. UTC | #2
On 22-10-2024 10:36, Ghimiray, Himal Prasad wrote:
> 
> 
> On 21-10-2024 23:27, Matthew Brost wrote:
>> G2H work queue can be used to free memory thus we should allow this work
>> queue to run during reclaim. Mark with G2H work queue with
>> WQ_MEM_RECLAIM appropriately.
>>
>> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_guc_ct.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/ 
>> xe_guc_ct.c
>> index c260d8840990..1b5d8fb1033a 100644
>> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
>> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
>> @@ -213,7 +213,7 @@ int xe_guc_ct_init(struct xe_guc_ct *ct)
>>       xe_gt_assert(gt, !(guc_ct_size() % PAGE_SIZE));
>> -    ct->g2h_wq = alloc_ordered_workqueue("xe-g2h-wq", 0);
>> +    ct->g2h_wq = alloc_ordered_workqueue("xe-g2h-wq", WQ_MEM_RECLAIM);
> 
> LGTM
> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>

Some how this patch is not reflecting in my mailbox, so replying here.
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>

Regards,
Badal

> 
> 
>>       if (!ct->g2h_wq)
>>           return -ENOMEM;
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index c260d8840990..1b5d8fb1033a 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -213,7 +213,7 @@  int xe_guc_ct_init(struct xe_guc_ct *ct)
 
 	xe_gt_assert(gt, !(guc_ct_size() % PAGE_SIZE));
 
-	ct->g2h_wq = alloc_ordered_workqueue("xe-g2h-wq", 0);
+	ct->g2h_wq = alloc_ordered_workqueue("xe-g2h-wq", WQ_MEM_RECLAIM);
 	if (!ct->g2h_wq)
 		return -ENOMEM;