bin/61664: syslogd speedup

Kris Kennaway kris at obsecurity.org
Thu Jan 22 14:50:21 PST 2004


The following reply was made to PR bin/61664; it has been noted by GNATS.

From: Kris Kennaway <kris at obsecurity.org>
To: Divacky Roman <xdivac02 at stud.fit.vutbr.cz>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: bin/61664: syslogd speedup
Date: Thu, 22 Jan 2004 14:44:14 -0800

 On Wed, Jan 21, 2004 at 10:15:22AM +0100, Divacky Roman wrote:
 
 > >Description:
 > 	When syslogd logs kernel messages it does it quite weird way. It reads
 > 	buffer from /dev/kmsg and then writes it into log file fsync()ing after
 > 	EACH newline.. this is very slow and much less secure than fsync()ing
 > 	it after whole buffer... this patch implements such behviour
 
 Why do you say "much less secure"?
 
 It's possible the fsync() behaviour is deliberate - this may allow
 kernel messages to be written to disk if a panic occurs before the
 entire buffer is filled, which is useful for analysis of the crash.
 
 Kris


More information about the freebsd-bugs mailing list