Re: Garbled kernel messages on shutdown

2009-04-17 Thread Dan Nelson
In the last episode (Apr 17), Bruce Cran said:
> On Thu, 16 Apr 2009 14:14:19 -0400 Damian Gerow  
> wrote:
> > Gary Jennejohn wrote:
> > > [snip a whole bunch of stuff]
> > > > This kernel output really looks bad:
> > > > Wai
> > > > tSiynngc i(nmga xd is6k0s ,s evcnoonddess)  rfeomraisnyisntge.m. 
> > > > .pr0ocess `syncer' to stop...0 done
> > > 
> > > I can't speak to the rest, but this is probably because you have SMP
> > > and don't have `options PRINTF_BUFR_SIZE=128' in your kernel config.
> > 
> > Ah, so that's what causes that.
> > 
> > Any particular reason GENERIC has SMP, but doesn't set
> > PRINTF_BUFR_SIZE=128? 
> 
> I think from previous discussions there might be some concern about
> stack usage when it's enabled.

I was going to ask if a mutex or other method could be used in the console
driver somewhere to prevent interleaved writes (the same way two userland
writes to a single fd aren't interleaved), but I looked at the kernel's
kvprintf function, and it really does send a character at a time to its
output callback function.  Maybe a mutex can be added inside kvprintf if
TOCONS is set in pca.flags?  So instead of malloc'ing a buffer, just make
the 2nd kvprintf call wait for the first to finish.

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Garbled kernel messages on shutdown

2009-04-17 Thread Bruce Cran
On Thu, 16 Apr 2009 14:14:19 -0400
Damian Gerow  wrote:

> Gary Jennejohn wrote:
> : [snip a whole bunch of stuff]
> : > This kernel output really looks bad:
> : > Wai
> : > tSiynngc i(nmga xd is6k0s ,s evcnoonddess)  rfeomra
> isnyisntge.m. .pr0o : > cess `syncer' to stop...0 done
> : > 
> : 
> : I can't speak to the rest, but this is probably because you have
> SMP and : don't have `options PRINTF_BUFR_SIZE=128' in your kernel
> config.
> 
> Ah, so that's what causes that.
> 
> Any particular reason GENERIC has SMP, but doesn't set
> PRINTF_BUFR_SIZE=128? 

I think from previous discussions there might be some concern about
stack usage when it's enabled.

-- 
Bruce Cran
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"