From c4aff2b753e80e49f88e95ea02d1ff1de21a2391 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Wed, 27 Apr 2011 18:44:29 +0300 Subject: xspice/qxl_ring: yield when ring is full --- src/qxl_ring.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qxl_ring.c b/src/qxl_ring.c index 0870ef1..02c4c35 100644 --- a/src/qxl_ring.c +++ b/src/qxl_ring.c @@ -75,7 +75,11 @@ qxl_ring_push (struct qxl_ring *ring, while (header->prod - header->cons == header->num_items) { header->notify_on_cons = header->cons + 1; - +#ifdef XSPICE + /* in gtkperf, circles, this is a major bottleneck. Can't be that good in a vm either + * Adding the yield reduces cpu usage, but doesn't improve throughput. */ + pthread_yield(); +#endif mem_barrier(); } -- cgit v1.2.3