qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Remove line buffering from log file


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] Remove line buffering from log file
Date: Thu, 29 Sep 2011 06:47:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13

Am 29.09.2011 04:43, schrieb Peter Chubb:

This patch was originally written by Bernard Blackham, and modified by
Peter Chubb.

From 0d755af2f5bef22432da71f2fe0a9dce7d2882cd Mon Sep 17 00:00:00 2001
From: Bernard Blackham <address@hidden>
Date: Fri, 24 Jul 2009 13:38:03 +1000
Subject: Disable line-based log buffering.

There's no real reason for line-based buffering in log file output.
If block buffering with a decent sized buffer is used, it can speed
qemu up for -d all or -d exec significantly.

The only thing you lose is that the last up to 4k of log output may be lost if
qemu crashes.

That's the reason why line buffering is needed today.
I enable log file output to see what happened last before the crash.

It might be possible to use buffered output with a new function
qemu_abort() which replaces the existing calls of abort().
This function could call flush() for the log output before aborting.
In addition, SIGSEGV needs to be catched, and the signal handler
would have to call flush(), too (is that possible in signal handlers?).

Speed is not the primary target when somebody runs qemu -d ...

Kind regards,

Stefan Weil




reply via email to

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