diff mbox series

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

Message ID 20241021175705.1584521-3-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
GGTT work queue is used to free memory thus we should allow this work
queue to run during reclaim. Mark with GGTT work queue with
WQ_MEM_RECLAIM appropriately.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_ggtt.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:
> GGTT work queue is used to free memory thus we should allow this work
> queue to run during reclaim. Mark with GGTT work queue with
> WQ_MEM_RECLAIM appropriately.
> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_ggtt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 1b3178226987..0124ad120c04 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -246,7 +246,7 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
>   	else
>   		ggtt->pt_ops = &xelp_pt_ops;
>   
> -	ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, 0);
> +	ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, WQ_MEM_RECLAIM);

LGTM
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>   
>   	drm_mm_init(&ggtt->mm, xe_wopcm_size(xe),
>   		    ggtt->size - xe_wopcm_size(xe));
Nilawar, Badal Oct. 22, 2024, 5:34 a.m. UTC | #2
On 21-10-2024 23:27, Matthew Brost wrote:
> GGTT work queue is used to free memory thus we should allow this work
> queue to run during reclaim. Mark with GGTT work queue with
> WQ_MEM_RECLAIM appropriately.
> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_ggtt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 1b3178226987..0124ad120c04 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -246,7 +246,7 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
>   	else
>   		ggtt->pt_ops = &xelp_pt_ops;
>   
> -	ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, 0);
> +	ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, WQ_MEM_RECLAIM);

Looks good to me.
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>

Regards,
Badal

>   
>   	drm_mm_init(&ggtt->mm, xe_wopcm_size(xe),
>   		    ggtt->size - xe_wopcm_size(xe));
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 1b3178226987..0124ad120c04 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -246,7 +246,7 @@  int xe_ggtt_init_early(struct xe_ggtt *ggtt)
 	else
 		ggtt->pt_ops = &xelp_pt_ops;
 
-	ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, 0);
+	ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, WQ_MEM_RECLAIM);
 
 	drm_mm_init(&ggtt->mm, xe_wopcm_size(xe),
 		    ggtt->size - xe_wopcm_size(xe));