[Spice-devel] [PATCH spice-server] Revert "replay: Replicate wakeups properly"

Frediano Ziglio fziglio at redhat.com
Thu Nov 17 09:08:15 UTC 2016


This reverts commit c6881ad1a00d95d0231dcab7bb30827e86d4d572.

This patch cause the replay utility run at full speed
to slow down a lot and in some cases getting stuck.
I don't understand the reason and when I tested was working
but as we are going to release would be a pity if this test utility
won't work as useful to get feedback and reports.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/red-replay-qxl.c | 2 +-
 server/tests/replay.c   | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
index e72b8fd..2176068 100644
--- a/server/red-replay-qxl.c
+++ b/server/red-replay-qxl.c
@@ -1280,7 +1280,7 @@ static void replay_handle_dev_input(QXLWorker *worker, SpiceReplay *replay,
         // we want to ignore this one - it is sent on client connection, we
         // shall have our own clients
     case RED_WORKER_MESSAGE_WAKEUP:
-        worker->wakeup(worker);
+        // safe to ignore
         break;
     default:
         spice_debug("unhandled %d\n", message);
diff --git a/server/tests/replay.c b/server/tests/replay.c
index 3a0d515..6c6e01e 100644
--- a/server/tests/replay.c
+++ b/server/tests/replay.c
@@ -111,6 +111,7 @@ static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info)
 static gboolean fill_queue_idle(gpointer user_data)
 {
     gboolean keep = FALSE;
+    gboolean wakeup = FALSE;
 
     while ((g_async_queue_length(display_queue) +
             g_async_queue_length(cursor_queue)) < 50) {
@@ -127,6 +128,7 @@ static gboolean fill_queue_idle(gpointer user_data)
             g_usleep(slow);
         }
 
+        wakeup = TRUE;
         if (cmd->cmd.type == QXL_CMD_CURSOR) {
             g_async_queue_push(cursor_queue, cmd);
         } else {
@@ -144,6 +146,8 @@ end:
         }
         pthread_mutex_unlock(&mutex);
     }
+    if (wakeup)
+        spice_qxl_wakeup(&display_sin);
 
     return keep;
 }
-- 
2.7.4



More information about the Spice-devel mailing list