cvs commit: src/usr.sbin/syslogd syslogd.c

Sergey Babkin babkin at
Fri Mar 31 14:00:33 UTC 2006

>Robert Watson <rwatson at> wrote:
>> The cost to check for free space is the cost of a fstatfs() system 
>> call on the file descriptor of the log file.  This should be handled 
>> without touching the disk, so while it's not a cheap system call 
>> compared to, say, getpid(), as it acquires locks and enters VFS, it's 
>> a lot cheaper than any disk I/O operation. Optional is good, if only 
>> because sometimes people do actually want logging to fill the disk, 
>> and that's been the behavior historically :-).
>Do you know if a kqueue based solution is cheaper?

Probably should not matter. Syslog writes data to disk
synchronously, right? So anything not involving a disk
access is negligible in cost compared to the main action
of writing the log entry.


More information about the cvs-src mailing list