[Top][All Lists]
[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
- [Qemu-devel] [PATCH 06/14] trace: Trace entry point of balloon request handler, (continued)
- [Qemu-devel] [PATCH 10/14] trace: Specify trace file name, Stefan Hajnoczi, 2010/08/12
- [Qemu-devel] [PATCH 05/14] trace: Trace port IO, Stefan Hajnoczi, 2010/08/12
- [Qemu-devel] [PATCH 09/14] trace: Support disabled events in trace-events, Stefan Hajnoczi, 2010/08/12
- [Qemu-devel] [PATCH 02/14] trace: Trace qemu_malloc() and qemu_vmalloc(), Stefan Hajnoczi, 2010/08/12
- Re: [Qemu-devel] [PATCH 00/14] trace: Add static tracing to QEMU, Blue Swirl, 2010/08/12
- Re: [Qemu-devel] [PATCH 00/14] trace: Add static tracing to QEMU, Anthony Liguori, 2010/08/22