Garbled kernel messages on shutdown

Dan Nelson dnelson at allantgroup.com
Fri Apr 17 14:41:22 UTC 2009


In the last episode (Apr 17), Bruce Cran said:
> On Thu, 16 Apr 2009 14:14:19 -0400 Damian Gerow <dgerow at afflictions.org> 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
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list