radeon: Use only a single work queue thread for crt
Subsystems (2)
PATCH 1/1 radeon: Use only a single work queue thread for crt
From: Andi Kleen <[email protected]>
I got tired of seeing a lot of radeon-crt kernel threads in ps on my workstation, one for each CPU and one for each display, which never use any CPU time. Surely a single kernel thread is enough to handle the display.
--- drivers/gpu/drm/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_display.c +1 -1
@@ -682,7 +682,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)drm_mode_crtc_set_gamma_size (&radeon_crtc->base,256 ); radeon_crtc->crtc_id = index; - radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" ,WQ_HIGHPRI ,0 ); + radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" ,WQ_HIGHPRI |WQ_UNBOUND ,0 ); rdev->mode_info.crtcs[index] = radeon_crtc;if (rdev->family >=CHIP_BONAIRE ) {
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Dear Andi,
Am 03.08.19 um 02:09 schrieb Andi Kleen:
Quoted 16 lines
From: Andi Kleen <[email protected]>
I got tired of seeing a lot of radeon-crt kernel threads in ps on my workstation, one for each CPU and one for each display, which never use any CPU time. Surely a single kernel thread is enough to handle the display.
Signed-off-by Andi Kleen <[email protected]>--- drivers/gpu/drm/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_display.c +0
-0
drivers/gpu/drm/radeon/radeon_display.c static void radeon_crtc_init(struct drm_device *dev, int index) · line 688
Quoted 8 lines
drivers/gpu/drm/radeon/radeon_display.c +1
-1@@ -682,7 +682,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)drm_mode_crtc_set_gamma_size (&radeon_crtc->base,256 ); radeon_crtc->crtc_id = index; - radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" ,WQ_HIGHPRI ,0 ); + radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" ,WQ_HIGHPRI |WQ_UNBOUND ,0 ); rdev->mode_info.crtcs[index] = radeon_crtc;if (rdev->family >=CHIP_BONAIRE ) {
Kind regards,
Paul
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
NAKAm 03.08.19 um 02:09 schrieb Andi Kleen:
Quoted 5 lines
From: Andi Kleen <[email protected]>
I got tired of seeing a lot of radeon-crt kernel threads in ps on my workstation, one for each CPU and one for each display, which never use any CPU time. Surely a single kernel thread is enough to handle the display.
NAK, radeon blocks inside the kernel thread and those need to run in parallel or otherwise the hardware can hang.
Christian.
Quoted 11 lines
Signed-off-by Andi Kleen <[email protected]>--- drivers/gpu/drm/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_display.c +0
-0
drivers/gpu/drm/radeon/radeon_display.c static void radeon_crtc_init(struct drm_device *dev, int index) · line 688
Quoted 8 lines
drivers/gpu/drm/radeon/radeon_display.c +1
-1@@ -682,7 +682,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)drm_mode_crtc_set_gamma_size (&radeon_crtc->base,256 ); radeon_crtc->crtc_id = index; - radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" ,WQ_HIGHPRI ,0 ); + radeon_crtc->flip_queue =alloc_workqueue ("radeon-crtc" ,WQ_HIGHPRI |WQ_UNBOUND ,0 ); rdev->mode_info.crtcs[index] = radeon_crtc;if (rdev->family >=CHIP_BONAIRE ) {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 11 lines · Christian König
Am 03.08.19 um 02:09 schrieb Andi Kleen:
Quoted 4 lines
From: Andi Kleen <[email protected]>
I got tired of seeing a lot of radeon-crt kernel threads in ps on my workstation, one for each CPU and one for each display, which never use
any CPU time.
Quoted 1 line
Surely a single kernel thread is enough to handle the display.
NAK, radeon blocks inside the kernel thread and those need to run in parallel or otherwise the hardware can hang.
Shouldn't WQ_UNBOUND create a new worker thread whenever all current workers go to sleep/block (and the total number of worker threads is below 'max_active') ?
Jan
Quoted 23 lines
Christian.
Review
Quoted 7 lines
Signed-off-by Andi Kleen <[email protected]>--- drivers/gpu/drm/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/radeon/radeon_display.cdrivers/gpu/drm/radeon/radeon_display.c static void radeon_crtc_init(struct drm_device *dev,
Quoted 4 lines
index
bd52f15e6330..fb0ca688f6fe100644drivers/gpu/drm/radeon/radeon_display.c +0
-0@@ -682,7 +682,7 @@ static void radeon_crtc_init(struct drm_device *dev,int index)
drivers/gpu/drm/radeon/radeon_display.c static void radeon_crtc_init(struct drm_device *dev, int index)
Quoted 4 lines
drivers/gpu/drm/radeon/radeon_display.c +0
-1drm_mode_crtc_set_gamma_size (&radeon_crtc->base,256 ); radeon_crtc->crtc_id = index; - radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc",
WQ_HIGHPRI, 0);drivers/gpu/drm/radeon/radeon_display.c static void radeon_crtc_init(struct drm_device *dev, · line 684
Quoted 1 line
drivers/gpu/drm/radeon/radeon_display.c +1
-0+ radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc",WQ_HIGHPRI|WQ_UNBOUND, 0);
Quoted 9 lines
drivers/gpu/drm/radeon/radeon_display.c static void radeon_crtc_init(struct drm_device *dev, int index) · line 688
Quoted 3 lines
drivers/gpu/drm/radeon/radeon_display.c +0
-0rdev->mode_info.crtcs[index] = radeon_crtc;if (rdev->family >=CHIP_BONAIRE ) {_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 06.09.20 um 18:02 schrieb Jan Vesely:
Quoted 12 lines · On Sun, Sep 6, 2020 at 4:54 AM Christian König…
Am 03.08.19 um 02:09 schrieb Andi Kleen:
> From: Andi Kleen <[email protected] <mailto:[email protected]>> >
> I got tired of seeing a lot of radeon-crt kernel threads in ps on my > workstation, one for each CPU and one for each display, which never use any CPU time.
> Surely a single kernel thread is enough to handle the display.
Quoted 5 lines
NAK, radeon blocks inside the kernel thread and those need to run in parallel or otherwise the hardware can hang.
Shouldn't
WQ_UNBOUNDcreate a new worker thread whenever all current workers go to sleep/block (and the total number of worker threads is below 'max_active') ?
If that is guaranteed then this is indeed sufficient, but the sentence "Surely a single kernel thread is enough to handle the display." sounded like it creates only a single one.
Christian.
Quoted 37 lines
Jan
Christian. > > Signed-off-by: Andi Kleen <[email protected] <mailto:[email protected]>> > --- > drivers/gpu/drm/radeon/radeon_display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c > index bd52f15e6330..fb0ca688f6fe 100644 > --- a/drivers/gpu/drm/radeon/radeon_display.c > +++ b/drivers/gpu/drm/radeon/radeon_display.c > @@ -682,7 +682,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index) > > drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256); > radeon_crtc->crtc_id = index; > - radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc", WQ_HIGHPRI, 0); > + radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc", WQ_HIGHPRI|WQ_UNBOUND, 0); > rdev->mode_info.crtcs[index] = radeon_crtc; > > if (rdev->family >= CHIP_BONAIRE) { _______________________________________________ amd-gfx mailing list [email protected] <mailto:[email protected]> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Dave Airlie
maintainerQuoted 10 lines · Christian König
Am 03.08.19 um 02:09 schrieb Andi Kleen:
Quoted 5 lines
From: Andi Kleen <[email protected]>
I got tired of seeing a lot of radeon-crt kernel threads in ps on my workstation, one for each CPU and one for each display, which never use any CPU time. Surely a single kernel thread is enough to handle the display.
NAK, radeon blocks inside the kernel thread and those need to run in parallel or otherwise the hardware can hang.
Do we need one per cpu? or is one per crtc enough?
Dave.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
maintainerAm 07.09.20 um 01:47 schrieb Dave Airlie:
Quoted 11 lines
Quoted 8 lines · Christian König
Am 03.08.19 um 02:09 schrieb Andi Kleen:
Quoted 5 lines
From: Andi Kleen <[email protected]>
I got tired of seeing a lot of radeon-crt kernel threads in ps on my workstation, one for each CPU and one for each display, which never use any CPU time. Surely a single kernel thread is enough to handle the display.
NAK, radeon blocks inside the kernel thread and those need to run in parallel or otherwise the hardware can hang.
Do we need one per cpu? or is one per crtc enough?
One per CRTC is enough, but the patch description sounds like it creates only a global one.
Christian.
Quoted 2 lines
Dave.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx