qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 00/14] trace: Add static tracing to QEMU


From: Lluís
Subject: Re: [Qemu-devel] [PATCH 00/14] trace: Add static tracing to QEMU
Date: Fri, 13 Aug 2010 21:07:10 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Stefan Hajnoczi writes:

> 1. Writing the trace buffer is currently synchronous - fwrite(3) is
> used by the unlucky caller that fills up the trace buffer.  Ideally
> traces should never block and write-out would be asynchronous.  With a
> regular file I'm not sure how much of an issue this is to performance,
> since the kernel could copy the trace buffer to the page cache and
> write it out sometime later.  I've avoided adding a dedicated thread
> because it will make the code more complex - any thoughts?

I think the only reliable and non-multithreaded way to do it would be to use
aio_write(3). Then, total buffer size and the threshold to trigger an aio_write
should be tuned to match the current disk throughput in order to eliminate
emulation stalls.

But this doesn't sound much easier than a producer-consumer threading scheme.

Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]