summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/none/1777786
blob: 871952dc0378abaca86a3b2c9c7ebb77171763df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
peripherals: 0.603
virtual: 0.533
ppc: 0.481
device: 0.477
graphic: 0.474
PID: 0.473
risc-v: 0.459
performance: 0.423
permissions: 0.423
register: 0.416
files: 0.395
VMM: 0.392
hypervisor: 0.382
arm: 0.376
boot: 0.362
TCG: 0.332
semantic: 0.322
user-level: 0.316
KVM: 0.314
mistranslation: 0.311
network: 0.290
architecture: 0.271
assembly: 0.261
i386: 0.242
vnc: 0.233
socket: 0.231
debug: 0.228
kernel: 0.162
x86: 0.135

virtio-gpu-3d.c: change virtio_gpu_fence_poll timer scale

We use virtio-gpu to accelerate Unigine Heaven Benchmark in VM. But we get only 5 FPS when we use AMD RX460 in our host.
We found that guest os spent a lot of time in waiting for the return of glMapBufferRange/glUnmapBuffer commad. We suspected the host GPU was waiting for fence. So we finally change the timer of fence_poll. Afer change timer from
 ms to us, Benchmark result raise up to 22 FPS.

From a4003af5c4fe92d55353f42767d0c45de95bb78f Mon Sep 17 00:00:00 2001
From: chen wei <email address hidden>
Date: Fri, 8 Jun 2018 17:34:45 +0800
Subject: [PATCH] virtio-gpu:improve 3d performance greatly

  opengl function need fence support.when CPU execute opengl function, it need wait fence for synchronize GPU.
so qemu must deal with fence timely as possible. but now the expire time of the timer to deal with fence is 10 ms.
I think it is too long for opengl. So i will change it to 20 ns.
  Before change, when i play Unigine_Heaven 3d game with virglrenderer, the fps is 3.  atfer change the fps up to 23.

Signed-off-by: chen wei   <email address hidden>
Signed-off-by: wang qiang <email address hidden>
---
 hw/display/virtio-gpu-3d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index 3558f38..c0a5d21 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -582,7 +582,7 @@ static void virtio_gpu_fence_poll(void *opaque)
     virgl_renderer_poll();
     virtio_gpu_process_cmdq(g);
     if (!QTAILQ_EMPTY(&g->cmdq) || !QTAILQ_EMPTY(&g->fenceq)) {
-        timer_mod(g->fence_poll, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 10);
+        timer_mod(g->fence_poll, qemu_clock_get_us(QEMU_CLOCK_VIRTUAL) + 20);
     }
 }
 
@@ -629,7 +629,7 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
         return ret;
     }
 
-    g->fence_poll = timer_new_ms(QEMU_CLOCK_VIRTUAL,
+    g->fence_poll = timer_new_us(QEMU_CLOCK_VIRTUAL,
                                  virtio_gpu_fence_poll, g);
 
     if (virtio_gpu_stats_enabled(g->conf)) {
-- 
2.7.4



Please don't use the bug tracker for providing patches, and send it to the mailing list instead, see: https://wiki.qemu.org/Contribute/SubmitAPatch

Did you ever send your patch to the mailing list for discussion?

[Expired for QEMU because there has been no activity for 60 days.]