From owner-freebsd-arch@FreeBSD.ORG Sun May 25 00:22:14 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EEBB106568D for ; Sun, 25 May 2008 00:22:14 +0000 (UTC) (envelope-from peter@wemm.org) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 8C5978FC30 for ; Sun, 25 May 2008 00:22:13 +0000 (UTC) (envelope-from peter@wemm.org) Received: by an-out-0708.google.com with SMTP id b33so317396ana.13 for ; Sat, 24 May 2008 17:22:12 -0700 (PDT) Received: by 10.101.70.5 with SMTP id x5mr4453235ank.12.1211673377589; Sat, 24 May 2008 16:56:17 -0700 (PDT) Received: by 10.100.8.6 with HTTP; Sat, 24 May 2008 16:56:17 -0700 (PDT) Message-ID: Date: Sat, 24 May 2008 16:56:17 -0700 From: "Peter Wemm" To: "Robert Watson" In-Reply-To: <20080524165519.K9809@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> Cc: arch@freebsd.org, current@freebsd.org, Coleman Kane , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 25 May 2008 00:22:14 -0000 On Sat, May 24, 2008 at 8:56 AM, Robert Watson wrote: > > On Sat, 24 May 2008, Coleman Kane wrote: > >> I've created a quick table of these at the following location: >> http://wiki.freebsd.org/NetworkNeedsGiant >> >> Please everyone feel free to fill in the blanks. I'll try to do it as well >> as time permits. > > FWIW, I suspect fixing things like SLIP and kernel PPP are fairly trivial > once tty locking is in place -- a per-softc mutex and a bit of locking in > the obvious spots would likely do it without too much trouble. In some > paths, it might be necessary to inject data via the netisr, if that's not > already being done (probably is) to avoid input/output lock order issues. ppp_tty.c is kind of hairy and rather stale. I'd be inclined to drop strong hints about switching to either userland ppp(8), or mpd + netgraph if you want packets to stay in the kernel path and avoid userland. I was once a big user of pppd(8) and if_ppp.c / ppp_tty.c and maintained them for a while. But I use ppp(8) now and have no interest in maintaining it anymore. pppd/if_ppp.c/ppp_tty.c is many many years stale compared to what its vendor supplies. And, I think if_sl.c could probably do the same treatment. It would probably be a better investment in time to write a userland slip driver and if_tun.c and/or write a ng_slip.c module -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-arch@FreeBSD.ORG Sun May 25 09:58:56 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4C71106567B; Sun, 25 May 2008 09:58:56 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 983DE8FC18; Sun, 25 May 2008 09:58:56 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id AB7AB46B66; Sun, 25 May 2008 05:58:55 -0400 (EDT) Date: Sun, 25 May 2008 10:58:55 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Peter Wemm In-Reply-To: Message-ID: <20080525105726.O39741@fledge.watson.org> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, current@freebsd.org, Coleman Kane , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 25 May 2008 09:58:57 -0000 On Sat, 24 May 2008, Peter Wemm wrote: >> FWIW, I suspect fixing things like SLIP and kernel PPP are fairly trivial >> once tty locking is in place -- a per-softc mutex and a bit of locking in >> the obvious spots would likely do it without too much trouble. In some >> paths, it might be necessary to inject data via the netisr, if that's not >> already being done (probably is) to avoid input/output lock order issues. > > ppp_tty.c is kind of hairy and rather stale. I'd be inclined to drop strong > hints about switching to either userland ppp(8), or mpd + netgraph if you > want packets to stay in the kernel path and avoid userland. > > I was once a big user of pppd(8) and if_ppp.c / ppp_tty.c and maintained > them for a while. But I use ppp(8) now and have no interest in maintaining > it anymore. > > pppd/if_ppp.c/ppp_tty.c is many many years stale compared to what its vendor > supplies. > > And, I think if_sl.c could probably do the same treatment. It would > probably be a better investment in time to write a userland slip driver and > if_tun.c and/or write a ng_slip.c module While I'd be quite supportive of something along these lines, I think it probably is more work to port SLIP to userspace than to hack the current code a little bit to be MPSAFE, assuming it remains supported with the revised tty code. SLIP is a fairly straight-forward piece of code, as long as you don't try to understand the line discipline stuff. :-) Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Sun May 25 23:06:34 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10A471065672; Sun, 25 May 2008 23:06:34 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id CFEE88FC0C; Sun, 25 May 2008 23:06:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 2CA7C46C2D; Sun, 25 May 2008 19:06:33 -0400 (EDT) Date: Mon, 26 May 2008 00:06:33 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: current@FreeBSD.org, arch@FreeBSD.org In-Reply-To: <20080521224350.T63482@fledge.watson.org> Message-ID: <20080526000329.K36357@fledge.watson.org> References: <20080310122338.T29929@fledge.watson.org> <20080521224350.T63482@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: net@FreeBSD.org Subject: HEADS UP: netatm removed (was: Re: netatm removal warning) 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, 25 May 2008 23:06:34 -0000 On Wed, 21 May 2008, Robert Watson wrote: >> 10 March 2008 E-mail warning to arch@/net@ >> 10 April 2008 E-mail warning to arch@/net@ >> 10 May 2008 Removal of netatm from HEAD >> 20 May 2008 Removal of netatm from RELENG_7 >> >> Obviously, netatm will remain in the revision control history should anyone >> wish to ressurect it after that date. However, I suspect that those >> interested in ATM on FreeBSD have long since been using Harti's netgraph >> ATM framework. > > Somehow the dates slipped pasted more quickly than I had hoped -- this is > the HEADS UP that, on a slightly delayed schedule, I will be trimming netatm > from the src tree for HEAD, and then a week or two later, from RELENG_7. > Assuming all goes well, this should result in no functional change at all. Per the long-announced schedule, netatm has now been removed from the CVS HEAD. Assuming no unexpected problems, it will likewise be removed from RELENG_7 in a few weeks. I apologize in advance if there's any build disruption; this touched a lot of Makefiles, and while netatm hasn't been connected to the build in ten months, there is always a risk of problems with a change of this scope. I'll keep an eye out for tinderbox warnings and correct as quickly as possible if any arise. Thanks, Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Mon May 26 09:30:21 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5C131065670; Mon, 26 May 2008 09:30:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8FA178FC18; Mon, 26 May 2008 09:30:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 07AB346B06; Mon, 26 May 2008 05:30:21 -0400 (EDT) Date: Mon, 26 May 2008 10:30:20 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: arch@FreeBSD.org, net@FreeBSD.org Message-ID: <20080526102345.G26343@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Remaining non-MPSAFE netisr handlers 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, 26 May 2008 09:30:21 -0000 Dear all: In the continuing campaign to eliminate the Giant lock from the dregs of the network stack, I thought I'd send out a list of non-MPSAFE netisr handlers: Location Handler Removed with IFF_NEEDSGIANT dev/usb/usb_ethersubr.c:120 usbintr Yes net/if_ppp.c:277 pppintr Yes netinet6/ip6_input.c ip6_input No The plan for 8.0 is to remove the NETISR_MPSAFE flag -- all netisr handlers will be executed without the Giant lock. This doesn't prohibit acquiring Giant in the handler if required, although that's undesirable for the obvious reasons (potentially stalling interrupt handling, etc). Obviously, what would be most desirable is eliminating the remaining requirement for Giant in the IPv6 input path, primarily consisting of mld6 and nd6. With this in mind, my current plan is to remove the flag and add explicit Giant acquisition for any remaining handlers in June when IFF_NEEDSGIANT device drivers are disabled. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Mon May 26 10:07:39 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5B65106566B; Mon, 26 May 2008 10:07:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B84DE8FC2B; Mon, 26 May 2008 10:07:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 5177E46BAC; Mon, 26 May 2008 06:07:39 -0400 (EDT) Date: Mon, 26 May 2008 11:07:39 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: arch@FreeBSD.org, net@FreeBSD.org Message-ID: <20080526110543.J26343@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Wiki page for non-MPSAFE network stack de-orbit scheduling 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, 26 May 2008 10:07:40 -0000 Just to keep track of things: http://wiki.freebsd.org/NONMPSAFE_DEORBIT Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Mon May 26 11:06:45 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE8171065681 for ; Mon, 26 May 2008 11:06:45 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 817658FC1E for ; Mon, 26 May 2008 11:06:45 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4QB6jAt064836 for ; Mon, 26 May 2008 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4QB6jd1064832 for freebsd-arch@FreeBSD.org; Mon, 26 May 2008 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 26 May 2008 11:06:45 GMT Message-Id: <200805261106.m4QB6jd1064832@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org 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, 26 May 2008 11:06:45 -0000 Current FreeBSD problem reports Critical problems Serious problems Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Mon May 26 13:10:34 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC0F01065690; Mon, 26 May 2008 13:10:34 +0000 (UTC) (envelope-from ade@FreeBSD.org) Received: from panix.lovett.com (panix.lovett.com [166.84.7.128]) by mx1.freebsd.org (Postfix) with ESMTP id 7E8338FC33; Mon, 26 May 2008 13:10:34 +0000 (UTC) (envelope-from ade@FreeBSD.org) Received: from [24.216.255.15] (helo=inferno.lab.lovett.com ident=ade) by panix.lovett.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1K0bu0-0003eG-4a; Mon, 26 May 2008 12:34:12 +0000 Message-Id: <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> From: Ade Lovett To: Robert Watson In-Reply-To: <20080525105726.O39741@fledge.watson.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 26 May 2008 05:34:09 -0700 References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> X-Mailer: Apple Mail (2.919.2) Cc: arch@freebsd.org, current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 13:10:34 -0000 On May 25, 2008, at 02:58 , Robert Watson wrote: > While I'd be quite supportive of something along these lines, I > think it probably is more work to port SLIP to userspace than to > hack the current code a little bit to be MPSAFE, assuming it remains > supported with the revised tty code. SLIP is a fairly straight- > forward piece of code, as long as you don't try to understand the > line discipline stuff. :-) Given that this is (a) 2008 and (b) 8.x we're talking about, are there really that many consumers of SLIP to warrant it being carried forward at all? Seems to me that it would not be unreasonable to give a heads up that the current kernel-space ppp/slip (and, for that matter, plip) drivers are going away some time before 8.0-RELEASE, pppd is more than adequately replaced by userland-ppp or netgraph, and if there's some critical need by someone to have SLIP and/or PLIP, then they'll need to step up to the plate to do the necessary re-implementation. Or stick with 7.x, which would be unaffected by this. We have a lot of network drivers that are potentially up for axing with the move to MPSAFE. Why not push just a little harder and slice out some serious legacy code? It's all well and good to be able to say that the current release of the kernel supports hardware that hasn't been used, other than in idiosyncratic situations (yes, ahc(4), I'm looking at you) for 5+ years, but it seems that we have an opportunity here to break out the Danish Ax[tm] in anger, and do some heavy-duty culling before 8.0-REL. -aDe From owner-freebsd-arch@FreeBSD.ORG Mon May 26 13:42:41 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E37D81065683; Mon, 26 May 2008 13:42:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B1B808FC16; Mon, 26 May 2008 13:42:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 3B09046B49; Mon, 26 May 2008 09:42:41 -0400 (EDT) Date: Mon, 26 May 2008 14:42:41 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ade Lovett In-Reply-To: <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> Message-ID: <20080526142931.Q26343@fledge.watson.org> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 13:42:42 -0000 On Mon, 26 May 2008, Ade Lovett wrote: > On May 25, 2008, at 02:58 , Robert Watson wrote: > >> While I'd be quite supportive of something along these lines, I think it >> probably is more work to port SLIP to userspace than to hack the current >> code a little bit to be MPSAFE, assuming it remains supported with the >> revised tty code. SLIP is a fairly straight-forward piece of code, as long >> as you don't try to understand the line discipline stuff. :-) > > Given that this is (a) 2008 and (b) 8.x we're talking about, are there > really that many consumers of SLIP to warrant it being carried forward at > all? > > Seems to me that it would not be unreasonable to give a heads up that the > current kernel-space ppp/slip (and, for that matter, plip) drivers are going > away some time before 8.0-RELEASE, pppd is more than adequately replaced by > userland-ppp or netgraph, and if there's some critical need by someone to > have SLIP and/or PLIP, then they'll need to step up to the plate to do the > necessary re-implementation. The thread you're replying began with precisely such a heads up. :-) Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Mon May 26 15:05:57 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613821065683; Mon, 26 May 2008 15:05:57 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) by mx1.freebsd.org (Postfix) with ESMTP id 21F518FC24; Mon, 26 May 2008 15:05:57 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (adsl-074-171-236-053.sip.jan.bellsouth.net [74.171.236.53]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 4688537B5AE; Mon, 26 May 2008 09:47:02 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id D2A0161C77; Mon, 26 May 2008 09:47:01 -0500 (CDT) Date: Mon, 26 May 2008 09:47:01 -0500 From: "Matthew D. Fuller" To: Ade Lovett Message-ID: <20080526144701.GG1689@over-yonder.net> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.17-fullermd.4 (2007-11-01) X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on thyme.infocus-llc.com X-Virus-Status: Clean Cc: arch@freebsd.org, Robert Watson , current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 15:05:57 -0000 On Mon, May 26, 2008 at 05:34:09AM -0700 I heard the voice of Ade Lovett, and lo! it spake thus: > > It's all well and good to be able to say that the current release of > the kernel supports hardware that hasn't been used, other than in > idiosyncratic situations (yes, ahc(4), I'm looking at you) for 5+ > years, [...] Neat, I didn't know I was idiosyncratic. % uname -sr FreeBSD 8.0-CURRENT % grep ^ahc /var/run/dmesg.boot ahc0: port 0x1000-0x10ff mem 0xf8001000-0xf8001fff irq 19 at device 11.0 on pci0 ahc0: [ITHREAD] ahc1: port 0x1400-0x14ff mem 0xf8002000-0xf8002fff irq 16 at device 13.0 on pci0 ahc1: [ITHREAD] ahc2: port 0x1800-0x18ff mem 0xf8003000-0xf8003fff irq 17 at device 13.1 on pci0 ahc2: [ITHREAD] (all 3 in use) -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. From owner-freebsd-arch@FreeBSD.ORG Mon May 26 15:26:14 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3C44106567B; Mon, 26 May 2008 15:26:14 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9FD208FC29; Mon, 26 May 2008 15:26:14 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 2781F46B42; Mon, 26 May 2008 11:26:14 -0400 (EDT) Date: Mon, 26 May 2008 16:26:14 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Bruce M. Simpson" In-Reply-To: <483AD498.6070207@FreeBSD.org> Message-ID: <20080526162427.X26343@fledge.watson.org> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> <483AD498.6070207@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, current@freebsd.org, Ade Lovett , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 15:26:15 -0000 On Mon, 26 May 2008, Bruce M. Simpson wrote: >> Given that this is (a) 2008 and (b) 8.x we're talking about, are there >> really that many consumers of SLIP to warrant it being carried forward at >> all? > > It's kind of a basic. [C]SLIP has been historically handy to have around for > situations which warrant it. Mind you, given that we have had tun(4) in the > tree for years now, a userland implementation of SLIP is possible. > > As with all of these things it's down to someone sitting down and doing it. > > I'm not volunteering to support any of this as I don't use it myself (got > enough on my plate), merely pointing out that support for SLIP in a system > is something many people have taken for granted over the years, and for > prototyping something or providing IP over a simple serial link without the > configuration overhead of PPP, SLIP is something someone might be using. > > P.S. ahc(4) is commodity hardware, I think it can stay right where it is > thank-you. My suspicion is that getting SLIP basically working in userspace is fairly straight forward, although I'm not sure how well-suited some of our current admin tools (slattach, etc) are for the purpose. If the new tty code maintains support for line disciplines, updating the existing SLIP code and adding locking code would probably be an equally sized (or shorter) task. SLIP has its subtleties, but the current implementation is relatively straight-forward, well-documented, etc. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Mon May 26 15:35:51 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5FAC1065682; Mon, 26 May 2008 15:35:51 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 901128FC35; Mon, 26 May 2008 15:35:51 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 0B90710FC5E; Mon, 26 May 2008 11:17:46 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 26 May 2008 11:17:46 -0400 X-Sasl-enc: BmCH8Ddrm/NXZI37g3u6FoKKwTjVsBDt4nCQLlLDEHBz 1211815065 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 14E19110AB; Mon, 26 May 2008 11:17:44 -0400 (EDT) Message-ID: <483AD498.6070207@FreeBSD.org> Date: Mon, 26 May 2008 16:17:44 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Ade Lovett References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> In-Reply-To: <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Robert Watson , current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 15:35:52 -0000 Ade Lovett wrote: > > On May 25, 2008, at 02:58 , Robert Watson wrote: >> While I'd be quite supportive of something along these lines, I think >> it probably is more work to port SLIP to userspace than to hack the >> current code a little bit to be MPSAFE, assuming it remains supported >> with the revised tty code. SLIP is a fairly straight-forward piece >> of code, as long as you don't try to understand the line discipline >> stuff. :-) > > Given that this is (a) 2008 and (b) 8.x we're talking about, are there > really that many consumers of SLIP to warrant it being carried forward > at all? It's kind of a basic. [C]SLIP has been historically handy to have around for situations which warrant it. Mind you, given that we have had tun(4) in the tree for years now, a userland implementation of SLIP is possible. As with all of these things it's down to someone sitting down and doing it. I'm not volunteering to support any of this as I don't use it myself (got enough on my plate), merely pointing out that support for SLIP in a system is something many people have taken for granted over the years, and for prototyping something or providing IP over a simple serial link without the configuration overhead of PPP, SLIP is something someone might be using. P.S. ahc(4) is commodity hardware, I think it can stay right where it is thank-you. From owner-freebsd-arch@FreeBSD.ORG Mon May 26 15:42:16 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D987A1065679; Mon, 26 May 2008 15:42:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id A76608FC22; Mon, 26 May 2008 15:42:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 542DF46B38; Mon, 26 May 2008 11:42:16 -0400 (EDT) Date: Mon, 26 May 2008 16:42:16 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Matthew D. Fuller" In-Reply-To: <20080526144701.GG1689@over-yonder.net> Message-ID: <20080526164151.D26343@fledge.watson.org> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> <20080526144701.GG1689@over-yonder.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, current@freebsd.org, Ade Lovett , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 15:42:17 -0000 On Mon, 26 May 2008, Matthew D. Fuller wrote: > On Mon, May 26, 2008 at 05:34:09AM -0700 I heard the voice of > Ade Lovett, and lo! it spake thus: >> >> It's all well and good to be able to say that the current release of the >> kernel supports hardware that hasn't been used, other than in idiosyncratic >> situations (yes, ahc(4), I'm looking at you) for 5+ years, [...] > > Neat, I didn't know I was idiosyncratic. Somehow it's always me who is idiosyncratic: ahc0: port 0xdc00-0xdcff mem 0xf9fff000-0xf9ffffff irq 14 at device 11.0 on pci2 da0 at ahc0 bus 0 target 0 lun 0 Robert N M Watson Computer Laboratory University of Cambridge > > % uname -sr > FreeBSD 8.0-CURRENT > > % grep ^ahc /var/run/dmesg.boot > ahc0: port 0x1000-0x10ff mem 0xf8001000-0xf8001fff irq 19 at device 11.0 on pci0 > ahc0: [ITHREAD] > ahc1: port 0x1400-0x14ff mem 0xf8002000-0xf8002fff irq 16 at device 13.0 on pci0 > ahc1: [ITHREAD] > ahc2: port 0x1800-0x18ff mem 0xf8003000-0xf8003fff irq 17 at device 13.1 on pci0 > ahc2: [ITHREAD] > > (all 3 in use) > > > -- > Matthew Fuller (MF4839) | fullermd@over-yonder.net > Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ > On the Internet, nobody can hear you scream. > From owner-freebsd-arch@FreeBSD.ORG Mon May 26 16:17:11 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 176C0106566C; Mon, 26 May 2008 16:17:11 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id C3B258FC15; Mon, 26 May 2008 16:17:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C2DCF1CC1A; Mon, 26 May 2008 18:16:08 +0200 (CEST) Date: Mon, 26 May 2008 18:16:08 +0200 From: Ed Schouten To: Robert Watson Message-ID: <20080526161608.GE64397@hoeg.nl> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> <483AD498.6070207@FreeBSD.org> <20080526162427.X26343@fledge.watson.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6Vw0j8UKbyX0bfpA" Content-Disposition: inline In-Reply-To: <20080526162427.X26343@fledge.watson.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: arch@freebsd.org, "Bruce M. Simpson" , current@freebsd.org, Ade Lovett , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 16:17:11 -0000 --6Vw0j8UKbyX0bfpA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Robert, * Robert Watson wrote: > If the new tty code maintains support for line disciplines, updating > the existing SLIP code and adding locking code would probably be an > equally sized (or shorter) task. The new TTY layer should still support line disciplines, unfortunately I haven't implemented the line discipline switching (TIOCSETD) yet. I would really prefer to have this in userspace. There are several advantages of implementing this in userspace: - We don't have to port things twice (make it MPSAFE first and port it to the new TTY layer later, or the other way around). - It is less likely to break. The entire userspace TTY and Tun/Tap userspace programming interfaces are more likely to be stable than the kernel interfaces. - It will be easier to port to other operating systems. - Implementing this in userspace could make it easier to configure and more flexible. Any comments/ideas/etc? --=20 Ed Schouten WWW: http://80386.nl/ --6Vw0j8UKbyX0bfpA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEUEARECAAYFAkg64kgACgkQ52SDGA2eCwVNEwCeMjSWFgbJCjcu53B1O8b2XFqe bksAlRZdlcBdfp8GQDALl4pjfAvspFs= =4oXx -----END PGP SIGNATURE----- --6Vw0j8UKbyX0bfpA-- From owner-freebsd-arch@FreeBSD.ORG Mon May 26 16:45:48 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3421106566C; Mon, 26 May 2008 16:45:48 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 8E5668FC13; Mon, 26 May 2008 16:45:48 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.2/8.14.2) with ESMTP id m4QGcijZ037726; Mon, 26 May 2008 09:38:44 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.2/8.14.2/Submit) id m4QGciN3037725; Mon, 26 May 2008 09:38:44 -0700 (PDT) (envelope-from sgk) Date: Mon, 26 May 2008 09:38:44 -0700 From: Steve Kargl To: Ade Lovett Message-ID: <20080526163844.GA37636@troutmask.apl.washington.edu> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: arch@freebsd.org, Robert Watson , current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 16:45:48 -0000 On Mon, May 26, 2008 at 05:34:09AM -0700, Ade Lovett wrote: > > idiosyncratic situations (yes, ahc(4), I'm looking at you) for 5+ What's the problem with ahc(4)? My ahc controller is one of the most reliable pieces of hardware that I've purchased. It's also the only interface available to my external DLT tape drive. -- Steve From owner-freebsd-arch@FreeBSD.ORG Mon May 26 17:51:45 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1948C106566C; Mon, 26 May 2008 17:51:45 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mail.digiware.nl (www.tegenbosch28.nl [217.21.251.97]) by mx1.freebsd.org (Postfix) with ESMTP id B589C8FC1C; Mon, 26 May 2008 17:51:44 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from localhost (localhost.digiware.nl [127.0.0.1]) by mail.digiware.nl (Postfix) with ESMTP id 11C0E17394; Mon, 26 May 2008 19:21:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.nl Received: from mail.digiware.nl ([127.0.0.1]) by localhost (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lg+ou8gvjXwu; Mon, 26 May 2008 19:21:25 +0200 (CEST) Received: from [192.168.2.10] (unknown [192.168.2.10]) by mail.digiware.nl (Postfix) with ESMTP id 285D31738B; Mon, 26 May 2008 19:21:24 +0200 (CEST) Message-ID: <483AF194.2020002@digiware.nl> Date: Mon, 26 May 2008 19:21:24 +0200 From: Willem Jan Withagen Organization: Digiware User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Steve Kargl References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> <20080526163844.GA37636@troutmask.apl.washington.edu> In-Reply-To: <20080526163844.GA37636@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Robert Watson , current@freebsd.org, Ade Lovett , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 26 May 2008 17:51:45 -0000 Steve Kargl wrote: > On Mon, May 26, 2008 at 05:34:09AM -0700, Ade Lovett wrote: >> idiosyncratic situations (yes, ahc(4), I'm looking at you) for 5+ > > What's the problem with ahc(4)? My ahc controller is one of > the most reliable pieces of hardware that I've purchased. > It's also the only interface available to my external DLT > tape drive. Not to forget the large amount of embedded ahc's that got implemented on all kinds of serverbords. I still have quite a large set of customers with such ASUS boards I sold to them over the years. Up 'till now I've been able to keep 'm running with the pace of FreeBSD. Removing this driver would "leave them behind". I can force them to upgrade, but thus far there has been little reason for that (hardware wise). Just my 2 ct's --WjW From owner-freebsd-arch@FreeBSD.ORG Mon May 26 18:13:02 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91290106564A; Mon, 26 May 2008 18:13:02 +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 3DE548FC13; Mon, 26 May 2008 18:13:01 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id m4QHkbWZ096376; Mon, 26 May 2008 11:46:37 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <483AF77D.3030006@samsco.org> Date: Mon, 26 May 2008 11:46:37 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Ade Lovett References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> In-Reply-To: <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: arch@freebsd.org, Robert Watson , current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 18:13:02 -0000 Ade Lovett wrote: > It's all well and good to be able to say that the current release of the > kernel supports hardware that hasn't been used, other than in > idiosyncratic situations (yes, ahc(4), I'm looking at you) for 5+ years, > but it seems that we have an opportunity here to break out the Danish > Ax[tm] in anger, and do some heavy-duty culling before 8.0-REL. > Why does this argument on hardware support keep on coming up? For christ sake, every year some yahoo speaks up and declares that he knows what hardware should stay and what should go, and every year that yahoo gets educated on how counterproductive that is to the project. I'll just skip to the end of the recording and say, "NO". Scott From owner-freebsd-arch@FreeBSD.ORG Mon May 26 18:58:02 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEC211065730 for ; Mon, 26 May 2008 18:58:02 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout2.freenet.de (mout2.freenet.de [IPv6:2001:748:100:40::2:4]) by mx1.freebsd.org (Postfix) with ESMTP id 188B18FC17 for ; Mon, 26 May 2008 18:58:02 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.20] (helo=10.mx.freenet.de) by mout2.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #19) id 1K0htQ-00019M-52; Mon, 26 May 2008 20:58:00 +0200 Received: from r9ea7.r.pppool.de ([89.54.158.167]:39991 helo=peedub.jennejohn.org) by 10.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #12) id 1K0htP-0002Eq-F8; Mon, 26 May 2008 20:58:00 +0200 Date: Mon, 26 May 2008 20:57:57 +0200 From: Gary Jennejohn To: arch@freebsd.org Message-ID: <20080526205757.6e49abba@peedub.jennejohn.org> In-Reply-To: <483AF194.2020002@digiware.nl> References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> <20080526163844.GA37636@troutmask.apl.washington.edu> <483AF194.2020002@digiware.nl> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.10.14; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Willem Jan Withagen , Steve Kargl Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2008 18:58:02 -0000 On Mon, 26 May 2008 19:21:24 +0200 Willem Jan Withagen wrote: > Steve Kargl wrote: > > On Mon, May 26, 2008 at 05:34:09AM -0700, Ade Lovett wrote: > >> idiosyncratic situations (yes, ahc(4), I'm looking at you) for 5+ > > > > What's the problem with ahc(4)? My ahc controller is one of > > the most reliable pieces of hardware that I've purchased. > > It's also the only interface available to my external DLT > > tape drive. > > Not to forget the large amount of embedded ahc's that got implemented on > all kinds of serverbords. I still have quite a large set of customers > with such ASUS boards I sold to them over the years. Up 'till now I've > been able to keep 'm running with the pace of FreeBSD. > Removing this driver would "leave them behind". > > I can force them to upgrade, but thus far there has been little reason > for that (hardware wise). > [pruned the over-zealous CCs] Well, one problem with ahc is that it doesn't play nicely with >= 4GB of memory on AMD64. I have ahc and 4GB of memory and have to set hw.physmem="3500m" in /boot/loader.conf to keep it from dumping its cookies at boot time. Otherwise I'm more than happy with my 29160N. --- Gary Jennejohn From owner-freebsd-arch@FreeBSD.ORG Mon May 26 19:08:55 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38BEE1065679; Mon, 26 May 2008 19:08:55 +0000 (UTC) (envelope-from ade@freebsd.org) Received: from panix.lovett.com (panix.lovett.com [166.84.7.128]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1E98FC0A; Mon, 26 May 2008 19:08:54 +0000 (UTC) (envelope-from ade@freebsd.org) Received: from [24.216.255.15] (helo=inferno.lab.lovett.com ident=ade) by panix.lovett.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1K0i3x-0000cO-Tv; Mon, 26 May 2008 19:08:54 +0000 Message-Id: From: Ade Lovett To: Scott Long In-Reply-To: <483AF77D.3030006@samsco.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 26 May 2008 12:08:50 -0700 References: <20080524111715.T64552@fledge.watson.org> <1211640498.1510.8.camel@localhost> <20080524165519.K9809@fledge.watson.org> <20080525105726.O39741@fledge.watson.org> <5D4AF8D7-88A7-4197-A0FE-7CA992EE5F96@FreeBSD.org> <483AF77D.3030006@samsco.org> X-Mailer: Apple Mail (2.919.2) Cc: arch@freebsd.org, current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 19:08:55 -0000 On May 26, 2008, at 10:46 , Scott Long wrote: > I'll just skip to the end of the recording and say, "NO". I wasn't aware that Web 2.0 did away with implied tags, not forgetting mode(tongue, cheek), etc.. etc.. Ah well. -aDe From owner-freebsd-arch@FreeBSD.ORG Mon May 26 19:41:12 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42CDB1065678; Mon, 26 May 2008 19:41:12 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id F0FF48FC0A; Mon, 26 May 2008 19:41:11 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 7A0E0170E4; Mon, 26 May 2008 19:11:17 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m4QJBGEx042522; Mon, 26 May 2008 19:11:17 GMT (envelope-from phk@critter.freebsd.dk) To: Ed Schouten From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 26 May 2008 18:16:08 +0200." <20080526161608.GE64397@hoeg.nl> Date: Mon, 26 May 2008 19:11:16 +0000 Message-ID: <42521.1211829076@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 26 May 2008 19:41:12 -0000 In message <20080526161608.GE64397@hoeg.nl>, Ed Schouten writes: >The new TTY layer should still support line disciplines, [...] Actually... I think it shouldn't. Line-disc's were introduced to interface weird-ass hardware like digitizing tablets that had very high data rates, but very little information (16 bit X, 16 bit Y and a couple of buttons, like modern mice) which would cost inordinate amounts of CPU time to support in userland on a VAX computer. If_slip.c happened in the kernel because there was no tun device, people cranked the speed up all they could (Hands up: who has changed the Xtal on a VAX serial port for faster SLIP ?) if_ppp happened because that was how if_slip did it. Today there is no longer a market for line disciplines and in practice we have only one: the POSIX mandated "termios", which also emulates the older "termio" ioctls. Anybody who cares to browse the three pages of text that RFC1055 contains, will see that implementing SLIP in userland using tun(4) and the code on the other three pages of RFC1055 is a trivial task not even worthy of a SoC student. PPP over async is already much better handled in ppp(8) thanks to Brians valiant effort back in the stoneage of the internet. We should summarily kill the concept of line disciplines as a modular component and decide that TTYs can be used with termios(4) or raw mode and leave it at that. Poul-Henning -- 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 27 06:15:21 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C87A2106567B for ; Tue, 27 May 2008 06:15:21 +0000 (UTC) (envelope-from peter@wemm.org) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7CAFB8FC23 for ; Tue, 27 May 2008 06:15:21 +0000 (UTC) (envelope-from peter@wemm.org) Received: by an-out-0708.google.com with SMTP id b33so541757ana.13 for ; Mon, 26 May 2008 23:15:20 -0700 (PDT) Received: by 10.100.194.5 with SMTP id r5mr848090anf.146.1211868920478; Mon, 26 May 2008 23:15:20 -0700 (PDT) Received: by 10.100.8.6 with HTTP; Mon, 26 May 2008 23:15:20 -0700 (PDT) Message-ID: Date: Mon, 26 May 2008 23:15:20 -0700 From: "Peter Wemm" To: "Poul-Henning Kamp" In-Reply-To: <42521.1211829076@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080526161608.GE64397@hoeg.nl> <42521.1211829076@critter.freebsd.dk> Cc: Ed Schouten , current@freebsd.org, arch@freebsd.org, Robert Watson , Ade Lovett , net@freebsd.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 06:15:21 -0000 On Mon, May 26, 2008 at 12:11 PM, Poul-Henning Kamp wrote: > In message <20080526161608.GE64397@hoeg.nl>, Ed Schouten writes: > >>The new TTY layer should still support line disciplines, [...] > > Actually... I think it shouldn't. > > Line-disc's were introduced to interface weird-ass hardware like > digitizing tablets that had very high data rates, but very little > information (16 bit X, 16 bit Y and a couple of buttons, like modern > mice) which would cost inordinate amounts of CPU time to support > in userland on a VAX computer. > > If_slip.c happened in the kernel because there was no tun device, > people cranked the speed up all they could (Hands up: who has changed > the Xtal on a VAX serial port for faster SLIP ?) > > if_ppp happened because that was how if_slip did it. > > Today there is no longer a market for line disciplines and in > practice we have only one: the POSIX mandated "termios", which also > emulates the older "termio" ioctls. > > Anybody who cares to browse the three pages of text that RFC1055 > contains, will see that implementing SLIP in userland using tun(4) > and the code on the other three pages of RFC1055 is a trivial task > not even worthy of a SoC student. > > PPP over async is already much better handled in ppp(8) thanks > to Brians valiant effort back in the stoneage of the internet. > > We should summarily kill the concept of line disciplines as a > modular component and decide that TTYs can be used with termios(4) > or raw mode and leave it at that. Amen brother!! I'd like if_sl.c and if_ppp.c/ppp_tty.c to go away simply so that we don't have to keep the line discipline switch in its current form. Let the tty layer rewrite have a free hand at doing whatever locking strategy is most appropriate for ttys, without having to worry about line disciplines and the lock order problems that come with if_sl.c. There is a reason why we merged the splnet() and spltty() interrupt masks back when we had spl()s. The tty stack cross called into the network stack via if_sl, and vice versa. ppp_tty.c had a hack to create a swi (thread) to partly hack around this where it was most critical to limit blocking of interrupts. To make this work is likely going to need a full taskq or thread for both if_sl.c and ppp_tty.c. It just isn't worth it. Especially when we have a better option in userland for ppp, and slip is a few dozen lines of code around a if_tun select loop. I've written 75% of what it would take to do slip in userland at least two or three times already, over the last 10 years. It just isn't worth it. Let line disciplines die and give Ed a free hand to do ttys "right". Line disciplines were there so that we could push processing for things like serial mice into the kernel and reduce context switches. We've been doing that in userland for the last 14+ years. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-arch@FreeBSD.ORG Tue May 27 06:28:49 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F15081065674; Tue, 27 May 2008 06:28:48 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id AC4B28FC2F; Tue, 27 May 2008 06:28:48 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8D8C81CC1A; Tue, 27 May 2008 08:27:36 +0200 (CEST) Date: Tue, 27 May 2008 08:27:36 +0200 From: Ed Schouten To: Poul-Henning Kamp Message-ID: <20080527062736.GF64397@hoeg.nl> References: <20080526161608.GE64397@hoeg.nl> <42521.1211829076@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eNMatiwYGLtwo1cJ" Content-Disposition: inline In-Reply-To: <42521.1211829076@critter.freebsd.dk> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 06:28:49 -0000 --eNMatiwYGLtwo1cJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Poul-Henning Kamp wrote: > In message <20080526161608.GE64397@hoeg.nl>, Ed Schouten writes: >=20 > >The new TTY layer should still support line disciplines, [...] >=20 > Actually... I think it shouldn't. With the word `should' I meant that it would still be possible to implement multiple line disciplines with the mpsafetty code. But I really think line disciplines should go. What should happen with the NETGRAPHDISC? --=20 Ed Schouten WWW: http://80386.nl/ --eNMatiwYGLtwo1cJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg7qdgACgkQ52SDGA2eCwWzpQCfWdegx1c9kAwnf8pgIVheii53 g0wAn21RUzpMiDVW7mZXUBM35wf154Wl =054i -----END PGP SIGNATURE----- --eNMatiwYGLtwo1cJ-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 06:37:51 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E287D106566B; Tue, 27 May 2008 06:37:51 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3098FC17; Tue, 27 May 2008 06:37:51 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id DDB08170E3; Tue, 27 May 2008 06:37:49 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m4R6bnsA045634; Tue, 27 May 2008 06:37:49 GMT (envelope-from phk@critter.freebsd.dk) To: Ed Schouten From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 27 May 2008 08:27:36 +0200." <20080527062736.GF64397@hoeg.nl> Date: Tue, 27 May 2008 06:37:49 +0000 Message-ID: <45633.1211870269@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 06:37:52 -0000 In message <20080527062736.GF64397@hoeg.nl>, Ed Schouten writes: >> >The new TTY layer should still support line disciplines, [...] >> >> Actually... I think it shouldn't. > >With the word `should' I meant that it would still be possible to >implement multiple line disciplines with the mpsafetty code. But I >really think line disciplines should go. No, don't bother. Remove the entire "abstraction" of linedisciplines. >What should happen with the NETGRAPHDISC? It should be done in userland if it is necessary at all. -- 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 27 06:44:06 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1785F106566B; Tue, 27 May 2008 06:44:06 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id C93D98FC28; Tue, 27 May 2008 06:44:05 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 866C01CC1A; Tue, 27 May 2008 08:42:53 +0200 (CEST) Date: Tue, 27 May 2008 08:42:53 +0200 From: Ed Schouten To: Poul-Henning Kamp Message-ID: <20080527064253.GG64397@hoeg.nl> References: <20080527062736.GF64397@hoeg.nl> <45633.1211870269@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+1TulI7fc0PCHNy3" Content-Disposition: inline In-Reply-To: <45633.1211870269@critter.freebsd.dk> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 06:44:06 -0000 --+1TulI7fc0PCHNy3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Poul-Henning Kamp wrote: > In message <20080527062736.GF64397@hoeg.nl>, Ed Schouten writes: >=20 > >> >The new TTY layer should still support line disciplines, [...] > >>=20 > >> Actually... I think it shouldn't. > > > >With the word `should' I meant that it would still be possible to > >implement multiple line disciplines with the mpsafetty code. But I > >really think line disciplines should go. >=20 > No, don't bother. Remove the entire "abstraction" of linedisciplines. Your wish is my command. --=20 Ed Schouten WWW: http://80386.nl/ --+1TulI7fc0PCHNy3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg7rW0ACgkQ52SDGA2eCwVsqACdEzoW5Fq+G8mEnjOJEFB8hOQf hPoAn0L1/k6DBz2mM0BZ5qcK0tLG4HWL =hY/5 -----END PGP SIGNATURE----- --+1TulI7fc0PCHNy3-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 07:57:25 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6410E1065672 for ; Tue, 27 May 2008 07:57:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outg.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 489998FC22 for ; Tue, 27 May 2008 07:57:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 2B0592496; Tue, 27 May 2008 00:45:33 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id B3D2E2D6022; Tue, 27 May 2008 00:45:26 -0700 (PDT) Message-ID: <483BBC1B.6040905@elischer.org> Date: Tue, 27 May 2008 00:45:31 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Poul-Henning Kamp References: <42521.1211829076@critter.freebsd.dk> In-Reply-To: <42521.1211829076@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 07:57:25 -0000 Poul-Henning Kamp wrote: > In message <20080526161608.GE64397@hoeg.nl>, Ed Schouten writes: > >> The new TTY layer should still support line disciplines, [...] > > Actually... I think it shouldn't. > > Line-disc's were introduced to interface weird-ass hardware like > digitizing tablets that had very high data rates, but very little > information (16 bit X, 16 bit Y and a couple of buttons, like modern > mice) which would cost inordinate amounts of CPU time to support > in userland on a VAX computer. > > If_slip.c happened in the kernel because there was no tun device, > people cranked the speed up all they could (Hands up: who has changed > the Xtal on a VAX serial port for faster SLIP ?) > > if_ppp happened because that was how if_slip did it. > > Today there is no longer a market for line disciplines and in > practice we have only one: the POSIX mandated "termios", which also > emulates the older "termio" ioctls. > > Anybody who cares to browse the three pages of text that RFC1055 > contains, will see that implementing SLIP in userland using tun(4) > and the code on the other three pages of RFC1055 is a trivial task > not even worthy of a SoC student. > > PPP over async is already much better handled in ppp(8) thanks > to Brians valiant effort back in the stoneage of the internet. > > We should summarily kill the concept of line disciplines as a > modular component and decide that TTYs can be used with termios(4) > or raw mode and leave it at that. > > Poul-Henning > However the line discipline was a very convenient place for netgraph to hook in without leaving the kernel. If you can supply an equally effective way to hook into a serial device in such a way that it appears to be a source/sink of bits then I don't care about line disciplins, but until you have a suggested replacement then leave them alone. There are MANY people using mpd with the netgraph ppp moduel hooked directly to the serial port via the netgraph line discipline. From owner-freebsd-arch@FreeBSD.ORG Tue May 27 08:04:02 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75713106567A; Tue, 27 May 2008 08:04:02 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id D88A28FC12; Tue, 27 May 2008 08:04:01 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 3AA67170E3; Tue, 27 May 2008 08:04:00 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m4R83xfh051990; Tue, 27 May 2008 08:03:59 GMT (envelope-from phk@critter.freebsd.dk) To: Julian Elischer From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 27 May 2008 00:45:31 MST." <483BBC1B.6040905@elischer.org> Date: Tue, 27 May 2008 08:03:59 +0000 Message-ID: <51989.1211875439@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 08:04:02 -0000 In message <483BBC1B.6040905@elischer.org>, Julian Elischer writes: >However the line discipline was a very convenient place for netgraph >to hook in without leaving the kernel. If you can supply an equally >effective way to hook into a serial device in such a way that it >appears to be a source/sink of bits then I don't care about >line disciplins, but until you have a suggested replacement then leave >them alone. There are MANY people using mpd with the netgraph ppp >moduel hooked directly to the serial port via the netgraph line >discipline. What exact value of "MANY" are we talking about here, and do you have any evidence that the systems in question will be updated to FreeBSD-8.0-RELEASE or later ? If, contrary to my expectation, that you can show a real market here, then we should make a better interface than linedisc for such hooks into serial ports. -- 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 27 08:06:11 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08CD4106567F for ; Tue, 27 May 2008 08:06:11 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outT.internet-mail-service.net (outt.internet-mail-service.net [216.240.47.243]) by mx1.freebsd.org (Postfix) with ESMTP id E0C4B8FC3A for ; Tue, 27 May 2008 08:06:10 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id C1CF42401; Tue, 27 May 2008 01:06:21 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 6C44C2D6014; Tue, 27 May 2008 01:06:09 -0700 (PDT) Message-ID: <483BC0F6.4050700@elischer.org> Date: Tue, 27 May 2008 01:06:14 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Poul-Henning Kamp References: <42521.1211829076@critter.freebsd.dk> <483BBC1B.6040905@elischer.org> In-Reply-To: <483BBC1B.6040905@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 08:06:11 -0000 Julian Elischer wrote: > Poul-Henning Kamp wrote: >> In message <20080526161608.GE64397@hoeg.nl>, Ed Schouten writes: >> >>> The new TTY layer should still support line disciplines, [...] >> >> Actually... I think it shouldn't. >> >> Line-disc's were introduced to interface weird-ass hardware like >> digitizing tablets that had very high data rates, but very little >> information (16 bit X, 16 bit Y and a couple of buttons, like modern >> mice) which would cost inordinate amounts of CPU time to support >> in userland on a VAX computer. >> >> If_slip.c happened in the kernel because there was no tun device, >> people cranked the speed up all they could (Hands up: who has changed >> the Xtal on a VAX serial port for faster SLIP ?) >> >> if_ppp happened because that was how if_slip did it. >> >> Today there is no longer a market for line disciplines and in >> practice we have only one: the POSIX mandated "termios", which also >> emulates the older "termio" ioctls. >> >> Anybody who cares to browse the three pages of text that RFC1055 >> contains, will see that implementing SLIP in userland using tun(4) >> and the code on the other three pages of RFC1055 is a trivial task >> not even worthy of a SoC student. >> >> PPP over async is already much better handled in ppp(8) thanks >> to Brians valiant effort back in the stoneage of the internet. >> >> We should summarily kill the concept of line disciplines as a >> modular component and decide that TTYs can be used with termios(4) >> or raw mode and leave it at that. >> >> Poul-Henning >> > > > However the line discipline was a very convenient place for netgraph to > hook in without leaving the kernel. If you can supply an equally > effective way to hook into a serial device in such a way that it appears > to be a source/sink of bits then I don't care about > line disciplins, but until you have a suggested replacement then leave > them alone. There are MANY people using mpd with the netgraph ppp moduel > hooked directly to the serial port via the netgraph line discipline. p.s "do it in userland" is not the right answer, but it should be able to hook into netgraph without all the requirements that were needed for a line discipline. let me contact you independently and we 'll see what can be done. > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-arch@FreeBSD.ORG Tue May 27 08:12:41 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EEE3106566B for ; Tue, 27 May 2008 08:12:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outB.internet-mail-service.net (outb.internet-mail-service.net [216.240.47.225]) by mx1.freebsd.org (Postfix) with ESMTP id 562328FC23 for ; Tue, 27 May 2008 08:12:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id AFC5F2401; Tue, 27 May 2008 01:13:15 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 5BE332D601A; Tue, 27 May 2008 01:12:40 -0700 (PDT) Message-ID: <483BC27C.6010102@elischer.org> Date: Tue, 27 May 2008 01:12:44 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Poul-Henning Kamp References: <51989.1211875439@critter.freebsd.dk> In-Reply-To: <51989.1211875439@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 08:12:41 -0000 Poul-Henning Kamp wrote: > In message <483BBC1B.6040905@elischer.org>, Julian Elischer writes: > >> However the line discipline was a very convenient place for netgraph >> to hook in without leaving the kernel. If you can supply an equally >> effective way to hook into a serial device in such a way that it >> appears to be a source/sink of bits then I don't care about >> line disciplins, but until you have a suggested replacement then leave >> them alone. There are MANY people using mpd with the netgraph ppp >> moduel hooked directly to the serial port via the netgraph line >> discipline. > > What exact value of "MANY" are we talking about here, and do you > have any evidence that the systems in question will be updated > to FreeBSD-8.0-RELEASE or later ? judging by the bug reports when things get broken there are still a lot of people connected to the internet via dial up lines in places off the beaten track, and still a lot of people who when travelling do use dialup still. Some of these also use mpd. I can not say how many plan to keep using this in the future but it may be that the simplest answer is a completely separate sio driver that just has netgraph hooks. I haven't talked with Ed yet but there may be may ways to solve this problem. One that comes to mind is tha tthe way netgraph hooks to other modules assumes a possible queueing of data, and that decoupling could make it a lot easier to connect tehm that was required for slip and ppp. > > If, contrary to my expectation, that you can show a real market > here, then we should make a better interface than linedisc for > such hooks into serial ports. > From owner-freebsd-arch@FreeBSD.ORG Tue May 27 08:54:57 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FA631065672; Tue, 27 May 2008 08:54:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1E56C8FC18; Tue, 27 May 2008 08:54:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id A01BB46B2D; Tue, 27 May 2008 04:54:56 -0400 (EDT) Date: Tue, 27 May 2008 09:54:56 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Poul-Henning Kamp In-Reply-To: <45633.1211870269@critter.freebsd.dk> Message-ID: <20080527095317.R35026@fledge.watson.org> References: <45633.1211870269@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 08:54:57 -0000 On Tue, 27 May 2008, Poul-Henning Kamp wrote: > In message <20080527062736.GF64397@hoeg.nl>, Ed Schouten writes: > >>>> The new TTY layer should still support line disciplines, [...] >>> >>> Actually... I think it shouldn't. >> >> With the word `should' I meant that it would still be possible to implement >> multiple line disciplines with the mpsafetty code. But I really think line >> disciplines should go. > > No, don't bother. Remove the entire "abstraction" of linedisciplines. > >> What should happen with the NETGRAPHDISC? > > It should be done in userland if it is necessary at all. It sounds like there is some disagreement on this point, given that that would require byte streams from serial lines to go into userspace just to be re-injected into the kernel in order to enter netgraph. Rather than do that, a more sensible route would be to look at converting ng_tty from a line discipline into a much more constrained set of I/O hooks, selected using the same ioctl but presumably a different discipline name. Unfortunately, it's not clear that snp would use the same hooks, as Netgraph presumably wants to eat the input, whereas snp just wants a copy, but perhaps there's a clean way to capture that distinction. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-arch@FreeBSD.ORG Tue May 27 13:07:34 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31F451065672; Tue, 27 May 2008 13:07:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 29AB38FC1F; Tue, 27 May 2008 13:07:33 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id B78301CC1A; Tue, 27 May 2008 15:06:15 +0200 (CEST) Date: Tue, 27 May 2008 15:06:15 +0200 From: Ed Schouten To: arch@FreeBSD.org Message-ID: <20080527130615.GJ64397@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="08ATZu8fEq0x2T3M" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: kib@FreeBSD.org Subject: Simplifying devfs: minor == unit 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, 27 May 2008 13:07:34 -0000 --08ATZu8fEq0x2T3M Content-Type: multipart/mixed; boundary="liqSWPDvh3eyfZ9k" Content-Disposition: inline --liqSWPDvh3eyfZ9k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, Right before I left to BSDCan I was looking at the devfs code. When I started hacking the TTY code, I discovered minor/unit numbers are still actively used within the FreeBSD kernel, even though they are never exposed to userspace. Devfs automatically generates an inode number for each device. Right now, st_rdev is always equal to st_ino, which still guarantees device numbers are unique throughout the system. In an experimental branch in Perforce, I decided to see what would happen if I would completely remove minor numbers from device drivers. This means make_dev()'s minor argument is removed, but also the minor(), unit2minor(), etc. functions. Drivers could use si_drv0 directly, just like si_drv1 and si_drv2 are used right now. This doesn't seem to be possible because of the design of the device cloner (not the eventhandler, just the clone_* routines), which preallocates an unnamed device with a specific unit numer, which can later be passed to make_dev(). This is why I want to do this in little steps right now. I was thinking about doing the following: - si_drv0 currently contains the minor number. We could alter the minor2unit(), etc. routines to make minor numbers equal to unit numbers. This means most routines will now become a no-op. See attachment. - When that hits the tree, we could decide to run a big regexp on the source code to make drivers use si_drv0 directly. - I've seen most drivers only use the device cloner, because they need descriptor local storage. It turns out more drivers need this than I initially thought. kib@ has a patch for this, so I hope this gets committed one of these {days,weeks,months}. - After we've got file descriptor local storage, I think we can live without the cloner. This means we could consider removing the minor number argument from make_dev(), removing the unique unit number restriction we currently have inside devfs, which causes many drivers to use number pools for no obvious reason. I was thinking about discussing this patch with my mentor + committing it somewhere in the nearby future. Any comments? --=20 Ed Schouten WWW: http://80386.nl/ --liqSWPDvh3eyfZ9k Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="devfs-unit-is-minor.diff" Content-Transfer-Encoding: quoted-printable --- sys/compat/svr4/svr4_ttold.c +++ sys/compat/svr4/svr4_ttold.c @@ -36,7 +36,6 @@ #include #include #include -#include #include =20 #include --- sys/dev/ieee488/upd7210.c +++ sys/dev/ieee488/upd7210.c @@ -277,7 +277,7 @@ struct cdev *dev; =20 if (units =3D=3D NULL) - units =3D new_unrhdr(0, minor2unit(MAXMINOR), NULL); + units =3D new_unrhdr(0, INT_MAX, NULL); u->unit =3D alloc_unr(units); mtx_init(&u->mutex, "gpib", NULL, MTX_DEF); u->cdev =3D make_dev(&gpib_l_cdevsw, u->unit, --- sys/dev/led/led.c +++ sys/dev/led/led.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -298,7 +299,7 @@ led_drvinit(void *unused) { =20 - led_unit =3D new_unrhdr(0, minor2unit(MAXMINOR), NULL); + led_unit =3D new_unrhdr(0, INT_MAX, NULL); mtx_init(&led_mtx, "LED mtx", NULL, MTX_DEF); sx_init(&led_sx, "LED sx"); callout_init(&led_ch, CALLOUT_MPSAFE); --- sys/dev/md/md.c +++ sys/dev/md/md.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -1234,7 +1235,7 @@ md_preloaded(ptr, len); sx_xunlock(&md_sx); } - status_dev =3D make_dev(&mdctl_cdevsw, MAXMINOR, UID_ROOT, GID_WHEEL, + status_dev =3D make_dev(&mdctl_cdevsw, INT_MAX, UID_ROOT, GID_WHEEL, 0600, MDCTL_NAME); g_topology_lock(); } --- sys/geom/geom_dev.c +++ sys/geom/geom_dev.c @@ -88,7 +88,7 @@ g_dev_init(struct g_class *mp) { =20 - unithdr =3D new_unrhdr(0, minor2unit(MAXMINOR), NULL); + unithdr =3D new_unrhdr(0, INT_MAX, NULL); } =20 void --- sys/kern/kern_conf.c +++ sys/kern/kern_conf.c @@ -500,7 +500,7 @@ { if (x =3D=3D NULL) return NODEV; - return(x->si_drv0 & MAXMINOR); + return (x->si_drv0); } =20 int @@ -509,23 +509,21 @@ =20 if (x =3D=3D NULL) return NODEV; - return (minor2unit(minor(x))); + return (x->si_drv0); } =20 u_int minor2unit(u_int _minor) { =20 - KASSERT((_minor & ~MAXMINOR) =3D=3D 0, ("Illegal minor %x", _minor)); - return ((_minor & 0xff) | ((_minor >> 8) & 0xffff00)); + return (_minor); } =20 int unit2minor(int unit) { =20 - KASSERT(unit <=3D 0xffffff, ("Invalid unit (%d) in unit2minor", unit)); - return ((unit & 0xff) | ((unit << 8) & ~0xffff)); + return (unit); } =20 static void @@ -581,16 +579,18 @@ return (si); } =20 +#define UMINORMASK 0xffff00ffU + int uminor(dev_t dev) { - return (dev & MAXMINOR); + return (dev & UMINORMASK); } =20 int umajor(dev_t dev) { - return ((dev & ~MAXMINOR) >> 8); + return ((dev & ~UMINORMASK) >> 8); } =20 static void @@ -690,9 +690,6 @@ struct cdev *dev; int i; =20 - KASSERT((minornr & ~MAXMINOR) =3D=3D 0, - ("Invalid minor (0x%x) in make_dev", minornr)); - dev =3D devfs_alloc(); dev_lock(); prep_cdevsw(devsw); --- sys/sys/conf.h +++ sys/sys/conf.h @@ -221,8 +221,6 @@ =20 #define NUMCDEVSW 256 =20 -#define MAXMINOR 0xffff00ffU - struct module; =20 struct devsw_module_data { --liqSWPDvh3eyfZ9k-- --08ATZu8fEq0x2T3M Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8B0cACgkQ52SDGA2eCwUkEQCfcVCSxUf5HfFMFXaGLMiDjagA 3B0An17ubeeZNfq8SaY1qLEaw1VbetBW =i2CN -----END PGP SIGNATURE----- --08ATZu8fEq0x2T3M-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 15:19:08 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 030EF1065672; Tue, 27 May 2008 15:19:08 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 93C208FC0A; Tue, 27 May 2008 15:19:07 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id DA98F104A60; Tue, 27 May 2008 11:19:06 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 27 May 2008 11:19:07 -0400 X-Sasl-enc: ZqpgoDUTicqVXYDdDy5GcplD65P6uhcNDK276KTzwMMu 1211901546 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id AA44CAA94; Tue, 27 May 2008 11:19:05 -0400 (EDT) Message-ID: <483C2666.7010608@FreeBSD.org> Date: Tue, 27 May 2008 16:19:02 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Ed Schouten References: <20080527062736.GF64397@hoeg.nl> <45633.1211870269@critter.freebsd.dk> <20080527064253.GG64397@hoeg.nl> In-Reply-To: <20080527064253.GG64397@hoeg.nl> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@FreeBSD.org, arch@FreeBSD.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@FreeBSD.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 15:19:08 -0000 Ed Schouten wrote: >>> With the word `should' I meant that it would still be possible to >>> implement multiple line disciplines with the mpsafetty code. But I >>> really think line disciplines should go. >>> >> No, don't bother. Remove the entire "abstraction" of linedisciplines. >> > > Your wish is my command. > Like Julian and Robert said, please don't break Netgraph. It still needs to hook into tty at a very low level; and the components such as Bluetooth which can use ttys for low level stream processing, are built on Netgraph. Both SLIP and PPP can be built using Netgraph. Other than that, line disciplines can go away. From owner-freebsd-arch@FreeBSD.ORG Tue May 27 15:22:42 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28858106564A for ; Tue, 27 May 2008 15:22:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id BAA568FC18 for ; Tue, 27 May 2008 15:22:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RF2icZ027145 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 May 2008 18:02:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RF2jLO096820; Tue, 27 May 2008 18:02:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m4RF2jMJ096819; Tue, 27 May 2008 18:02:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 May 2008 18:02:44 +0300 From: Kostik Belousov To: Ed Schouten Message-ID: <20080527150244.GN21317@deviant.kiev.zoral.com.ua> References: <20080527130615.GJ64397@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N/GrjenRD+RJfyz+" Content-Disposition: inline In-Reply-To: <20080527130615.GJ64397@hoeg.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 15:22:42 -0000 --N/GrjenRD+RJfyz+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 27, 2008 at 03:06:15PM +0200, Ed Schouten wrote: > Hello everyone, >=20 > Right before I left to BSDCan I was looking at the devfs code. When I > started hacking the TTY code, I discovered minor/unit numbers are still > actively used within the FreeBSD kernel, even though they are never > exposed to userspace. Devfs automatically generates an inode number for > each device. Right now, st_rdev is always equal to st_ino, which still > guarantees device numbers are unique throughout the system. >=20 > In an experimental branch in Perforce, I decided to see what would > happen if I would completely remove minor numbers from device drivers. > This means make_dev()'s minor argument is removed, but also the minor(), > unit2minor(), etc. functions. Drivers could use si_drv0 directly, just > like si_drv1 and si_drv2 are used right now. >=20 > This doesn't seem to be possible because of the design of the device > cloner (not the eventhandler, just the clone_* routines), which > preallocates an unnamed device with a specific unit numer, which can > later be passed to make_dev(). >=20 > This is why I want to do this in little steps right now. I was thinking > about doing the following: >=20 > - si_drv0 currently contains the minor number. We could alter the > minor2unit(), etc. routines to make minor numbers equal to unit > numbers. This means most routines will now become a no-op. See > attachment. >=20 > - When that hits the tree, we could decide to run a big regexp on the > source code to make drivers use si_drv0 directly. >=20 > - I've seen most drivers only use the device cloner, because they need > descriptor local storage. It turns out more drivers need this than I > initially thought. kib@ has a patch for this, so I hope this gets > committed one of these {days,weeks,months}. The patch was committed ~ a week ago. >=20 > - After we've got file descriptor local storage, I think we can live > without the cloner. This means we could consider removing the minor > number argument from make_dev(), removing the unique unit number > restriction we currently have inside devfs, which causes many drivers > to use number pools for no obvious reason. I think we cannot live without clones regardless of devfs_cdevpriv. The model assumed for the pty, snp and probably several other devices actually requires new cdev instead of the priv data. >=20 > I was thinking about discussing this patch with my mentor + committing > it somewhere in the nearby future. Any comments? Making minor =3D=3D unit number looks to be not a bad idea, please, look at the saga of the tty_pty.c revs. 1.153, 156, 1.157. Making the devices use si_drv0 directly probably is not so good since we remove the indirection layer that is already present and allows for some (minor) freedom in the devfs/kern_conf implementation. --N/GrjenRD+RJfyz+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8IpQACgkQC3+MBN1Mb4jVywCg1/dbG6rHS2dQ9ASSWswl3emC Vq8AoNFeeMdX5QWOlGFEhdqkwDWxA+nO =tgwm -----END PGP SIGNATURE----- --N/GrjenRD+RJfyz+-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 16:59:15 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07C761065675 for ; Tue, 27 May 2008 16:59:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id BF6B58FC15 for ; Tue, 27 May 2008 16:59:14 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id B8F131CC1A; Tue, 27 May 2008 18:57:53 +0200 (CEST) Date: Tue, 27 May 2008 18:57:53 +0200 From: Ed Schouten To: Kostik Belousov Message-ID: <20080527165753.GK64397@hoeg.nl> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hdW7zL/qDS6RXdAL" Content-Disposition: inline In-Reply-To: <20080527150244.GN21317@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 16:59:15 -0000 --hdW7zL/qDS6RXdAL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > > - I've seen most drivers only use the device cloner, because they need > > descriptor local storage. It turns out more drivers need this than I > > initially thought. kib@ has a patch for this, so I hope this gets > > committed one of these {days,weeks,months}. > The patch was committed ~ a week ago. Great. Looks like I wasn't paying attention back then. > > - After we've got file descriptor local storage, I think we can live > > without the cloner. This means we could consider removing the minor > > number argument from make_dev(), removing the unique unit number > > restriction we currently have inside devfs, which causes many drivers > > to use number pools for no obvious reason. > I think we cannot live without clones regardless of devfs_cdevpriv. > The model assumed for the pty, snp and probably several other devices > actually requires new cdev instead of the priv data. The pty driver does not use the clone_* interface. It only uses the eventhandler, which should indeed be left intact. The snp driver does use the clone_* interface, but not in a way that can't be done using the eventhandler, validating the device name and calling make_dev() directly. Please take a look at src/usr.sbin/watch/watch.c:open_snp(). We might as well turn snp(4) into a single /dev/snp, where the kernel space driver uses per-descriptor data to distinguish the instances. This provides some advantages: - No more silly open()-loops. - A system administrator can change the permissions on /dev/snp, which automatically sets a system wide policy, instead on one of the device nodes. - We don't fill up the system with a lot of unused nodes. for i in `seq 1000` do ls /dev/bpf$i > /dev/null done > > I was thinking about discussing this patch with my mentor + committing > > it somewhere in the nearby future. Any comments? >=20 > Making minor =3D=3D unit number looks to be not a bad idea, please, look = at > the saga of the tty_pty.c revs. 1.153, 156, 1.157. Making the devices use > si_drv0 directly probably is not so good since we remove the indirection > layer that is already present and allows for some (minor) freedom in the > devfs/kern_conf implementation. But why isn't this done for si_drv1 and si_drv2 then? My idea is to turn si_drv0 in an integer field that can be freely used. There is reason to force a policy on this field. --=20 Ed Schouten WWW: http://80386.nl/ --hdW7zL/qDS6RXdAL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8PZEACgkQ52SDGA2eCwVBRgCfeVpGRCUJXHSyEklM21b/+nU0 2HAAn1Qvig6tm6SOBvvE40MLed3AKv6m =5BRD -----END PGP SIGNATURE----- --hdW7zL/qDS6RXdAL-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 17:01:50 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B411065671; Tue, 27 May 2008 17:01:50 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 811628FC15; Tue, 27 May 2008 17:01:48 +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 fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m4R8xHNg021311; Tue, 27 May 2008 18:59:17 +1000 Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m4R8xDdR001141 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 May 2008 18:59:15 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.2) with ESMTP id m4R8xDaJ084440; Tue, 27 May 2008 18:59:13 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m4R8xDXR084439; Tue, 27 May 2008 18:59:13 +1000 (EST) (envelope-from peter) Date: Tue, 27 May 2008 18:59:13 +1000 From: Peter Jeremy To: Poul-Henning Kamp Message-ID: <20080527085913.GD1469@server.vk2pj.dyndns.org> References: <20080526161608.GE64397@hoeg.nl> <42521.1211829076@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rBVNTu5JXDAWzN2S" Content-Disposition: inline In-Reply-To: <42521.1211829076@critter.freebsd.dk> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: arch@freebsd.org, current@freebsd.org, net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 17:01:50 -0000 --rBVNTu5JXDAWzN2S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-May-26 19:11:16 +0000, Poul-Henning Kamp wrote: >We should summarily kill the concept of line disciplines as a >modular component and decide that TTYs can be used with termios(4) >or raw mode and leave it at that. streams anyone? --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --rBVNTu5JXDAWzN2S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkg7zWEACgkQ/opHv/APuIfwGACdGcAqWOfEiWHZe+SNLO11ALjJ zVAAnj+SjhT8r7PAZY3Cl208w5jfndT+ =Bp2L -----END PGP SIGNATURE----- --rBVNTu5JXDAWzN2S-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 17:02:33 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAFE11065671; Tue, 27 May 2008 17:02:33 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.83]) by mx1.freebsd.org (Postfix) with ESMTP id 65A398FC19; Tue, 27 May 2008 17:02:32 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtp012-bge351000 (asmtp012-bge351000 [10.150.69.75]) by smtpoutm.mac.com (Xserve/smtpout020/MantshX 4.0) with ESMTP id m4RGhGNP028737; Tue, 27 May 2008 09:43:16 -0700 (PDT) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp012.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0K1J00HWDD42T350@asmtp012.mac.com>; Tue, 27 May 2008 09:43:16 -0700 (PDT) Message-id: <5229B4D7-40F0-4D45-93F1-244FA05E0304@mac.com> From: Marcel Moolenaar To: Julian Elischer In-reply-to: <483BC27C.6010102@elischer.org> Date: Tue, 27 May 2008 09:43:12 -0700 References: <51989.1211875439@critter.freebsd.dk> <483BC27C.6010102@elischer.org> X-Mailer: Apple Mail (2.919.2) Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 17:02:33 -0000 On May 27, 2008, at 1:12 AM, Julian Elischer wrote: > judging by the bug reports when things get broken there are still a > lot of people connected to the internet via dial up lines in places > off the beaten track, and still a lot of people who when travelling > do use dialup still. Some of these also use mpd. I can not say how > many plan to keep using this in the future but it may be that the > simplest answer is a completely separate sio driver that > just has netgraph hooks. I haven't talked with Ed yet but there > may be may ways to solve this problem. Take a look at uart(4). It has been designed to allow different kernel interfaces. It currently supports TTYs and keyboards. It should not be too hard to have it hook into netgraph. FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arch@FreeBSD.ORG Tue May 27 17:22:25 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1427106566C for ; Tue, 27 May 2008 17:22:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outW.internet-mail-service.net (outw.internet-mail-service.net [216.240.47.246]) by mx1.freebsd.org (Postfix) with ESMTP id BA7EC8FC21 for ; Tue, 27 May 2008 17:22:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 62B2423DF; Tue, 27 May 2008 10:22:47 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 53E8D2D600D; Tue, 27 May 2008 10:22:25 -0700 (PDT) Message-ID: <483C4358.2050707@elischer.org> Date: Tue, 27 May 2008 10:22:32 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Kostik Belousov References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> In-Reply-To: <20080527150244.GN21317@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 17:22:25 -0000 Kostik Belousov wrote: > On Tue, May 27, 2008 at 03:06:15PM +0200, Ed Schouten wrote: >> Hello everyone, >> >> Right before I left to BSDCan I was looking at the devfs code. When I >> started hacking the TTY code, I discovered minor/unit numbers are still >> actively used within the FreeBSD kernel, even though they are never >> exposed to userspace. Devfs automatically generates an inode number for >> each device. Right now, st_rdev is always equal to st_ino, which still >> guarantees device numbers are unique throughout the system. >> >> In an experimental branch in Perforce, I decided to see what would >> happen if I would completely remove minor numbers from device drivers. >> This means make_dev()'s minor argument is removed, but also the minor(), >> unit2minor(), etc. functions. Drivers could use si_drv0 directly, just >> like si_drv1 and si_drv2 are used right now. >> >> This doesn't seem to be possible because of the design of the device >> cloner (not the eventhandler, just the clone_* routines), which >> preallocates an unnamed device with a specific unit numer, which can >> later be passed to make_dev(). >> >> This is why I want to do this in little steps right now. I was thinking >> about doing the following: >> >> - si_drv0 currently contains the minor number. We could alter the >> minor2unit(), etc. routines to make minor numbers equal to unit >> numbers. This means most routines will now become a no-op. See >> attachment. >> >> - When that hits the tree, we could decide to run a big regexp on the >> source code to make drivers use si_drv0 directly. >> >> - I've seen most drivers only use the device cloner, because they need >> descriptor local storage. It turns out more drivers need this than I >> initially thought. kib@ has a patch for this, so I hope this gets >> committed one of these {days,weeks,months}. > The patch was committed ~ a week ago. >> - After we've got file descriptor local storage, I think we can live >> without the cloner. This means we could consider removing the minor >> number argument from make_dev(), removing the unique unit number >> restriction we currently have inside devfs, which causes many drivers >> to use number pools for no obvious reason. > I think we cannot live without clones regardless of devfs_cdevpriv. > The model assumed for the pty, snp and probably several other devices > actually requires new cdev instead of the priv data. > >> I was thinking about discussing this patch with my mentor + committing >> it somewhere in the nearby future. Any comments? > > Making minor == unit number looks to be not a bad idea, please, look at > the saga of the tty_pty.c revs. 1.153, 156, 1.157. Making the devices use > si_drv0 directly probably is not so good since we remove the indirection > layer that is already present and allows for some (minor) freedom in the > devfs/kern_conf implementation. Make sure that old binaries that expect the minor number sot be on a certain format are not broken.. try run some old 2.2.5 binaries in a 2.2.5 jail with /dev mounted and make sure that things like ptys work. From owner-freebsd-arch@FreeBSD.ORG Tue May 27 17:28:21 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3824D106564A for ; Tue, 27 May 2008 17:28:21 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id F09F98FC16 for ; Tue, 27 May 2008 17:28:20 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 6DC121CC1A; Tue, 27 May 2008 19:27:00 +0200 (CEST) Date: Tue, 27 May 2008 19:27:00 +0200 From: Ed Schouten To: Julian Elischer Message-ID: <20080527172700.GM64397@hoeg.nl> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <483C4358.2050707@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IoFIGPN1N3g1Ryqz" Content-Disposition: inline In-Reply-To: <483C4358.2050707@elischer.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Kostik Belousov , arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 17:28:21 -0000 --IoFIGPN1N3g1Ryqz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Julian Elischer wrote: > Make sure that old binaries that expect the minor number sot be on a =20 > certain format are not broken.. > > try run some old 2.2.5 binaries in a 2.2.5 jail with /dev mounted and =20 > make sure that things like ptys work. This should not be a problem. Even though they are called minor numbers, they must not be confused with the device minor numbers which are shown in /dev. These are always the same as the inode number of the device. The minor numbers which are currently being used inside the kernel have no actual purpose, but are only there to remain compatible with certain KPI's. --=20 Ed Schouten WWW: http://80386.nl/ --IoFIGPN1N3g1Ryqz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8RGQACgkQ52SDGA2eCwWMPACcD9w7bwdpPOEI+VbH9moodbKw fgYAn0dngnfBCuNwSz5zSd4RHGVdbWDy =J+gf -----END PGP SIGNATURE----- --IoFIGPN1N3g1Ryqz-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 17:33:15 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E70A1065676 for ; Tue, 27 May 2008 17:33:15 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outg.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 0A3198FC18 for ; Tue, 27 May 2008 17:33:15 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 64EF823F2; Tue, 27 May 2008 10:33:42 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 446A52D6015; Tue, 27 May 2008 10:33:14 -0700 (PDT) Message-ID: <483C45E1.2040707@elischer.org> Date: Tue, 27 May 2008 10:33:21 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Ed Schouten References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <483C4358.2050707@elischer.org> <20080527172700.GM64397@hoeg.nl> In-Reply-To: <20080527172700.GM64397@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 17:33:15 -0000 Ed Schouten wrote: > * Julian Elischer wrote: >> Make sure that old binaries that expect the minor number sot be on a >> certain format are not broken.. >> >> try run some old 2.2.5 binaries in a 2.2.5 jail with /dev mounted and >> make sure that things like ptys work. > > This should not be a problem. Even though they are called minor numbers, > they must not be confused with the device minor numbers which are shown > in /dev. These are always the same as the inode number of the device. > > The minor numbers which are currently being used inside the kernel have > no actual purpose, but are only there to remain compatible with certain > KPI's. > as long as that is proved to be true.. From owner-freebsd-arch@FreeBSD.ORG Tue May 27 17:50:14 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C44C10656E3 for ; Tue, 27 May 2008 17:50:14 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outZ.internet-mail-service.net (outz.internet-mail-service.net [216.240.47.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4278FC25 for ; Tue, 27 May 2008 17:50:14 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 982AC2384; Tue, 27 May 2008 10:50:14 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 1B10B2D6010; Tue, 27 May 2008 10:50:13 -0700 (PDT) Message-ID: <483C49DC.3080108@elischer.org> Date: Tue, 27 May 2008 10:50:20 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Marcel Moolenaar References: <51989.1211875439@critter.freebsd.dk> <483BC27C.6010102@elischer.org> <5229B4D7-40F0-4D45-93F1-244FA05E0304@mac.com> In-Reply-To: <5229B4D7-40F0-4D45-93F1-244FA05E0304@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 17:50:14 -0000 Marcel Moolenaar wrote: > On May 27, 2008, at 1:12 AM, Julian Elischer wrote: > >> judging by the bug reports when things get broken there are still a >> lot of people connected to the internet via dial up lines in places >> off the beaten track, and still a lot of people who when travelling >> do use dialup still. Some of these also use mpd. I can not say how >> many plan to keep using this in the future but it may be that the >> simplest answer is a completely separate sio driver that >> just has netgraph hooks. I haven't talked with Ed yet but there >> may be may ways to solve this problem. > > Take a look at uart(4). It has been designed to allow different > kernel interfaces. It currently supports TTYs and keyboards. It > should not be too hard to have it hook into netgraph. > > FYI, > While this is a good idea on it's own, the difference between what that achieves and what a line discipline achieves is that a line disciplin is hardware independent and can even be used on a virtual device. From owner-freebsd-arch@FreeBSD.ORG Tue May 27 17:53:28 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 777611065673; Tue, 27 May 2008 17:53:28 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 443388FC17; Tue, 27 May 2008 17:53:28 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 7C509110064; Tue, 27 May 2008 13:53:27 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 27 May 2008 13:53:27 -0400 X-Sasl-enc: FUdG9lMuSyinLn2Nqn0cQ//xZEpmPsSIQH97MabdU9Io 1211910806 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 0131C32E6; Tue, 27 May 2008 13:53:25 -0400 (EDT) Message-ID: <483C4A94.4000107@FreeBSD.org> Date: Tue, 27 May 2008 18:53:24 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Julian Elischer References: <51989.1211875439@critter.freebsd.dk> <483BC27C.6010102@elischer.org> <5229B4D7-40F0-4D45-93F1-244FA05E0304@mac.com> <483C49DC.3080108@elischer.org> In-Reply-To: <483C49DC.3080108@elischer.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , current@FreeBSD.org, Marcel Moolenaar , arch@FreeBSD.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@FreeBSD.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 17:53:28 -0000 Julian Elischer wrote: > > While this is a good idea on it's own, the difference between > what that achieves and what a line discipline achieves is that > a line disciplin is hardware independent and can even be used > on a virtual device. I was under the impression that the back-end for UART was light weight enough that it could be used as a virtual device. For example: Many years ago I tried to get the WinModem working in my IBM ThinkPad T23. UART lends itself well to being a wrapper for the DSP microcode without having any of the historical tty baggage. In the case of UART the "translation shim" moves from on top of the device node to underneath, in much the same way as has happened for GEOM. From owner-freebsd-arch@FreeBSD.ORG Tue May 27 18:11:41 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADB071065689; Tue, 27 May 2008 18:11:41 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.70]) by mx1.freebsd.org (Postfix) with ESMTP id 8ECED8FC14; Tue, 27 May 2008 18:11:41 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpin126.mac.com (smtpin126-bge351000 [10.150.68.126]) by smtpoutm.mac.com (Xserve/smtpout007/MantshX 4.0) with ESMTP id m4RIBftD000655; Tue, 27 May 2008 11:11:41 -0700 (PDT) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by smtpin126.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0K1J00HDYH7GY6A0@smtpin126.mac.com>; Tue, 27 May 2008 11:11:41 -0700 (PDT) Message-id: <260F636A-8F72-411B-AED9-B029E1964003@mac.com> From: Marcel Moolenaar To: Julian Elischer In-reply-to: <483C49DC.3080108@elischer.org> Date: Tue, 27 May 2008 11:11:39 -0700 References: <51989.1211875439@critter.freebsd.dk> <483BC27C.6010102@elischer.org> <5229B4D7-40F0-4D45-93F1-244FA05E0304@mac.com> <483C49DC.3080108@elischer.org> X-Mailer: Apple Mail (2.919.2) Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 18:11:41 -0000 On May 27, 2008, at 10:50 AM, Julian Elischer wrote: > Marcel Moolenaar wrote: >> On May 27, 2008, at 1:12 AM, Julian Elischer wrote: >>> judging by the bug reports when things get broken there are still a >>> lot of people connected to the internet via dial up lines in places >>> off the beaten track, and still a lot of people who when travelling >>> do use dialup still. Some of these also use mpd. I can not say how >>> many plan to keep using this in the future but it may be that the >>> simplest answer is a completely separate sio driver that >>> just has netgraph hooks. I haven't talked with Ed yet but there >>> may be may ways to solve this problem. >> Take a look at uart(4). It has been designed to allow different >> kernel interfaces. It currently supports TTYs and keyboards. It >> should not be too hard to have it hook into netgraph. >> FYI, > > > While this is a good idea on it's own, the difference between > what that achieves and what a line discipline achieves is that > a line disciplin is hardware independent and can even be used > on a virtual device. True, but you said: "... the simplest answer is a completely separate sio driver...". This, besides not being true, is just as hardware dependent as uart(4) is. It seems to me that you've conveniently changed the subject to match your point of view :-) -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arch@FreeBSD.ORG Tue May 27 19:13:29 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39A281065672 for ; Tue, 27 May 2008 19:13:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id B33778FC1D for ; Tue, 27 May 2008 19:13:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RJD37N035578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 May 2008 22:13:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RJD3kb080567; Tue, 27 May 2008 22:13:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m4RJD3rF080519; Tue, 27 May 2008 22:13:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 May 2008 22:13:03 +0300 From: Kostik Belousov To: Ed Schouten Message-ID: <20080527191302.GS21317@deviant.kiev.zoral.com.ua> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1IOPqZ3f1xe/JZlz" Content-Disposition: inline In-Reply-To: <20080527165753.GK64397@hoeg.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 19:13:29 -0000 --1IOPqZ3f1xe/JZlz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 27, 2008 at 06:57:53PM +0200, Ed Schouten wrote: > * Kostik Belousov wrote: > > > - I've seen most drivers only use the device cloner, because they need > > > descriptor local storage. It turns out more drivers need this than I > > > initially thought. kib@ has a patch for this, so I hope this gets > > > committed one of these {days,weeks,months}. > > The patch was committed ~ a week ago. >=20 > Great. Looks like I wasn't paying attention back then. >=20 > > > - After we've got file descriptor local storage, I think we can live > > > without the cloner. This means we could consider removing the minor > > > number argument from make_dev(), removing the unique unit number > > > restriction we currently have inside devfs, which causes many drive= rs > > > to use number pools for no obvious reason. > > I think we cannot live without clones regardless of devfs_cdevpriv. > > The model assumed for the pty, snp and probably several other devices > > actually requires new cdev instead of the priv data. >=20 > The pty driver does not use the clone_* interface. It only uses the > eventhandler, which should indeed be left intact. The snp driver does > use the clone_* interface, but not in a way that can't be done using the > eventhandler, validating the device name and calling make_dev() > directly. Ok. >=20 > Please take a look at src/usr.sbin/watch/watch.c:open_snp(). We might as > well turn snp(4) into a single /dev/snp, where the kernel space driver > uses per-descriptor data to distinguish the instances. This provides > some advantages: >=20 > - No more silly open()-loops. >=20 > - A system administrator can change the permissions on /dev/snp, which > automatically sets a system wide policy, instead on one of the device > nodes. >=20 > - We don't fill up the system with a lot of unused nodes. >=20 > for i in `seq 1000` > do > ls /dev/bpf$i > /dev/null > done Please, do not overuse the cdevpriv data (I am not speaking about snp/watch ATM, each case requires careful decision). Using cdevpriv disables some features that may be provided by the clones, i.e. actual cdevs. For example, you cannot have several independent opens operate on the same instance. >=20 > > > I was thinking about discussing this patch with my mentor + committing > > > it somewhere in the nearby future. Any comments? > >=20 > > Making minor =3D=3D unit number looks to be not a bad idea, please, loo= k at > > the saga of the tty_pty.c revs. 1.153, 156, 1.157. Making the devices u= se > > si_drv0 directly probably is not so good since we remove the indirection > > layer that is already present and allows for some (minor) freedom in the > > devfs/kern_conf implementation. >=20 > But why isn't this done for si_drv1 and si_drv2 then? My idea is to turn > si_drv0 in an integer field that can be freely used. There is reason to > force a policy on this field. I would argue that si_drv{1,2} are the warts. I do not want to point finger at the drivers, but I remember there is a representative subset of them using si_drv in the racy way when simultaneous open/close is performed. I would much prefer to have some KPI there instead of the direct access into cdev members. --1IOPqZ3f1xe/JZlz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8XT4ACgkQC3+MBN1Mb4ju+gCg4ewkjv2YIFyOqLLUhHblCEF6 rBAAn3Bhc4ceVqK4LQVF5SjYMOu5CCJU =Fy/c -----END PGP SIGNATURE----- --1IOPqZ3f1xe/JZlz-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 19:34:04 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F962106566B for ; Tue, 27 May 2008 19:34:04 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 643548FC1A for ; Tue, 27 May 2008 19:34:04 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 2308C1CC1A; Tue, 27 May 2008 21:32:42 +0200 (CEST) Date: Tue, 27 May 2008 21:32:42 +0200 From: Ed Schouten To: Kostik Belousov Message-ID: <20080527193242.GN64397@hoeg.nl> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> <20080527191302.GS21317@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w6U88vdWm8UqIXvc" Content-Disposition: inline In-Reply-To: <20080527191302.GS21317@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 19:34:04 -0000 --w6U88vdWm8UqIXvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > On Tue, May 27, 2008 at 06:57:53PM +0200, Ed Schouten wrote: > >=20 > > Please take a look at src/usr.sbin/watch/watch.c:open_snp(). We might as > > well turn snp(4) into a single /dev/snp, where the kernel space driver > > uses per-descriptor data to distinguish the instances. This provides > > some advantages: > >=20 > > - No more silly open()-loops. > >=20 > > - A system administrator can change the permissions on /dev/snp, which > > automatically sets a system wide policy, instead on one of the device > > nodes. > >=20 > > - We don't fill up the system with a lot of unused nodes. > >=20 > > for i in `seq 1000` > > do > > ls /dev/bpf$i > /dev/null > > done > Please, do not overuse the cdevpriv data (I am not speaking about snp/wat= ch > ATM, each case requires careful decision). Using cdevpriv disables some > features that may be provided by the clones, i.e. actual cdevs. For examp= le, > you cannot have several independent opens operate on the same instance. I'll take a closer look at how it works when time permits. Do you mind if I commit the minor =3D=3D unit patch one of these days/weeks? Thanks for your feedback! --=20 Ed Schouten WWW: http://80386.nl/ --w6U88vdWm8UqIXvc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8YdoACgkQ52SDGA2eCwVN9ACcD/qYIOyAOCUT2zwPsmBvu535 9KEAmwe8lxDp0/kdSofmdU3QmFZvJzfO =74nM -----END PGP SIGNATURE----- --w6U88vdWm8UqIXvc-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 19:48:43 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3A67106564A for ; Tue, 27 May 2008 19:48:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 089818FC12 for ; Tue, 27 May 2008 19:48:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RJmNQL036386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 May 2008 22:48:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RJmNLl029864; Tue, 27 May 2008 22:48:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m4RJmNhK029863; Tue, 27 May 2008 22:48:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 May 2008 22:48:23 +0300 From: Kostik Belousov To: Ed Schouten Message-ID: <20080527194823.GT21317@deviant.kiev.zoral.com.ua> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> <20080527191302.GS21317@deviant.kiev.zoral.com.ua> <20080527193242.GN64397@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OowMmFE4aK71mEhh" Content-Disposition: inline In-Reply-To: <20080527193242.GN64397@hoeg.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 19:48:43 -0000 --OowMmFE4aK71mEhh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 27, 2008 at 09:32:42PM +0200, Ed Schouten wrote: > * Kostik Belousov wrote: > > On Tue, May 27, 2008 at 06:57:53PM +0200, Ed Schouten wrote: > > >=20 > > > Please take a look at src/usr.sbin/watch/watch.c:open_snp(). We might= as > > > well turn snp(4) into a single /dev/snp, where the kernel space driver > > > uses per-descriptor data to distinguish the instances. This provides > > > some advantages: > > >=20 > > > - No more silly open()-loops. > > >=20 > > > - A system administrator can change the permissions on /dev/snp, which > > > automatically sets a system wide policy, instead on one of the devi= ce > > > nodes. > > >=20 > > > - We don't fill up the system with a lot of unused nodes. > > >=20 > > > for i in `seq 1000` > > > do > > > ls /dev/bpf$i > /dev/null > > > done > > Please, do not overuse the cdevpriv data (I am not speaking about snp/w= atch > > ATM, each case requires careful decision). Using cdevpriv disables some > > features that may be provided by the clones, i.e. actual cdevs. For exa= mple, > > you cannot have several independent opens operate on the same instance. >=20 > I'll take a closer look at how it works when time permits. >=20 > Do you mind if I commit the minor =3D=3D unit patch one of these days/wee= ks? >=20 In fact, I do not understand why you leave the UMINORMASK stuff. It makes no sense with the unit =3D=3D minor, IMHO. --OowMmFE4aK71mEhh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8ZYYACgkQC3+MBN1Mb4hL3wCg9+DhkoQYsMdsaPCrjrfmhtXk UNsAmwXuUbbwwGhwSBQ4yuedU47x7gjG =K+HF -----END PGP SIGNATURE----- --OowMmFE4aK71mEhh-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 19:50:03 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A0FA106564A for ; Tue, 27 May 2008 19:50:03 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id C214C8FC15 for ; Tue, 27 May 2008 19:50:02 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 7D36C1CC1A; Tue, 27 May 2008 21:48:40 +0200 (CEST) Date: Tue, 27 May 2008 21:48:40 +0200 From: Ed Schouten To: Kostik Belousov Message-ID: <20080527194840.GO64397@hoeg.nl> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> <20080527191302.GS21317@deviant.kiev.zoral.com.ua> <20080527193242.GN64397@hoeg.nl> <20080527194823.GT21317@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OmL7C/BU0IhhC9Of" Content-Disposition: inline In-Reply-To: <20080527194823.GT21317@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 19:50:03 -0000 --OmL7C/BU0IhhC9Of Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > In fact, I do not understand why you leave the UMINORMASK stuff. It makes > no sense with the unit =3D=3D minor, IMHO. That's because the uminor() and umajor() routines operate on user device numbers (dev_t's). We need to leave those intact, to make things like the binary compat work. --=20 Ed Schouten WWW: http://80386.nl/ --OmL7C/BU0IhhC9Of Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8ZZgACgkQ52SDGA2eCwWtMACfSpkm9xJV+UMbSbh8ukhdWrNs augAnAiH05NPn6l9bmHZYLLSHqMBu19C =aLOM -----END PGP SIGNATURE----- --OmL7C/BU0IhhC9Of-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 20:10:23 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D9DC1065676 for ; Tue, 27 May 2008 20:10:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 22F298FC15 for ; Tue, 27 May 2008 20:10:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RKA2BE036928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 May 2008 23:10:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4RKA27E086446; Tue, 27 May 2008 23:10:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m4RKA2YF086225; Tue, 27 May 2008 23:10:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 May 2008 23:10:02 +0300 From: Kostik Belousov To: Ed Schouten Message-ID: <20080527201002.GU21317@deviant.kiev.zoral.com.ua> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> <20080527191302.GS21317@deviant.kiev.zoral.com.ua> <20080527193242.GN64397@hoeg.nl> <20080527194823.GT21317@deviant.kiev.zoral.com.ua> <20080527194840.GO64397@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dXvu6+ixFx2ZffE8" Content-Disposition: inline In-Reply-To: <20080527194840.GO64397@hoeg.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 20:10:23 -0000 --dXvu6+ixFx2ZffE8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 27, 2008 at 09:48:40PM +0200, Ed Schouten wrote: > * Kostik Belousov wrote: > > In fact, I do not understand why you leave the UMINORMASK stuff. It mak= es > > no sense with the unit =3D=3D minor, IMHO. >=20 > That's because the uminor() and umajor() routines operate on user device > numbers (dev_t's). We need to leave those intact, to make things like > the binary compat work. What does it mean to take bits 8-15 from the the unit number to denote some fictitious major ? And, what binary compatibility you talk about ? You changed the layout of the encoding for the minor, but still take the major from it, while there is simply no space for major after your patch, and definitely not in [8:15]. Also, look at the sys/types.h: #ifndef _KERNEL /* * minor() gives a cookie instead of an index since we don't want to * change the meanings of bits 0-15 or waste time and space shifting * bits 16-31 for devices that don't use them. */ #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ #define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ #endif /* !_KERNEL */ #define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ I think, if you want to do the change you proposed, the minors for cdevs shall be cleanly separated from the major/minor something, the later has no relations with the cdevs in the current FreeBSD. I.e., in your patch, the uminor() can and shall be made identity function, to match minor2unit() and unit2minor(), and umajor() shall just return 0. It would be nice to verify that the linuxolator emulation still works (look at the compat/linux/linux_stats.c). --dXvu6+ixFx2ZffE8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8apkACgkQC3+MBN1Mb4hcHgCfYnCrI9/5GgT58CKE9Dqm2Vvh 0NoAn2eJoh8ydCn2jU15ZtICYhsnNux6 =QwvR -----END PGP SIGNATURE----- --dXvu6+ixFx2ZffE8-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 20:24:55 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A035C106566C for ; Tue, 27 May 2008 20:24:55 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 60B0F8FC34 for ; Tue, 27 May 2008 20:24:55 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 7D21E1CC1A; Tue, 27 May 2008 22:23:32 +0200 (CEST) Date: Tue, 27 May 2008 22:23:32 +0200 From: Ed Schouten To: Kostik Belousov Message-ID: <20080527202332.GP64397@hoeg.nl> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> <20080527191302.GS21317@deviant.kiev.zoral.com.ua> <20080527193242.GN64397@hoeg.nl> <20080527194823.GT21317@deviant.kiev.zoral.com.ua> <20080527194840.GO64397@hoeg.nl> <20080527201002.GU21317@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JQ29orswtRjjfiJM" Content-Disposition: inline In-Reply-To: <20080527201002.GU21317@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit 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, 27 May 2008 20:24:55 -0000 --JQ29orswtRjjfiJM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > On Tue, May 27, 2008 at 09:48:40PM +0200, Ed Schouten wrote: > > * Kostik Belousov wrote: > > > In fact, I do not understand why you leave the UMINORMASK stuff. It m= akes > > > no sense with the unit =3D=3D minor, IMHO. > >=20 > > That's because the uminor() and umajor() routines operate on user device > > numbers (dev_t's). We need to leave those intact, to make things like > > the binary compat work. >=20 > What does it mean to take bits 8-15 from the the unit number to denote > some fictitious major ? And, what binary compatibility you talk about > ? You changed the layout of the encoding for the minor, but still take > the major from it, while there is simply no space for major after your > patch, and definitely not in [8:15]. >=20 > Also, look at the sys/types.h: >=20 > #ifndef _KERNEL > /* > * minor() gives a cookie instead of an index since we don't want to > * change the meanings of bits 0-15 or waste time and space shifting > * bits 16-31 for devices that don't use them. > */ > #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ > #define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ > #endif /* !_KERNEL */ >=20 > #define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ >=20 > I think, if you want to do the change you proposed, the minors for cdevs > shall be cleanly separated from the major/minor something, the later has = no > relations with the cdevs in the current FreeBSD. >=20 > I.e., in your patch, the uminor() can and shall be made identity > function, to match minor2unit() and unit2minor(), and umajor() shall just > return 0. >=20 > It would be nice to verify that the linuxolator emulation still works > (look at the compat/linux/linux_stats.c). Wait. uminor() and umajor() are used on the device number that's returned by dev2udev(). They are only used to obtain the major and minor number from a user device number, which can then be converted to a native Linux/SVR4/etc dev_t. We should not turn this into a 1:1 mapping. The values of dev2unit(cdev) and minor(cdev) should _never_ end up in userspace. It's quite confusing. MAXMINOR currently has a redundant meaning inside the kernel. It is used for both the user major/minor numbers, but also the kernel ones minor numbers (we don't store major numbers there), which is why I renamed it to UMINORMASK while there. --=20 Ed Schouten WWW: http://80386.nl/ --JQ29orswtRjjfiJM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8bcQACgkQ52SDGA2eCwXimgCeJxWBoPUZBObWYWWBLKJOY1rW u5MAnRHhfY0RuSBe0w4t8o3AjksPNjK2 =WAk9 -----END PGP SIGNATURE----- --JQ29orswtRjjfiJM-- From owner-freebsd-arch@FreeBSD.ORG Tue May 27 20:49:14 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A838F1065673 for ; Tue, 27 May 2008 20:49:14 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outZ.internet-mail-service.net (outz.internet-mail-service.net [216.240.47.249]) by mx1.freebsd.org (Postfix) with ESMTP id 901EA8FC18 for ; Tue, 27 May 2008 20:49:14 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id AFDA62360; Tue, 27 May 2008 13:49:33 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id A19D22D600F; Tue, 27 May 2008 13:49:13 -0700 (PDT) Message-ID: <483C73D0.8060709@elischer.org> Date: Tue, 27 May 2008 13:49:20 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Marcel Moolenaar References: <51989.1211875439@critter.freebsd.dk> <483BC27C.6010102@elischer.org> <5229B4D7-40F0-4D45-93F1-244FA05E0304@mac.com> <483C49DC.3080108@elischer.org> <260F636A-8F72-411B-AED9-B029E1964003@mac.com> In-Reply-To: <260F636A-8F72-411B-AED9-B029E1964003@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 20:49:14 -0000 Marcel Moolenaar wrote: > > On May 27, 2008, at 10:50 AM, Julian Elischer wrote: > >> Marcel Moolenaar wrote: >>> On May 27, 2008, at 1:12 AM, Julian Elischer wrote: >>>> judging by the bug reports when things get broken there are still a >>>> lot of people connected to the internet via dial up lines in places >>>> off the beaten track, and still a lot of people who when travelling >>>> do use dialup still. Some of these also use mpd. I can not say how >>>> many plan to keep using this in the future but it may be that the >>>> simplest answer is a completely separate sio driver that >>>> just has netgraph hooks. I haven't talked with Ed yet but there >>>> may be may ways to solve this problem. >>> Take a look at uart(4). It has been designed to allow different >>> kernel interfaces. It currently supports TTYs and keyboards. It >>> should not be too hard to have it hook into netgraph. >>> FYI, >> >> >> While this is a good idea on it's own, the difference between >> what that achieves and what a line discipline achieves is that >> a line disciplin is hardware independent and can even be used >> on a virtual device. > > True, but you said: > "... the simplest answer is a completely separate sio driver...". > > This, besides not being true, is just as hardware dependent as > uart(4) is. It seems to me that you've conveniently changed the > subject to match your point of view :-) yep :-) we need to decide if the aim is to support just serial ports or any 'tty'. From owner-freebsd-arch@FreeBSD.ORG Tue May 27 21:04:28 2008 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3412106566B; Tue, 27 May 2008 21:04:27 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.75]) by mx1.freebsd.org (Postfix) with ESMTP id D3F168FC2F; Tue, 27 May 2008 21:04:27 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtp012-bge351000 (asmtp012-bge351000 [10.150.69.75]) by smtpoutm.mac.com (Xserve/smtpout012/MantshX 4.0) with ESMTP id m4RL4Rd4026378; Tue, 27 May 2008 14:04:27 -0700 (PDT) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp012.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0K1J00K7WP7EB4B0@asmtp012.mac.com>; Tue, 27 May 2008 14:04:27 -0700 (PDT) Message-id: <32DC950C-7FE6-41D5-8935-60E7A1356EFA@mac.com> From: Marcel Moolenaar To: Julian Elischer In-reply-to: <483C73D0.8060709@elischer.org> Date: Tue, 27 May 2008 14:04:25 -0700 References: <51989.1211875439@critter.freebsd.dk> <483BC27C.6010102@elischer.org> <5229B4D7-40F0-4D45-93F1-244FA05E0304@mac.com> <483C49DC.3080108@elischer.org> <260F636A-8F72-411B-AED9-B029E1964003@mac.com> <483C73D0.8060709@elischer.org> X-Mailer: Apple Mail (2.919.2) Cc: Ed Schouten , current@FreeBSD.org, arch@FreeBSD.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@FreeBSD.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled 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, 27 May 2008 21:04:28 -0000 On May 27, 2008, at 1:49 PM, Julian Elischer wrote: > Marcel Moolenaar wrote: >> On May 27, 2008, at 10:50 AM, Julian Elischer wrote: >>> Marcel Moolenaar wrote: >>>> On May 27, 2008, at 1:12 AM, Julian Elischer wrote: >>>>> judging by the bug reports when things get broken there are >>>>> still a >>>>> lot of people connected to the internet via dial up lines in >>>>> places >>>>> off the beaten track, and still a lot of people who when >>>>> travelling >>>>> do use dialup still. Some of these also use mpd. I can not say >>>>> how many plan to keep using this in the future but it may be >>>>> that the simplest answer is a completely separate sio driver that >>>>> just has netgraph hooks. I haven't talked with Ed yet but there >>>>> may be may ways to solve this problem. >>>> Take a look at uart(4). It has been designed to allow different >>>> kernel interfaces. It currently supports TTYs and keyboards. It >>>> should not be too hard to have it hook into netgraph. >>>> FYI, >>> >>> >>> While this is a good idea on it's own, the difference between >>> what that achieves and what a line discipline achieves is that >>> a line disciplin is hardware independent and can even be used >>> on a virtual device. >> True, but you said: >> "... the simplest answer is a completely separate sio driver...". >> This, besides not being true, is just as hardware dependent as >> uart(4) is. It seems to me that you've conveniently changed the >> subject to match your point of view :-) > > > yep :-) > > we need to decide if the aim is to support just serial > ports or any 'tty'. Agreed. ucom(4) is in scope... -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arch@FreeBSD.ORG Tue May 27 22:30:29 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1B1F1065684 for ; Tue, 27 May 2008 22:30:29 +0000 (UTC) (envelope-from peter@wemm.org) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 59DC18FC19 for ; Tue, 27 May 2008 22:30:28 +0000 (UTC) (envelope-from peter@wemm.org) Received: by an-out-0708.google.com with SMTP id b33so642374ana.13 for ; Tue, 27 May 2008 15:30:28 -0700 (PDT) Received: by 10.100.166.9 with SMTP id o9mr2199323ane.120.1211927428233; Tue, 27 May 2008 15:30:28 -0700 (PDT) Received: by 10.100.8.6 with HTTP; Tue, 27 May 2008 15:30:28 -0700 (PDT) Message-ID: Date: Tue, 27 May 2008 15:30:28 -0700 From: "Peter Wemm" To: "Bruce M. Simpson" In-Reply-To: <483C2666.7010608@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080527062736.GF64397@hoeg.nl> <45633.1211870269@critter.freebsd.dk> <20080527064253.GG64397@hoeg.nl> <483C2666.7010608@FreeBSD.org> Cc: Ed Schouten , current@freebsd.org, arch@freebsd.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@freebsd.org Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 27 May 2008 22:30:30 -0000 On Tue, May 27, 2008 at 8:19 AM, Bruce M. Simpson wrote: > Ed Schouten wrote: >>>> >>>> With the word `should' I meant that it would still be possible to >>>> implement multiple line disciplines with the mpsafetty code. But I >>>> really think line disciplines should go. >>>> >>> >>> No, don't bother. Remove the entire "abstraction" of linedisciplines. >>> >> >> Your wish is my command. >> > > Like Julian and Robert said, please don't break Netgraph. > > It still needs to hook into tty at a very low level; and the components such > as Bluetooth which can use ttys for low level stream processing, are built > on Netgraph. > > Both SLIP and PPP can be built using Netgraph. > > Other than that, line disciplines can go away. I think line disciplines should go away as such. It would be nice to have a place to hook into (even linux has this), but the line discipline concept is 30 years stale. IMHO, priority #1 is give ttys the first class treatment they need, then priority #2 is to put in some low level hooks for ng_tty or whatever. It would be hard to come up with a more inconvenient interface than we have now. As an example.. look at the CAN_BYPASS_L_RINT stuff. If we had a way to pass a block of characters upstream instead of a single character at a time, then we could build this magic into the input routines instead of the device drivers. The bypass is still useful because it saves considerable cycles for raw tty modes, eg: userland ppp, zmodem upload/downloads etc etc. But the logic for it shouldn't have to be scattered all over the tree due to poor line discipline APIs. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-arch@FreeBSD.ORG Wed May 28 06:27:12 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EACB5106566C; Wed, 28 May 2008 06:27:12 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 9D6868FC27; Wed, 28 May 2008 06:27:12 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 984F61CC1A; Wed, 28 May 2008 08:25:42 +0200 (CEST) Date: Wed, 28 May 2008 08:25:42 +0200 From: Ed Schouten To: Peter Wemm Message-ID: <20080528062542.GR64397@hoeg.nl> References: <20080527062736.GF64397@hoeg.nl> <45633.1211870269@critter.freebsd.dk> <20080527064253.GG64397@hoeg.nl> <483C2666.7010608@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QRtLtq+kfJNLc57H" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: current@freebsd.org, arch@freebsd.org, Poul-Henning Kamp , Robert Watson , Ade Lovett , net@freebsd.org, "Bruce M. Simpson" Subject: Re: HEAD UP: non-MPSAFE network drivers to be disabled (was: 8.0 network stack MPsafety goals (fwd)) 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, 28 May 2008 06:27:13 -0000 --QRtLtq+kfJNLc57H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Peter, * Peter Wemm wrote: > As an example.. look at the CAN_BYPASS_L_RINT stuff. If we had a way > to pass a block of characters upstream instead of a single character > at a time, then we could build this magic into the input routines > instead of the device drivers. I still haven't had time to add the CAN_BYPASS_L_RINT functionality back. I was thinking about adding the actual copying to the buffers inside the TTY layer, which means we can finally remove all that redundant code from the drivers. But this is still on my TODO list. ;-) --=20 Ed Schouten WWW: http://80386.nl/ --QRtLtq+kfJNLc57H Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8+uYACgkQ52SDGA2eCwUjSQCeP5+BHA+T4Dd1QJ9NorZIMXVE JdwAn2b+C+QOxVlYL+pSJQiINOxGl0KM =u5BL -----END PGP SIGNATURE----- --QRtLtq+kfJNLc57H-- From owner-freebsd-arch@FreeBSD.ORG Thu May 29 17:28:44 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC431065673 for ; Thu, 29 May 2008 17:28:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outl.internet-mail-service.net [216.240.47.235]) by mx1.freebsd.org (Postfix) with ESMTP id 8190F8FC17 for ; Thu, 29 May 2008 17:28:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 7160A24A0 for ; Thu, 29 May 2008 10:28:44 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 151C82D6015 for ; Thu, 29 May 2008 10:28:44 -0700 (PDT) Message-ID: <483EE7D5.5050408@elischer.org> Date: Thu, 29 May 2008 10:28:53 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: all mutexes -> read-write locks? 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, 29 May 2008 17:28:44 -0000 it has been mentioned several times that through the evolution of the locking primitives it has come to be that mutexes and exclusively acquired reader-writer locks are almost the same in terms of overhead and that it might be a good move to define all mutexes to be actually just that. this would allow people to slowly go through the system, catching low hanging fruit by converting some of the mutex operations to reader acquisitions wherever a writer is not required, thus reducing general system contention. Is there any thought on this? Last I heard jhb had confirmed that it was feasible..