diff mbox series

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

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

Commit Message

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

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

Comments

Ghimiray, Himal Prasad Oct. 22, 2024, 5:06 a.m. UTC | #1
On 21-10-2024 23:27, Matthew Brost wrote:
> GT ordered work queue can be used to free memory via resets and fence
> signaling thus we should allow this work queue to run during reclaim.
> Mark with GT ordered work queue with WQ_MEM_RECLAIM appropriately.
> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 89e9d9d4db06..d6744be01a68 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -77,7 +77,8 @@ struct xe_gt *xe_gt_alloc(struct xe_tile *tile)
>   		return ERR_PTR(-ENOMEM);
>   
>   	gt->tile = tile;
> -	gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq", 0);
> +	gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq",
> +						 WQ_MEM_RECLAIM);

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

>   
>   	err = drmm_add_action_or_reset(&gt_to_xe(gt)->drm, gt_fini, gt);
>   	if (err)
Nilawar, Badal Oct. 22, 2024, 5:25 a.m. UTC | #2
On 21-10-2024 23:27, Matthew Brost wrote:
> GT ordered work queue can be used to free memory via resets and fence
> signaling thus we should allow this work queue to run during reclaim.
> Mark with GT ordered work queue with WQ_MEM_RECLAIM appropriately.
> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 89e9d9d4db06..d6744be01a68 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -77,7 +77,8 @@ struct xe_gt *xe_gt_alloc(struct xe_tile *tile)
>   		return ERR_PTR(-ENOMEM);
>   
>   	gt->tile = tile;
> -	gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq", 0);
> +	gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq",
> +						 WQ_MEM_RECLAIM);

LGTM,
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>

>  
>   	err = drmm_add_action_or_reset(&gt_to_xe(gt)->drm, gt_fini, gt);
>   	if (err)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 89e9d9d4db06..d6744be01a68 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -77,7 +77,8 @@  struct xe_gt *xe_gt_alloc(struct xe_tile *tile)
 		return ERR_PTR(-ENOMEM);
 
 	gt->tile = tile;
-	gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq", 0);
+	gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq",
+						 WQ_MEM_RECLAIM);
 
 	err = drmm_add_action_or_reset(&gt_to_xe(gt)->drm, gt_fini, gt);
 	if (err)