From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 17 14:41:18 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CF4010657CB for ; Fri, 17 Apr 2009 14:41:18 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id D8B0B8FC14 for ; Fri, 17 Apr 2009 14:41:17 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id n3HEfG7J027800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Apr 2009 09:41:17 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id n3HEfGAd096202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Apr 2009 09:41:16 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id n3HEfEsd096199; Fri, 17 Apr 2009 09:41:14 -0500 (CDT) (envelope-from dan) Date: Fri, 17 Apr 2009 09:41:14 -0500 From: Dan Nelson To: Bruce Cran Message-ID: <20090417144114.GI90152@dan.emsphone.com> References: <49E74917.808@gmail.com> <20090416185354.4fa01e02@ernst.jennejohn.org> <20090416181418.GA1186@plebeian.afflictions.org> <20090417130426.68c41313@gluon.draftnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090417130426.68c41313@gluon.draftnet> X-OS: FreeBSD 7.1-STABLE User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Fri, 17 Apr 2009 09:41:17 -0500 (CDT) X-Scanned-By: MIMEDefang 2.45 Cc: deeptech71@gmail.com, Damian Gerow , freebsd-hackers@freebsd.org Subject: Re: Garbled kernel messages on shutdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 14:41:22 -0000 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 dnelson@allantgroup.com