From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 21:09:07 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 504BE1065673 for ; Fri, 31 Oct 2008 21:09:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id 355838FC1B for ; Fri, 31 Oct 2008 21:09:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA03.emeryville.ca.mail.comcast.net ([76.96.30.27]) by QMTA09.emeryville.ca.mail.comcast.net with comcast id ZVhj1a0070b6N64A9Yt7Z5; Fri, 31 Oct 2008 20:53:07 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA03.emeryville.ca.mail.comcast.net with comcast id ZYt61a0032P6wsM8PYt6e3; Fri, 31 Oct 2008 20:53:07 +0000 X-Authority-Analysis: v=1.0 c=1 a=PY5qRhY-vE0A:10 a=kLzTVIZtAFQA:10 a=QycZ5dHgAAAA:8 a=_0snWaezkuZAxO3qcZMA:9 a=cTXnQ0Xl32sj3gjX_eYA:7 a=7ov2EYgUsnRZfohZlXz-TEGkpmwA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id D51DDC9419; Fri, 31 Oct 2008 13:53:05 -0700 (PDT) Date: Fri, 31 Oct 2008 13:53:05 -0700 From: Jeremy Chadwick To: Scott Long Message-ID: <20081031205305.GA41320@icarus.home.lan> References: <200810311746.23743.thierry.herbelot@free.fr> <20081031190614.GQ1165@hoeg.nl> <490B5C42.10200@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <490B5C42.10200@samsco.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Thierry Herbelot , Ed Schouten , hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console 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, 31 Oct 2008 21:09:07 -0000 On Fri, Oct 31, 2008 at 01:28:02PM -0600, Scott Long wrote: > Ed Schouten wrote: >> Hello Theirry, >> >> * Thierry Herbelot wrote: >>> with the following patch on /sbin/init, I have two different >>> behaviours depending on the console type (on a i386/32 PC) : >>> - on a video console, I see the expected two messages, >>> - on a serial console, the messages are not displayed (init silently >>> finishes its job and gets to start /etc/rc and everything) >>> >>> I assume that the writev system call is implemented in >>> src/sys/kern/tty_cons.c::cnwrite(), but I could not parse the code to >>> find an explanation. >>> >>> any taker ? >>> >>> TfH >>> >>> PS : this is initially for a RELENG_6 machine, but the code is quite >>> similar under RELENG_7 or Current >> >> Any data written to /dev/console is not multiplexed to all console >> devices, but only the first active device in the list. The reason behind >> this, is because it adds a real lot of complexity to the console code, >> especially related to polling and reading on /dev/console. >> >> This weekend I'm going to commit a replacement implementation of >> /dev/console, which also has this restriction. >> > > The multiplexed console feature is one thing that linux got right. In a > corporate setting, you really need both a serial console and a video > console in order to effectively manage the machines, as you want to be > able to access them both remotely and locally. I know this comment isn't much help, but, I am in full agreement with Scott. FreeBSD's lack of *true* multi (or even dual) console during all stages is a big disappointment to server administrators. The common reaction is: "What do you mean I can only get some messages on serial or some messages on VGA?! That's retarded!" I believe DragonFly has addressed this (offering a true dual console mechanism), and if I remember correctly, Matt Dillon discussed the code changes in great detail, citing a large amount of re-engineering required to accomplish it. > While it might be hard to build multiplexing into the console driver, > do you think it would be possible to layer a multiplexer on top of it, > similar to how the kbdmux driver works? Let's make sure that we don't implement it identically though, as there are many of us who have major problems with kbdmux (reports of LORs, and even more reports of incredibly slow keyboard input when a USB keyboard is used; workarounds are either disabling atkbd/atkbdc entirely, or disabling kbdmux entirely. In my case, I found the latter to be preferable). :-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |