diff mbox series

drm/ttm: set max_active to recommened default

Message ID 20231111131106.1169124-1-rajneesh.bhardwaj@amd.com (mailing list archive)
State New, archived
Headers show
Series drm/ttm: set max_active to recommened default | expand

Commit Message

Rajneesh Bhardwaj Nov. 11, 2023, 1:11 p.m. UTC
To maximize per cpu execution context for the work items, use the
recommended settings i.e. WQ_DFL_ACTIVE(256). There is no apparent
reason to throttle to 16 while process tear down.

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
---
 drivers/gpu/drm/ttm/ttm_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian König Nov. 13, 2023, 9:42 a.m. UTC | #1
Am 11.11.23 um 14:11 schrieb Rajneesh Bhardwaj:
> To maximize per cpu execution context for the work items, use the
> recommended settings i.e. WQ_DFL_ACTIVE(256). There is no apparent
> reason to throttle to 16 while process tear down.

Well big NAK to this. During process tear down it can be that hundreds 
of BOs are released at the same time.

We really don't want to start a kernel thread for each of them just to 
wait for it to be idle.

Regards,
Christian.

>
> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
> ---
>   drivers/gpu/drm/ttm/ttm_device.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
> index bc97e3dd40f0..5443c0f19213 100644
> --- a/drivers/gpu/drm/ttm/ttm_device.c
> +++ b/drivers/gpu/drm/ttm/ttm_device.c
> @@ -205,7 +205,7 @@ int ttm_device_init(struct ttm_device *bdev, struct ttm_device_funcs *funcs,
>   		return ret;
>   
>   	bdev->wq = alloc_workqueue("ttm",
> -				   WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 16);
> +				   WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 0);
>   	if (!bdev->wq) {
>   		ttm_global_release();
>   		return -ENOMEM;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index bc97e3dd40f0..5443c0f19213 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -205,7 +205,7 @@  int ttm_device_init(struct ttm_device *bdev, struct ttm_device_funcs *funcs,
 		return ret;
 
 	bdev->wq = alloc_workqueue("ttm",
-				   WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 16);
+				   WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 0);
 	if (!bdev->wq) {
 		ttm_global_release();
 		return -ENOMEM;