Re: [Intel-gfx] [PATCH v3] drm/i915: Queue page flip work via a low latency, unbound workqueue

2016-09-20 Thread Maarten Lankhorst
Op 20-09-16 om 14:51 schreef Chris Wilson:
> On Tue, Sep 20, 2016 at 02:58:19PM +0300, Imre Deak wrote:
>> While user space has control over the scheduling priority of its page
>> flipping thread, the corresponding work the driver schedules for MMIO
>> flips always runs from the generic system workqueue which has some
>> scheduling overhead due it being CPU bound. This would hinder an
>> application that wants more stringent guarantees over flip timing (to
>> avoid missing a flip at the next frame count).
>>
>> Fix this by scheduling the work from the unbound system workqueue
>> which provides for minimal scheduling latency.
>>
>> v2:
>> - Use an unbound workqueue instead of a high-prio one. (Tvrtko, Chris)
>> v3:
>> - Use the system unbound wq instead of a dedicated one. (Maarten)
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97775
>> Testcase: igt/kms_cursor_legacy
>> CC: Chris Wilson 
>> CC: Maarten Lankhorst 
>> CC: Tvrtko Ursulin 
>> Signed-off-by: Imre Deak 
>> Reviewed-by: Tvrtko Ursulin  (v1)
> We violate the unbound_wq rules no worse than the ordinary system_wq,
> and this brings mmioflip on a par with nonblocking atomic modesets, so
> Reviewed-by: Chris Wilson 
> -Chris
>
Reviewed-by: Maarten Lankhorst 

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v3] drm/i915: Queue page flip work via a low latency, unbound workqueue

2016-09-20 Thread Chris Wilson
On Tue, Sep 20, 2016 at 02:58:19PM +0300, Imre Deak wrote:
> While user space has control over the scheduling priority of its page
> flipping thread, the corresponding work the driver schedules for MMIO
> flips always runs from the generic system workqueue which has some
> scheduling overhead due it being CPU bound. This would hinder an
> application that wants more stringent guarantees over flip timing (to
> avoid missing a flip at the next frame count).
> 
> Fix this by scheduling the work from the unbound system workqueue
> which provides for minimal scheduling latency.
> 
> v2:
> - Use an unbound workqueue instead of a high-prio one. (Tvrtko, Chris)
> v3:
> - Use the system unbound wq instead of a dedicated one. (Maarten)
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97775
> Testcase: igt/kms_cursor_legacy
> CC: Chris Wilson 
> CC: Maarten Lankhorst 
> CC: Tvrtko Ursulin 
> Signed-off-by: Imre Deak 
> Reviewed-by: Tvrtko Ursulin  (v1)

We violate the unbound_wq rules no worse than the ordinary system_wq,
and this brings mmioflip on a par with nonblocking atomic modesets, so
Reviewed-by: Chris Wilson 
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v3] drm/i915: Queue page flip work via a low latency, unbound workqueue

2016-09-20 Thread Imre Deak
While user space has control over the scheduling priority of its page
flipping thread, the corresponding work the driver schedules for MMIO
flips always runs from the generic system workqueue which has some
scheduling overhead due it being CPU bound. This would hinder an
application that wants more stringent guarantees over flip timing (to
avoid missing a flip at the next frame count).

Fix this by scheduling the work from the unbound system workqueue
which provides for minimal scheduling latency.

v2:
- Use an unbound workqueue instead of a high-prio one. (Tvrtko, Chris)
v3:
- Use the system unbound wq instead of a dedicated one. (Maarten)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97775
Testcase: igt/kms_cursor_legacy
CC: Chris Wilson 
CC: Maarten Lankhorst 
CC: Tvrtko Ursulin 
Signed-off-by: Imre Deak 
Reviewed-by: Tvrtko Ursulin  (v1)
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 7bb7874..8da9f3c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12266,7 +12266,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 
work->flip_queued_req = i915_gem_active_get(>last_write,

>base.dev->struct_mutex);
-   schedule_work(>mmio_work);
+   queue_work(system_unbound_wq, >mmio_work);
} else {
request = i915_gem_request_alloc(engine, engine->last_context);
if (IS_ERR(request)) {
-- 
2.5.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx