[Spice-devel] [RFC qxl-wddm-dod 0/3] Synchronization of display mode change and pushing drawables

Yuri Benditovich yuri.benditovich at daynix.com
Mon Apr 24 17:12:57 UTC 2017


It would be very helpful to receive a feedback regarding this problem,
especially:
- Do you see the reason why this erroneous flow on 'old' spice server
(0.12.4, for example) can lead to significant device memory leak.
- If yes: Is spice server 0.12.4 still actual in the field?
- The warning was removed from 0.13 server - does it mean this flow does
not present any problem anymore?
- Finally - do we need this kind of fix in the driver or not?

Thanks,
Yuri

On Sun, Apr 16, 2017 at 10:43 PM, Yuri Benditovich <
yuri.benditovich at daynix.com> wrote:

> This is result of investigation of HCK tests "WHQL FPO optimization check
> for kernel video drivers" on
> latest upstream driver.
> These tests execute in aloop fast change of display mode and full screen
> rendering between changes.
> When they run on qxl-wddm-dod driver with separate thread that pushes
> drawables to the host and with
> spice server 0.12.4 (rhel-7.2) there are warning printouts of spice server:
> "rendering incorrect from now on: get_drawable" and sometimes (3/10) the
> guest system
> stops responding (qxl-wddm-dod driver is in infinite wait for memory
> allocation).
> In case of fast change of display mode it is possible that the driver
> creates drawable objects
> in selected display mode but sends them down in the middle of the change
> or after change of display mode.
> This can cause failure in validation of drawable in spice server.
> The same tests do not produce any warnings and system stuck is not
> reproduced with 0.16 release of the
> driver (before implementation of separate thread)
> When these tests run on spice server 0.12.8 there are the same warnings
> but guest stuck was not
> reproduced in 10 runs.
> In spice server 0.13 these warnings removed from spice server code and
> guest stuck also was not
> reproduced in 10 runs.
> It is unclear which commit in spice server 0.12 makes the change, if any.
> To avoid inconsistency between drawables and current display mode this set
> of patches implements
> synchronization between display mode change and sending drawables to the
> host.
> Each successful processing of rendering callback creates array of
> drawables, places it to internal
> ring, increments counter of outstanding operations and triggers processing
> in separate thread.
> The thread processes drawables, pushes them to command ring and decrements
> the counter of outstanding
> operations.
> When the OS changes display mode, the driver waits until the thread pushes
> all the queued drawables to the
> host, disables queuing of drawables, executes display mode switch and then
> enables queuing of drawables.
>
> Yuri Benditovich (3):
>   Move code for discarding drawable to separate procedure
>   Implement rendering state machine
>   Synchronize display mode change and pushing drawables
>
>  qxldod/QxlDod.cpp |  35 +++++++++++++++----
>  qxldod/QxlDod.h   | 102 ++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++
>  2 files changed, 130 insertions(+), 7 deletions(-)
>
> --
> 2.7.0.windows.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170424/20166829/attachment.html>


More information about the Spice-devel mailing list