<div dir="ltr">It would be very helpful to receive a feedback regarding this problem, especially:<div>- 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. </div><div>- If yes: Is spice server 0.12.4 still actual in the field?</div><div>- The warning was removed from 0.13 server - does it mean this flow does not present any problem anymore? </div><div>- Finally - do we need this kind of fix in the driver or not?</div><div><br></div><div>Thanks,</div><div>Yuri</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 16, 2017 at 10:43 PM, Yuri Benditovich <span dir="ltr"><<a href="mailto:yuri.benditovich@daynix.com" target="_blank">yuri.benditovich@daynix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is result of investigation of HCK tests "WHQL FPO optimization check for kernel video drivers" on<br>
latest upstream driver.<br>
These tests execute in aloop fast change of display mode and full screen rendering between changes.<br>
When they run on qxl-wddm-dod driver with separate thread that pushes drawables to the host and with<br>
spice server 0.12.4 (rhel-7.2) there are warning printouts of spice server:<br>
"rendering incorrect from now on: get_drawable" and sometimes (3/10) the guest system<br>
stops responding (qxl-wddm-dod driver is in infinite wait for memory allocation).<br>
In case of fast change of display mode it is possible that the driver creates drawable objects<br>
in selected display mode but sends them down in the middle of the change or after change of display mode.<br>
This can cause failure in validation of drawable in spice server.<br>
The same tests do not produce any warnings and system stuck is not reproduced with 0.16 release of the<br>
driver (before implementation of separate thread)<br>
When these tests run on spice server 0.12.8 there are the same warnings but guest stuck was not<br>
reproduced in 10 runs.<br>
In spice server 0.13 these warnings removed from spice server code and guest stuck also was not<br>
reproduced in 10 runs.<br>
It is unclear which commit in spice server 0.12 makes the change, if any.<br>
To avoid inconsistency between drawables and current display mode this set of patches implements<br>
synchronization between display mode change and sending drawables to the host.<br>
Each successful processing of rendering callback creates array of drawables, places it to internal<br>
ring, increments counter of outstanding operations and triggers processing in separate thread.<br>
The thread processes drawables, pushes them to command ring and decrements the counter of outstanding<br>
operations.<br>
When the OS changes display mode, the driver waits until the thread pushes all the queued drawables to the<br>
host, disables queuing of drawables, executes display mode switch and then enables queuing of drawables.<br>
<br>
Yuri Benditovich (3):<br>
  Move code for discarding drawable to separate procedure<br>
  Implement rendering state machine<br>
  Synchronize display mode change and pushing drawables<br>
<br>
 qxldod/QxlDod.cpp |  35 +++++++++++++++----<br>
 qxldod/QxlDod.h   | 102 ++++++++++++++++++++++++++++++<wbr>++++++++++++++++++++++++<br>
 2 files changed, 130 insertions(+), 7 deletions(-)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.7.0.windows.1<br>
<br>
</font></span></blockquote></div><br></div>