From owner-freebsd-arch@FreeBSD.ORG Tue Aug 25 18:58:23 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 D4101106568E for ; Tue, 25 Aug 2009 18:58:23 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout025.mac.com (asmtpout025.mac.com [17.148.16.100]) by mx1.freebsd.org (Postfix) with ESMTP id 89C128FC15 for ; Tue, 25 Aug 2009 18:58:23 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp025.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KOY003YR4P9ZC10@asmtp025.mac.com> for arch@freebsd.org; Tue, 25 Aug 2009 11:58:22 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20090825073057.GK2829@hoeg.nl> Date: Tue, 25 Aug 2009 11:58:21 -0700 Message-id: References: <20090824174050.GI2829@hoeg.nl> <2678DC6C-3E91-420A-B43D-02E0F1F853C5@mac.com> <20090825073057.GK2829@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1074) 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 18:58:23 -0000 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... FYI, -- Marcel Moolenaar xcllnt@mac.com