From owner-freebsd-arch@FreeBSD.ORG Tue Aug 25 07:31:00 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3583D1065693 for ; Tue, 25 Aug 2009 07:30:59 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id CE0338FC0C for ; Tue, 25 Aug 2009 07:30:58 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DC9001CD58; Tue, 25 Aug 2009 09:30:57 +0200 (CEST) Date: Tue, 25 Aug 2009 09:30:57 +0200 From: Ed Schouten To: Marcel Moolenaar Message-ID: <20090825073057.GK2829@hoeg.nl> References: <20090824174050.GI2829@hoeg.nl> <2678DC6C-3E91-420A-B43D-02E0F1F853C5@mac.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvuyDaC2GNSBQusT" Content-Disposition: inline In-Reply-To: <2678DC6C-3E91-420A-B43D-02E0F1F853C5@mac.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Arch Subject: Re: mtx_lock_do_what_i_mean() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2009 07:31:00 -0000 --GvuyDaC2GNSBQusT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Marcel Moolenaar wrote: > I would approach the problem differently: decouple printf() in the > kernel from anything to which we have a TTY attached. Instead, look > at printf() as a means to write to the message buffer only. Echoing > things that go into the message buffer to the console becomes 1) > optional (yay!), and 2) something you can do by going through the TTY > layer (use a kthread or use a process [syslog]). Yeah. That would be a lot better, but that means you still need to have a lot of code to make it work properly w.r.t. kernel panics: - When you're in the kernel debugger, you still need to have this synchronous programming interface to print data and read keyboard input. - In this context, you need to add extra code to flush the buffer before printing=20 I think we could look at this approach somewhere in the future, but better not now. I'd rather not debug debugging interfaces. ;-) --=20 Ed Schouten WWW: http://80386.nl/ --GvuyDaC2GNSBQusT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqTkzEACgkQ52SDGA2eCwVHSgCeK3STy/if3spb2qUB2tVIiYsJ DhIAn3XXhGkASxQMDNjPlHQYWJSJp242 =Kjko -----END PGP SIGNATURE----- --GvuyDaC2GNSBQusT--