From owner-freebsd-arch@FreeBSD.ORG Wed Aug 26 06:35:44 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 E27CB106568E for ; Wed, 26 Aug 2009 06:35:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 646288FC14 for ; Wed, 26 Aug 2009 06:35:44 +0000 (UTC) Received: from c122-106-152-1.carlnfd1.nsw.optusnet.com.au (c122-106-152-1.carlnfd1.nsw.optusnet.com.au [122.106.152.1]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n7Q6ZV3J012764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Aug 2009 16:35:32 +1000 Date: Wed, 26 Aug 2009 16:35:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Marcel Moolenaar In-Reply-To: Message-ID: <20090826161941.B41435@delplex.bde.org> References: <20090824174050.GI2829@hoeg.nl> <2678DC6C-3E91-420A-B43D-02E0F1F853C5@mac.com> <20090825073057.GK2829@hoeg.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Ed Schouten , 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: Wed, 26 Aug 2009 06:35:45 -0000 On Tue, 25 Aug 2009, Marcel Moolenaar wrote: > On Aug 25, 2009, at 12:30 AM, Ed Schouten wrote: > >> * 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: > > The debugger doesn't call printf(). It calls db_printf(). We > already have everything in place to decouple the debugger > from the problem and I would definitely not pull it in. The > debugger is a problem all by itself... Everything is in place to remove 0.1% of the coupling. Debugger i/o still normally goes to the same device as user and kernel i/o, so it is strongly coupled. Bruce