From owner-freebsd-arch@FreeBSD.ORG Sun May 28 00:15:39 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AF3416AC1F for ; Sun, 28 May 2006 00:08:04 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mrout1.yahoo.com (mrout1.yahoo.com [216.145.54.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id D11F843D4C for ; Sun, 28 May 2006 00:08:03 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from traveling-laptop-140.corp.yahoo.com.neville-neil.com (proxy7.corp.yahoo.com [216.145.48.98]) by mrout1.yahoo.com (8.13.6/8.13.4/y.out) with ESMTP id k4S05cpC042878; Sat, 27 May 2006 17:05:39 -0700 (PDT) Date: Sun, 28 May 2006 09:05:32 +0900 Message-ID: From: gnn@freebsd.org To: Poul-Henning Kamp In-Reply-To: <16029.1148764704@critter.freebsd.dk> References: <16029.1148764704@critter.freebsd.dk> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-apple-darwin8.5.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 00:15:43 -0000 At Sat, 27 May 2006 23:18:24 +0200, Poul-Henning Kamp wrote: > Comments, ideas, suggestions etc welcome > It makes sense to me. I know that by default all the stuff I would expect on the console will wind up in /var/log/messages but do we want to create a /var/log/console that takes the place of console output in the last case? Later, George From owner-freebsd-arch@FreeBSD.ORG Sun May 28 01:15:35 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D24B516C306 for ; Sun, 28 May 2006 01:05:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 3B17643D46 for ; Sun, 28 May 2006 01:05:46 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 8040 invoked by uid 399); 28 May 2006 01:05:45 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 28 May 2006 01:05:45 -0000 Message-ID: <4478F767.5090403@FreeBSD.org> Date: Sat, 27 May 2006 18:05:43 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.2 (X11/20060507) MIME-Version: 1.0 To: Poul-Henning Kamp References: <16029.1148764704@critter.freebsd.dk> In-Reply-To: <16029.1148764704@critter.freebsd.dk> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 01:15:47 -0000 Poul-Henning Kamp wrote: > Today we expect all relevant logging to happen to logfiles, either > directly (like for instance apache provides for) or via syslogd(8), > which adds the ability to send the logs to a remote machine in > real-time. > > Spitting things out on /dev/console today will more likely than > not, print stuff on a syscons or serial port which nobody looks at. > For that reason, we added a hack to the kernel to make all stuff > that went to /dev/console be sent to syslogd(8). I really like that hack, and enable logging of console.* on all my systems. Your point about syslogd being able to log remotely is also a good one. However the good old fashioned /dev/console is not as anachronistic as you might think. Where I used to work we had a very handy serial console program that "listened" to the serial console output and logged it locally. That way, if a machine crashed, died, or otherwise went unreachable you could log into the serial console, quickly check the most recent console output, then try to fix the problem. Whatever output might have gone to a remote syslog is also useful, but only if the problems were not so fundamental as to have prevented the remote logging in the first place. > I would like to redefine the semantics of "/dev/console" as follows: > > if any console-consumers like xconsole(8) are active > send output to all console-consumers. > else if a controlling terminal is available > send output to controlling terminal (that is /dev/tty) > else > send output to syslogd, as if generated by printf(9). > (but do not actually output to low-level console) At first glance I don't see anything wrong with that logic. My one request is that you add a branch that says, "if legacy behavior is requested by , add it to the mix." hth, Doug -- This .signature sanitized for your protection From owner-freebsd-arch@FreeBSD.ORG Sun May 28 05:20:37 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A60F416BB76 for ; Sun, 28 May 2006 05:12:42 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outboundD.internet-mail-service.net (outboundD.internet-mail-service.net [216.240.47.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66A4743D46 for ; Sun, 28 May 2006 05:12:42 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by outbound.internet-mail-service.net (Postfix) with ESMTP id 9F9F62E07BF; Sat, 27 May 2006 22:12:41 -0700 (PDT) Received: from [192.168.2.5] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id k4S5Cedo043305; Sat, 27 May 2006 22:12:41 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <44793146.6070200@elischer.org> Date: Sat, 27 May 2006 22:12:38 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051120 X-Accept-Language: en, hu MIME-Version: 1.0 To: Poul-Henning Kamp References: <16029.1148764704@critter.freebsd.dk> In-Reply-To: <16029.1148764704@critter.freebsd.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 05:20:38 -0000 Poul-Henning Kamp wrote: > We have four concepts of "console" in FreeBSD: > > 1. Whatever boot0/boot1/boot2/loader uses > Accessed from/via native boot/firmware environment #1 is sort of independent as it stops being used at the moment FreeBSd starts. > > 2. The boot/DDB/printf(9)/panic(9) console ("The low-level console"). > Polled operation since interrupts may not be working. I always want this to be set to be the same device as #1. (with dcons that is already not possible) > > 3. The tty which /sbin/init uses for single-user and /etc/rc > Can be any tty, but convention has been "/dev/console" I would want this to be the same device as #2 > > 4. The /dev/console device in multi-user mode. > Emergency output device for critical messages. > but, emergency messages from where? You've coverred the ones I care about above. My main concern is that when I have a single serial console, All these things are captured on the session logger that is monitoring it. As long as that can happen I'm not too worried about how that happens. From owner-freebsd-arch@FreeBSD.ORG Sun May 28 05:23:06 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCC2416B312; Sun, 28 May 2006 05:15:12 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outboundD.internet-mail-service.net (outboundD.internet-mail-service.net [216.240.47.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F68143D48; Sun, 28 May 2006 05:15:12 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by outbound.internet-mail-service.net (Postfix) with ESMTP id 54A6B2E1873; Sat, 27 May 2006 22:15:12 -0700 (PDT) Received: from [192.168.2.5] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id k4S5FBX2047595; Sat, 27 May 2006 22:15:12 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <447931DF.8050408@elischer.org> Date: Sat, 27 May 2006 22:15:11 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051120 X-Accept-Language: en, hu MIME-Version: 1.0 To: gnn@freebsd.org References: <16029.1148764704@critter.freebsd.dk> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Poul-Henning Kamp Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 05:23:43 -0000 gnn@freebsd.org wrote: > At Sat, 27 May 2006 23:18:24 +0200, > Poul-Henning Kamp wrote: > >>Comments, ideas, suggestions etc welcome >> > > > It makes sense to me. I know that by default all the stuff I would > expect on the console will wind up in /var/log/messages but do we want > to create a /var/log/console that takes the place of console output in > the last case? The trouble with /var/log/messages is that you need to have a functionning disk system and a fully working scheduler etc. for the message to get there. When everything gumms up you need to still get those last whimpers out. > > Later, > George > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" From owner-freebsd-arch@FreeBSD.ORG Sun May 28 06:17:21 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22A4A16B3CE for ; Sun, 28 May 2006 06:13:26 +0000 (UTC) (envelope-from lyndon@orthanc.ca) Received: from orthanc.ca (orthanc.ca [209.89.70.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id B71FB43D46 for ; Sun, 28 May 2006 06:13:25 +0000 (GMT) (envelope-from lyndon@orthanc.ca) Received: from [192.168.15.2] (d154-5-28-131.bchsia.telus.net [154.5.28.131]) (authenticated bits=0) by orthanc.ca (8.13.4/8.13.4) with ESMTP id k4S6DL8T034237; Sun, 28 May 2006 00:13:21 -0600 (MDT) (envelope-from lyndon@orthanc.ca) In-Reply-To: <16029.1148764704@critter.freebsd.dk> References: <16029.1148764704@critter.freebsd.dk> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <67EC575F-CEE3-43DF-A811-18930687DABD@orthanc.ca> Content-Transfer-Encoding: 7bit From: Lyndon Nerenberg Date: Sat, 27 May 2006 23:12:29 -0700 To: Poul-Henning Kamp X-Mailer: Apple Mail (2.750) X-Spam-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_00, RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.1.1 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on orthanc.ca Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 06:17:25 -0000 Just as a neutral data point ... CTIX (Convergent Technologies SVRx from the mid 1980s) ran /dev/ console such that writes went into an in-kernel circular buffer. Reads from /dev/console would drain the contents of that buffer. I didn't like the read behaviour; it would have been more useful if reads didn't empty the buffer. But I did like how easy it was to examine the buffer with crash after a panic. While this isn't directly applicable to BSD, I do like the concept of having that kernel message log. It addresses the issues that others have raised about syslog not having time to commit to disk, or do a network write during kernel death. I would gladly pay for a meg or so of kernel memory to hold such a write buffer (size tunable by sysctl). --lyndon From owner-freebsd-arch@FreeBSD.ORG Sun May 28 06:22:52 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABD7916AC83 for ; Sun, 28 May 2006 06:21:19 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1491943D46 for ; Sun, 28 May 2006 06:21:18 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail01.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k4S6LErW007118 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 28 May 2006 16:21:14 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k4S6LDRx026562; Sun, 28 May 2006 16:21:13 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k4S6LDae026561; Sun, 28 May 2006 16:21:13 +1000 (EST) (envelope-from peter) Date: Sun, 28 May 2006 16:21:13 +1000 From: Peter Jeremy To: Julian Elischer Message-ID: <20060528062113.GN744@turion.vk2pj.dyndns.org> References: <16029.1148764704@critter.freebsd.dk> <44793146.6070200@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44793146.6070200@elischer.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 06:22:59 -0000 On Sat, 2006-May-27 22:12:38 -0700, Julian Elischer wrote: >Poul-Henning Kamp wrote: >>We have four concepts of "console" in FreeBSD: >> >>1. Whatever boot0/boot1/boot2/loader uses >> Accessed from/via native boot/firmware environment > >#1 is sort of independent as it stops being used at the moment FreeBSd >starts. Last time I checked, the copyright notice and some of the early kernel probe output came via the native firmware (at least on some architectures). There's a bit of a Catch-22 because the kernel wants to report output before it's got far enough through the device probe sequence to be able to talk to the hardware making up the console. >>4. The /dev/console device in multi-user mode. >> Emergency output device for critical messages. > >but, emergency messages from where? You've coverred the ones I care about >above. syslog(3) LOG_CONS immediately comes to mind. A quick check of the source shows that ps(1), init(8), rpc.ypxfrd(8), bits of the lp subsystem as well as thread library's initialisation code can also write to /dev/console. I thought dump(8) did but it doesn't appear to any longer. -- Peter Jeremy From owner-freebsd-arch@FreeBSD.ORG Sun May 28 06:35:04 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAD0516C8A6 for ; Sun, 28 May 2006 06:26:28 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BDC043D4C for ; Sun, 28 May 2006 06:26:28 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail12.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k4S6QO1p030566 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 28 May 2006 16:26:26 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k4S6QOOJ026613; Sun, 28 May 2006 16:26:24 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k4S6QOSS026612; Sun, 28 May 2006 16:26:24 +1000 (EST) (envelope-from peter) Date: Sun, 28 May 2006 16:26:23 +1000 From: Peter Jeremy To: Lyndon Nerenberg Message-ID: <20060528062623.GO744@turion.vk2pj.dyndns.org> References: <16029.1148764704@critter.freebsd.dk> <67EC575F-CEE3-43DF-A811-18930687DABD@orthanc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67EC575F-CEE3-43DF-A811-18930687DABD@orthanc.ca> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 06:35:15 -0000 On Sat, 2006-May-27 23:12:29 -0700, Lyndon Nerenberg wrote: >reads didn't empty the buffer. But I did like how easy it was to >examine the buffer with crash after a panic. While this isn't >directly applicable to BSD, I do like the concept of having that >kernel message log. FreeBSD has had a message buffer as long as I can remember. Look in for the API and kern.msgbuf for the content. I can't find any man pages on it. -- Peter Jeremy From owner-freebsd-arch@FreeBSD.ORG Sun May 28 06:57:44 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FAF916BC6D for ; Sun, 28 May 2006 06:46:33 +0000 (UTC) (envelope-from lyndon@orthanc.ca) Received: from orthanc.ca (orthanc.ca [209.89.70.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC3B843D4C for ; Sun, 28 May 2006 06:46:32 +0000 (GMT) (envelope-from lyndon@orthanc.ca) Received: from [192.168.15.2] (d154-5-28-131.bchsia.telus.net [154.5.28.131]) (authenticated bits=0) by orthanc.ca (8.13.4/8.13.4) with ESMTP id k4S6kTti034382; Sun, 28 May 2006 00:46:29 -0600 (MDT) (envelope-from lyndon@orthanc.ca) In-Reply-To: <20060528062623.GO744@turion.vk2pj.dyndns.org> References: <16029.1148764704@critter.freebsd.dk> <67EC575F-CEE3-43DF-A811-18930687DABD@orthanc.ca> <20060528062623.GO744@turion.vk2pj.dyndns.org> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <10D0C601-EF31-40BA-9438-12F2C6D23A72@orthanc.ca> Content-Transfer-Encoding: 7bit From: Lyndon Nerenberg Date: Sat, 27 May 2006 23:45:36 -0700 To: Peter Jeremy X-Mailer: Apple Mail (2.750) X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_00, RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.1.1 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on orthanc.ca Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 06:58:04 -0000 On May 27, 2006, at 11:26 PM, Peter Jeremy wrote: > FreeBSD has had a message buffer as long as I can remember. Look in > for the API and kern.msgbuf for the content. I can't > find any man pages on it. I remember looking at this before a couple of times, but it seemed (I'm a bit fuzzy on the details now -- it's been a while) that the interface wasn't stable (or even documented, as you mentioned). If a documented API was nailed down, that would be great. But I would really like to see the read semantics of /dev/console made as I described, so that multiple readers could watch what was going on (e.g. multiple procs filtering the output and acting accordingly). This makes it much easier to write system monitors (ala swatch, doing the equivalent of 'tail -f') without having to do all kinds of ioctl goo against special /dev files. Being able to adjust the buffer size at runtime (via sysctl) would be a bonus. For example, when we get load storms on our web servers, it would be very helpful to be able to crank up the size of the buffer and turn up logging to try to catch something in the debug stream to explain what's going on. But I wouldn't want to run with a (say) 200MB console buffer in normal production. Dynamic sizing is perhaps just wishful thinking though -- we can certainly live without it. --lyndon From owner-freebsd-arch@FreeBSD.ORG Sun May 28 07:32:20 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B820716CB03 for ; Sun, 28 May 2006 07:16:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C1E943D46 for ; Sun, 28 May 2006 07:16:25 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k4S7FFbQ082802; Sun, 28 May 2006 01:15:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 May 2006 01:15:18 -0600 (MDT) Message-Id: <20060528.011518.1306332021.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <16029.1148764704@critter.freebsd.dk> References: <16029.1148764704@critter.freebsd.dk> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 07:32:48 -0000 In message: <16029.1148764704@critter.freebsd.dk> Poul-Henning Kamp writes: : 4. The /dev/console device in multi-user mode. : Emergency output device for critical messages. Who is generating these messages? Are these for the programs that open /dev/console and spit out 'oh shit' messages? If so, why not make /dev/console a pipe that syslogd listens to? #3 can be solved by using a different name. Hmmm, I guess it would have to be a special kind of pipe where all writers go to the same readers since you'd want the output from #2 to go down this pipe as well. : I would like to redefine the semantics of "/dev/console" as follows: : if any console-consumers like xconsole(8) are active : send output to all console-consumers. : else if a controlling terminal is available : send output to controlling terminal (that is /dev/tty) : else : send output to syslogd, as if generated by printf(9). : (but do not actually output to low-level console) Assuming that this is for #4 /dev/console, that's fine. If you are talking about #2 or #3, then we have problems. The problem that I have with it being just /dev/tty is that the program opened /dev/console to tell the world about it, rather than just using fprintf(stderr,). What does that gain you? Things like syslog already log to stderr as well as /dev/console (when told to do both). This would remove most syslog messages from the logs if they were from programs with controlling ttys (all nondaemons). : If xconsole(8) or similar programs are run, or if syslogd(8) is : told to record all console output, they will get what they expect. : Alternatively, we try to send the message to the relevant user and : if that fails (for daemons) we log it in syslog. I'm not sure that I see the point of sending it to the actual user. Things like syslog already have an option to print to stderr as well as /dev/console. I think that muddies the waters. : This also involves number #3 from the list because today /sbin/init : opens /dev/console for single user mode and /etc/rc. But /sbin/init : can use any tty device so adding the necessary code to make the : low-level console communicate the relevant tty name to /sbin/init, : possibly making it overridable from the loader with a hint, will : take care of that. Indeed, it would. : Comments, ideas, suggestions etc welcome Warner From owner-freebsd-arch@FreeBSD.ORG Sun May 28 07:39:07 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7DE516A935 for ; Sun, 28 May 2006 07:22:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62FFE43D48 for ; Sun, 28 May 2006 07:22:35 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k4S7JTg9082830; Sun, 28 May 2006 01:19:29 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 May 2006 01:19:32 -0600 (MDT) Message-Id: <20060528.011932.1220016372.imp@bsdimp.com> To: peterjeremy@optushome.com.au From: "M. Warner Losh" In-Reply-To: <20060528062113.GN744@turion.vk2pj.dyndns.org> References: <16029.1148764704@critter.freebsd.dk> <44793146.6070200@elischer.org> <20060528062113.GN744@turion.vk2pj.dyndns.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@FreeBSD.org, julian@elischer.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 07:39:22 -0000 In message: <20060528062113.GN744@turion.vk2pj.dyndns.org> Peter Jeremy writes: : On Sat, 2006-May-27 22:12:38 -0700, Julian Elischer wrote: : >Poul-Henning Kamp wrote: : >>We have four concepts of "console" in FreeBSD: : >> : >>1. Whatever boot0/boot1/boot2/loader uses : >> Accessed from/via native boot/firmware environment : > : >#1 is sort of independent as it stops being used at the moment FreeBSd : >starts. : : Last time I checked, the copyright notice and some of the early kernel : probe output came via the native firmware (at least on some : architectures). There's a bit of a Catch-22 because the kernel wants : to report output before it's got far enough through the device probe : sequence to be able to talk to the hardware making up the console. There's special code in the kernel that knows how to talk to the hardware before it has been fully probed. All the early boot messages are printed out using this low-level console. This is #2 in phk's world. Some platforms tie this low-level console to the firmware from #1, but i386, amd64, pc98, ia64 and arm (maybe others too) all go directly to real hardware using the low-level console routines. : >>4. The /dev/console device in multi-user mode. : >> Emergency output device for critical messages. : > : >but, emergency messages from where? You've coverred the ones I care about : >above. : : syslog(3) LOG_CONS immediately comes to mind. A quick check of the : source shows that ps(1), init(8), rpc.ypxfrd(8), bits of the lp : subsystem as well as thread library's initialisation code can also : write to /dev/console. LOG_CONS happens only when it can't sent the message to syslogd(8). LOG_PERROR will also print it on stderr. LOG_CONS would then degenerate into LOG_PERROR. If the data can't already be sent to syslogd(8) by userland, I'm not so sure that the kernel would have better luck. : I thought dump(8) did but it doesn't appear to any longer. dump used to, but now uses wall. Warner From owner-freebsd-arch@FreeBSD.ORG Sun May 28 08:13:40 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A674616A7DD for ; Sun, 28 May 2006 08:00:43 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pfepa.post.tele.dk (pfepa.post.tele.dk [195.41.46.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CC5D43D46 for ; Sun, 28 May 2006 08:00:43 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x50a07cfc.naenxx7.adsl-dhcp.tele.dk [80.160.124.252]) by pfepa.post.tele.dk (Postfix) with ESMTP id A8B2FFAC044 for ; Sun, 28 May 2006 10:00:41 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4S80VHW018083; Sun, 28 May 2006 10:00:32 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "M. Warner Losh" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 28 May 2006 01:19:32 MDT." <20060528.011932.1220016372.imp@bsdimp.com> Date: Sun, 28 May 2006 10:00:31 +0200 Message-ID: <18082.1148803231@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: julian@elischer.org, arch@FreeBSD.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 08:13:53 -0000 In message <20060528.011932.1220016372.imp@bsdimp.com>, "M. Warner Losh" writes : >LOG_CONS happens only when it can't sent the message to syslogd(8). >LOG_PERROR will also print it on stderr. LOG_CONS would then >degenerate into LOG_PERROR. No, it would degenerate into the nonexistent LOG_TTY. stderr and /dev/tty are not the same thing, and it is impossible to declare one better than the other: they have different semantics. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Sun May 28 08:18:51 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38CAD16A6A1 for ; Sun, 28 May 2006 08:05:40 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pfepb.post.tele.dk (pfepb.post.tele.dk [195.41.46.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id C167043D4C for ; Sun, 28 May 2006 08:05:39 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x50a07cfc.naenxx7.adsl-dhcp.tele.dk [80.160.124.252]) by pfepb.post.tele.dk (Postfix) with ESMTP id 58639A5004F for ; Sun, 28 May 2006 10:05:38 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4S85VDX018116; Sun, 28 May 2006 10:05:31 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "M. Warner Losh" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 28 May 2006 01:15:18 MDT." <20060528.011518.1306332021.imp@bsdimp.com> Date: Sun, 28 May 2006 10:05:31 +0200 Message-ID: <18115.1148803531@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 08:19:05 -0000 In message <20060528.011518.1306332021.imp@bsdimp.com>, "M. Warner Losh" writes : >In message: <16029.1148764704@critter.freebsd.dk> > Poul-Henning Kamp writes: >: 4. The /dev/console device in multi-user mode. >: Emergency output device for critical messages. > >Who is generating these messages? Typically programs in distress. >If so, why not make /dev/console a pipe that syslogd listens to? That is the option which I personally favour. It kills xconsole(1) like applications, and I suspect that would result in whinage, but if we are willing to do that, it is by far the simplest and most sensible solution. >: I would like to redefine the semantics of "/dev/console" as follows: >: if any console-consumers like xconsole(8) are active >: send output to all console-consumers. >: else if a controlling terminal is available >: send output to controlling terminal (that is /dev/tty) >: else >: send output to syslogd, as if generated by printf(9). >: (but do not actually output to low-level console) > >Assuming that this is for #4 /dev/console, that's fine. It is only #4. >The problem that I >have with it being just /dev/tty is that the program opened >/dev/console to tell the world about it, rather than just using >fprintf(stderr,). What does that gain you? As I said in the other email, /dev/tty and stderr is not quite the same thing. /dev/tty has more of the semantics that /dev/console used to have (ie: flash it before their eyes). -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Sun May 28 08:19:07 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72F8716A977; Sun, 28 May 2006 08:07:14 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pfepb.post.tele.dk (pfepb.post.tele.dk [195.41.46.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CB7143D53; Sun, 28 May 2006 08:07:14 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x50a07cfc.naenxx7.adsl-dhcp.tele.dk [80.160.124.252]) by pfepb.post.tele.dk (Postfix) with ESMTP id 2D3D3A50037; Sun, 28 May 2006 10:07:13 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4S87BU2018142; Sun, 28 May 2006 10:07:11 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Doug Barton From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 27 May 2006 18:05:43 PDT." <4478F767.5090403@FreeBSD.org> Date: Sun, 28 May 2006 10:07:11 +0200 Message-ID: <18141.1148803631@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@FreeBSD.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 08:19:21 -0000 In message <4478F767.5090403@FreeBSD.org>, Doug Barton writes: >At first glance I don't see anything wrong with that logic. My one request >is that you add a branch that says, "if legacy behavior is requested by >, add it to the mix." Legacy behaviour is exactly what we need to avoid to get the device locking sorted out, so this would be rather poisonous to the entire effort. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Sun May 28 15:27:51 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAFE616BA89 for ; Sun, 28 May 2006 15:27:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2A6543D7E for ; Sun, 28 May 2006 15:27:45 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [192.168.2.4]) ([10.251.60.15]) by a50.ironport.com with ESMTP; 28 May 2006 08:27:45 -0700 Message-ID: <4479C171.4050403@elischer.org> Date: Sun, 28 May 2006 08:27:45 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Poul-Henning Kamp References: <18115.1148803531@critter.freebsd.dk> In-Reply-To: <18115.1148803531@critter.freebsd.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 15:27:54 -0000 Poul-Henning Kamp wrote: >In message <20060528.011518.1306332021.imp@bsdimp.com>, "M. Warner Losh" writes >: > > >>In message: <16029.1148764704@critter.freebsd.dk> >> Poul-Henning Kamp writes: >>: 4. The /dev/console device in multi-user mode. >>: Emergency output device for critical messages. >> >>Who is generating these messages? >> >> > >Typically programs in distress. > > > >>If so, why not make /dev/console a pipe that syslogd listens to? >> >> > >That is the option which I personally favour. > >It kills xconsole(1) like applications, and I suspect that would >result in whinage, but if we are willing to do that, it is by >far the simplest and most sensible solution. > > killing XConsole is not a small matter. people have that when they are specifically looking for that information > > >>: I would like to redefine the semantics of "/dev/console" as follows: >>: if any console-consumers like xconsole(8) are active >>: send output to all console-consumers. >>: else if a controlling terminal is available >>: send output to controlling terminal (that is /dev/tty) >>: else >>: send output to syslogd, as if generated by printf(9). >>: (but do not actually output to low-level console) >> >>Assuming that this is for #4 /dev/console, that's fine. >> >> > >It is only #4. > > > >>The problem that I >>have with it being just /dev/tty is that the program opened >>/dev/console to tell the world about it, rather than just using >>fprintf(stderr,). What does that gain you? >> >> > >As I said in the other email, /dev/tty and stderr is not quite the >same thing. /dev/tty has more of the semantics that /dev/console >used to have (ie: flash it before their eyes). > > > From owner-freebsd-arch@FreeBSD.ORG Sun May 28 16:43:34 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E20316AAB5 for ; Sun, 28 May 2006 16:43:34 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9952943D46 for ; Sun, 28 May 2006 16:43:33 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k4SGhTHx084908 for ; Sun, 28 May 2006 20:43:29 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k4SGhTNx084907 for freebsd-arch@freebsd.org; Sun, 28 May 2006 20:43:29 +0400 (MSD) (envelope-from yar) Date: Sun, 28 May 2006 20:43:28 +0400 From: Yar Tikhiy To: freebsd-arch@freebsd.org Message-ID: <20060528164328.GA84031@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Subject: Can fts_open() be constified further? 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: Sun, 28 May 2006 16:43:35 -0000 Hi folks, Currently, fts_open() is declared as follows: FTS * fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT * const *, const FTSENT * const *)); This means that one cannot pass pointers to constant strings in path_argv[] without getting rather justified warnings from cc. AFAIK, fts(3) functions aren't supposed to modify the path strings. Hence the prototype asks to be changed slightly: fts_open(const char * const *path_argv, int options, ^^^^^ This shouldn't break fts consumers because a pointer to a variable can be converted to a pointer to a constant w/o warnings (but not the other way around.) Can anybody see other possible side effects from such change? -- Yar From owner-freebsd-arch@FreeBSD.ORG Sun May 28 16:46:40 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AA7516A75C for ; Sun, 28 May 2006 16:46:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2EFE43D53 for ; Sun, 28 May 2006 16:46:39 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k4SGk0lK093397; Sun, 28 May 2006 10:46:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 May 2006 10:46:04 -0600 (MDT) Message-Id: <20060528.104604.1784648387.imp@bsdimp.com> To: julian@elischer.org From: "M. Warner Losh" In-Reply-To: <4479C171.4050403@elischer.org> References: <18115.1148803531@critter.freebsd.dk> <4479C171.4050403@elischer.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, phk@phk.freebsd.dk Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 16:46:46 -0000 In message: <4479C171.4050403@elischer.org> Julian Elischer writes: : killing XConsole is not a small matter. people have that when they are : specifically looking for that information Recall that this is only for programs that open /dev/console directly and write to it, like syslogd. Warner From owner-freebsd-arch@FreeBSD.ORG Sun May 28 17:04:06 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6686516B44E for ; Sun, 28 May 2006 17:04:06 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2932B43D4C for ; Sun, 28 May 2006 17:04:05 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [192.168.2.4]) ([10.251.60.15]) by a50.ironport.com with ESMTP; 28 May 2006 10:04:05 -0700 Message-ID: <4479D804.1060106@elischer.org> Date: Sun, 28 May 2006 10:04:04 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <18115.1148803531@critter.freebsd.dk> <4479C171.4050403@elischer.org> <20060528.104604.1784648387.imp@bsdimp.com> In-Reply-To: <20060528.104604.1784648387.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, phk@phk.freebsd.dk Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 17:04:23 -0000 M. Warner Losh wrote: >In message: <4479C171.4050403@elischer.org> > Julian Elischer writes: >: killing XConsole is not a small matter. people have that when they are >: specifically looking for that information > >Recall that this is only for programs that open /dev/console directly >and write to it, like syslogd. > > > the description makes it sound like xconsole would not be able to show kernel error messages. >Warner > > From owner-freebsd-arch@FreeBSD.ORG Sun May 28 17:19:29 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D4AD16C3A1 for ; Sun, 28 May 2006 17:19:29 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pasmtp.tele.dk (pasmtp.tele.dk [193.162.159.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87B7E43D64 for ; Sun, 28 May 2006 17:19:28 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x535c0e2a.sgnxx1.adsl-dhcp.tele.dk [83.92.14.42]) by pasmtp.tele.dk (Postfix) with ESMTP id 54EC21EC334 for ; Sun, 28 May 2006 19:19:24 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4SHJHgm001472; Sun, 28 May 2006 19:19:17 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Julian Elischer From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 28 May 2006 10:04:04 PDT." <4479D804.1060106@elischer.org> Date: Sun, 28 May 2006 19:19:17 +0200 Message-ID: <1471.1148836757@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 17:19:50 -0000 In message <4479D804.1060106@elischer.org>, Julian Elischer writes: >M. Warner Losh wrote: > >>In message: <4479C171.4050403@elischer.org> >> Julian Elischer writes: >>: killing XConsole is not a small matter. people have that when they are >>: specifically looking for that information >> >>Recall that this is only for programs that open /dev/console directly >>and write to it, like syslogd. > >the description makes it sound like xconsole would not be able to show >kernel error messages. xconsole is a hack anyway. the correct way would be to have way to connect to syslogd and subscribe to messages. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Sun May 28 17:37:52 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DCB316A555 for ; Sun, 28 May 2006 17:37:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id A487443D48 for ; Sun, 28 May 2006 17:37:51 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k4SHbKc8094030; Sun, 28 May 2006 11:37:20 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 May 2006 11:37:24 -0600 (MDT) Message-Id: <20060528.113724.1655407378.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <1471.1148836757@critter.freebsd.dk> References: <4479D804.1060106@elischer.org> <1471.1148836757@critter.freebsd.dk> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, julian@elischer.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 17:37:52 -0000 In message: <1471.1148836757@critter.freebsd.dk> "Poul-Henning Kamp" writes: : In message <4479D804.1060106@elischer.org>, Julian Elischer writes: : >M. Warner Losh wrote: : > : >>In message: <4479C171.4050403@elischer.org> : >> Julian Elischer writes: : >>: killing XConsole is not a small matter. people have that when they are : >>: specifically looking for that information : >> : >>Recall that this is only for programs that open /dev/console directly : >>and write to it, like syslogd. : > : >the description makes it sound like xconsole would not be able to show : >kernel error messages. : : xconsole is a hack anyway. : : the correct way would be to have way to connect to syslogd and subscribe : to messages. There's no way to 'connect to syslogd and subscribe to messages' in the current syslogd. In today's world order, the best that it can do is to open a pty, and then hack syslogd.conf to send messages to that pty and then log the results. This takes quiet a bit of code, and there's a number of tricky edge cases to make it work. At least there were back when I created a combination xconsole + syslog display program. And I still didn't have the ability to filter on message time except in real time (since syslogd doesn't print message type). I also had to have two PTYs open (one for syslog messages and one for console messages). If you are going to go down this route, lots of work needs to happen to both xconsole and syslogd (and all other xconsole-like programs). Not saying that it can't be done, but there's a big hunk of work there before people would be happy. Why we can't do as I suggested earlier and just make /dev/console a pseudo-pipe that is fed from #2 and #4 and that has a well documented 'other end interface' for things like xconsole. that would simulate the historical usage of /dev/console well. Warner From owner-freebsd-arch@FreeBSD.ORG Sun May 28 17:51:23 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAC1F16BE52 for ; Sun, 28 May 2006 17:51:23 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pasmtp.tele.dk (pasmtp.tele.dk [193.162.159.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46DE943D4C for ; Sun, 28 May 2006 17:51:22 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x535c0e2a.sgnxx1.adsl-dhcp.tele.dk [83.92.14.42]) by pasmtp.tele.dk (Postfix) with ESMTP id EAD061EC318 for ; Sun, 28 May 2006 19:51:21 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4SHp9Jf001603; Sun, 28 May 2006 19:51:09 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "M. Warner Losh" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 28 May 2006 11:37:24 MDT." <20060528.113724.1655407378.imp@bsdimp.com> Date: Sun, 28 May 2006 19:51:09 +0200 Message-ID: <1602.1148838669@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org, julian@elischer.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 17:51:26 -0000 In message <20060528.113724.1655407378.imp@bsdimp.com>, "M. Warner Losh" writes : >Why we can't do as I suggested earlier and just make /dev/console a >pseudo-pipe that is fed from #2 and #4 and that has a well documented >'other end interface' for things like xconsole. that would simulate >the historical usage of /dev/console well. We probably _can_ do that, but it would be easier to teach syslogd about accept connections from processes interested in subscribing to events. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Sun May 28 18:08:15 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3ECD916A442 for ; Sun, 28 May 2006 18:08:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id B1A6B43D48 for ; Sun, 28 May 2006 18:08:14 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 28426 invoked by uid 399); 28 May 2006 18:08:14 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 28 May 2006 18:08:14 -0000 Message-ID: <4479E70B.6050506@FreeBSD.org> Date: Sun, 28 May 2006 11:08:11 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.2 (X11/20060507) MIME-Version: 1.0 To: Poul-Henning Kamp References: <18141.1148803631@critter.freebsd.dk> In-Reply-To: <18141.1148803631@critter.freebsd.dk> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arch@FreeBSD.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Sun, 28 May 2006 18:08:17 -0000 Poul-Henning Kamp wrote: > In message <4478F767.5090403@FreeBSD.org>, Doug Barton writes: > >> At first glance I don't see anything wrong with that logic. My one request >> is that you add a branch that says, "if legacy behavior is requested by >> , add it to the mix." > > Legacy behaviour is exactly what we need to avoid to get the > device locking sorted out, so this would be rather poisonous > to the entire effort. Just to be clear, I'm not saying that the mechanism for making it happen has to be the same, just that having the same end result would be very useful. Doug -- This .signature sanitized for your protection From owner-freebsd-arch@FreeBSD.ORG Sun May 28 23:04:49 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFC3C16AF5B; Sun, 28 May 2006 23:01:01 +0000 (UTC) (envelope-from skip.ford@verizon.net) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A5FC43D46; Sun, 28 May 2006 23:01:01 +0000 (GMT) (envelope-from skip.ford@verizon.net) Received: from pool-70-17-33-65.pskn.east.verizon.net ([70.17.33.65]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IZZ00MIDZXOYM86@vms046.mailsrvcs.net>; Sun, 28 May 2006 18:01:01 -0500 (CDT) Date: Sun, 28 May 2006 19:00:59 -0400 From: Skip Ford To: Robert Watson Mail-followup-to: Robert Watson , freebsd-atm@FreeBSD.org, freebsd-arch@FreeBSD.org Message-id: <20060528230058.GA836@lucy.pool-70-17-33-65.pskn.east.verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.4.2.1i Cc: freebsd-atm@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Locking netatm 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: Sun, 28 May 2006 23:04:55 -0000 In my attempt to make netatm MPSAFE, I've run into just a couple situations I'm not sure how to handle. I've more-or-less replaced the splnet() calls with a single subsystem lock. Nearly all of them were protecting structures within the netatm subsystem. But I'm not sure how to handle the existing splimp() calls. There seem to be a few different reasons why splimp() calls were made. First, for timing. Three netatm functions use splimp() to protect access to the list of atm_timeq structures (struct atm_time *). Here is the usage from one of those three functions. I've removed much of the code to simplify what it does: s = splimp(); FOREACH(atm_timeq); ... ... possibly modify structures within atm_timeq ... ... modify the struct atm_time * passed to this function ... (void) splx(s); So my question is, were network interrupts disabled when mucking with the atm_timeq list because a generated interrupt can modify structures within the list? This use is probably very netatm-specific. I'm still studying the timeout code to understand what it's doing. A second situation where network interrupts were disabled was for netatm memory allocation for devices: in atm_dev_alloc() s = splimp(); FOREACH(atm_mem_head) ... malloc (...) (void) splx(s); and in atm_dev_free() s = splimp(); FOREACH(atm_mem_head) ... free (...); (void) splx(s); I'm not sure how these should be protected. Presumably, we don't want to receive interrupts until the netatm memory for the device is allocated. Would a global subsystem lock protect these calls? I can protect atm_mem_head, so maybe that'd be enough? Another use is to protect calls to other subsystems. For example: within atm_nif_attach(struct atm_nif *nip) ifp = nip->nif_ifp; s = splimp(); if_attach(ifp); bpfattach(ifp, DLT_ATM_CLIP, T_ATM_LLC_MAX_LEN); (void) splx(s); } and within atm_nif_detach(struct atm_nif *nip) ifp = nip->nif_ifp; s = splimp(); bpfdetach(ifp); if_detach(ifp); if_free(ifp); (void) splx(s); Holding a new netatm subsystem lock won't protect those calls so I'm not sure how to handle those. Other non-netatm code in the tree seems to not do any locking at all around those calls. These are really the only uses I've yet to convert so if someone can provide some pointers, I'd appreciate it. I'm pretty new to FreeBSD locking, either the old way or the new way. I'm still studying the code, including other network stacks and the netatm stack itself, but a pointer or two would be appreciated. I feel like it's mostly converted, though I've done no testing at all yet. Once I finish removing splimp(), I can test with the single subsystem lock, then move on to finer-grained locking where necessary. -- Skip From owner-freebsd-arch@FreeBSD.ORG Mon May 29 00:43:57 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53B9016A878 for ; Mon, 29 May 2006 00:43:57 +0000 (UTC) (envelope-from anonymous@crowe-shop.com) Received: from crowe-shop.com (crowe-shop.com [199.237.206.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id D99D643D5F for ; Mon, 29 May 2006 00:43:54 +0000 (GMT) (envelope-from anonymous@crowe-shop.com) Received: (qmail 63570 invoked by uid 20114); 29 May 2006 00:39:58 -0000 Date: 29 May 2006 00:39:58 -0000 Message-ID: <20060529003958.63569.qmail@crowe-shop.com> To: freebsd-arch@freebsd.org From: CajaMadrid.es Content-Transfer-Encoding: 7bit X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Nuevo medio de seguridad X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "CajaMadrid.es" List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 00:43:57 -0000 Inicio | Accesibilidad | Boletines | Atención al cliente | Ayuda | Oficinas y cajeros | Mapa Web | Portales Caja Madrid _________________________________________________________________ [SB_08_IMG.GIF] [SB_08_CLAIM.GIF] Oficina Internet Debido a los tentativas recientes de fraude Caja Madrid ha introducido un nuevo medio de seguridad. Debes conectar en tu cuenta de Caja Madrid usando tu ordenador personal o del lugar y ordenador que has utilizado en el pasado. Tu dirección IP será colocada a nuestra base de datos. Cualquier tentativa de conexión de un diverso dirección IP necesita confirmación sobre el el teléfono. Puedes corregir su detalles personales y su dirección IP principal usando el panel de control en cualquier momento. Por favor dar un plazo de 5 minutos a partir del momento que has llenado el formulario nuestro y darnos su dirección IP principal pulsa [1]aquí o usando la dirección. [2]https://oi.cajamadrid.es/CajaMadrid/oi/pt_oi/Login/login_IP_conf=tr ue Información Legal | Seguridad | Privacidad | Tarifas | Tablón de Anuncios _________________________________________________________________ References 1. http://www.markrolph.com/ 2. http://www.markrolph.com/ From owner-freebsd-arch@FreeBSD.ORG Mon May 29 04:54:31 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D5DE16A508; Mon, 29 May 2006 04:54:31 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mrout2.yahoo.com (mrout2.yahoo.com [216.145.54.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5851043D4C; Mon, 29 May 2006 04:54:31 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from traveling-laptop-140.corp.yahoo.com.neville-neil.com (proxy7.corp.yahoo.com [216.145.48.98]) by mrout2.yahoo.com (8.13.6/8.13.4/y.out) with ESMTP id k4T4quVX018117; Sun, 28 May 2006 21:52:57 -0700 (PDT) Date: Mon, 29 May 2006 13:52:48 +0900 Message-ID: From: gnn@FreeBSD.org To: Robert Watson , freebsd-atm@FreeBSD.org, freebsd-arch@FreeBSD.org In-Reply-To: <20060528230058.GA836@lucy.pool-70-17-33-65.pskn.east.verizon.net> References: <20060528230058.GA836@lucy.pool-70-17-33-65.pskn.east.verizon.net> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-apple-darwin8.5.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Subject: Re: Locking netatm 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: Mon, 29 May 2006 04:54:31 -0000 At Sun, 28 May 2006 19:00:59 -0400, Skip Ford wrote: > > In my attempt to make netatm MPSAFE, I've run into just a couple > situations I'm not sure how to handle. I've more-or-less replaced > the splnet() calls with a single subsystem lock. Nearly all of them > were protecting structures within the netatm subsystem. But I'm not > sure how to handle the existing splimp() calls. > Hi Skip, I'm not familiar with netatm but I am somewhat familiar with our locking code, and I hope that others will also join in. > There seem to be a few different reasons why splimp() calls were > made. First, for timing. Three netatm functions use splimp() to > protect access to the list of atm_timeq structures (struct atm_time > *). Here is the usage from one of those three functions. I've > removed much of the code to simplify what it does: > > s = splimp(); > > FOREACH(atm_timeq); > ... > > ... possibly modify structures within atm_timeq ... > ... modify the struct atm_time * passed to this function ... > > (void) splx(s); > > So my question is, were network interrupts disabled when mucking > with the atm_timeq list because a generated interrupt can modify > structures within the list? This use is probably very > netatm-specific. I'm still studying the timeout code to understand > what it's doing. > The spl() calls haven't disabled real interrupts, as far as I know, for quite a while. They acted as general code locks to prevent simultaneous access to data structures while an update was in progress. In terms of the timeq, the locks were acting as a mutex now would to protect the list during an update. > A second situation where network interrupts were disabled was for > netatm memory allocation for devices: > > in atm_dev_alloc() > > s = splimp(); > > FOREACH(atm_mem_head) > ... > malloc (...) > > (void) splx(s); > > and in atm_dev_free() > > s = splimp(); > > FOREACH(atm_mem_head) > ... > free (...); > > (void) splx(s); > > I'm not sure how these should be protected. Presumably, we don't > want to receive interrupts until the netatm memory for the device is > allocated. Would a global subsystem lock protect these calls? I > can protect atm_mem_head, so maybe that'd be enough? I would assume, again, that these are prtections of the list, and not the memory allocation routines. A mutex protecting the list, like the one that protects, say, the UDP protocol list is probably what you want. > Another use is to protect calls to other subsystems. For > example: > > within atm_nif_attach(struct atm_nif *nip) > > ifp = nip->nif_ifp; > > s = splimp(); > > if_attach(ifp); > bpfattach(ifp, DLT_ATM_CLIP, T_ATM_LLC_MAX_LEN); > > (void) splx(s); > } > > and within atm_nif_detach(struct atm_nif *nip) > > ifp = nip->nif_ifp; > > s = splimp(); > > bpfdetach(ifp); > if_detach(ifp); > if_free(ifp); > > (void) splx(s); > > Holding a new netatm subsystem lock won't protect those calls so I'm > not sure how to handle those. Other non-netatm code in the tree > seems to not do any locking at all around those calls. I believe these are now unnecessary since the ifnet lists now have their own locks. > These are really the only uses I've yet to convert so if someone can > provide some pointers, I'd appreciate it. I'm pretty new to FreeBSD > locking, either the old way or the new way. I'm still studying the > code, including other network stacks and the netatm stack itself, > but a pointer or two would be appreciated. I feel like it's mostly > converted, though I've done no testing at all yet. Once I finish > removing splimp(), I can test with the single subsystem lock, then > move on to finer-grained locking where necessary. I would look at the UDP and TCP protocol list locking as being somewhat similar to what you have here. UDP is the easiest to understand as it's mostly in one file, netinet/udp_usrreq.c. Later, George From owner-freebsd-arch@FreeBSD.ORG Mon May 29 05:18:13 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2614716A50F; Mon, 29 May 2006 05:18:13 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D961F43D46; Mon, 29 May 2006 05:18:12 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id A99D61A3C1F; Sun, 28 May 2006 22:18:12 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 11B4D5153E; Mon, 29 May 2006 01:18:12 -0400 (EDT) Date: Mon, 29 May 2006 01:18:11 -0400 From: Kris Kennaway To: gnn@FreeBSD.org Message-ID: <20060529051811.GA60877@xor.obsecurity.org> References: <20060528230058.GA836@lucy.pool-70-17-33-65.pskn.east.verizon.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-atm@FreeBSD.org, Robert Watson , freebsd-arch@FreeBSD.org Subject: Re: Locking netatm 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: Mon, 29 May 2006 05:18:13 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 29, 2006 at 01:52:48PM +0900, gnn@FreeBSD.org wrote: > > So my question is, were network interrupts disabled when mucking > > with the atm_timeq list because a generated interrupt can modify > > structures within the list? This use is probably very > > netatm-specific. I'm still studying the timeout code to understand > > what it's doing. > >=20 >=20 > The spl() calls haven't disabled real interrupts, as far as I know, > for quite a while. They acted as general code locks to prevent > simultaneous access to data structures while an update was in > progress. In terms of the timeq, the locks were acting as a mutex now > would to protect the list during an update. Actually the spl calls have all been NOPs since the early 5.0 days, and they were just left in an mnemonic placeholders showing which code/data sections need to be protected. Kris --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEeoQTWry0BWjoQKURAk94AJ41qSIQle1p3QJpxfY+eZ6nrN21jgCeLlvP auY7U0HK7miLNQHDLpfOgMc= =WY96 -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE-- From owner-freebsd-arch@FreeBSD.ORG Mon May 29 09:23:46 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5566C16A59A for ; Mon, 29 May 2006 09:23:46 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E16D43D48 for ; Mon, 29 May 2006 09:23:42 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k4T9NbSM099669 for ; Mon, 29 May 2006 13:23:38 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k4T9Na1m099666 for freebsd-arch@freebsd.org; Mon, 29 May 2006 13:23:36 +0400 (MSD) (envelope-from yar) Date: Mon, 29 May 2006 13:23:36 +0400 From: Yar Tikhiy To: freebsd-arch@freebsd.org Message-ID: <20060529092335.GD98288@comp.chem.msu.su> References: <20060528164328.GA84031@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060528164328.GA84031@comp.chem.msu.su> User-Agent: Mutt/1.5.9i Subject: Re: Can fts_open() be constified further? 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: Mon, 29 May 2006 09:23:55 -0000 On Sun, May 28, 2006 at 08:43:28PM +0400, Yar Tikhiy wrote: > Hi folks, > > Currently, fts_open() is declared as follows: > > FTS * > fts_open(char * const *path_argv, int options, > int (*compar)(const FTSENT * const *, const FTSENT * const *)); > > This means that one cannot pass pointers to constant strings in > path_argv[] without getting rather justified warnings from cc. > AFAIK, fts(3) functions aren't supposed to modify the path strings. > Hence the prototype asks to be changed slightly: > > fts_open(const char * const *path_argv, int options, > ^^^^^ > This shouldn't break fts consumers because a pointer to a variable > can be converted to a pointer to a constant w/o warnings (but not > the other way around.) Can anybody see other possible side effects > from such change? I was pointed out in a private mail that the types "const FOO **" and "FOO **" were incompatible, which would break passing "argv" from main() to fts_open(). -- Yar From owner-freebsd-arch@FreeBSD.ORG Mon May 29 10:48:34 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C10AF16A41F for ; Mon, 29 May 2006 10:48:34 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EAD343D48 for ; Mon, 29 May 2006 10:48:34 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id A7CA12086; Mon, 29 May 2006 12:48:30 +0200 (CEST) X-Spam-Tests: none X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 9A4562082; Mon, 29 May 2006 12:48:30 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id 7572233CAD; Mon, 29 May 2006 12:48:30 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: "M. Warner Losh" References: <4479D804.1060106@elischer.org> <1471.1148836757@critter.freebsd.dk> <20060528.113724.1655407378.imp@bsdimp.com> Date: Mon, 29 May 2006 12:48:29 +0200 In-Reply-To: <20060528.113724.1655407378.imp@bsdimp.com> (M. Warner Losh's message of "Sun, 28 May 2006 11:37:24 -0600 (MDT)") Message-ID: <86pshx85tu.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, phk@phk.freebsd.dk, julian@elischer.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Mon, 29 May 2006 10:48:34 -0000 "M. Warner Losh" writes: > There's no way to 'connect to syslogd and subscribe to messages' in > the current syslogd. tail -F /var/log/messages DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Mon May 29 10:49:37 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3ECD416A439 for ; Mon, 29 May 2006 10:49:37 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pasmtp.tele.dk (pasmtp.tele.dk [193.162.159.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id D414743D46 for ; Mon, 29 May 2006 10:49:34 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x535c0e2a.sgnxx1.adsl-dhcp.tele.dk [83.92.14.42]) by pasmtp.tele.dk (Postfix) with ESMTP id 001E21EC30F for ; Mon, 29 May 2006 12:49:33 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4TAnSMH010582; Mon, 29 May 2006 12:49:29 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 29 May 2006 12:48:29 +0200." <86pshx85tu.fsf@xps.des.no> Date: Mon, 29 May 2006 12:49:28 +0200 Message-ID: <10581.1148899768@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org, julian@elischer.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Mon, 29 May 2006 10:49:37 -0000 In message <86pshx85tu.fsf@xps.des.no>, Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= writes: >"M. Warner Losh" writes: >> There's no way to 'connect to syslogd and subscribe to messages' in >> the current syslogd. > >tail -F /var/log/messages Yes, that is sort of a substitute, but not quite... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Mon May 29 11:10:20 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DB3316A435 for ; Mon, 29 May 2006 11:10:00 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABF4943D48 for ; Mon, 29 May 2006 11:09:59 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (Postfix) with ESMTP id 8FAB63A7F81; Mon, 29 May 2006 21:09:58 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4TB9tJK027874; Mon, 29 May 2006 21:09:56 +1000 Date: Mon, 29 May 2006 21:09:55 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Yar Tikhiy In-Reply-To: <20060528164328.GA84031@comp.chem.msu.su> Message-ID: <20060529200215.T24032@delplex.bde.org> References: <20060528164328.GA84031@comp.chem.msu.su> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: Can fts_open() be constified further? 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: Mon, 29 May 2006 11:10:20 -0000 On Sun, 28 May 2006, Yar Tikhiy wrote: > Currently, fts_open() is declared as follows: > > FTS * > fts_open(char * const *path_argv, int options, > int (*compar)(const FTSENT * const *, const FTSENT * const *)); > > This means that one cannot pass pointers to constant strings in > path_argv[] without getting rather justified warnings from cc. > AFAIK, fts(3) functions aren't supposed to modify the path strings. > Hence the prototype asks to be changed slightly: > > fts_open(const char * const *path_argv, int options, > ^^^^^ > This shouldn't break fts consumers because a pointer to a variable > can be converted to a pointer to a constant w/o warnings (but not > the other way around.) Can anybody see other possible side effects > from such change? It wouldn't work, for the same reasons that it doesn't work for execve(): plain "char **" cannot be converted to "const char * const *". Only "const char **" and of course itself can be converted. "char * const *" cannot be converted but is weird compared with "char **". All this follows from the type rule that you expressed informally. "const" can only be added at the outer level when the inner types are the same. Set T1 = "char *" and T2 = "const char *" to reduce confusion about the levels. Then: char ** = pointer to T1 = PT1 char * const * = const pointer to T1 = CPT1 const char ** = pointer to T2 = PT2 const char * const * = const pointer to T2 = CPT2 PT1 can be converted to CPT1 and PT2 can be converted to CPT2. No other conversions from adding a "const" are permitted, since T1 != T2. The prototypes for the execve() family and presumably for fts_open() are chosen so that the most important non-constified type (PT1) can be converted to the type in the prototype (CPT1). PT1 cannot be converted to CPT2 since "const" is not very well designed. Allowing this conversion without redesigning "const" would make "const" even less well designed. From the draft C standard (n869.txt): %%% [#6] EXAMPLE 3 Consider the fragment: const char **cpp; char *p; const char c = 'A'; cpp = &p; // constraint violation *cpp = &c; // valid *p = 0; // valid The first assignment is unsafe because it would allow the following valid code to attempt to change the value of the const object c. %%% It looks harmless to add a "const" to the inner type in &p, but this example shows that it unsafe. Bruce From owner-freebsd-arch@FreeBSD.ORG Mon May 29 12:02:57 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4046F16A93E; Mon, 29 May 2006 12:02:57 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id A388143D7B; Mon, 29 May 2006 12:02:42 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (Postfix) with ESMTP id A60353283C3; Mon, 29 May 2006 22:02:41 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4TC2c3T028279; Mon, 29 May 2006 22:02:39 +1000 Date: Mon, 29 May 2006 22:02:38 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Kris Kennaway In-Reply-To: <20060529051811.GA60877@xor.obsecurity.org> Message-ID: <20060529213903.G24267@delplex.bde.org> References: <20060528230058.GA836@lucy.pool-70-17-33-65.pskn.east.verizon.net> <20060529051811.GA60877@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Robert Watson , gnn@freebsd.org, freebsd-atm@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Locking netatm 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: Mon, 29 May 2006 12:03:16 -0000 On Mon, 29 May 2006, Kris Kennaway wrote: > On Mon, May 29, 2006 at 01:52:48PM +0900, gnn@FreeBSD.org wrote: >>> So my question is, were network interrupts disabled when mucking >>> with the atm_timeq list because a generated interrupt can modify >>> structures within the list? This use is probably very >>> netatm-specific. I'm still studying the timeout code to understand >>> what it's doing. >> >> The spl() calls haven't disabled real interrupts, as far as I know, >> for quite a while. They acted as general code locks to prevent >> simultaneous access to data structures while an update was in >> progress. In terms of the timeq, the locks were acting as a mutex now >> would to protect the list during an update. > > Actually the spl calls have all been NOPs since the early 5.0 days, > and they were just left in an mnemonic placeholders showing which > code/data sections need to be protected. Actually the spl calls were sort of replaced by Giant locking. The Giant locking is just implicit and magic where the non-null spl "locking" was explicit and less magic. The effect was initially similar to replacing all spl calls by a non-null splhigh() (giving very coarse-grained locking to interrupt handlers) and also adding splhigh() to all kernel entry points (giving even coarser-grained locking). Now many things are not under Giant, the Giant-locked things are not locked out so much by other things, but they still lock out each other and still depend very much on the Giant locking having much the same effect as splhigh(). To the extent that subsystems called by netatm are MPSAFE, you can just remove the spl "locking". It hasn't done anything for a long time, and the Giant locking is also null for other MPSAFE subsystems. However, the other subsystems might not be fully MPSAFE yet. Some have to be run in !MPSAFE mode because their callers are not MPSAFE, and this might hide bugs. Locking for timing probably isn't very important. Giant and other locking can give very large latency in hard-to-predict ways, but some things have been running for a long time without this causing many obvious problems other than reduced efficiency. Bruce From owner-freebsd-arch@FreeBSD.ORG Mon May 29 13:26:02 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E873116A421 for ; Mon, 29 May 2006 13:26:02 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A3D043D53 for ; Mon, 29 May 2006 13:26:01 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id i31so133706wxd for ; Mon, 29 May 2006 06:26:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rlb9n0e5e1uTN9lig42k7Cmb6Qii8Kxu/wZEZZcbhSCVLlfWOV6VJLI+xHpsxXaxrZSKplnzhWCrS2Q4SDGI7vAGw5AQ0JF2QnZwbNuAnJuHuhH3eXp5kPqr9i9GSe4d3w8jk2DbFw2mdranAvWjvkDbpefWPFdieKd28i83pXM= Received: by 10.70.54.11 with SMTP id c11mr2322899wxa; Mon, 29 May 2006 06:25:59 -0700 (PDT) Received: by 10.70.11.2 with HTTP; Mon, 29 May 2006 06:25:59 -0700 (PDT) Message-ID: <3bbf2fe10605290625p63221f95i6e17466ab5db6812@mail.gmail.com> Date: Mon, 29 May 2006 15:25:59 +0200 From: "Attilio Rao" To: "Robert Watson" , freebsd-atm@freebsd.org, freebsd-arch@freebsd.org In-Reply-To: <20060528230058.GA836@lucy.pool-70-17-33-65.pskn.east.verizon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <20060528230058.GA836@lucy.pool-70-17-33-65.pskn.east.verizon.net> Cc: Subject: Re: Locking netatm X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 13:26:04 -0000 MjAwNi81LzI5LCBTa2lwIEZvcmQgPHNraXAuZm9yZEB2ZXJpem9uLm5ldD46Cgpbc25pcF0KCj4g U28gbXkgcXVlc3Rpb24gaXMsIHdlcmUgbmV0d29yayBpbnRlcnJ1cHRzIGRpc2FibGVkIHdoZW4g bXVja2luZwo+IHdpdGggdGhlIGF0bV90aW1lcSBsaXN0IGJlY2F1c2UgYSBnZW5lcmF0ZWQgaW50 ZXJydXB0IGNhbiBtb2RpZnkKPiBzdHJ1Y3R1cmVzIHdpdGhpbiB0aGUgbGlzdD8gIFRoaXMgdXNl IGlzIHByb2JhYmx5IHZlcnkKPiBuZXRhdG0tc3BlY2lmaWMuICBJJ20gc3RpbGwgc3R1ZHlpbmcg dGhlIHRpbWVvdXQgY29kZSB0bwo+IHVuZGVyc3RhbmQgd2hhdCBpdCdzIGRvaW5nLgoKVGhpcyBp cyB0aGUgd2hvbGUgcG9pbnQgb2YgbG9ja2luZyBwcmltaXRpdmVzOiBhdG9taWMgb3BlcmF0aW9u cy4KSW50ZXJydXB0aW5nIHRoZSBjb2RlIHdoaWxlIGdldHRpbmcgYSBsb2NrIGNvdWxkIHJlc3Vs dCBpbiBhIHJhY2UgY29uZGl0aW9uLgoKSWYgeW91IGhhdmUgdG8gcHJvdGVjdCBkYXRhcyB0aHJv dWdoIGEgVFNMIChUZXN0IGFuZCBTZXQgTG9jaykKb3BlcmF0aW9uLCB3aGF0IGhhcHBlbiBpcyBz b21ldGhpbmcgbGlrZSAoaHlwb3RldGljYWxseSk6CgppZiAobG9jayA9PSAwKQogICAgbG9jayA9 IDE7CmVsc2UKICAgdGhyZWFkX3NsZWVwKCk7CgpUaGFuIHlvdSBpbW1hZ2luZSB0aHJlYWRBIHZl cmlmeSBjb21wYXJpc29ucyBhcyB0cnVlLCBnZXQgaW50ZXJydXB0ZWQKYnkgaW50ZXJydXB0IHRp bWVyIGFuZCB0aHJlYWRCIGlzIHNjaGVkdWxlZCB0byBydW4uIHRocmVhZEIgZXhlY3V0ZXMKdGhl IHdob2xlIHByb2NlZHVyZSAoc2V0dGluZyBsb2NrID0gMSkgdGhhbiB0aHJlYWRBIGlzIHNjaGVk dWxlZCBhZ2Fpbgp0byBydW4gYW5kIHRoaW5rcyB0aGUgY3JpdGljYWwgc2VjdGlvbiBpcyBmcmVl IChzaW5jZSBpdHMgY29tcGFyaXNvbgp3YXMgdHJ1ZSkgc28gc2V0cyBhZ2FpbiBsb2NrPTEgYW5k IGdvIG9uLiBBdCB0aGlzIHBvaW50IHlvdSBoYXZlIGFuCmluY29ycmVjdCBiZWhhdmlvdXIgZm9y IHlvdXIgT1MgKGEgcmFjZSBjb25kaXRpb24pLiBUaGlzIGlzIHdoeQppbnRlcnJ1cHRzIGFyZSBw YWluZnVsIGZvciBhdG9taWMgb3BlcmF0aW9ucyBhbmQgd2h5IHRoZXkncmUgbmV2ZXIKYWxsb3dl ZC4KCj4gQSBzZWNvbmQgc2l0dWF0aW9uIHdoZXJlIG5ldHdvcmsgaW50ZXJydXB0cyB3ZXJlIGRp c2FibGVkIHdhcyBmb3IKPiBuZXRhdG0gbWVtb3J5IGFsbG9jYXRpb24gZm9yIGRldmljZXM6Cj4K PiBpbiBhdG1fZGV2X2FsbG9jKCkKPgo+ICAgICAgICBzID0gc3BsaW1wKCk7Cj4KPiAgICAgICAg Rk9SRUFDSChhdG1fbWVtX2hlYWQpCj4gICAgICAgICAgICAgICAgLi4uCj4gICAgICAgIG1hbGxv YyAoLi4uKQo+Cj4gICAgICAgICh2b2lkKSBzcGx4KHMpOwo+Cj4gYW5kIGluIGF0bV9kZXZfZnJl ZSgpCj4KPiAgICAgICAgcyA9IHNwbGltcCgpOwo+Cj4gICAgICAgIEZPUkVBQ0goYXRtX21lbV9o ZWFkKQo+ICAgICAgICAgICAgICAgIC4uLgo+ICAgICAgICBmcmVlICguLi4pOwo+Cj4gICAgICAg ICh2b2lkKSBzcGx4KHMpOwo+Cj4gSSdtIG5vdCBzdXJlIGhvdyB0aGVzZSBzaG91bGQgYmUgcHJv dGVjdGVkLiAgUHJlc3VtYWJseSwgd2UgZG9uJ3QKPiB3YW50IHRvIHJlY2VpdmUgaW50ZXJydXB0 cyB1bnRpbCB0aGUgbmV0YXRtIG1lbW9yeSBmb3IgdGhlCj4gZGV2aWNlIGlzIGFsbG9jYXRlZC4g IFdvdWxkIGEgZ2xvYmFsIHN1YnN5c3RlbSBsb2NrIHByb3RlY3QgdGhlc2UKPiBjYWxscz8gIEkg Y2FuIHByb3RlY3QgYXRtX21lbV9oZWFkLCBzbyBtYXliZSB0aGF0J2QgYmUgZW5vdWdoPwoKVGhl IGJldHRlciB3YXkgdG8gcHJvdGVjdCBhIGxpc3QgaXMgYSByd2xvY2suCkV2ZW4gaWYgdGhleSdy ZSBzdGlsbCBpbmNvbXBsZXRlLCBhY3R1YWxseSwgdGhleSdyZSB0aGUgb25seSBwcmltaXRpdmUK d2hpY2ggY2FuIGFzc3VyZSBhIHR3by1sZXZlbHMgcHJvdGVjdGlvbiBhbmQgYSBzb3J0IG9mIHBy aW9yaXR5CnByb3BhZ2F0aW9uLCBzbyBpdCB3b3VsZCBiZSBwcmVmZXJhYmxlIHVzaW5nIGl0ICho b2xkaW5nIGFjY29yZGluZyB0bwp5b3VyIG9wZXJhdGlvbnMpLgoKSSB0aGluayB0aGF0IGEgbG90 IG9mIHF1ZXVlcyB0aGF0IHdlIGhhdmUgcHJvdGVjdGVkIGJ5IGEgc3ggbG9jayBtaWdodApzd2l0 Y2ggdG8gcndsb2Nrcy4uLgoKPiBBbm90aGVyIHVzZSBpcyB0byBwcm90ZWN0IGNhbGxzIHRvIG90 aGVyIHN1YnN5c3RlbXMuICBGb3IKPiBleGFtcGxlOgo+Cj4gd2l0aGluIGF0bV9uaWZfYXR0YWNo KHN0cnVjdCBhdG1fbmlmICpuaXApCj4KPiAgICAgICAgaWZwID0gbmlwLT5uaWZfaWZwOwo+Cj4g ICAgICAgIHMgPSBzcGxpbXAoKTsKPgo+ICAgICAgICBpZl9hdHRhY2goaWZwKTsKPiAgICAgICAg YnBmYXR0YWNoKGlmcCwgRExUX0FUTV9DTElQLCBUX0FUTV9MTENfTUFYX0xFTik7Cj4KPiAgICAg ICAgKHZvaWQpIHNwbHgocyk7Cj4gfQo+Cj4gYW5kIHdpdGhpbiBhdG1fbmlmX2RldGFjaChzdHJ1 Y3QgYXRtX25pZiAqbmlwKQo+Cj4gICAgICAgIGlmcCA9IG5pcC0+bmlmX2lmcDsKPgo+ICAgICAg ICBzID0gc3BsaW1wKCk7Cj4KPiAgICAgICAgYnBmZGV0YWNoKGlmcCk7Cj4gICAgICAgIGlmX2Rl dGFjaChpZnApOwo+ICAgICAgICBpZl9mcmVlKGlmcCk7Cj4KPiAgICAgICAgKHZvaWQpIHNwbHgo cyk7Cj4KPiBIb2xkaW5nIGEgbmV3IG5ldGF0bSBzdWJzeXN0ZW0gbG9jayB3b24ndCBwcm90ZWN0 IHRob3NlIGNhbGxzIHNvCj4gSSdtIG5vdCBzdXJlIGhvdyB0byBoYW5kbGUgdGhvc2UuICBPdGhl ciBub24tbmV0YXRtIGNvZGUgaW4gdGhlCj4gdHJlZSBzZWVtcyB0byBub3QgZG8gYW55IGxvY2tp bmcgYXQgYWxsIGFyb3VuZCB0aG9zZSBjYWxscy4KCkhlcmUgYSBtdXRleCg5KSBpcyBlbm91Z2gu Cgo+IFRoZXNlIGFyZSByZWFsbHkgdGhlIG9ubHkgdXNlcyBJJ3ZlIHlldCB0byBjb252ZXJ0IHNv IGlmIHNvbWVvbmUKPiBjYW4gcHJvdmlkZSBzb21lIHBvaW50ZXJzLCBJJ2QgYXBwcmVjaWF0ZSBp dC4gIEknbSBwcmV0dHkgbmV3IHRvCj4gRnJlZUJTRCBsb2NraW5nLCBlaXRoZXIgdGhlIG9sZCB3 YXkgb3IgdGhlIG5ldyB3YXkuICBJJ20gc3RpbGwKPiBzdHVkeWluZyB0aGUgY29kZSwgaW5jbHVk aW5nIG90aGVyIG5ldHdvcmsgc3RhY2tzIGFuZCB0aGUgbmV0YXRtCj4gc3RhY2sgaXRzZWxmLCBi dXQgYSBwb2ludGVyIG9yIHR3byB3b3VsZCBiZSBhcHByZWNpYXRlZC4gIEkgZmVlbAo+IGxpa2Ug aXQncyBtb3N0bHkgY29udmVydGVkLCB0aG91Z2ggSSd2ZSBkb25lIG5vIHRlc3RpbmcgYXQgYWxs Cj4geWV0LiAgT25jZSBJIGZpbmlzaCByZW1vdmluZyBzcGxpbXAoKSwgSSBjYW4gdGVzdCB3aXRo IHRoZSBzaW5nbGUKPiBzdWJzeXN0ZW0gbG9jaywgdGhlbiBtb3ZlIG9uIHRvIGZpbmVyLWdyYWlu ZWQgbG9ja2luZyB3aGVyZQo+IG5lY2Vzc2FyeS4KClRoZXJlIGlzIG5vdCBhIGxvdCBvZiB1cGRh dGUgZG9jdW1lbnRhdGlvbiBhYm91dCBpdCwgSSBjYW4gc2F5IHlvdSBpbgpwYXJ0aWN1bGFyOgpo dHRwOi8vd3d3LmZyZWVic2Qub3JnL2RvYy9lbi9ib29rcy9hcmNoLWhhbmRib29rL2xvY2tpbmcu aHRtbApodHRwOi8vd3d3LmxlbWlzLmNvbS9ncm9nL1NNUG5nL1NpbmdhcG9yZS9wYXBlci5wZGYK aHR0cDovL3Blb3BsZS5mcmVlYnNkLm9yZy9+ZnNtcC9TTVAvU01QLmh0bWwKCkJUVywgc29tZSBv ZiB0aGlzIGlzIG5vdCBjdXJyZW50bHkgYXBwbGllZCBpbnRvIHRoZSBrZXJuZWwgc28gbG9vayBh dAp0aGUgY29kZSBhcyB1c3VhbCA6UAoKQXR0aWxpbwoKLS0gClBlYWNlIGNhbiBvbmx5IGJlIGFj aGlldmVkIGJ5IHVuZGVyc3RhbmRpbmcgLSBBLiBFaW5zdGVpbgo= From owner-freebsd-arch@FreeBSD.ORG Mon May 29 17:31:53 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C152116A431 for ; Mon, 29 May 2006 17:31:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 438A043D48 for ; Mon, 29 May 2006 17:31:53 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k4THTUa7013681; Mon, 29 May 2006 11:29:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 29 May 2006 11:29:35 -0600 (MDT) Message-Id: <20060529.112935.570083129.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86pshx85tu.fsf@xps.des.no> References: <1471.1148836757@critter.freebsd.dk> <20060528.113724.1655407378.imp@bsdimp.com> <86pshx85tu.fsf@xps.des.no> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, phk@phk.freebsd.dk, julian@elischer.org Subject: Re: A sort of plan for consoles in FreeBSD 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: Mon, 29 May 2006 17:31:54 -0000 In message: <86pshx85tu.fsf@xps.des.no> des@des.no (Dag-Erling Sm=F8rgrav) writes: : "M. Warner Losh" writes: : > There's no way to 'connect to syslogd and subscribe to messages' in= : > the current syslogd. : = : tail -F /var/log/messages That doesn't give you what I described. What that does is give you the messages that syslogd writes to /var/log/messages. This is a subset of the messages sent to syslogd, and doesn't have the severity levels, facilities, etc associated with them. There's no way for one to connect to syslogd and dynamically filter the records that are displayed. While adding such a facility wouldn't be that hard, it does not exist today. Warner From owner-freebsd-arch@FreeBSD.ORG Tue May 30 17:58:26 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 84C9816A7F6 for ; Tue, 30 May 2006 17:58:26 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B8BE43D48 for ; Tue, 30 May 2006 17:58:26 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.13.6/8.13.6) with ESMTP id k4UHwKb8024825 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 30 May 2006 13:58:20 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id k4UHwE8Q070607; Tue, 30 May 2006 13:58:14 -0400 (EDT) (envelope-from gallatin) Date: Tue, 30 May 2006 13:58:14 -0400 From: Andrew Gallatin To: Poul-Henning Kamp Message-ID: <20060530135814.A70588@grasshopper.cs.duke.edu> References: <16029.1148764704@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <16029.1148764704@critter.freebsd.dk>; from phk@phk.freebsd.dk on Sat, May 27, 2006 at 11:18:24PM +0200 X-Operating-System: FreeBSD 4.9-RELEASE-p1 on an i386 Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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, 30 May 2006 17:59:11 -0000 Poul-Henning Kamp [phk@phk.freebsd.dk] wrote: > I would like to redefine the semantics of "/dev/console" as follows: > > if any console-consumers like xconsole(8) are active > send output to all console-consumers. > else if a controlling terminal is available > send output to controlling terminal (that is /dev/tty) > else > send output to syslogd, as if generated by printf(9). > (but do not actually output to low-level console) If there is nobody logged in, where do kernel messages from device drivers, and panic messages (with helpful things like KDB_TRACE) wind up? I hope the answer is not "nowhere". I have debugged many problems after they happened by looking at serial console logs, and I would hate to loose this. Drew From owner-freebsd-arch@FreeBSD.ORG Tue May 30 18:03:55 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3F0416A55E for ; Tue, 30 May 2006 18:03:55 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from pasmtp.tele.dk (pasmtp.tele.dk [193.162.159.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AA0A43D48 for ; Tue, 30 May 2006 18:03:55 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x535c0e2a.sgnxx1.adsl-dhcp.tele.dk [83.92.14.42]) by pasmtp.tele.dk (Postfix) with ESMTP id 5103F1ECC9C for ; Tue, 30 May 2006 20:03:54 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k4UI3lN6017735; Tue, 30 May 2006 20:03:48 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Andrew Gallatin From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 30 May 2006 13:58:14 EDT." <20060530135814.A70588@grasshopper.cs.duke.edu> Date: Tue, 30 May 2006 20:03:47 +0200 Message-ID: <17734.1149012227@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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, 30 May 2006 18:03:57 -0000 In message <20060530135814.A70588@grasshopper.cs.duke.edu>, Andrew Gallatin wri tes: >Poul-Henning Kamp [phk@phk.freebsd.dk] wrote: >> I would like to redefine the semantics of "/dev/console" as follows: >> >> if any console-consumers like xconsole(8) are active >> send output to all console-consumers. >> else if a controlling terminal is available >> send output to controlling terminal (that is /dev/tty) >> else >> send output to syslogd, as if generated by printf(9). >> (but do not actually output to low-level console) > >If there is nobody logged in, where do kernel messages from device >drivers, and panic messages (with helpful things like KDB_TRACE) wind >up? These go to the #2 console just like the bootup messages etc. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Tue May 30 18:23:11 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E781F16A454 for ; Tue, 30 May 2006 18:23:11 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76B7143D46 for ; Tue, 30 May 2006 18:23:11 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.205]) ([10.251.23.205]) by a50.ironport.com with ESMTP; 30 May 2006 11:23:10 -0700 Message-ID: <447C8D8C.1020808@elischer.org> Date: Tue, 30 May 2006 11:23:08 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <1471.1148836757@critter.freebsd.dk> <20060528.113724.1655407378.imp@bsdimp.com> <86pshx85tu.fsf@xps.des.no> <20060529.112935.570083129.imp@bsdimp.com> In-Reply-To: <20060529.112935.570083129.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: des@des.no, phk@phk.freebsd.dk, arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD 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, 30 May 2006 18:23:16 -0000 M. Warner Losh wrote: >In message: <86pshx85tu.fsf@xps.des.no> > des@des.no (Dag-Erling Smørgrav) writes: >: "M. Warner Losh" writes: >: > There's no way to 'connect to syslogd and subscribe to messages' in >: > the current syslogd. >: >: tail -F /var/log/messages > > in -currnet you can listen on any UDP port and have syslog send you stuff. >That doesn't give you what I described. What that does is give you >the messages that syslogd writes to /var/log/messages. This is a >subset of the messages sent to syslogd, and doesn't have the severity >levels, facilities, etc associated with them. There's no way for one >to connect to syslogd and dynamically filter the records that are >displayed. While adding such a facility wouldn't be that hard, it >does not exist today. > >Warner > > > From owner-freebsd-arch@FreeBSD.ORG Tue May 30 19:48:41 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77FF216AA86; Tue, 30 May 2006 19:48:41 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx0.rink.nu (thunderstone.rink.nu [80.112.228.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9338743D5F; Tue, 30 May 2006 19:48:39 +0000 (GMT) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx0.rink.nu (Postfix) with ESMTP id C17A71707A; Tue, 30 May 2006 21:48:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx0.rink.nu ([127.0.0.1]) by localhost (thunderstone.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xOD6C1qZRZVO; Tue, 30 May 2006 19:48:36 +0000 (UTC) Received: by mx0.rink.nu (Postfix, from userid 1678) id 2E5301705E; Tue, 30 May 2006 21:48:36 +0200 (CEST) Date: Tue, 30 May 2006 21:48:36 +0200 From: Rink Springer To: Ruslan Ermilov Message-ID: <20060530194836.GF46869@rink.nu> References: <20060526154208.GD9715@rink.nu> <20060526184740.GA95451@ip.net.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <20060526184740.GA95451@ip.net.ua> User-Agent: Mutt/1.5.11 Cc: arch@freebsd.org Subject: Re: [RFC] Minor crunchgen patch 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, 30 May 2006 19:48:44 -0000 --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 26, 2006 at 09:47:40PM +0300, Ruslan Ermilov wrote: > On Fri, May 26, 2006 at 05:42:08PM +0200, Rink Springer wrote: > > Hi, > >=20 > > Apart from the syslogd patch, I have written a minor patch for > > crunchgen, which allows you to specify arguments to pass to all invoked > > make(1) instances. > >=20 > > I used this to specify an alternative system makefile path (using -m), > > this made it much easier to build crunchgen(1)-ed binaries for -CURRENT > > on a -STABLE box (due to the new build knobs infrastructure). This is > > part of my FreeBSD/xbox installation/livecd, which will be released in a > > few days. > >=20 > > You can find the patch at http://www.il.fontys.nl/~rink/crunchgen.diff. > > I intend to commit next week and MFC it after a few days. > > > What, the MAKEFLAGS environment variable supported by make(1) is not > sufficient? Grr, this is the first time I ever heard of that option; anyway, just looked at the manpage and update my script. It works like a charm. Move along folks, nothing to see here ... --=20 Rink P.W. Springer - http://rink.nu "Richter: Tribute? You steal men's souls, and make them your slaves! Dracula: Perhaps the same could be said of all religions." - Castlevania: Symphony of the Night --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEfKGUb3O60uztv/8RAqagAJ486fHb9zzjiYWh/bfIlqqZ1W52wgCfT+KR ztSm3dL8vsI6wfokLjJ0lNc= =+dAm -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ-- From owner-freebsd-arch@FreeBSD.ORG Wed May 31 18:56:07 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62DF016AE0D for ; Wed, 31 May 2006 18:56:07 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9691E43D76 for ; Wed, 31 May 2006 18:56:01 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id s17so68264wxc for ; Wed, 31 May 2006 11:56:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ghA1lvAtW83hI7rQbE7m4KHOypV05ZxqRxS6uMen6GfBLHr/0Tex2ZR6cR3nKmxpMBFoAgeqvaSulu6eiNYfCIZuZMzHfrfEFazxziOcO/oUSjBnbE0R33+enPwgT42RkK+hsmxq5Ea6t3UlwFp4QEKov55x3gV6PGhbOijF7ZE= Received: by 10.70.68.10 with SMTP id q10mr570616wxa; Wed, 31 May 2006 11:56:00 -0700 (PDT) Received: by 10.70.11.2 with HTTP; Wed, 31 May 2006 11:56:00 -0700 (PDT) Message-ID: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> Date: Wed, 31 May 2006 20:56:00 +0200 From: "Attilio Rao" To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, freebsd-x86@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: [patch] Adding optimized kernel copying support - Part III X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2006 18:56:21 -0000 Hi, this is the last release which is rather finished and complete for the project. I tested for consistency for a long time and the FPU handling mechanism seems very robust so as copyin/copyout do. What I'm looking for, at this point, are testers for peroformances. What is proposed in the patch is one of the better solutions for UP archs (not running with PREEMPTION) but more general cases might be handled with time. I hope that somebody wants to play with him, giving suggestions and doing different benchmarks. The code can be found here: http://users.gufi.org/~rookie/works/patches/xmmcopy_6_1.diff and is for RELEASE_6_1 in order to have a wider range of testers (a diff against HEAD will be available ASAP). Please keep in mind that this is not a complete rip of DflyBSD code beacause it is different in a lot of parts. For any kind of tecnical questions, please mail me. Attilio PS: a particular thanks goes to Bruce Evans for his benchmarks and feedbacks about code structure -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-arch@FreeBSD.ORG Wed May 31 20:10:02 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D719116B2EA for ; Wed, 31 May 2006 20:10:02 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 005B043D49 for ; Wed, 31 May 2006 20:10:01 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id s17so78528wxc for ; Wed, 31 May 2006 13:10:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=B5tr4I5MBt/+WIFDdLI/oCX9uKkCGHlryluLEaCCI45mBFWHOuNrFKjiSk3fUxGycGkYrLvVzonOslGk+HDe/x1MqgOYqIIDnlPChorTQKS/Elet5+bPZnk4L2DCnPenSNzlYI6UvupiDA1BehCfR5cDyhmvg3rS/dM0vzt+jUU= Received: by 10.70.62.20 with SMTP id k20mr652867wxa; Wed, 31 May 2006 13:10:01 -0700 (PDT) Received: by 10.70.11.2 with HTTP; Wed, 31 May 2006 13:10:01 -0700 (PDT) Message-ID: <3bbf2fe10605311310m1beaf8f7pac8ba04f5bbbe34b@mail.gmail.com> Date: Wed, 31 May 2006 22:10:01 +0200 From: "Attilio Rao" To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org In-Reply-To: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> Cc: Subject: Re: [patch] Adding optimized kernel copying support - Part III X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2006 20:10:06 -0000 Sorry, but I unforgot one thing so, please, redownload the patch now. Attilio 2006/5/31, Attilio Rao : > Hi, > this is the last release which is rather finished and complete for the project. > > I tested for consistency for a long time and the FPU handling > mechanism seems very robust so as copyin/copyout do. > > What I'm looking for, at this point, are testers for peroformances. > What is proposed in the patch is one of the better solutions for UP > archs (not running with PREEMPTION) but more general cases might be > handled with time. > > I hope that somebody wants to play with him, giving suggestions and > doing different benchmarks. > > The code can be found here: > http://users.gufi.org/~rookie/works/patches/xmmcopy_6_1.diff > > and is for RELEASE_6_1 in order to have a wider range of testers (a > diff against HEAD will be available ASAP). > > Please keep in mind that this is not a complete rip of DflyBSD code > beacause it is different in a lot of parts. > > For any kind of tecnical questions, please mail me. > > Attilio > > PS: a particular thanks goes to Bruce Evans for his benchmarks and > feedbacks about code structure > > > -- > Peace can only be achieved by understanding - A. Einstein > -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-arch@FreeBSD.ORG Wed May 31 20:19:07 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F72D16B8CD; Wed, 31 May 2006 20:19:07 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CD3543D4C; Wed, 31 May 2006 20:19:07 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.250.2] (217-162-174-115.dclient.hispeed.ch [217.162.174.115]) by elvis.mu.org (Postfix) with ESMTP id 28FC41A4E48; Wed, 31 May 2006 13:19:05 -0700 (PDT) Message-ID: <447DFA0C.20207@FreeBSD.org> Date: Wed, 31 May 2006 22:18:20 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: rookie@gufi.org References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> In-Reply-To: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-x86@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [patch] Adding optimized kernel copying support - Part III 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, 31 May 2006 20:19:09 -0000 Hello Attilio, Attilio Rao wrote: > Hi, > this is the last release which is rather finished and complete for the > project. > > I tested for consistency for a long time and the FPU handling > mechanism seems very robust so as copyin/copyout do. Nice work. Any chance you could also port it to amd64? :-) > What I'm looking for, at this point, are testers for peroformances. > What is proposed in the patch is one of the better solutions for UP > archs (not running with PREEMPTION) but more general cases might be > handled with time. Does that mean it won't work with SMP and PREEMPTION? > I hope that somebody wants to play with him, giving suggestions and > doing different benchmarks. What kind of performance improvements did you see in your benchmarks? > The code can be found here: > http://users.gufi.org/~rookie/works/patches/xmmcopy_6_1.diff > > and is for RELEASE_6_1 in order to have a wider range of testers (a > diff against HEAD will be available ASAP). > > Please keep in mind that this is not a complete rip of DflyBSD code > beacause it is different in a lot of parts. > > For any kind of tecnical questions, please mail me. I wonder if we could get rid of the memcpy_vector (copyin/copyout_vector before this patch), bzero_vector and bcopy_vector function pointers and do boot-time patching of the callers to the right version. I have a linux-inspired proof-of-concept demo of this boot-time patching at http://people.freebsd.org/~ssouhlal/testing/bootpatch-20060527.diff. It prefetches the next element in the *_FOREACH() macros in sys/queue.h. The patching that it does is to use PREFETCH instruction instead of PREFETCHNTA if the cpu is found to support SSE2. -- Suleiman From owner-freebsd-arch@FreeBSD.ORG Wed May 31 20:29:37 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E28C16A6DF for ; Wed, 31 May 2006 20:29:37 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id E966943D58 for ; Wed, 31 May 2006 20:29:35 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id s17so81117wxc for ; Wed, 31 May 2006 13:29:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kyB7hT1gh0WZwQkDS9zI10ektLcvvwrpFzPJjIjx4kJVAOWmgWliBebeiSbCieUqcqtXLcVYxN7fcVasmB+oo9+4QPZrz9Dh1CrkqWuN70deVjp9oBSdeub0iQCI0KK9rudjtmU5VraU3Z6ofC7N+PEIApwW/Qt4dhwR1i5bxis= Received: by 10.70.68.10 with SMTP id q10mr695097wxa; Wed, 31 May 2006 13:29:34 -0700 (PDT) Received: by 10.70.11.2 with HTTP; Wed, 31 May 2006 13:29:34 -0700 (PDT) Message-ID: <3bbf2fe10605311329h7adc1722j9088253515e0265b@mail.gmail.com> Date: Wed, 31 May 2006 22:29:34 +0200 From: "Attilio Rao" To: "Suleiman Souhlal" , freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org In-Reply-To: <447DFA0C.20207@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> <447DFA0C.20207@FreeBSD.org> Cc: Subject: Re: [patch] Adding optimized kernel copying support - Part III X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2006 20:29:42 -0000 2006/5/31, Suleiman Souhlal : > Hello Attilio, Hello Suleiman, > Nice work. Any chance you could also port it to amd64? :-) Not in the near future, I think. :P > Does that mean it won't work with SMP and PREEMPTION? Yes it will work (even if I think it needs more testing) but maybe would give lesser performances on SMP|PREEMPTION due to too much traffic on memory/cache. For this I was planing to use non-temporal instructions (obviously benchmarks would be very appreciate). > What kind of performance improvements did you see in your benchmarks? I'm sorry but I didn't benchmarked on P4 (with xmm instructions). On P3, using integer copies, with dd and time I measured about 2% increasing, I hope more on P4 (and you might add xmm usage too). > I wonder if we could get rid of the memcpy_vector (copyin/copyout_vector > before this patch), bzero_vector and bcopy_vector function pointers and > do boot-time patching of the callers to the right version Mmm, please note that on i386, at boot time (I've never studied that code) it seems requiring of vectorized version of bcopy/bzero. memcpy_vector that I introduced is used in slightly a different way from the other so I don't think it's so simple applying your idea to these. > I have a linux-inspired proof-of-concept demo of this boot-time patching > at http://people.freebsd.org/~ssouhlal/testing/bootpatch-20060527.diff. > It prefetches the next element in the *_FOREACH() macros in sys/queue.h. > The patching that it does is to use PREFETCH instruction instead of > PREFETCHNTA if the cpu is found to support SSE2. It would be very appreciate to have it MI (yes, I mean MD + MI structure :PP) Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-arch@FreeBSD.ORG Wed May 31 23:25:22 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7E4516A992; Wed, 31 May 2006 23:25:22 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31FD943D70; Wed, 31 May 2006 23:25:22 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (Postfix) with ESMTP id DA491427E25; Thu, 1 Jun 2006 09:25:20 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4VNPHvJ001167; Thu, 1 Jun 2006 09:25:18 +1000 Date: Thu, 1 Jun 2006 09:25:17 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: rookie@gufi.org In-Reply-To: <3bbf2fe10605311329h7adc1722j9088253515e0265b@mail.gmail.com> Message-ID: <20060601084052.D32549@delplex.bde.org> References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> <447DFA0C.20207@FreeBSD.org> <3bbf2fe10605311329h7adc1722j9088253515e0265b@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Suleiman Souhlal , freebsd-arch@freebsd.org Subject: Re: [patch] Adding optimized kernel copying support - Part III 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, 31 May 2006 23:25:29 -0000 On Wed, 31 May 2006, Attilio Rao wrote: > 2006/5/31, Suleiman Souhlal : >> Nice work. Any chance you could also port it to amd64? :-) > > Not in the near future, I think. :P It is not useful for amd64. An amd64 has enough instruction bandwidth to saturate the L1 cache using 64-bit accesses although not using 32-bit accesses. An amd64 has 64-bit integer registers which can be accesses without the huge setup overheads and code complications for MMX/XMM registers. It already uses 64-bit registers or 64-bit movs for copying and zeroing of course. Perhaps it should use prefetches and nontemporal writes more than it already does, but these don't require using SSE2 instructions like nontemporal writes do for 32-bit CPUs. >> Does that mean it won't work with SMP and PREEMPTION? > > Yes it will work (even if I think it needs more testing) but maybe > would give lesser performances on SMP|PREEMPTION due to too much > traffic on memory/cache. For this I was planing to use non-temporal > instructions > (obviously benchmarks would be very appreciate). Er, isn't its main point to fix some !SMP assumptions made in the old copying-through-the-FPU code? (The old code is messy due to its avoidance of global changes. It wants to preserve the FPU state on the stack, but this doesn't quite work so it does extra things (still mostly locally) that only work in the !SMP && (!SMPng even with UP) case. Patching this approach to work with SMP || SMPng cases would make it messier.) The new code wouldn't behave much differently under SMP. It just might be a smaller optimization because more memory pressure for SMP causes more cache misses for everything and there are no benefits from copying through MMX/XMM unless nontemporal writes are used. All (?) CPUs with MMX or SSE* can saturate main memory using 32-bit instructions. On 32-bit CPUs, the benefits of using MMX/XMM come from being able to saturate the L1 cache on some CPUs (mainly Athlons and not P[2-4]), and from being able to use nontemporal writes on some CPUs (at least AthlonXP via SSE extensions all CPUs with SSE2). Bruce From owner-freebsd-arch@FreeBSD.ORG Wed May 31 23:32:16 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1AF4016C229 for ; Wed, 31 May 2006 23:32:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B36143D7D for ; Wed, 31 May 2006 23:32:13 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id i31so106068wxd for ; Wed, 31 May 2006 16:32:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eaKw2a805ufMILLL2K3Hs59kLRFyMPKbrSjXEt4gpxSWhtqLPsY7VtfXNq0oTfNg1cyQ8QSJNZcY4Upm78CYHs+g1+w/BYnZmwiVlKRIrZPY8RBpn65CRgT9CnxfLdqmJ29WGl3hJif088OnQ5FtVbH6W9Mi5NCwZoM+oiU45OU= Received: by 10.70.72.13 with SMTP id u13mr875681wxa; Wed, 31 May 2006 16:32:12 -0700 (PDT) Received: by 10.70.11.2 with HTTP; Wed, 31 May 2006 16:32:12 -0700 (PDT) Message-ID: <3bbf2fe10605311632w58c2949buc072e58ac103d7d@mail.gmail.com> Date: Thu, 1 Jun 2006 01:32:12 +0200 From: "Attilio Rao" To: "Bruce Evans" , "Suleiman Souhlal" , freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org In-Reply-To: <20060601084052.D32549@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> <447DFA0C.20207@FreeBSD.org> <3bbf2fe10605311329h7adc1722j9088253515e0265b@mail.gmail.com> <20060601084052.D32549@delplex.bde.org> Cc: Subject: Re: [patch] Adding optimized kernel copying support - Part III X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2006 23:32:24 -0000 2006/6/1, Bruce Evans : > > >> Does that mean it won't work with SMP and PREEMPTION? > > > > Yes it will work (even if I think it needs more testing) but maybe > > would give lesser performances on SMP|PREEMPTION due to too much > > traffic on memory/cache. For this I was planing to use non-temporal > > instructions > > (obviously benchmarks would be very appreciate). > > Er, isn't its main point to fix some !SMP assumptions made in the old > copying-through-the-FPU code? (The old code is messy due to its avoidance > of global changes. It wants to preserve the FPU state on the stack, but > this doesn't quite work so it does extra things (still mostly locally) > that only work in the !SMP && (!SMPng even with UP) case. Patching this > approach to work with SMP || SMPng cases would make it messier.) > > The new code wouldn't behave much differently under SMP. It just might > be a smaller optimization because more memory pressure for SMP causes > more cache misses for everything and there are no benefits from copying > through MMX/XMM unless nontemporal writes are used. All (?) CPUs with > MMX or SSE* can saturate main memory using 32-bit instructions. On > 32-bit CPUs, the benefits of using MMX/XMM come from being able to > saturate the L1 cache on some CPUs (mainly Athlons and not P[2-4]), > and from being able to use nontemporal writes on some CPUs (at least > AthlonXP via SSE extensions all CPUs with SSE2). I was just speaking about the copying routine itself and not about the SSE2 environment preserving mechanism. It remains untouched in SMP case. However I need to say you were right when you suggested me to merge anything in support.s since it has a more coherent design. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-arch@FreeBSD.ORG Thu Jun 1 07:30:22 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0402C16BEFC; Thu, 1 Jun 2006 07:30:22 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 851CD43D7B; Thu, 1 Jun 2006 07:30:19 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5D7E5.dip.t-dialin.net [84.165.215.229]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.4/8.13.4) with ESMTP id k517TBih097703; Thu, 1 Jun 2006 09:29:12 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k517UGMa085619; Thu, 1 Jun 2006 09:30:16 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Thu, 01 Jun 2006 09:30:16 +0200 Message-ID: <20060601093016.ygeptkv80840gkww@netchild.homeip.net> X-Priority: 3 (Normal) Date: Thu, 01 Jun 2006 09:30:16 +0200 From: Alexander Leidinger To: Attilio Rao References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> <447DFA0C.20207@FreeBSD.org> <3bbf2fe10605311329h7adc1722j9088253515e0265b@mail.gmail.com> <20060601084052.D32549@delplex.bde.org> <3bbf2fe10605311632w58c2949buc072e58ac103d7d@mail.gmail.com> In-Reply-To: <3bbf2fe10605311632w58c2949buc072e58ac103d7d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: freebsd-hackers@freebsd.org, Suleiman Souhlal , freebsd-arch@freebsd.org Subject: Re: [patch] Adding optimized kernel copying support - Part III 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: Thu, 01 Jun 2006 07:30:58 -0000 Quoting Attilio Rao (from Thu, 1 Jun 2006 =20 01:32:12 +0200): > 2006/6/1, Bruce Evans : >> The new code wouldn't behave much differently under SMP. It just might >> be a smaller optimization because more memory pressure for SMP causes >> more cache misses for everything and there are no benefits from copying >> through MMX/XMM unless nontemporal writes are used. All (?) CPUs with >> MMX or SSE* can saturate main memory using 32-bit instructions. On >> 32-bit CPUs, the benefits of using MMX/XMM come from being able to >> saturate the L1 cache on some CPUs (mainly Athlons and not P[2-4]), >> and from being able to use nontemporal writes on some CPUs (at least >> AthlonXP via SSE extensions all CPUs with SSE2). > > I was just speaking about the copying routine itself and not about the > SSE2 environment preserving mechanism. It remains untouched in SMP > case. AFAIR the DFly FPU rework allows to use FPU/XMM instructions in their =20 kernel without the need to do some manual state preserving (it's done =20 automatically on demand). So one could use XMM instructions in RAID 5 =20 or crypto parts of the code to test if it is a performance benefit. Do =20 I understand the above part right that with this patch this is also =20 the case for us in the UP case, but not in the SMP case? Bye, Alexander. --=20 Selling GoodYear Eagle F1 235/40ZR18, 2x 4mm + 2x 5mm, ~150 EUR you have to pick it up between Germany/Saarland and Luxembourg/Capellen http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-arch@FreeBSD.ORG Thu Jun 1 12:27:16 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B759116A674 for ; Thu, 1 Jun 2006 12:27:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3091A43D49 for ; Thu, 1 Jun 2006 12:27:13 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id i31so187439wxd for ; Thu, 01 Jun 2006 05:27:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=plnTOjvGtT9l/tJXK1KULnvFAnEgiQIQbPEaMARs1V2xUFd4oQMjPGQduqWUDnmmM3vWG45NyG4YTdWDI9aWvTG4rzK0lWjczBT0m5dkDlQCkdJe4fDniPDjHR63SzDM60V/7kXtzrkcNyoRoeVc3SPqZNrOiK808+INOSp3oZw= Received: by 10.70.68.10 with SMTP id q10mr632553wxa; Thu, 01 Jun 2006 05:27:13 -0700 (PDT) Received: by 10.70.11.2 with HTTP; Thu, 1 Jun 2006 05:27:13 -0700 (PDT) Message-ID: <3bbf2fe10606010527p5072dc2cmbbcbab039261f870@mail.gmail.com> Date: Thu, 1 Jun 2006 14:27:13 +0200 From: "Attilio Rao" To: "Bruce Evans" , "Suleiman Souhlal" , freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org In-Reply-To: <3bbf2fe10606010525g7893408asdca7ada37e0dab41@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> <447DFA0C.20207@FreeBSD.org> <3bbf2fe10605311329h7adc1722j9088253515e0265b@mail.gmail.com> <20060601084052.D32549@delplex.bde.org> <3bbf2fe10605311632w58c2949buc072e58ac103d7d@mail.gmail.com> <20060601093016.ygeptkv80840gkww@netchild.homeip.net> <3bbf2fe10606010525g7893408asdca7ada37e0dab41@mail.gmail.com> Cc: Subject: Re: [patch] Adding optimized kernel copying support - Part III X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 12:27:21 -0000 2006/6/1, Alexander Leidinger : > AFAIR the DFly FPU rework allows to use FPU/XMM instructions in their > kernel without the need to do some manual state preserving (it's done > automatically on demand). So one could use XMM instructions in RAID 5 > or crypto parts of the code to test if it is a performance benefit. Do > I understand the above part right that with this patch this is also > the case for us in the UP case, but not in the SMP case? Since it seems to be a mis-understanding about this I will try to explain better. The patch can be saw as a 3-step issue*: 1) Implementing a robust and working method to preserve FPU/MMX/XMM usage into the kernel 2) Modifing copyin/copyout/memcpy in order to use xmm registers (in a first moment I thought to bzero/bcopy too but, since they're used for short amount of datas, xmm usage is deprecated due to heavyness of context saving). 3) Giving a reliable and better version of memcpy (that I called i686_memcpy). 1 is achieved successfully and it is the same in UP and SMP arches. It's imported from Dragonfly and I tested on my boxes very carefully and for a long time. It never give me problems. 2 seems good too, even if it needs more stress-testing I think. It is the same on UP and SMP and needs no changes. 3 is what I was speaking about having different versions for UP and SMP. It needs more testing even if the code seems correct to me. It's important to understand that it is an example on how new architecture for FPU saving/restore can be used (you can see at it as a reference for further coding I guess). Maybe FPU_PICKUP/FPU_DROP could be modified and exported in order to be used in different parts of the kernel... So I hope it's clearer now. Attilio * I refer, for this discussion, exclusively to FreeBSD-i386 -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-arch@FreeBSD.ORG Fri Jun 2 02:09:18 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 955E616AF5D for ; Fri, 2 Jun 2006 02:09:18 +0000 (UTC) (envelope-from wenbo.sun@sg-mxserver.o2micro.com) Received: from sg-mxserver.o2micro.com (sg-mxserver.o2micro.com [203.126.184.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32FAA43D7F for ; Fri, 2 Jun 2006 02:09:16 +0000 (GMT) (envelope-from wenbo.sun@sg-mxserver.o2micro.com) Received: from sg-exch2003.nt-fsrvr.o2micro.com ([10.5.1.3]) by sg-mxserver.o2micro.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 2 Jun 2006 10:10:51 +0800 Received: from sh-exch2003b.nt-fsrvr.o2micro.com ([10.20.1.2]) by sg-exch2003.nt-fsrvr.o2micro.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 2 Jun 2006 10:06:01 +0800 Content-class: urn:content-classes:message MIME-Version: 1.0 X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 2 Jun 2006 10:09:36 +0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: freebsd support the MPC8247 CPU? Thread-Index: AcaF6aD8i+/F67lwSHKfAJLLa227GA== From: "Wenbo Sun\(SH\)" To: X-OriginalArrivalTime: 02 Jun 2006 02:06:01.0500 (UTC) FILETIME=[18B495C0:01C685E9] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: freebsd support the MPC8247 CPU? 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: Fri, 02 Jun 2006 02:09:27 -0000 Dear FreeBSD Administrator/Developer =20 I want to know whether the FreeBSD OS support the MPC8247 CPU from the Freescale Semiconductor or not. I wish your reply, Thanks a lot!=20 =20 Thanks & regards Wenbo Sun O2Micro Technology (China) Co., Ltd. =20 Tel : 86-21-50271133-836 Fax: 86-21-50275776 Email : wenbo.sun@o2micro.com http://www.o2micro.com =20 Address :2B Zhangjiang Mansion, No. 560 Song Tao Road,Zhang Jiang High-tech Park Shanghai, China Zip Code: 201203 =20 From owner-freebsd-arch@FreeBSD.ORG Fri Jun 2 13:56:07 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA89016A42C for ; Fri, 2 Jun 2006 13:56:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D62543D49 for ; Fri, 2 Jun 2006 13:56:06 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [131.106.58.208] (72-255-64-174.client.stsn.net [72.255.64.174]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k52Du2f6087699; Fri, 2 Jun 2006 09:56:03 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-arch@freebsd.org Date: Fri, 2 Jun 2006 09:11:30 -0400 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606020911.31207.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1506/Fri Jun 2 00:01:20 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: "Wenbo Sun\(SH\)" Subject: Re: freebsd support the MPC8247 CPU? 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: Fri, 02 Jun 2006 13:56:07 -0000 On Thursday 01 June 2006 22:09, Wenbo Sun(SH) wrote: > Dear FreeBSD Administrator/Developer > > I want to know whether the FreeBSD OS support the MPC8247 CPU from the > Freescale Semiconductor or not. > I wish your reply, Thanks a lot! FreeBSD doesn't currently run on MIPS CPUs. -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Fri Jun 2 14:28:49 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61EAE16A455; Fri, 2 Jun 2006 14:28:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B40C843D46; Fri, 2 Jun 2006 14:28:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k52EQEns096058; Fri, 2 Jun 2006 08:26:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 02 Jun 2006 08:26:19 -0600 (MDT) Message-Id: <20060602.082619.-1962671121.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200606020911.31207.jhb@freebsd.org> References: <200606020911.31207.jhb@freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: wenbo.sun@o2micro.com, freebsd-arch@freebsd.org Subject: Re: freebsd support the MPC8247 CPU? 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: Fri, 02 Jun 2006 14:28:54 -0000 In message: <200606020911.31207.jhb@freebsd.org> John Baldwin writes: : On Thursday 01 June 2006 22:09, Wenbo Sun(SH) wrote: : > Dear FreeBSD Administrator/Developer : > : > I want to know whether the FreeBSD OS support the MPC8247 CPU from the : > Freescale Semiconductor or not. : > I wish your reply, Thanks a lot! : : FreeBSD doesn't currently run on MIPS CPUs. The MPC8247 CPU is a PowerPC CPU. FreeBSD does run generically on PowerPC, but a quick grep of the tree shows nothing specific to this CPU. Warner From owner-freebsd-arch@FreeBSD.ORG Fri Jun 2 15:20:52 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71E8916A425; Fri, 2 Jun 2006 15:20:52 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB65943D45; Fri, 2 Jun 2006 15:20:49 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [10.10.3.185] ([69.15.205.254]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k52FKet0015668; Fri, 2 Jun 2006 09:20:46 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <44805743.2080108@samsco.org> Date: Fri, 02 Jun 2006 09:20:35 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <200606020911.31207.jhb@freebsd.org> <20060602.082619.-1962671121.imp@bsdimp.com> In-Reply-To: <20060602.082619.-1962671121.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=3.8 tests=none autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: wenbo.sun@o2micro.com, freebsd-arch@freebsd.org Subject: Re: freebsd support the MPC8247 CPU? 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: Fri, 02 Jun 2006 15:20:55 -0000 M. Warner Losh wrote: > In message: <200606020911.31207.jhb@freebsd.org> > John Baldwin writes: > : On Thursday 01 June 2006 22:09, Wenbo Sun(SH) wrote: > : > Dear FreeBSD Administrator/Developer > : > > : > I want to know whether the FreeBSD OS support the MPC8247 CPU from the > : > Freescale Semiconductor or not. > : > I wish your reply, Thanks a lot! > : > : FreeBSD doesn't currently run on MIPS CPUs. > > The MPC8247 CPU is a PowerPC CPU. FreeBSD does run generically on > PowerPC, but a quick grep of the tree shows nothing specific to this > CPU. > > Warner The 824x series are essentially G3 family CPUs. The amount of effort required to bring up this CPU would be amount the same amount of effort needed to bring up a new ARM9 CPU. The only thing that complicates it is that the current ppc support is really tailored for the Mac platform, so it assumes access to OpenFirmware during bootup. That said, MPC824x and IBM 4xx series support would be awesome for getting into appliances that specialize in DSP. Scott From owner-freebsd-arch@FreeBSD.ORG Fri Jun 2 19:20:24 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C58516A604 for ; Fri, 2 Jun 2006 19:20:24 +0000 (UTC) (envelope-from nludban@columbus.rr.com) Received: from ms-smtp-01.ohiordc.rr.com (ms-smtp-01.ohiordc.rr.com [65.24.5.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F54C43D48 for ; Fri, 2 Jun 2006 19:20:22 +0000 (GMT) (envelope-from nludban@columbus.rr.com) Received: from columbus.rr.com (cpe-65-24-34-191.columbus.res.rr.com [65.24.34.191]) by ms-smtp-01.ohiordc.rr.com (8.13.6/8.13.6) with SMTP id k52JKBtt019330; Fri, 2 Jun 2006 15:20:13 -0400 (EDT) Date: Fri, 2 Jun 2006 15:13:10 -0400 From: Neil Ludban To: Scott Long Message-Id: <20060602151310.714496f1.nludban@columbus.rr.com> In-Reply-To: <44805743.2080108@samsco.org> References: <200606020911.31207.jhb@freebsd.org> <20060602.082619.-1962671121.imp@bsdimp.com> <44805743.2080108@samsco.org> X-Mailer: Sylpheed version 2.0.4 (GTK+ 2.8.7; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine Cc: wenbo.sun@o2micro.com, freebsd-arch@freebsd.org Subject: Re: freebsd support the MPC8247 CPU? 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: Fri, 02 Jun 2006 19:20:28 -0000 On Fri, 02 Jun 2006 09:20:35 -0600 Scott Long wrote: > M. Warner Losh wrote: > > In message: <200606020911.31207.jhb@freebsd.org> > > John Baldwin writes: > > : On Thursday 01 June 2006 22:09, Wenbo Sun(SH) wrote: > > : > Dear FreeBSD Administrator/Developer > > : > > > : > I want to know whether the FreeBSD OS support the MPC8247 CPU from the > > : > Freescale Semiconductor or not. > > : > I wish your reply, Thanks a lot! > > : > > : FreeBSD doesn't currently run on MIPS CPUs. > > > > The MPC8247 CPU is a PowerPC CPU. FreeBSD does run generically on > > PowerPC, but a quick grep of the tree shows nothing specific to this > > CPU. > > > > Warner > > The 824x series are essentially G3 family CPUs. The amount of effort > required to bring up this CPU would be amount the same amount of effort > needed to bring up a new ARM9 CPU. The only thing that complicates it > is that the current ppc support is really tailored for the Mac platform, > so it assumes access to OpenFirmware during bootup. That said, MPC824x > and IBM 4xx series support would be awesome for getting into appliances > that specialize in DSP. Freescale broke their numbering scheme on this one. It's a variant of the MPC8272 (8247, 8248, and 8271 were the other numbers, IIRC - optional ATM and security co-processor). It has a 603e core, which is based on the G2. Try searching on the 8272 number and for PowerQUICC-II device drivers. There were a couple incomplete NetBSD ports floating around the Internet, but they were already old when I was working on a proprietary port (for NetBSD) back in 2004. From owner-freebsd-arch@FreeBSD.ORG Fri Jun 2 21:16:50 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E73216A46D for ; Fri, 2 Jun 2006 21:16:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84C7C43D46 for ; Fri, 2 Jun 2006 21:16:49 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [131.106.58.208] (72-255-64-174.client.stsn.net [72.255.64.174]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k52LGhZt093940; Fri, 2 Jun 2006 17:16:44 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Fri, 2 Jun 2006 16:30:43 -0400 User-Agent: KMail/1.9.1 References: <200606020911.31207.jhb@freebsd.org> <20060602.082619.-1962671121.imp@bsdimp.com> In-Reply-To: <20060602.082619.-1962671121.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606021630.44897.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1507/Fri Jun 2 14:40:23 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: wenbo.sun@o2micro.com, freebsd-arch@freebsd.org Subject: Re: freebsd support the MPC8247 CPU? 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: Fri, 02 Jun 2006 21:16:50 -0000 On Friday 02 June 2006 10:26, M. Warner Losh wrote: > In message: <200606020911.31207.jhb@freebsd.org> > John Baldwin writes: > : On Thursday 01 June 2006 22:09, Wenbo Sun(SH) wrote: > : > Dear FreeBSD Administrator/Developer > : > > : > I want to know whether the FreeBSD OS support the MPC8247 CPU from the > : > Freescale Semiconductor or not. > : > I wish your reply, Thanks a lot! > : > : FreeBSD doesn't currently run on MIPS CPUs. > > The MPC8247 CPU is a PowerPC CPU. FreeBSD does run generically on > PowerPC, but a quick grep of the tree shows nothing specific to this > CPU. I blame haste and Google. :-P -- John Baldwin