[haiku-development] Re: Increase syslog_buffer_size

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 18 Mar 2010 13:26:18 +0100

On 2010-03-18 at 10:18:57 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> > The point is: Is it really worth it to introduce a dynamic
> > syslog_buffer_size-scaling feature? I only see its usefulness for
> > debugging wifi-drivers atm. And once the worst bugs are ironed out,
> > the
> > kernel settings file setting could be deactivated again.
> 
> Honestly, I don't see a point in adding such a feature. Having it that
> big is a temporary measurement, anyway, AFAICT, so why bother?

IMO it makes sense to have an initially larger buffer during the boot 
process and shrink it later. That the wifi drivers are particularly verbose 
is just one issue. Even on my desktop machine (without wifi) I have to set 
a larger buffer size in order to capture the whole boot process. Hence I 
think an initially larger buffer is absolutely justified. It's a waste of 
memory to keep it that large once the syslog daemon is running, though.

As for how to implement the shrinking, I would do that at the beginning of 
the syslog sender thread:
 * wait for syslog daemon port to turn up
 * allocate small buffer
 * switch active buffer with small buffer
 * drain old buffer and free it
 * enter main loop

ATM it is not particularly urgent to implement that, though, since the 
debug syslog feature I've recently introduced is enabled by default (for 
kdebug level >= 1) and thus there's a permanent 1 MB buffer, which is even 
accessible in the boot loader after a reset.

CU, Ingo

Other related posts: