Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2009 09:41:14 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Bruce Cran <bruce@cran.org.uk>
Cc:        deeptech71@gmail.com, Damian Gerow <dgerow@afflictions.org>, freebsd-hackers@freebsd.org
Subject:   Re: Garbled kernel messages on shutdown
Message-ID:  <20090417144114.GI90152@dan.emsphone.com>
In-Reply-To: <20090417130426.68c41313@gluon.draftnet>
References:  <49E74917.808@gmail.com> <20090416185354.4fa01e02@ernst.jennejohn.org> <20090416181418.GA1186@plebeian.afflictions.org> <20090417130426.68c41313@gluon.draftnet>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Apr 17), Bruce Cran said:
> On Thu, 16 Apr 2009 14:14:19 -0400 Damian Gerow <dgerow@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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090417144114.GI90152>