From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 03:07:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82FB9106566C for ; Sun, 9 Mar 2008 03:07:22 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail.asahi-net.or.jp (mail1.asahi-net.or.jp [202.224.39.197]) by mx1.freebsd.org (Postfix) with ESMTP id 4FC1E8FC23 for ; Sun, 9 Mar 2008 03:07:22 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from localhost (pool-151-197-33-119.phil.east.verizon.net [151.197.33.119]) by mail.asahi-net.or.jp (Postfix) with ESMTP id 617E351F1B; Sun, 9 Mar 2008 12:07:20 +0900 (JST) Date: Sat, 8 Mar 2008 22:07:11 -0500 From: Yoshihiro Ota To: Kostik Belousov , freebsd-hackers@freebsd.org Message-Id: <20080308220711.1f43614d.ota@j.email.ne.jp> In-Reply-To: <20080308201832.GA10374@deviant.kiev.zoral.com.ua> References: <20080308144505.9c72e484.ota@j.email.ne.jp> <20080308201832.GA10374@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: Re: Remote Kernel Debugging over QEMU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 03:07:22 -0000 On Sat, 8 Mar 2008 22:18:32 +0200 Kostik Belousov wrote: > On Sat, Mar 08, 2008 at 02:45:05PM -0500, Yoshihiro Ota wrote: > > Hello, folks, > > > > Has anyone tried to remote-debugging of a system running on Qemu? > > > > I thought if I could attach kgdb from Qemu host to a guest FreeBSD > > running on Qemu, it would be very helpful for many reasons, i.e. > > no hardware requirements, avoid fscking all disks, and so on. > > > > Has anyone ever attempted? I spent a half day but due to lack of > > remote debugging experience and some other knowledge, it wasn't > > successful. > > I do it often, with the stock gdb built from FSF sources. > > Simply run the qemu with the "-s" switch, then start gdb with kernel.debug > argument, and, in the gdb, do "target remote localhost:1234". > > I use latest gdb since it much better handles debugging information > generated by the 4.2 gcc. > > Also, this setup allows me to use both convenience of ddb specific > commands (inside QEMU) and gdb data inspection facilities (almost) > simultaneously. > Thank you for all replies. This one was the simplest one, indeed. My attempt was like how Robert described but I haven't understood to do that way enough. Regards, Hiro From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 06:30:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AB8D1065672 for ; Sun, 9 Mar 2008 06:30:38 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outI.internet-mail-service.net (outI.internet-mail-service.net [216.240.47.232]) by mx1.freebsd.org (Postfix) with ESMTP id 070698FC1F for ; Sun, 9 Mar 2008 06:30:37 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Sat, 08 Mar 2008 22:30:36 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id CE0A42D6020; Sat, 8 Mar 2008 22:30:35 -0800 (PST) Message-ID: <47D38412.5090903@elischer.org> Date: Sat, 08 Mar 2008 22:30:42 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Hans Petter Selasky References: <200803081133.02575.hselasky@c2i.net> In-Reply-To: <200803081133.02575.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 06:30:38 -0000 Hans Petter Selasky wrote: > Hi, > > I'm planning to create a new socket type in FreeBSD called AF_Q921, which is > to be used for ISDN telephony. Where do I find documentation on how to > implement a new socket in the kernel ? > > --HPS > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" basically you just need to add a 'domain' structure. From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 06:49:24 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A8FF1065675 for ; Sun, 9 Mar 2008 06:49:24 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outI.internet-mail-service.net (outI.internet-mail-service.net [216.240.47.232]) by mx1.freebsd.org (Postfix) with ESMTP id C62E88FC1B for ; Sun, 9 Mar 2008 06:49:23 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Sat, 08 Mar 2008 22:49:23 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 3A8572D6012; Sat, 8 Mar 2008 22:49:22 -0800 (PST) Message-ID: <47D38879.6000102@elischer.org> Date: Sat, 08 Mar 2008 22:49:29 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: "harti@freebsd.org >> Hartmut Brandt" References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> <47D2E469.9030507@dlr.de> In-Reply-To: <47D2E469.9030507@dlr.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Robert Watson , Hans Petter Selasky Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 06:49:24 -0000 Hartmut Brandt wrote: > Robert Watson wrote: >> >> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: >> >>> I'm planning to create a new socket type in FreeBSD called AF_Q921, >>> which is to be used for ISDN telephony. Where do I find documentation >>> on how to implement a new socket in the kernel ? >> > > [SNIP] > >> that isn't connected to the protocol stack, or by using a device stack >> tied to Netgraph nodes. Could you tell us a bit more about what you're >> trying to do, and perhaps we can provide some useful pointers? For > > I want to jump in here about the netgraph stuff (this was the second > time a response talked about using netgraph). > > While developing the ATM signaling stack (this is Q.2931) it turned out, > that the netgraph notion of sending message around very rapidly became a > nightmare if you want correct error handling. The number of states in > Q.2931 (12 states) and the API node exploded to something like 30 or 40 > because of the asynchronuous nature of the communication between stack > layers and error handling. One example: To setup a connection you invoke > a SETUP request. Then you wait for something like CALL_PROCEEDING, > RELEASE_ACK or CONNECT_ACK. Unfortunately you also want to return an > error in the case something is wrong with the request itself (no memory, > bad parameters). So you add an extra message that just ACKs that the > SETUP is going to be handled by the stack or rejected because of some > error in it. With a normal function call based interface you would just > make the setup-request function return an error code. With netgraph > however you need to invent a new message, have additional states in the > consumer and the protocol. Not to talk about error handling when you > want to correctly handle errors like not beeing able to allocate that > same response message. > > Netgraph is very nice for data-flow oriented stuff. It is not so useful > to stack complicated protocol layers. If I'd write the signaling stack > from scratch, I'd probably collaps all the signalling into a single > netgraph node with a socket interface on the upper end. But then one may > as well just implement that as a 'normal' protocol, probably... While I'm very flattered that people have used netgraph for things such as these, and happy to see that it works, keep in mind that Netgraph was in fact written as a way to do "pluggable link level switching", and not really to implement whole protocol stacks. A secondary design goal was to allow to do rapid prototyping of protocols and stream transforming modules. The framework has however been used sometimes as just a way to configure, load and control modules that don't actually use the network side of netgraph at all. (e.g. ng_fec) and its ability to export a stream to userland for extra processing has been useful to some people. I'm not saying that you were wrong to use netgraph, just explaining for the record why it acts the way it does. Having said that, nothing is static. I and others who work with Netgraph are very open to any suggestions that make it more useful. Whether that includes new control mechanisms and feedback schemes, or what-ever, don't feel shy about asking us about the possibility of enhancing it. > > > harti > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 09:16:12 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C17B21065671 for ; Sun, 9 Mar 2008 09:16:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 541A18FC17 for ; Sun, 9 Mar 2008 09:16:12 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.132.89] (account mc467741@c2i.net [62.113.132.89] verified) by mailfe06.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 841500610; Sun, 09 Mar 2008 10:16:10 +0100 From: Hans Petter Selasky To: "Max Laier" Date: Sun, 9 Mar 2008 10:17:14 +0100 User-Agent: KMail/1.9.7 References: <200803081133.02575.hselasky@c2i.net> <49726.192.168.4.151.1204973365.squirrel@router.laiers.local> In-Reply-To: <49726.192.168.4.151.1204973365.squirrel@router.laiers.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803091017.15485.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 09:16:12 -0000 On Saturday 08 March 2008, Max Laier wrote: > Am Sa, 8.03.2008, 11:33, schrieb Hans Petter Selasky: > > I'm planning to create a new socket type in FreeBSD called AF_Q921, which > > is > > to be used for ISDN telephony. Where do I find documentation on how to > > interesting ... can you share more information on this project? Hi Max, I'm currently working on some redesign of my ISDN4BSD stack in cooperation with the FreeSwitch project. One of things that I want to do is to have all ISDN adapters appear like network devices. The ISDN protocols usually use something called Q.921 which is similar to TCP, only very simplified. The Q.931 part will either be in userland or in the kernel, and is used to do the telephony signalling like SETUP, CONNECT and RELEASE_COMPLETE. The idea is that once you use a socket you can easily change the layer2 to TCP, SCTP, UDP or whatever to be able to run Q.931 accross ethernet. --HPS Current I4B homepage: http://www.selasky.org/hans_petter/isdn4bsd From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 09:26:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 048FD1065671 for ; Sun, 9 Mar 2008 09:26:37 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 8BF8E8FC15 for ; Sun, 9 Mar 2008 09:26:35 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.132.89] (account mc467741@c2i.net [62.113.132.89] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 842121505; Sun, 09 Mar 2008 10:26:34 +0100 From: Hans Petter Selasky To: Robert Watson Date: Sun, 9 Mar 2008 10:27:38 +0100 User-Agent: KMail/1.9.7 References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> In-Reply-To: <20080308171435.J88526@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803091027.39843.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 09:26:37 -0000 On Saturday 08 March 2008, Robert Watson wrote: > On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > For example, do you > anticipate using or even needing the routing facilities, and how might you > map ISDN telephony parts into the normal network stack infrastructure of > addresses, routing, interfaces, etc? Hi Robert, ISDN is very simple. In the ISDN world there is a term called TEI which is the Terminal Entity Identifier. This kind of like an IP address. Besides from the signalling there are 2 B-channels which can transport data or audio. One of my goals is to achive zero copy when moving data to/from an ISDN line and also in combination to Voice over IP. Currently data is moved through userland (Asterisk typically) which is usable in the short term, but in the long run I want this extra copying removed. The idea is that I can route [IP] packets (mbufs) through various filters in the kernel without the need for copy. --HPS From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 09:42:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A17591065670 for ; Sun, 9 Mar 2008 09:42:41 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 5F86E8FC1A for ; Sun, 9 Mar 2008 09:42:41 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id AE77A73129; Sun, 9 Mar 2008 10:27:56 +0100 (CET) Date: Sun, 9 Mar 2008 10:27:56 +0100 From: Luigi Rizzo To: Hans Petter Selasky Message-ID: <20080309092756.GC70086@onelab2.iet.unipi.it> References: <200803081133.02575.hselasky@c2i.net> <49726.192.168.4.151.1204973365.squirrel@router.laiers.local> <200803091017.15485.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803091017.15485.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Sun, 09 Mar 2008 11:20:13 +0000 Cc: Max Laier , freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 09:42:41 -0000 On Sun, Mar 09, 2008 at 10:17:14AM +0100, Hans Petter Selasky wrote: > On Saturday 08 March 2008, Max Laier wrote: > > Am Sa, 8.03.2008, 11:33, schrieb Hans Petter Selasky: > > > I'm planning to create a new socket type in FreeBSD called AF_Q921, which > > > is > > > to be used for ISDN telephony. Where do I find documentation on how to > > > > interesting ... can you share more information on this project? > > Hi Max, > > I'm currently working on some redesign of my ISDN4BSD stack in cooperation > with the FreeSwitch project. One of things that I want to do is to have all > ISDN adapters appear like network devices. The ISDN protocols usually use > something called Q.921 which is similar to TCP, only very simplified. funny, I thought that the word "simplified" and an ITU specification were incompatible concepts :) (for the records, the Q.921 spec is available online from ITU http://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-Q.921-199709-I!!PDF-E&type=items cheers luigi From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 11:20:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A01106567E for ; Sun, 9 Mar 2008 11:20:41 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 3A7AC8FC33 for ; Sun, 9 Mar 2008 11:20:39 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so1192278fgg.35 for ; Sun, 09 Mar 2008 04:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=pk9yCoMsRH0lutXzZ6o5zp/ETU2J2+Uns6FSXdDT5+8=; b=k+Mtis3ZQFiQORWjBjTFdPJeH18iYddJLsaimahUlTUDaGYoAIGZckQ5ecAprAafjnIH2BEimvYxV2+p0qoy8gQZvN6e8N/5K17Ifwz6LQme3txYXD8QNQGImtDjZs87OGvP8v7gyUp+/vzXPXJj4CJaoeP7W7Fu4QAR8e/i2LA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=AQtd+zgSpXBvzGPsxMlWZyRwpefMEdXgFkf8hs86SrOAgqtnhnHz/2+W5xEpgsvTOQHym8O2PjLFObpvoIxHqDpKP0NfNzCOj7CZ22fKAr+NC+iMqD+FrBhF1O7N8xEF8F/qw6jUWvLl3eWO4g/bdH87wpljxjqShM2XzZFfzBw= Received: by 10.86.1.1 with SMTP id 1mr4706015fga.2.1205061639070; Sun, 09 Mar 2008 04:20:39 -0700 (PDT) Received: from epsilon.local ( [83.144.140.96]) by mx.google.com with ESMTPS id i6sm6694096gve.5.2008.03.09.04.20.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 09 Mar 2008 04:20:38 -0700 (PDT) Message-ID: <47D3C804.9090307@FreeBSD.org> Date: Sun, 09 Mar 2008 11:20:36 +0000 From: Rui Paulo User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Andriy Gapon References: <479F0ED4.9030709@icyb.net.ua> <479F62D9.6080703@root.org> <47A33CCB.3090902@icyb.net.ua> <47B0C10F.6000109@icyb.net.ua> <47B4103A.6090902@icyb.net.ua> <47B4A103.7040801@icyb.net.ua> <47B4B31A.4020605@icyb.net.ua> <47B84E61.3060401@icyb.net.ua> <47BB375C.5010208@icyb.net.ua> <47BB4D5C.9000406@icyb.net.ua> <47BC7287.6000301@icyb.net.ua> <47BEF2AA.900@icyb.net.ua> In-Reply-To: <47BEF2AA.900@icyb.net.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: Rui Paulo Cc: freebsd-hackers@freebsd.org, freebsd-acpi@freebsd.org Subject: Re: cx_lowest and CPU usage X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 11:20:41 -0000 Andriy Gapon wrote: > on 20/02/2008 20:33 Andriy Gapon said the following: >> on 19/02/2008 23:42 Andriy Gapon said the following: >>> The last result most probably means that RTC IRQ was not the interrupt >>> to wake CPU from sleeping state. >>> The first possibility that comes to mind is that on this particular >>> hardware RTC interrupt (IRQ8) is not able to wake the system from C2 state. >> So it seems that this was true. >> Here's a shortcut to the relevant info: >> PIIX4E (FW82371EB) specification >> DEVACTB — DEVICE ACTIVITY B (FUNCTION 3) pci register description >> BRLD_EN_IRQ8, bit 5 >> >> $ pciconf -r pci0:0:7:3 0x58 >> 03040c07 > > Attached is a patch that fixes the issue for me (without any > side-effects) and should not cause any harm for others. I committed your patch. Thanks! Regards, -- Rui Paulo From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 12:30:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D73951065675; Sun, 9 Mar 2008 12:30:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 8AF4E8FC1D; Sun, 9 Mar 2008 12:30:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 04E9541C795; Sun, 9 Mar 2008 13:30:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id Yqe7zxzNZ72f; Sun, 9 Mar 2008 13:30:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A42F841C770; Sun, 9 Mar 2008 13:30:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 0380D44487F; Sun, 9 Mar 2008 12:28:41 +0000 (UTC) Date: Sun, 9 Mar 2008 12:28:41 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Hans Petter Selasky In-Reply-To: <200803091027.39843.hselasky@c2i.net> Message-ID: <20080309121908.E50685@maildrop.int.zabbadoz.net> References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> <200803091027.39843.hselasky@c2i.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 12:30:07 -0000 On Sun, 9 Mar 2008, Hans Petter Selasky wrote: > On Saturday 08 March 2008, Robert Watson wrote: >> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > >> For example, do you >> anticipate using or even needing the routing facilities, and how might you >> map ISDN telephony parts into the normal network stack infrastructure of >> addresses, routing, interfaces, etc? > > Hi Robert, > > ISDN is very simple. In the ISDN world there is a term called TEI which is the > Terminal Entity Identifier. This kind of like an IP address. Terminal Endpoint Identifier ... -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT Software is harder than hardware so better get it right the first time. From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 14:08:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC681106566B for ; Sun, 9 Mar 2008 14:08:29 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 3957B8FC1E for ; Sun, 9 Mar 2008 14:08:28 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m29E8Qs2089813; Sun, 9 Mar 2008 15:08:26 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id m29E8Hxw072664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 9 Mar 2008 15:08:17 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id m29E8H6D044844; Sun, 9 Mar 2008 15:08:17 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id m29E8Gxi044843; Sun, 9 Mar 2008 15:08:16 +0100 (CET) (envelope-from ticso) Date: Sun, 9 Mar 2008 15:08:16 +0100 From: Bernd Walter To: Daniel Eischen Message-ID: <20080309140815.GN34311@cicely12.cicely.de> References: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on cicely12.cicely.de Cc: FreeBSD Hackers , "Marko, Shaun" Subject: Re: libpthread/fork issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 14:08:29 -0000 On Fri, Mar 07, 2008 at 11:08:50AM -0500, Daniel Eischen wrote: > On Thu, 6 Mar 2008, Marko, Shaun wrote: > > >I'm working on FreeBSD 6.2 and I'm wondering if anybody can help with an > >issue I've found using fork and threads. The attached program > >demonstrates the problem. In short, if a process creates a thread, joins > >the thread, then forks a child process which creates a thread, the > >child's attempt to create a thread will cause the program to dump core > >with the following error message: > >Fatal error 'mutex is on list' at line 540 in file > >/usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0). > > You are not allowed by POSIX to call any non-async-signal-safe > function from a child of a threaded program. There's words > or rationale to the effect that the only purpose for forking > from a threaded program should be to call one of the exec* > functions. Trying to create a thread from a child (like > you are trying to do) is definitely not supported. I've often done it, but since this is subject right now it is a good point to ask if I just had luck so far. Is it allowed to use popen(3) from a threaded programm? -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 15:05:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B7571065670 for ; Sun, 9 Mar 2008 15:05:35 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE0D8FC1C for ; Sun, 9 Mar 2008 15:05:34 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m29F5U2i002430; Sun, 9 Mar 2008 11:05:30 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Sun, 09 Mar 2008 11:05:30 -0400 (EDT) Date: Sun, 9 Mar 2008 11:05:30 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: ticso@cicely.de In-Reply-To: <20080309140815.GN34311@cicely12.cicely.de> Message-ID: References: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> <20080309140815.GN34311@cicely12.cicely.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers , "Marko, Shaun" Subject: Re: libpthread/fork issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 15:05:35 -0000 On Sun, 9 Mar 2008, Bernd Walter wrote: > On Fri, Mar 07, 2008 at 11:08:50AM -0500, Daniel Eischen wrote: >> On Thu, 6 Mar 2008, Marko, Shaun wrote: >> >>> I'm working on FreeBSD 6.2 and I'm wondering if anybody can help with an >>> issue I've found using fork and threads. The attached program >>> demonstrates the problem. In short, if a process creates a thread, joins >>> the thread, then forks a child process which creates a thread, the >>> child's attempt to create a thread will cause the program to dump core >>> with the following error message: >>> Fatal error 'mutex is on list' at line 540 in file >>> /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0). >> >> You are not allowed by POSIX to call any non-async-signal-safe >> function from a child of a threaded program. There's words >> or rationale to the effect that the only purpose for forking >> from a threaded program should be to call one of the exec* >> functions. Trying to create a thread from a child (like >> you are trying to do) is definitely not supported. > > I've often done it, but since this is subject right now it is a good > point to ask if I just had luck so far. > Is it allowed to use popen(3) from a threaded programm? popen() should work fine - the child just uses close() and dup2(), followed by an execve(). -- DE From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 15:24:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 017511065676 for ; Sun, 9 Mar 2008 15:24:19 +0000 (UTC) (envelope-from mitchell@wyatt672earp.force9.co.uk) Received: from pih-relay08.plus.net (pih-relay08.plus.net [212.159.14.134]) by mx1.freebsd.org (Postfix) with ESMTP id B43A28FC1C for ; Sun, 9 Mar 2008 15:24:18 +0000 (UTC) (envelope-from mitchell@wyatt672earp.force9.co.uk) Received: from [81.174.213.123] (helo=81-174-213-123.pth-as6.dial.plus.net) by pih-relay08.plus.net with esmtp (Exim) id 1JYN0V-0005vz-If for freebsd-hackers@freebsd.org; Sun, 09 Mar 2008 15:00:12 +0000 From: Frank Mitchell To: freebsd-hackers@freebsd.org Date: Sun, 9 Mar 2008 14:41:30 +0000 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200803091441.30157.mitchell@wyatt672earp.force9.co.uk> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Plusnet-Relay: 0bf135d1bbe34951f0789c8d119a108a Subject: Bugs On 64-Bit Version 6.3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 15:24:19 -0000 MOUNTING EXT2FS: I dual-boot with OpenSUSE, sharing data on an Ext2 Partition. The machine is an AMD Sempron with SATA Hard Disk. After installing FreeBSD 64-bit for AMD, I suddenly got problems with mount_ext2fs. Thus: "mount_ext2fs /dev/ad4s2 /mnt" , with various options can yield: "Operation not permitted" "kldload: unsupported file type" I haven't noticed a pattern yet, but I discovered a simple solution: "umount /mnt" Which can work without complaining when I didn't know anything was mounted, like immediately after reboot. MEMORY LOCKING: Recompiling my root-privileged program, I get a System Call failure for: mlockall(MCL_CURRENT); errno says: "Resource temporarily unavailable" But mlock(); works. BIOS TIME SETTING: System Time keeps getting set back, typically by 5 minutes plus. I can't see another explanation yet except my new FreeBSD Installation. Faictz Ce Que Vouldras: Frank Mitchell. From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 16:33:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71BD7106566C for ; Sun, 9 Mar 2008 16:33:31 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outR.internet-mail-service.net (outR.internet-mail-service.net [216.240.47.241]) by mx1.freebsd.org (Postfix) with ESMTP id 419CE8FC16 for ; Sun, 9 Mar 2008 16:33:31 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Sun, 09 Mar 2008 09:33:30 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id C1BE62D6017; Sun, 9 Mar 2008 09:33:29 -0700 (PDT) Message-ID: <47D41160.9070901@elischer.org> Date: Sun, 09 Mar 2008 09:33:36 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Hans Petter Selasky References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> <200803091027.39843.hselasky@c2i.net> In-Reply-To: <200803091027.39843.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 16:33:31 -0000 Hans Petter Selasky wrote: > On Saturday 08 March 2008, Robert Watson wrote: >> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > >> For example, do you >> anticipate using or even needing the routing facilities, and how might you >> map ISDN telephony parts into the normal network stack infrastructure of >> addresses, routing, interfaces, etc? > > Hi Robert, > > ISDN is very simple. In the ISDN world there is a term called TEI which is the > Terminal Entity Identifier. This kind of like an IP address. > > Besides from the signalling there are 2 B-channels which can transport data or > audio. One of my goals is to achive zero copy when moving data to/from an > ISDN line and also in combination to Voice over IP. Currently data is moved > through userland (Asterisk typically) which is usable in the short term, but > in the long run I want this extra copying removed. The idea is that I can > route [IP] packets (mbufs) through various filters in the kernel without the > need for copy. Given the speed of ISDN connections, It is not worth doing zero copy on ISDN unless you have more than 1000 of them, which seems unlikely. given a total throughput of 128000 b/s and the speed of current hardware, the number of packets per second is probably not high enough to make the difference even noticable. > > --HPS > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 16:36:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C93B71065675 for ; Sun, 9 Mar 2008 16:36:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outY.internet-mail-service.net (outY.internet-mail-service.net [216.240.47.248]) by mx1.freebsd.org (Postfix) with ESMTP id 981E78FC1F for ; Sun, 9 Mar 2008 16:36:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Sun, 09 Mar 2008 09:36:00 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 1A4ED2D601A; Sun, 9 Mar 2008 09:35:59 -0700 (PDT) Message-ID: <47D411F5.7010905@elischer.org> Date: Sun, 09 Mar 2008 09:36:05 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: ticso@cicely.de References: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> <20080309140815.GN34311@cicely12.cicely.de> In-Reply-To: <20080309140815.GN34311@cicely12.cicely.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , FreeBSD Hackers , "Marko, Shaun" Subject: Re: libpthread/fork issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 16:36:01 -0000 Bernd Walter wrote: > On Fri, Mar 07, 2008 at 11:08:50AM -0500, Daniel Eischen wrote: >> On Thu, 6 Mar 2008, Marko, Shaun wrote: >> >>> I'm working on FreeBSD 6.2 and I'm wondering if anybody can help with an >>> issue I've found using fork and threads. The attached program >>> demonstrates the problem. In short, if a process creates a thread, joins >>> the thread, then forks a child process which creates a thread, the >>> child's attempt to create a thread will cause the program to dump core >>> with the following error message: >>> Fatal error 'mutex is on list' at line 540 in file >>> /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0). >> You are not allowed by POSIX to call any non-async-signal-safe >> function from a child of a threaded program. There's words >> or rationale to the effect that the only purpose for forking >> from a threaded program should be to call one of the exec* >> functions. Trying to create a thread from a child (like >> you are trying to do) is definitely not supported. > > I've often done it, but since this is subject right now it is a good > point to ask if I just had luck so far. > Is it allowed to use popen(3) from a threaded programm? > "probably".. the child in popen does an exec. From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 17:03:16 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BEC7106566B; Sun, 9 Mar 2008 17:03:16 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-1.dlr.de (smtp-1.dlr.de [195.37.61.185]) by mx1.freebsd.org (Postfix) with ESMTP id AA8B38FC1A; Sun, 9 Mar 2008 17:03:15 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from [192.168.2.100] ([172.21.151.1]) by smtp-1.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Sun, 9 Mar 2008 18:03:13 +0100 Message-ID: <47D4184D.6020704@dlr.de> Date: Sun, 09 Mar 2008 18:03:09 +0100 From: Hartmut Brandt Organization: German Aerospace Center User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Julian Elischer References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> <47D2E469.9030507@dlr.de> <47D38879.6000102@elischer.org> In-Reply-To: <47D38879.6000102@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 Mar 2008 17:03:13.0727 (UTC) FILETIME=[76110CF0:01C88207] Cc: freebsd-hackers@freebsd.org, Robert Watson , Hans Petter Selasky Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hartmut Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 17:03:16 -0000 Julian Elischer wrote: > Hartmut Brandt wrote: >> Robert Watson wrote: >>> >>> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: >>> >>>> I'm planning to create a new socket type in FreeBSD called AF_Q921, >>>> which is to be used for ISDN telephony. Where do I find >>>> documentation on how to implement a new socket in the kernel ? >>> >> >> [SNIP] >> >>> that isn't connected to the protocol stack, or by using a device >>> stack tied to Netgraph nodes. Could you tell us a bit more about what >>> you're trying to do, and perhaps we can provide some useful >>> pointers? For >> >> I want to jump in here about the netgraph stuff (this was the second >> time a response talked about using netgraph). >> >> While developing the ATM signaling stack (this is Q.2931) it turned >> out, that the netgraph notion of sending message around very rapidly >> became a nightmare if you want correct error handling. The number of >> states in Q.2931 (12 states) and the API node exploded to something >> like 30 or 40 because of the asynchronuous nature of the communication >> between stack layers and error handling. One example: To setup a >> connection you invoke a SETUP request. Then you wait for something >> like CALL_PROCEEDING, RELEASE_ACK or CONNECT_ACK. Unfortunately you >> also want to return an error in the case something is wrong with the >> request itself (no memory, bad parameters). So you add an extra >> message that just ACKs that the SETUP is going to be handled by the >> stack or rejected because of some error in it. With a normal function >> call based interface you would just make the setup-request function >> return an error code. With netgraph however you need to invent a new >> message, have additional states in the consumer and the protocol. Not >> to talk about error handling when you want to correctly handle errors >> like not beeing able to allocate that same response message. >> >> Netgraph is very nice for data-flow oriented stuff. It is not so >> useful to stack complicated protocol layers. If I'd write the >> signaling stack from scratch, I'd probably collaps all the signalling >> into a single netgraph node with a socket interface on the upper end. >> But then one may as well just implement that as a 'normal' protocol, >> probably... > > While I'm very flattered that people have used netgraph for things > such as these, and happy to see that it works, keep in mind that > Netgraph was in fact written as a way to do "pluggable link level > switching", and not really to implement whole protocol stacks. > > A secondary design goal was to allow to do rapid prototyping of > protocols and stream transforming modules. > > The framework has however been used sometimes as just a way to > configure, load and control modules that don't actually use the > network side of netgraph at all. (e.g. ng_fec) and its ability to > export a stream to userland for extra processing has been useful > to some people. > > I'm not saying that you were wrong to use netgraph, just explaining > for the record why it acts the way it does. > Having said that, nothing is static. I and others who work with > Netgraph are very open to any suggestions that make it more > useful. Whether that includes new control mechanisms and feedback > schemes, or what-ever, don't feel shy about asking us about the > possibility of enhancing it. Yes. I didn't want to say that netgraph is bad - it was just not my best idea to use it for a signaling stack. Indeed, it is excellent if you use it right. The SSCOP protocol, which is the transport protocol used for ATM signalling is something like TCP - 3-way handshake, SACKs, flow control, ... all that stuff. This fits nicely into the scheme - you can push that on another node, for example, a raw ATM/AAL5 connection and get reliable data transfer. Just implementing several complex state machines one on top of the other does not work so good. At the end STREAMS suffers from the same problem. There is a reason that Sun merged IP and TCP into a single module in Solaris 2.4 or 2.5. So really - netgraph is an excellent piece of work. harti From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 19:55:24 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3D0B1065671 for ; Sun, 9 Mar 2008 19:55:24 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with SMTP id 772C48FC1C for ; Sun, 9 Mar 2008 19:55:23 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 22155 invoked by uid 1001); 9 Mar 2008 19:27:13 -0000 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda.mired.org (tmda-ofmipd) with ESMTP; Sun, 09 Mar 2008 15:27:13 -0400 Date: Sun, 9 Mar 2008 15:27:12 -0400 To: hackers@freebsd.org Message-ID: <20080309152712.42752293@bhuda.mired.org> Organization: Meyer Consulting X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; amd64-portbld-freebsd6.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Mike Meyer Cc: Subject: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 19:55:25 -0000 I've stumbled on to an obscure problem with autoconf 2.61, and I'm not sure quite what to do with it. I've already sent mail to the autoconf folks, but I'd like to understand what's going on. The problem is that, on a FreeBSD system with only /bin/sh and the ports zsh as installed shells, if you have SHELL set to zsh when invoking the autoconf-generated configure script, the script produces a broken Makefile. It doesn't generate an error, it just complains that: as_func_failure succeeded. as_func_failure succeeded. No shell found that supports shell functions. Please tell autoconf@gnu.org about your system, including any error possibly output before this message and then runs to completion, with no other indication of an error, and non in the config.log file either. This has happened on multiple different FreeBSD systems (including both 6-STABLE and 7-RELEASE), on multiple autoconf scripts (possibly from multiple versions of autoconf). Installing bash (or presumably any of the other shells that the configure script looks for) changes this, and it works fine. Setting SHELL to /bin/sh, or unsetting it, also solves this. And of course, if you build from ports, SHELL gets set to /bin/sh, so there isn't a problem at all (which probably has a lot to do with why I never noticed it before - the ports systems pretty much covers most of my needs). =46rom poking at things it seems that autoconf isn't happy with /bin/sh for some reason, even though it works. With SHELL set to zsh, it then tries that - and again isn't happy. However, it's not so unhappy that it fails completely, so it tries to run with whatever shell it tried last. My question is, why doesn't the configure script just accept /bin/sh? After all, it's going to work. Is there an autoconf person who knows this one? Thanks, http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 20:20:06 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABF31106566B for ; Sun, 9 Mar 2008 20:20:06 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4CF8FC19 for ; Sun, 9 Mar 2008 20:20:06 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JYS02-0000Uo-Q0 for freebsd-hackers@freebsd.org; Sun, 09 Mar 2008 20:20:02 +0000 Received: from d463cebe.datahighways.de ([212.99.206.190]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Mar 2008 20:20:02 +0000 Received: from ino-news by d463cebe.datahighways.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Mar 2008 20:20:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: ino-news@spotteswoode.dnsalias.org (clemens fischer) Date: Sun, 09 Mar 2008 21:01:44 +0100 Lines: 22 Message-ID: <8asda5x3ni.ln2@nntp.spotteswoode.dnsalias.org> References: <200803091441.30157.mitchell@wyatt672earp.force9.co.uk> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: d463cebe.datahighways.de X-Archive: encrypt=none User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/7.0-STABLE (i386)) Sender: news Subject: Re: Bugs On 64-Bit Version 6.3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 20:20:06 -0000 On Sun, 9 Mar 2008 14:41:30 +0000 Frank Mitchell wrote: > MEMORY LOCKING: > > Recompiling my root-privileged program, I get a System Call failure > for: > > mlockall(MCL_CURRENT); > > errno says: "Resource temporarily unavailable" how much memory is installed? > But mlock(); works. ... and how many bytes/pages do you lock in this operation? note that currently the 64-bit ELF ld wastes space by allocating larger memory blocks than its 32-bit counterpart. this has been discussed before, but i don't remember any solution to the problem. regards, clemens From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 21:57:04 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF3031065673 for ; Sun, 9 Mar 2008 21:57:04 +0000 (UTC) (envelope-from jon@porthos.spock.org) Received: from porthos.spock.org (porthos.spock.org [204.97.176.45]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9908FC14 for ; Sun, 9 Mar 2008 21:57:04 +0000 (UTC) (envelope-from jon@porthos.spock.org) Received: from porthos.spock.org (R00+@localhost [127.0.0.1]) by porthos.spock.org with ESMTP serial EF600Q3T-B7F8823m29LOgCx057329F7T for ; Sun, 9 Mar 2008 17:24:42 -0400 (EDT) (envelope-from jon@porthos.spock.org) Received: (from jon@localhost) by porthos.spock.org (8.14.2/8.14.2/Submit) id m29LOgXV057328 for hackers@freebsd.org; Sun, 9 Mar 2008 17:24:42 -0400 (EDT) (envelope-from jon) Date: Sun, 9 Mar 2008 17:24:42 -0400 From: Jonathan Chen To: hackers@freebsd.org Message-ID: <20080309212441.GA56523@porthos.spock.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Scanned-By: MIMEDefang 2.63 on 204.97.176.45 Cc: Subject: mlock & COW X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 21:57:04 -0000 I've been battling with a bug related to mlock and COW pages. Since I'm basically clueless when it comes to the VM subsystem, I was hoping someone with more clue can look at my fix and let me know if I'm doing the right thing here. The problem: User programs will crash (SEGV/BUS) if COW pages become writable after the pages are mlocked. This happens if shared libraries is loaded in a program after a call to mlockall(MCL_FUTURE), and can be seen with amd and ntpd when nss_ldap is used in the system. Included at the end of this message is a sample program that demonstrates the problem. The "solution": Forcibly wire the page via vm_fault_wire() when the page protection bits are changed. This seems to make the problem disappear, but I'm not sure if causing a fault on vm_map_protect() is a good thing to do. Am I correct in thinking vm_fault_wire() will cause the COW page to be copied immediately? I think this is the right thing to do, given the page is supposed to be wired, but I'm not sure if somewhere in the vm fault routines might be a better place to put the fix. I'm also not sure what the last argument to vm_fault_wire() (fictitious) means, I just copied the argument from another invocation. My patch (against 7-STABLE) is included below. I'll commit this if someone blesses the fix as the right thing. Index: sys/vm/vm_map.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_map.c,v retrieving revision 1.388.2.3 diff -u -p -r1.388.2.3 vm_map.c --- sys/vm/vm_map.c 18 Jan 2008 10:02:53 -0000 1.388.2.3 +++ sys/vm/vm_map.c 9 Mar 2008 20:55:50 -0000 @@ -1621,6 +1621,15 @@ vm_map_protect(vm_map_t map, vm_offset_t current->end, current->protection & MASK(current)); #undef MASK + if ((entry->eflags & + (MAP_ENTRY_USER_WIRED|MAP_ENTRY_COW)) == + (MAP_ENTRY_USER_WIRED|MAP_ENTRY_COW)) { + vm_fault_wire(map, current->start, + current->end, TRUE, + entry->object.vm_object != NULL && + entry->object.vm_object->type == + OBJT_DEVICE); + } } vm_map_simplify_entry(map, current); current = current->next; bug demonstration code =================================================================== #include #include #include #include #include #include #include char *b; int main() { int fd = open("/usr/lib/libc.a", O_RDONLY); if (fd < 0) { perror("open"); exit(1); } b = mmap(0, 1024, PROT_READ|PROT_EXEC, MAP_PRIVATE, fd, 0); if (b == MAP_FAILED) { perror("mmap"); exit(0); } if (mlock(b, 1024) != 0) { perror("mlock"); } if (mprotect(b, 1024, PROT_READ|PROT_WRITE|PROT_EXEC) != 0) { perror("mprotect"); } printf("memset crash now\n"); memset(b, 1, 1024); printf("still alive\n"); } -Jon From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 22:20:10 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 010FD1065670 for ; Sun, 9 Mar 2008 22:20:10 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.freebsd.org (Postfix) with ESMTP id D38098FC1A for ; Sun, 9 Mar 2008 22:20:09 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: (qmail 11839 invoked from network); 9 Mar 2008 22:20:09 -0000 Received: from april.chuckr.org (chuckr@[66.92.151.30]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 9 Mar 2008 22:20:08 -0000 Message-ID: <47D46127.2030802@chuckr.org> Date: Sun, 09 Mar 2008 18:13:59 -0400 From: Chuck Robey User-Agent: Thunderbird 2.0.0.6 (X11/20071107) MIME-Version: 1.0 To: Mike Meyer References: <20080309152712.42752293@bhuda.mired.org> In-Reply-To: <20080309152712.42752293@bhuda.mired.org> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 22:20:10 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike Meyer wrote: > I've stumbled on to an obscure problem with autoconf 2.61, and I'm not > sure quite what to do with it. I've already sent mail to the autoconf > folks, but I'd like to understand what's going on. > > The problem is that, on a FreeBSD system with only /bin/sh and the > ports zsh as installed shells, if you have SHELL set to zsh when > invoking the autoconf-generated configure script, the script produces > a broken Makefile. It doesn't generate an error, it just complains > that: > > as_func_failure succeeded. > as_func_failure succeeded. > No shell found that supports shell functions. > Please tell autoconf@gnu.org about your system, > including any error possibly output before this > message > > and then runs to completion, with no other indication of an error, and > non in the config.log file either. This has happened on multiple > different FreeBSD systems (including both 6-STABLE and 7-RELEASE), on > multiple autoconf scripts (possibly from multiple versions of > autoconf). > > Installing bash (or presumably any of the other shells that the > configure script looks for) changes this, and it works fine. Setting > SHELL to /bin/sh, or unsetting it, also solves this. > > And of course, if you build from ports, SHELL gets set to /bin/sh, so > there isn't a problem at all (which probably has a lot to do with why > I never noticed it before - the ports systems pretty much covers most > of my needs). > > From poking at things it seems that autoconf isn't happy with /bin/sh > for some reason, even though it works. With SHELL set to zsh, it then > tries that - and again isn't happy. However, it's not so unhappy that > it fails completely, so it tries to run with whatever shell it tried > last. > > My question is, why doesn't the configure script just accept /bin/sh? > After all, it's going to work. Is there an autoconf person who knows > this one? > The top of the configure script I just inspected (the one from print/libxslt) called out, on the top line: #!/bin/sh and so, as long as you do have a real shell there (which you have to have) should really work, BUT I know, from past experience, that many, many Linuxers, when told that their script doesn't work with any shell but Bash, will just tell you "but why don't you run Bash?" as if no one should ever run any other shell. I went to far, back when I ran Gentoo, to try to fix some broken scripts wrt non-bash usage, but no one really cared to fix that kind of thing. It's not going to be a proboem with configure, but it's possible that soome script called by configure is setting it's own shell. Configure probably needs, way up at the top, something like "export SHELL=/bin/sh" but don't hold your breath, and if Linuxers gave it a try, they'd probably want to peg it to bash, and that'd cause worse problems, because Linux and FreeBSD store bash in a different places. But if you're considering some holy war to try to convince Linux folks to correct this, DING DING, let me off at the next stop, please. > Thanks, > Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A16031065675 for ; Sun, 9 Mar 2008 22:36:10 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.233]) by mx1.freebsd.org (Postfix) with ESMTP id 5F1448FC12 for ; Sun, 9 Mar 2008 22:36:10 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so1715288wxd.7 for ; Sun, 09 Mar 2008 15:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=47Uhv1ycKzCGH8LbGI2o5Czir8E25WNijXRaPWp8VHY=; b=iLTk5ye+qiFLKp0fq21v5eqWY74uihMD4Z/jiRXF/cvJ/TBifcDizhY+o7yKipdsTBflMv71+PZLHAdCwT/ucHeQJvRnEDq18gcV4pfy3yhkarMcDovBZehrtnchB+8e7tKu7mluxXFxvtO7IkuGBXbeglrmtgtNhmj2GQtwjJk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BOnesPEEn4mbZUWVIp1B8OLP294dz7T/V/4MjceHQ8Ow9HXcBF7+YOziQft8V7lS0i0RDXizIqCBMVNKAQIpzVKhis7dgb2j/I3No8lo5haJl3J+ItG4cSA5wfK+VrEa/mBuuBP53pAU8/yN4HTgmDwIfFKsg5Urc1AJkC1RY7E= Received: by 10.115.89.1 with SMTP id r1mr2429107wal.8.1205100727322; Sun, 09 Mar 2008 15:12:07 -0700 (PDT) Received: by 10.115.22.10 with HTTP; Sun, 9 Mar 2008 15:12:07 -0700 (PDT) Message-ID: Date: Sun, 9 Mar 2008 15:12:07 -0700 From: "Kip Macy" To: "Jonathan Chen" In-Reply-To: <20080309212441.GA56523@porthos.spock.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080309212441.GA56523@porthos.spock.org> Cc: hackers@freebsd.org Subject: Re: mlock & COW X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 22:36:10 -0000 On Sun, Mar 9, 2008 at 2:24 PM, Jonathan Chen wrote: > I've been battling with a bug related to mlock and COW pages. Since I'm > basically clueless when it comes to the VM subsystem, I was hoping someone > with more clue can look at my fix and let me know if I'm doing the right > thing here. > > The problem: User programs will crash (SEGV/BUS) if COW pages become > writable after the pages are mlocked. This happens if shared libraries is > loaded in a program after a call to mlockall(MCL_FUTURE), and can be seen > with amd and ntpd when nss_ldap is used in the system. Included at the end > of this message is a sample program that demonstrates the problem. I think the problem is mlock wires the pages that are backing those mappings. So you're writing to a page that you don't have write access to. You're best off ensuring that you have a private copy of all those pages before mlocking(). > > The "solution": Forcibly wire the page via vm_fault_wire() when the page > protection bits are changed. This seems to make the problem disappear, but > I'm not sure if causing a fault on vm_map_protect() is a good thing to do. Uhm no. Don't do that. > Am I correct in thinking vm_fault_wire() will cause the COW page to be > copied immediately? I think this is the right thing to do, given the page > is supposed to be wired, but I'm not sure if somewhere in the vm fault > routines might be a better place to put the fix. I'm also not sure what > the last argument to vm_fault_wire() (fictitious) means, I just copied the > argument from another invocation. My patch (against 7-STABLE) is included > below. I'm not certain what the correct semantics are. You're patch *may* be OK. -Kip > > I'll commit this if someone blesses the fix as the right thing. > > > Index: sys/vm/vm_map.c > =================================================================== > RCS file: /home/ncvs/src/sys/vm/vm_map.c,v > retrieving revision 1.388.2.3 > diff -u -p -r1.388.2.3 vm_map.c > --- sys/vm/vm_map.c 18 Jan 2008 10:02:53 -0000 1.388.2.3 > +++ sys/vm/vm_map.c 9 Mar 2008 20:55:50 -0000 > @@ -1621,6 +1621,15 @@ vm_map_protect(vm_map_t map, vm_offset_t > current->end, > current->protection & MASK(current)); > #undef MASK > + if ((entry->eflags & > + (MAP_ENTRY_USER_WIRED|MAP_ENTRY_COW)) == > + (MAP_ENTRY_USER_WIRED|MAP_ENTRY_COW)) { > + vm_fault_wire(map, current->start, > + current->end, TRUE, > + entry->object.vm_object != NULL && > + entry->object.vm_object->type == > + OBJT_DEVICE); > + } > } > vm_map_simplify_entry(map, current); > current = current->next; > > > > > bug demonstration code > =================================================================== > > #include > #include > #include > #include > #include > #include > #include > > char *b; > > int main() { > int fd = open("/usr/lib/libc.a", O_RDONLY); > if (fd < 0) { > perror("open"); > exit(1); > } > b = mmap(0, 1024, PROT_READ|PROT_EXEC, MAP_PRIVATE, fd, 0); > if (b == MAP_FAILED) { > perror("mmap"); > exit(0); > } > if (mlock(b, 1024) != 0) { > perror("mlock"); > } > if (mprotect(b, 1024, PROT_READ|PROT_WRITE|PROT_EXEC) != 0) { > perror("mprotect"); > } > printf("memset crash now\n"); > memset(b, 1, 1024); > printf("still alive\n"); > } > > -Jon > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 9 23:42:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BA481065674 for ; Sun, 9 Mar 2008 23:42:23 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with SMTP id D6BD28FC12 for ; Sun, 9 Mar 2008 23:42:22 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 44620 invoked by uid 1001); 9 Mar 2008 23:40:53 -0000 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda.mired.org (tmda-ofmipd) with ESMTP; Sun, 09 Mar 2008 19:40:52 -0400 Date: Sun, 9 Mar 2008 19:40:50 -0400 To: freebsd-hackers@freebsd.org Message-ID: <20080309194050.39bab925@bhuda.mired.org> In-Reply-To: <47D46127.2030802@chuckr.org> References: <20080309152712.42752293@bhuda.mired.org> <47D46127.2030802@chuckr.org> Organization: Meyer Consulting X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; amd64-portbld-freebsd6.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Mike Meyer Subject: Re: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 23:42:23 -0000 On Sun, 09 Mar 2008 18:13:59 -0400 Chuck Robey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Mike Meyer wrote: > > I've stumbled on to an obscure problem with autoconf 2.61, and I'm not > > sure quite what to do with it. I've already sent mail to the autoconf > > folks, but I'd like to understand what's going on. > > > > The problem is that, on a FreeBSD system with only /bin/sh and the > > ports zsh as installed shells, if you have SHELL set to zsh when > > invoking the autoconf-generated configure script, the script produces > > a broken Makefile. It doesn't generate an error, it just complains > > that: > > > > as_func_failure succeeded. > > as_func_failure succeeded. > > No shell found that supports shell functions. > > Please tell autoconf@gnu.org about your system, > > including any error possibly output before this > > message > > then runs to completion, with no other indication of an error, and > > non in the config.log file either. This has happened on multiple > > different FreeBSD systems (including both 6-STABLE and 7-RELEASE), on > > multiple autoconf scripts (possibly from multiple versions of > > autoconf). > > > > Installing bash (or presumably any of the other shells that the > > configure script looks for) changes this, and it works fine. Setting > > SHELL to /bin/sh, or unsetting it, also solves this. > > > > And of course, if you build from ports, SHELL gets set to /bin/sh, so > > there isn't a problem at all (which probably has a lot to do with why > > I never noticed it before - the ports systems pretty much covers most > > of my needs). > > > > From poking at things it seems that autoconf isn't happy with /bin/sh > > for some reason, even though it works. With SHELL set to zsh, it then > > tries that - and again isn't happy. However, it's not so unhappy that > > it fails completely, so it tries to run with whatever shell it tried > > last. > > > > My question is, why doesn't the configure script just accept /bin/sh? > > After all, it's going to work. Is there an autoconf person who knows > > this one? > > > > The top of the configure script I just inspected (the one from > print/libxslt) called out, on the top line: > > #!/bin/sh > > and so, as long as you do have a real shell there (which you have to have) > should really work, BUT I know, from past experience, that many, many > Linuxers, when told that their script doesn't work with any shell but Bash, > will just tell you "but why don't you run Bash?" as if no one should ever > run any other shell. I went to far, back when I ran Gentoo, to try to fix > some broken scripts wrt non-bash usage, but no one really cared to fix that > kind of thing. It's not going to be a proboem with configure, but it's > possible that soome script called by configure is setting it's own shell. > Configure probably needs, way up at the top, something like "export > SHELL=/bin/sh" but don't hold your breath, and if Linuxers gave it a try, > they'd probably want to peg it to bash, and that'd cause worse problems, > because Linux and FreeBSD store bash in a different places. I don't really think this is a bash vs. sh issue, as the point of the code that's failing is all about trying to figure out which of the available shell-like things will do the job it needs to do. If the autoconf folks were going to say "just use bash", they'd skip all this magic, and just make the script a bash script (which would mean that bash couldn't use autoconf). Worse yet, said job verges on the impossible, so I can understand why the code is a bit fuzzy about what "acceptable" is. Shells apparently wind up in three classes: 1) Not usable - none of the shells discussed are put here. 2) Maybe usable - both sh and zsh are put here. 3) Definitely usable - bash gets put here. If a definitely usable shell is found, the search stops, and configure just uses it. If none of the shells are maybe usable, then configure stops and complains. Otherwise, we try the last shell that was "maybe usable", and $SHELL is always the last one tried. So there are at *least* three things that could be considered broken, in that changing them would fix the problem I encountered. 1) Our /bin/sh isn't classified as Definitely usable. 2) zsh is Not usable. 3) zsh is classified as Maybe usable. #1 could be fixed on our side, if we understood why it wasn't usable. It could also be fixed by the autoconf folks. #2 has to be fixed by the zsh folks. #3 has to be fixed by the autoconf folks. > But if you're considering some holy war to try to convince Linux folks to > correct this, DING DING, let me off at the next stop, please. No, I'm not considering a holy war about this - I'm just curious as to what's going on. After that, we can call the jihad :-). http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 00:05:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F0B4106566C for ; Mon, 10 Mar 2008 00:05:11 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id D93918FC1F for ; Mon, 10 Mar 2008 00:05:10 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 0AEAF4B67E4 for ; Mon, 10 Mar 2008 00:05:09 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id DA506175D5; Mon, 10 Mar 2008 01:04:25 +0100 (CET) Date: Mon, 10 Mar 2008 01:04:25 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080310000425.GA1653@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20080309152712.42752293@bhuda.mired.org> <47D46127.2030802@chuckr.org> <20080309194050.39bab925@bhuda.mired.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080309194050.39bab925@bhuda.mired.org> User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 00:05:11 -0000 On Sun, Mar 09, 2008 at 07:40:50PM -0400, Mike Meyer wrote: > 1) Our /bin/sh isn't classified as Definitely usable. > 2) zsh is Not usable. > 3) zsh is classified as Maybe usable. The third is definitely true. Joerg From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 00:06:06 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D5F81065675 for ; Mon, 10 Mar 2008 00:06:06 +0000 (UTC) (envelope-from grog@lemis.com) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.freebsd.org (Postfix) with ESMTP id 03E108FC1A for ; Mon, 10 Mar 2008 00:06:05 +0000 (UTC) (envelope-from grog@lemis.com) Received: from dereel.lemis.com (ozlabs.org [203.10.76.45]) by ozlabs.org (Postfix) with ESMTP id 59094DDDEE; Mon, 10 Mar 2008 10:50:32 +1100 (EST) Received: by dereel.lemis.com (Postfix, from userid 1004) id 791618B1C5; Mon, 10 Mar 2008 10:50:29 +1100 (EST) Date: Mon, 10 Mar 2008 10:50:29 +1100 From: Greg 'groggy' Lehey To: Mike Meyer Message-ID: <20080309235029.GD86378@dereel.lemis.com> References: <20080309152712.42752293@bhuda.mired.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pZs/OQEoSSbxGlYw" Content-Disposition: inline In-Reply-To: <20080309152712.42752293@bhuda.mired.org> User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: hackers@freebsd.org Subject: Why doesn't autoconf like zsh? (was: Why doesn't autoconf like our /bin/sh?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 00:06:06 -0000 --pZs/OQEoSSbxGlYw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sunday, 9 March 2008 at 15:27:12 -0400, Mike Meyer wrote: > I've stumbled on to an obscure problem with autoconf 2.61, and I'm not > sure quite what to do with it. I've already sent mail to the autoconf > folks, but I'd like to understand what's going on. > > The problem is that, on a FreeBSD system with only /bin/sh and the > ports zsh as installed shells, if you have SHELL set to zsh when > invoking the autoconf-generated configure script, the script produces > a broken Makefile. It doesn't generate an error, it just complains > that: > > ... > > Setting SHELL to /bin/sh, or unsetting it, also solves this. This is pretty clear that this is a zsh issue, either because of bugs in zsh or (more likely, I'd guess) in autoconf. Greg -- See complete headers for address and phone numbers. --pZs/OQEoSSbxGlYw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFH1HdhIubykFB6QiMRAkA9AJ0fpcjcW0gCQpofBmxyoZjxzZFjZwCeO89k 4cQafn+PReoaSa5r7PLPmfQ= =QXnH -----END PGP SIGNATURE----- --pZs/OQEoSSbxGlYw-- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 00:58:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A23C106566B for ; Mon, 10 Mar 2008 00:58:22 +0000 (UTC) (envelope-from mbsd@pacbell.net) Received: from nlpi001.prodigy.net (nlpi001.sbcis.sbc.com [207.115.36.30]) by mx1.freebsd.org (Postfix) with ESMTP id 398D18FC16 for ; Mon, 10 Mar 2008 00:58:21 +0000 (UTC) (envelope-from mbsd@pacbell.net) X-ORBL: [69.236.76.168] Received: from antec (adsl-69-236-76-168.dsl.pltn13.pacbell.net [69.236.76.168]) by nlpi001.prodigy.net (8.13.8 out.dk.spool/8.13.8) with ESMTP id m2A0fFjb024386; Sun, 9 Mar 2008 19:41:15 -0500 Date: Sun, 9 Mar 2008 17:41:15 -0700 (PDT) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= To: Mike Meyer In-Reply-To: <20080309194050.39bab925@bhuda.mired.org> Message-ID: <20080309173523.D907@antec.home> References: <20080309152712.42752293@bhuda.mired.org> <47D46127.2030802@chuckr.org> <20080309194050.39bab925@bhuda.mired.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 00:58:22 -0000 On Sun, 9 Mar 2008, Mike Meyer wrote: [...] > So there are at *least* three things that could be considered broken, > in that changing them would fix the problem I encountered. > > 1) Our /bin/sh isn't classified as Definitely usable. > 2) zsh is Not usable. > 3) zsh is classified as Maybe usable. > > #1 could be fixed on our side, if we understood why it wasn't > usable. It could also be fixed by the autoconf folks. #2 has to be > fixed by the zsh folks. #3 has to be fixed by the autoconf folks. Zsh has a large number of configuration settings that can make it more or less sh(1)-compatible. I've been bitten by SH_WORD_SPLIT, which defaults to being incompatible, IIRC. Since zsh is my interactive shell of preference, I spent a few minutes trying to reproduce your problems, but failed. Perhaps there is something in your .z* config files that make things go awry? $.02, /Mikko From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 01:07:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC97F106566C for ; Mon, 10 Mar 2008 01:07:23 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with SMTP id 91DBE8FC1E for ; Mon, 10 Mar 2008 01:07:23 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 60576 invoked by uid 1001); 10 Mar 2008 01:05:42 -0000 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda.mired.org (tmda-ofmipd) with ESMTP; Sun, 09 Mar 2008 21:05:41 -0400 Date: Sun, 9 Mar 2008 21:05:15 -0400 To: Mikko =?UTF-8?B?VHnDtmzDpGrDpHJ2aQ==?= Message-ID: <20080309210515.50f710cf@bhuda.mired.org> In-Reply-To: <20080309173523.D907@antec.home> References: <20080309152712.42752293@bhuda.mired.org> <47D46127.2030802@chuckr.org> <20080309194050.39bab925@bhuda.mired.org> <20080309173523.D907@antec.home> Organization: Meyer Consulting X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; amd64-portbld-freebsd6.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 01:07:24 -0000 On Sun, 9 Mar 2008 17:41:15 -0700 (PDT) Mikko Ty=C3=B6l=C3=A4j=C3=A4rvi wrote: > On Sun, 9 Mar 2008, Mike Meyer wrote: >=20 > [...] >=20 > > So there are at *least* three things that could be considered broken, > > in that changing them would fix the problem I encountered. > > > > 1) Our /bin/sh isn't classified as Definitely usable. > > 2) zsh is Not usable. > > 3) zsh is classified as Maybe usable. > > > > #1 could be fixed on our side, if we understood why it wasn't > > usable. It could also be fixed by the autoconf folks. #2 has to be > > fixed by the zsh folks. #3 has to be fixed by the autoconf folks. >=20 > Zsh has a large number of configuration settings that can make it > more or less sh(1)-compatible. I've been bitten by SH_WORD_SPLIT, > which defaults to being incompatible, IIRC. >=20 > Since zsh is my interactive shell of preference, I spent a few minutes > trying to reproduce your problems, but failed. Perhaps there is > something in your .z* config files that make things go awry? Note that to reproduce it, you must *not* have any shells installed that the configure script classifies as "definitely usable". In particular, if you've got bash installed (and a number of ports will install it for you), the configure script finds that and will use it. Also, doing things through ports causes SHELL to be set to /bin/sh (normally, anway), and hence masks the problem. There seem to be a fwe things in my environment specific to zsh - other than all the completion stuff, of course, which shouldn't make any difference - MULTIOS, zsh, FPATH and extendedglob. Turning them all off doesn't make any difference. Thanks, http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 09:59:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DE3C106566C; Mon, 10 Mar 2008 09:59:00 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4378FC13; Mon, 10 Mar 2008 09:59:00 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A54F51.dip.t-dialin.net [84.165.79.81]) by redbull.bpaserver.net (Postfix) with ESMTP id EBFB02E27E; Mon, 10 Mar 2008 10:58:53 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id DFBCE940A1; Mon, 10 Mar 2008 10:57:28 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m2A9vRCW036923; Mon, 10 Mar 2008 10:57:27 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Mon, 10 Mar 2008 10:57:27 +0100 Message-ID: <20080310105727.ah4y31sh40o04gw4@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 10 Mar 2008 10:57:27 +0100 From: Alexander Leidinger To: Julian Elischer References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> <200803091027.39843.hselasky@c2i.net> <47D41160.9070901@elischer.org> In-Reply-To: <47D41160.9070901@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.5) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-12.71, required 6, BAYES_00 -15.00, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10, SARE_LWSHORTT 0.79) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Mon, 10 Mar 2008 11:28:25 +0000 Cc: freebsd-hackers@freebsd.org, Robert Watson , Hans Petter Selasky Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 09:59:00 -0000 Quoting Julian Elischer (from Sun, 09 Mar 2008 =20 09:33:36 -0700): > Hans Petter Selasky wrote: >> On Saturday 08 March 2008, Robert Watson wrote: >>> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: >> >>> For example, do you >>> anticipate using or even needing the routing facilities, and how might y= ou >>> map ISDN telephony parts into the normal network stack infrastructure of >>> addresses, routing, interfaces, etc? >> >> Hi Robert, >> >> ISDN is very simple. In the ISDN world there is a term called TEI =20 >> which is the Terminal Entity Identifier. This kind of like an IP =20 >> address. >> >> Besides from the signalling there are 2 B-channels which can =20 >> transport data or audio. One of my goals is to achive zero copy =20 >> when moving data to/from an ISDN line and also in combination to =20 >> Voice over IP. Currently data is moved through userland (Asterisk =20 >> typically) which is usable in the short term, but in the long run I =20 >> want this extra copying removed. The idea is that I can route [IP] =20 >> packets (mbufs) through various filters in the kernel without the =20 >> need for copy. > > Given the speed of ISDN connections, It is not worth doing zero copy > on ISDN unless you have more than 1000 of them, which seems unlikely. > given a total throughput of 128000 b/s and the speed of current > hardware, the number of packets per second is probably not high > enough to make the difference even noticable. What about low-power embedded systems and a high count of small =20 packets (VoIP)? Where do you draw the line between powerful enough and =20 how do you chose this line? Bye, Alexander. --=20 http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 17:50:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7F54106566B for ; Mon, 10 Mar 2008 17:50:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.tele2.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 143DF8FC1B for ; Mon, 10 Mar 2008 17:50:45 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.132.89] (account mc467741@c2i.net [62.113.132.89] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 671482948; Mon, 10 Mar 2008 17:50:41 +0100 From: Hans Petter Selasky To: Alexander Leidinger Date: Mon, 10 Mar 2008 17:51:46 +0100 User-Agent: KMail/1.9.7 References: <200803081133.02575.hselasky@c2i.net> <47D41160.9070901@elischer.org> <20080310105727.ah4y31sh40o04gw4@webmail.leidinger.net> In-Reply-To: <20080310105727.ah4y31sh40o04gw4@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803101751.48055.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org, Robert Watson , Julian Elischer Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 17:50:46 -0000 ISDN can have more than 2-data channels per logical unit. There is something called E1 and T1 which has 30 and 24 B-channels respectivly per D-channel. --HPS On Monday 10 March 2008, Alexander Leidinger wrote: > Quoting Julian Elischer (from Sun, 09 Mar 2008 > > 09:33:36 -0700): > > Hans Petter Selasky wrote: > >> On Saturday 08 March 2008, Robert Watson wrote: > >>> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > >>> > >>> For example, do you > >>> anticipate using or even needing the routing facilities, and how might > >>> you map ISDN telephony parts into the normal network stack > >>> infrastructure of addresses, routing, interfaces, etc? > >> > >> Hi Robert, > >> > >> ISDN is very simple. In the ISDN world there is a term called TEI > >> which is the Terminal Entity Identifier. This kind of like an IP > >> address. > >> > >> Besides from the signalling there are 2 B-channels which can > >> transport data or audio. One of my goals is to achive zero copy > >> when moving data to/from an ISDN line and also in combination to > >> Voice over IP. Currently data is moved through userland (Asterisk > >> typically) which is usable in the short term, but in the long run I > >> want this extra copying removed. The idea is that I can route [IP] > >> packets (mbufs) through various filters in the kernel without the > >> need for copy. > > > > Given the speed of ISDN connections, It is not worth doing zero copy > > on ISDN unless you have more than 1000 of them, which seems unlikely. > > given a total throughput of 128000 b/s and the speed of current > > hardware, the number of packets per second is probably not high > > enough to make the difference even noticable. > > What about low-power embedded systems and a high count of small > packets (VoIP)? Where do you draw the line between powerful enough and > how do you chose this line? > > Bye, > Alexander. From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 18:13:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA177106566B for ; Mon, 10 Mar 2008 18:13:01 +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 B12E58FC35 for ; Mon, 10 Mar 2008 18:13:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 10 Mar 2008 11:13:01 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id E0B822D601F; Mon, 10 Mar 2008 11:12:58 -0700 (PDT) Message-ID: <47D57A33.1070209@elischer.org> Date: Mon, 10 Mar 2008 11:13:07 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Hans Petter Selasky References: <200803081133.02575.hselasky@c2i.net> <47D41160.9070901@elischer.org> <20080310105727.ah4y31sh40o04gw4@webmail.leidinger.net> <200803101751.48055.hselasky@c2i.net> In-Reply-To: <200803101751.48055.hselasky@c2i.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Leidinger , Robert Watson , freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 18:13:02 -0000 Hans Petter Selasky wrote: > ISDN can have more than 2-data channels per logical unit. There is something > called E1 and T1 which has 30 and 24 B-channels respectivly per D-channel. I know, but neither of these represent any challenge to modern hardware. > > --HPS > > On Monday 10 March 2008, Alexander Leidinger wrote: >> Quoting Julian Elischer (from Sun, 09 Mar 2008 >> >> 09:33:36 -0700): >>> Hans Petter Selasky wrote: >>>> On Saturday 08 March 2008, Robert Watson wrote: >>>>> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: >>>>> >>>>> For example, do you >>>>> anticipate using or even needing the routing facilities, and how might >>>>> you map ISDN telephony parts into the normal network stack >>>>> infrastructure of addresses, routing, interfaces, etc? >>>> Hi Robert, >>>> >>>> ISDN is very simple. In the ISDN world there is a term called TEI >>>> which is the Terminal Entity Identifier. This kind of like an IP >>>> address. >>>> >>>> Besides from the signalling there are 2 B-channels which can >>>> transport data or audio. One of my goals is to achive zero copy >>>> when moving data to/from an ISDN line and also in combination to >>>> Voice over IP. Currently data is moved through userland (Asterisk >>>> typically) which is usable in the short term, but in the long run I >>>> want this extra copying removed. The idea is that I can route [IP] >>>> packets (mbufs) through various filters in the kernel without the >>>> need for copy. >>> Given the speed of ISDN connections, It is not worth doing zero copy >>> on ISDN unless you have more than 1000 of them, which seems unlikely. >>> given a total throughput of 128000 b/s and the speed of current >>> hardware, the number of packets per second is probably not high >>> enough to make the difference even noticable. >> What about low-power embedded systems and a high count of small >> packets (VoIP)? Where do you draw the line between powerful enough and >> how do you chose this line? >> >> Bye, >> Alexander. > From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 18:38:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43585106568A for ; Mon, 10 Mar 2008 18:38:20 +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 C026B8FC49 for ; Mon, 10 Mar 2008 18:38:19 +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 6A38546B43; Mon, 10 Mar 2008 14:38:16 -0400 (EDT) Date: Mon, 10 Mar 2008 18:38:16 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky In-Reply-To: <200803091027.39843.hselasky@c2i.net> Message-ID: <20080310183324.S70549@fledge.watson.org> References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> <200803091027.39843.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 18:38:20 -0000 On Sun, 9 Mar 2008, Hans Petter Selasky wrote: > On Saturday 08 March 2008, Robert Watson wrote: >> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > >> For example, do you anticipate using or even needing the routing >> facilities, and how might you map ISDN telephony parts into the normal >> network stack infrastructure of addresses, routing, interfaces, etc? > > ISDN is very simple. In the ISDN world there is a term called TEI which is > the Terminal Entity Identifier. This kind of like an IP address. > > Besides from the signalling there are 2 B-channels which can transport data > or audio. One of my goals is to achive zero copy when moving data to/from an > ISDN line and also in combination to Voice over IP. Currently data is moved > through userland (Asterisk typically) which is usable in the short term, but > in the long run I want this extra copying removed. The idea is that I can > route [IP] packets (mbufs) through various filters in the kernel without the > need for copy. While I'm not opposed to the idea in principle, I would recommend thinking very carefully before committing to the protocol stack approach as it comes with a lot of maintenance baggage and is a pretty heavy-weight activity. The reason to do that instead of just doing a custom device stack that plugs into the network stack only where it intersects with, say, encapsulated IP, would be if you really need to expose a full socket abstraction to userspace. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 21:41:14 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA91E1065673 for ; Mon, 10 Mar 2008 21:41:14 +0000 (UTC) (envelope-from ady@ady.ro) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by mx1.freebsd.org (Postfix) with ESMTP id A0E8C8FC36 for ; Mon, 10 Mar 2008 21:41:14 +0000 (UTC) (envelope-from ady@ady.ro) Received: by wf-out-1314.google.com with SMTP id 25so2051850wfa.7 for ; Mon, 10 Mar 2008 14:41:10 -0700 (PDT) Received: by 10.142.101.17 with SMTP id y17mr2309327wfb.54.1205185270791; Mon, 10 Mar 2008 14:41:10 -0700 (PDT) Received: by 10.143.159.13 with HTTP; Mon, 10 Mar 2008 14:40:43 -0700 (PDT) Message-ID: <78cb3d3f0803101440l54384d82rf57044aa9418efdf@mail.gmail.com> Date: Mon, 10 Mar 2008 23:40:43 +0200 From: "Adrian Penisoara" Sender: ady@ady.ro To: "Zaphod Beeblebrox" MIME-Version: 1.0 X-Google-Sender-Auth: 4be664f25ea8e449 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-rc@freebsd.org Subject: ZFS startup scripts (was Re: On ZFS and 64/32 dual-booting.) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 21:41:15 -0000 Hi, In particular to ZFS rc.d scripts comments below... On Sat, Mar 8, 2008 at 9:53 PM, Zaphod Beeblebrox wrote: [...] > === What doesn't work OOTB === > > The startup scripts for ZFS are still a little green. One issue is that > the > startup script 'requires' mountcritlocal --- I assume because it figures > it > requires it so that it's own filesystems will mount on top of other local > UFS ones. At least in my case, this is backwards. I need zfs to run > BEFORE > mountcritlocal and BEFORE mdconfig. I have changed my require line to > 'root I'm not sure why you would need to have ZFS filesystems up before mdconfig. However, if you need ZFS volumes up before mdconfig, that's understandable and it is easily doable with a split ZFS startups scripts configuration, like the one I proposed in PR conf/120228 ( http://www.freebsd.org/cgi/query-pr.cgi?pr=120228 ). Basically the ZFS volumes initialization needs to occur as a "disks" requirement. > > hostid' ... since it's good to have the hostid already set and having root > r/w is also good. I don't think I've solved the "BEFORE" problem, but the > my requirements might make it into the CVS tree. > Actually, to respect the Un*x philospphy, I think you would need to list the "critical" filesystems in /etc/fstab. You could do that by specifying the filesystem type "zfs" and the ZFS path as device node, e.g., for a sysvol pool with "usr" filesystem: system/usr /usr zfs rw 0 0 Otherwise I think you are right, ZFS filesystems mounting should occur around the same time as "mountcritlocal". I have done a test with the following /etc/rc.d/zfs script header and appears to do the trick (you don't have to list the individual ZFS mounts in /etc/fstab): # PROVIDE: mountcritlocal zfs # REQUIRE: root However, that change proved to be unnecessary (and perhaps wrong) since /etc/rc.d/FILESYSTEMS already lists zfs as a dependency and most of the scripts keep FILESYSTEMS as a requirement. You would still need to use vfs.root.mountfrom in /boot/loader.conf to start from a ZFS filesystem root. > > This dependancy issue is an interesting one. I assume that the fstab code > make sure that filesystems are mounted in a sane order ... or maybe it's > just the order in the file itself --- I've never had a problem, so I don't > know. However, having this information in two places poses the immediate > problem... one person might have a ufs /usr and a zfs /usr/ports and > another > might have a zfs /usr and a ufs or nfs /usr/home. Calling zfs mount -a > either before or after mountcritlocal isn't going to make everyone happy. > Maybe it needs to be called both times? I dunno. I dunno if zfs can fail > gracefully when things it needs arn't mounted yet. > I guess FreeBSD philosophy (and Un*x in general) is to keep all filesystems to be mounted in /etc/fstab -- this way the order would be quite clear. Since this occurs in [/etc/rc.d/]mountcritlocal and mountcritlocal is listed as a requirement in /etc/rc.d/zfs, then you can rest assured that "zfs mount -a" will occur after mounting stuff in /etc/fstab. If you need to have an exception then forcibly mount it early in /etc/fstab (I guess you should do that anyway for important mountpoints like /usr and /var). [...] > > 2. Dependencies of /etc/rc.d/zfs need rethinking Check proposed patch in above quoted PR. Let me know if you have comments on that. Thank you, Adrian Penisoara ROFUG / EnterpriseBSD From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 21:42:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DACB9106566B for ; Mon, 10 Mar 2008 21:42:33 +0000 (UTC) (envelope-from ady@ady.ro) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mx1.freebsd.org (Postfix) with ESMTP id A19AB8FC14 for ; Mon, 10 Mar 2008 21:42:33 +0000 (UTC) (envelope-from ady@ady.ro) Received: by wf-out-1314.google.com with SMTP id 25so2052297wfa.7 for ; Mon, 10 Mar 2008 14:42:30 -0700 (PDT) Received: by 10.142.177.7 with SMTP id z7mr2272691wfe.238.1205185243818; Mon, 10 Mar 2008 14:40:43 -0700 (PDT) Received: by 10.143.159.13 with HTTP; Mon, 10 Mar 2008 14:40:43 -0700 (PDT) Message-ID: <78cb3d3f0803101440l54384d82rf57044aa9418efdf@mail.gmail.com> Date: Mon, 10 Mar 2008 23:40:43 +0200 From: "Adrian Penisoara" Sender: ady@ady.ro To: "Zaphod Beeblebrox" MIME-Version: 1.0 X-Google-Sender-Auth: 4be664f25ea8e449 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-rc@freebsd.org Subject: ZFS startup scripts (was Re: On ZFS and 64/32 dual-booting.) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 21:42:34 -0000 Hi, In particular to ZFS rc.d scripts comments below... On Sat, Mar 8, 2008 at 9:53 PM, Zaphod Beeblebrox wrote: [...] > === What doesn't work OOTB === > > The startup scripts for ZFS are still a little green. One issue is that > the > startup script 'requires' mountcritlocal --- I assume because it figures > it > requires it so that it's own filesystems will mount on top of other local > UFS ones. At least in my case, this is backwards. I need zfs to run > BEFORE > mountcritlocal and BEFORE mdconfig. I have changed my require line to > 'root I'm not sure why you would need to have ZFS filesystems up before mdconfig. However, if you need ZFS volumes up before mdconfig, that's understandable and it is easily doable with a split ZFS startups scripts configuration, like the one I proposed in PR conf/120228 ( http://www.freebsd.org/cgi/query-pr.cgi?pr=120228 ). Basically the ZFS volumes initialization needs to occur as a "disks" requirement. > > hostid' ... since it's good to have the hostid already set and having root > r/w is also good. I don't think I've solved the "BEFORE" problem, but the > my requirements might make it into the CVS tree. > Actually, to respect the Un*x philospphy, I think you would need to list the "critical" filesystems in /etc/fstab. You could do that by specifying the filesystem type "zfs" and the ZFS path as device node, e.g., for a sysvol pool with "usr" filesystem: system/usr /usr zfs rw 0 0 Otherwise I think you are right, ZFS filesystems mounting should occur around the same time as "mountcritlocal". I have done a test with the following /etc/rc.d/zfs script header and appears to do the trick (you don't have to list the individual ZFS mounts in /etc/fstab): # PROVIDE: mountcritlocal zfs # REQUIRE: root However, that change proved to be unnecessary (and perhaps wrong) since /etc/rc.d/FILESYSTEMS already lists zfs as a dependency and most of the scripts keep FILESYSTEMS as a requirement. You would still need to use vfs.root.mountfrom in /boot/loader.conf to start from a ZFS filesystem root. > > This dependancy issue is an interesting one. I assume that the fstab code > make sure that filesystems are mounted in a sane order ... or maybe it's > just the order in the file itself --- I've never had a problem, so I don't > know. However, having this information in two places poses the immediate > problem... one person might have a ufs /usr and a zfs /usr/ports and > another > might have a zfs /usr and a ufs or nfs /usr/home. Calling zfs mount -a > either before or after mountcritlocal isn't going to make everyone happy. > Maybe it needs to be called both times? I dunno. I dunno if zfs can fail > gracefully when things it needs arn't mounted yet. > I guess FreeBSD philosophy (and Un*x in general) is to keep all filesystems to be mounted in /etc/fstab -- this way the order would be quite clear. Since this occurs in [/etc/rc.d/]mountcritlocal and mountcritlocal is listed as a requirement in /etc/rc.d/zfs, then you can rest assured that "zfs mount -a" will occur after mounting stuff in /etc/fstab. If you need to have an exception then forcibly mount it early in /etc/fstab (I guess you should do that anyway for important mountpoints like /usr and /var). [...] > > 2. Dependencies of /etc/rc.d/zfs need rethinking Check proposed patch in above quoted PR. Let me know if you have comments on that. Thank you, Adrian Penisoara ROFUG / EnterpriseBSD From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 11 08:08:31 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DCBE106578A for ; Tue, 11 Mar 2008 08:08:31 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 227D28FC13 for ; Tue, 11 Mar 2008 08:08:30 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m2B88N7v008232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Mar 2008 19:08:24 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m2B88MlJ042084; Tue, 11 Mar 2008 19:08:22 +1100 (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 m2B88KH7042083; Tue, 11 Mar 2008 19:08:20 +1100 (EST) (envelope-from peter) Date: Tue, 11 Mar 2008 19:08:20 +1100 From: Peter Jeremy To: Mike Meyer Message-ID: <20080311080820.GJ68971@server.vk2pj.dyndns.org> References: <20080309152712.42752293@bhuda.mired.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uCozLMBrA/OCc/kF" Content-Disposition: inline In-Reply-To: <20080309152712.42752293@bhuda.mired.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org Subject: Re: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2008 08:08:31 -0000 --uCozLMBrA/OCc/kF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 09, 2008 at 03:27:12PM -0400, Mike Meyer wrote: >I've stumbled on to an obscure problem with autoconf 2.61, and I'm not >sure quite what to do with it. I've already sent mail to the autoconf >folks, but I'd like to understand what's going on. Simplest explanation is that autotools are broken by design. After my recent experiences, I've come to the conclusion that they are designed to impede the portability of software. >My question is, why doesn't the configure script just accept /bin/sh? Probably because it's not bash. --=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. --uCozLMBrA/OCc/kF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkfWPfQACgkQ/opHv/APuIcAqACgjfUB0c7UWTHchdckt/PtvqUy ah8AoLBAmbwOteczzCzQh6DvF3zQl24/ =uhJk -----END PGP SIGNATURE----- --uCozLMBrA/OCc/kF-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 11 14:41:55 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0D34106566B for ; Tue, 11 Mar 2008 14:41:55 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 466F18FC16 for ; Tue, 11 Mar 2008 14:41:55 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m2BE97YE060795; Tue, 11 Mar 2008 15:09:07 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id m2BE915c096041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Mar 2008 15:09:01 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id m2BE90Xi052330; Tue, 11 Mar 2008 15:09:01 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id m2BE90kO052329; Tue, 11 Mar 2008 15:09:00 +0100 (CET) (envelope-from ticso) Date: Tue, 11 Mar 2008 15:08:59 +0100 From: Bernd Walter To: Peter Jeremy Message-ID: <20080311140859.GB34311@cicely12.cicely.de> References: <20080309152712.42752293@bhuda.mired.org> <20080311080820.GJ68971@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080311080820.GJ68971@server.vk2pj.dyndns.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on cicely12.cicely.de Cc: hackers@freebsd.org, Mike Meyer Subject: Re: Why doesn't autoconf like our /bin/sh? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2008 14:41:55 -0000 On Tue, Mar 11, 2008 at 07:08:20PM +1100, Peter Jeremy wrote: > On Sun, Mar 09, 2008 at 03:27:12PM -0400, Mike Meyer wrote: > >I've stumbled on to an obscure problem with autoconf 2.61, and I'm not > >sure quite what to do with it. I've already sent mail to the autoconf > >folks, but I'd like to understand what's going on. > > Simplest explanation is that autotools are broken by design. After my > recent experiences, I've come to the conclusion that they are designed > to impede the portability of software. > > >My question is, why doesn't the configure script just accept /bin/sh? > > Probably because it's not bash. This is also the reason why I install bash if I had linux-bash in my path, because it will use linux-bash instead of sh and starts finding linux things which it shouldn't for native builds. The native bash is in path befor the linix version so it at least uses a native compiled shell. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 12 09:10:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5702B1065675 for ; Wed, 12 Mar 2008 09:10:10 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id AD0868FC18 for ; Wed, 12 Mar 2008 09:10:09 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JZMyI-0003aH-VU for freebsd-hackers@freebsd.org; Wed, 12 Mar 2008 09:10:02 +0000 Received: from 195.208.174.178 ([195.208.174.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Mar 2008 09:10:02 +0000 Received: from vadim_nuclight by 195.208.174.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Mar 2008 09:10:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Vadim Goncharov Followup-To: gmane.os.freebsd.current Date: Wed, 12 Mar 2008 08:50:19 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 158 Message-ID: References: <200803111336.m2BDaosM084555@lurza.secnetix.de> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.208.174.178 X-Comment-To: Oliver Fromme User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Cc: freebsd-current@freebsd.org Subject: Re: RELEASE discs & ISO images (for future) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 09:10:10 -0000 Hi Oliver Fromme! On Tue, 11 Mar 2008 14:36:50 +0100 (CET); Oliver Fromme wrote about 'Re: RELEASE discs & ISO images (for future)': >>> - Disk 1 contains everything you need to install the base >>> FreeBSD system, as well as a few useful packages. >> >> Yes. Which? > The most important ones, including the linux base package > for the linux ABI, perl, xorg and a few other things. > Just look at the /packages subdirectory for details. I currently have no 7.0 ISOs to look at (and ftp.freebsd.org contains just symlink to all available packages, not only disc1). But I remember perl, linux and xorg on the disc1 from 6.2 times, yes. And actually the most needed things are just perl and linux ABI, not heavy Xorg which can be moved to disc2 - it >>> - Disk 2 and 3 just contain more packages. >> >> I remember working CD-changer while install, yeah. Several times while >> handling dependencies on first disc and second disc. Annoying. > That's right, "someone" should improve sysinstall so it > loads the packages in an optimized order, so the number > of CD changes is reduced. If you have implemented patches > to do that, I'm sure they will be very welcome. Really, but sysinstall is just one big bunch of hackish code. The simpler way to do this is to move packages. > Until then, there are some workarounds for the problem. > For example, you can copy all packages from the CDs to > your harddisk and install from there. Not suitable for novice users. And those will be disattracted by CD-changing most of all, yes. >>> - The "docs" CD only contains documentation: Handbook, >>> FAQ and articles in various languages. These are also >>> available online, so there's rarely a need to download >>> this CD. >> >> It's handy for novice users to have them in base system, though. > I don't know ... I never used them. I think it's more > convenient to read them online. Because it is not your first install :) But if you do not have Internet yet, ability to look to Handbook directly from installer is VERY valuable. >>> By the way, you can combine disk1 and the livefs image into >>> a single ISO image and write it onto a DVD-R. It won't fit >>> on a CD-R disk, though, and that's the reason why the >>> lifefs went onto a separate ISO image. >> >> If use DVD, then all 5 disks should be combined to it for convenience. > Of course you can do that, too. >>>> I suspect this separation is due to sizes od docs etc. - but CD drives can now >>>> handle even 700 MBs of data, and disc1 for i386 occupies only 509M, though >>>> disc2 is 694M, yes. >>> As you can see, disk1 + livefs is larger than 700 MB. >>> The docs CD is separate anyway, which is a good thing >>> because many people won't need it. >> >> And what about removing packages from disc1 ? > The question is: What does the majority of users want? Attraction. Ability to say "Wow! Their CD is SO handy, many features on just one disk". Don't forget about advocacy and opinionating new users. > I think there are more users who install packages than > users who want "fixit" on disk1. In other words, more > users benefit from the packages, and for most people it > seems to be OK to have "fixit" on a separate CD. > Those who want to have a combined install+fixit CD without > packages can easily make one themselves. Or even a DVD > with everything. Or buy one from one of the vendors who > sell FreeBSD DVDs. Yes, but: livefs and disc1 have many things in common, so placing livefs on disc1 is much more cheaper in size than plain sum of disc1+livefs as they are so currently. >>>> May be it is desirable to compress docs and other base system parts with >>>> bzip2 -9 instead of gzip? >>> What exactly would you propose to compress? Compressing >>> the docs isn't a good idea, because then you wouldn't be >>> able to read them directly from the CD. Also, as mentioned >>> above, the docs are already on a separate CD. >> >> Ideally, I want one combined disc1 + livefs + docs on a single disc1 CD. >> This can be achieved by: changing compression from gzip to bzip2 -9 for >> base system parts, and moving packages from disc1 to disc2. The latter has >> additional benefit of reducing CD-changing annoyance for user during install. > It depends. A solution that is good for you might be worse > for others. For example, I rarely install any packages > from CD on a new system, except for linux emulation and > maybe perl. I do not have to change CDs at all; only disc1 > is required. With your proposed change, I would need to > download an additional 700 MB ISO. That's annoying. I've suggested above - just Xorg can be moved, perl and linux ABI are not so big. > I'm also not sure that using bzip2 for the base install bits > would be a good idea. Decompression is a lot slower with > bzip2, especially on older machines. I remember someone > tried it and reported on the lists, it was like fife times > slower, but saved only a few percent space for the base > system (which is mostly binaries and already compressed > files, like manual pages). Not worth it. Really? Have benchmarks? If it is really hust a few percent, then it is not worth, of course. >> There is also another idea to above: compress parts of livefs and/or docs >> on disc1 with geom_ugz, as it is read-only anyway. This is how done in Frenzy >> LiveCD from as old as 5.2.1-R times, allowing to fit entire base system and >> several packages on 200MB miniCD. > You can't compress the docs CD that way, because then you > wouldn't be able to read them from another system. The > docs must not be compressed. Is it needed? I think that ability to read docs directly from installer is much more handy. But if it is really critical, then separate uncompressed docs CD could be done. Just for those, and all others can install handbook or read them from installer from disc1 - where docs are placed on geom_ugz to both fit (good compressable) and be available to read and install them onto hard drive (not needing now to have separate compressed docs tarballs just for installation). > As far as the live FS is concerned, yes, it might be > possible to compress it. The performance will be worse, > and I think it also requires more RAM, but it's certainly > something that could be done. Whether it's really worth > it is a different question. Performance will be not so worse. As someone said, 7.0 livefs can also do install, so real livefs part to add to disc1 is even smaller. It is possible to compress >>>> P.S. And may be it is good also to resurrect miniinst disk for >>>> Depenguinator project? :) >>> Do you mean the "bootonly" CD? It's already there. >> >> Nope, "miniinst" as it was in 5.3, a 300-meg image with base-system only, >> allowing to install without network, as "bootonly", but ports should be >> installed from network - handy if ports are not needed. > In today's world (7.0-RELEASE) it would be more like 400 MB > which isn't really "mini". it's not much smaller than the > current disc1 (509 MB), so it doesn't justify creating a > separate ISO, in my opinion. OK, let it be so. -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 12 17:32:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9A44106567C for ; Wed, 12 Mar 2008 17:32:38 +0000 (UTC) (envelope-from kensmith@cse.Buffalo.EDU) Received: from phoebe.cse.buffalo.edu (phoebe.cse.buffalo.edu [128.205.32.89]) by mx1.freebsd.org (Postfix) with ESMTP id 59E838FC25 for ; Wed, 12 Mar 2008 17:32:38 +0000 (UTC) (envelope-from kensmith@cse.Buffalo.EDU) Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76]) (authenticated bits=0) by phoebe.cse.buffalo.edu (8.14.1/8.13.7) with ESMTP id m2CHGvsS067087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Mar 2008 13:16:58 -0400 (EDT) (envelope-from kensmith@cse.buffalo.edu) From: Ken Smith To: vadim_nuclight@mail.ru In-Reply-To: References: <200803111336.m2BDaosM084555@lurza.secnetix.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-wTUa056QsLD4i74fJqfB" Organization: U. Buffalo CSE Department Date: Wed, 12 Mar 2008 13:16:57 -0400 Message-Id: <1205342217.44173.40.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port X-DCC-Buffalo.EDU-Metrics: phoebe.cse.buffalo.edu 1336; Body=0 Fuz1=0 Fuz2=0 X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on phoebe.cse.buffalo.edu Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: RELEASE discs & ISO images (for future) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 17:32:38 -0000 --=-wTUa056QsLD4i74fJqfB Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2008-03-12 at 08:50 +0000, Vadim Goncharov wrote: > I currently have no 7.0 ISOs to look at (and ftp.freebsd.org contains jus= t > symlink to all available packages, not only disc1). But I remember perl, > linux and xorg on the disc1 from 6.2 times, yes. And actually the most ne= eded > things are just perl and linux ABI, not heavy Xorg which can be moved to > disc2 - it=20 Disc1 contains all the packages necessary to get to the "Would you like to browse the pre-built packages" menu in sysinstall without needing to switch discs (which is desirable for novices as well as being able to complete that portion, not bother selecting packages in the menu, and thus not need disc2/disc3). That includes xorg because it's one of the things that can be chosen in the "Software Distributions" section. I'm planning to change that with 8.0, no longer offering to have anything that's not part of the baseline system installed until you get to the "Would you like to ..." menu. That will reinforce to people that that stuff really is packages/ports and it will make things like the monthly snapshots less of a hack (I don't include any packages on those so you get odd results if you select "All" in the Software Distributions menu for example...). But I didn't have a chance to get that stuff done for 7.0. > > The question is: What does the majority of users want? >=20 > Attraction. Ability to say "Wow! Their CD is SO handy, many > features on just one disk". Don't forget about advocacy and > opinionating new users. In my opinion the above setup (being able to make any of the selections we offer in the "Distributions" section and complete an install without needing to switch discs {provided you opt out of selecting packages from the packages menu}) is what benefits the most users. I could be wrong but this is one of those things that it's impossible to satisfy everyone all the time so a decision needed to be made and that was it. I *hope* I can merge the livefs stuff back in to disc1 by eliminating Xorg from the "Distributions" section (and the offer to install Linux as a separate thing - let them select that from packages as well). But that just wasn't possible for 7.0. We'll see if it can happen for 8.0 (and as pointed out in this thread the base system seems to continue to grow so we'll see :-). > I've suggested above - just Xorg can be moved, perl and linux ABI are not > so big. That causes even more disc shuffling pain than we have now. Disc1 currently contains both Gnome and KDE. Trying to move Xorg to disc1 means one of them needs to be moved to another disc, the three won't fit. And so many packages are intertwined among those three things the disc switching becomes way worse. As things stand now if you select "All" in the software distributions section everything from disc1 will wind up being installed before you get to the Packages selection menu so it will never ask for disc1 again. If you then just select Gnome or KDE disc2 goes in and it never asks for disc3. However if you select anything more than Gnome or KDE things go downhill fast. But nowhere near as fast as if all of either Gnome or KDE were not on disc1. Yes, we need to make sysinstall smarter about the order it installs stuff in. But I spent some time fiddling with the current layout given what I had to work with as far as meta package sizes and ISO image sizes go and this wound up being the least painful (note I don't claim painless). What I hope to shoot for with 8.0 is a CD-sized thing named "disc1" that is much like the monthly snapshots - no packages at all on it. If possible at the point we're near 8.0's release given sizes livefs will be merged back onto it. I'll have trimmed out the stuff sysinstall offers to do before reaching the "Would you like to browse pre-built packages?" menu so you don't get odd failures if you select something-or-other and no pre-built packages are available at all. And in addition to that CD-sized "disc1" we'll have a DVD-sized thing that includes everything on disc1 plus some set of pre-built packages. --=20 Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | --=-wTUa056QsLD4i74fJqfB Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBH2BAJ/G14VSmup/YRAqkDAJ9mt9s7SENPaD0+YHev+PAl+/winACgkM41 Wab/d6rd285WxVjYtTsaCUc= =8iWu -----END PGP SIGNATURE----- --=-wTUa056QsLD4i74fJqfB-- From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 12 19:14:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A01D106566B for ; Wed, 12 Mar 2008 19:14:44 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx1.freebsd.org (Postfix) with ESMTP id 76DC38FC16 for ; Wed, 12 Mar 2008 19:14:44 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 12 Mar 2008 11:46:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,490,1199692800"; d="scan'208,217";a="262174732" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by orsmga002.jf.intel.com with ESMTP; 12 Mar 2008 11:46:22 -0700 Received: from orsmsx419.amr.corp.intel.com ([10.22.226.88]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 12 Mar 2008 11:46:21 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Wed, 12 Mar 2008 11:46:21 -0700 Message-ID: <12A5C15467D5B94F8E0FF265D9498ADD02B35F81@orsmsx419.amr.corp.intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Shared VM address range across processes Thread-Index: AciEcV17ojE1XC8ER9WFsPX6hlWeeg== From: "Rao, Nikhil" To: X-OriginalArrivalTime: 12 Mar 2008 18:46:21.0904 (UTC) FILETIME=[5DBF2D00:01C88471] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Shared VM address range across processes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 19:14:44 -0000 Hi,=20 =20 I want to map device memory into the same virtual address range in multiple processes, this means I would have to add a vm_map_entry per address range in every process, since the list of processes can be potentially huge .. Is it allowed to point to the same list of vm_map_entrys from multiple vm_spaces ? BSD3 had a field in the vm_map_entry that could be a share map - would it be an idea that I could reuse ? =20 Nikhil From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 12 18:00:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97CD11065674 for ; Wed, 12 Mar 2008 18:00:02 +0000 (UTC) (envelope-from wadeklaver@itiva.com) Received: from mail.crossflux.com (a2.9.1243.static.theplanet.com [67.18.9.162]) by mx1.freebsd.org (Postfix) with SMTP id 5E9C98FC13 for ; Wed, 12 Mar 2008 18:00:02 +0000 (UTC) (envelope-from wadeklaver@itiva.com) Received: (qmail 25955 invoked by uid 522); 12 Mar 2008 12:22:25 -0500 Received: from 69.10.147.2 by mog (envelope-from , uid 508) with qmail-scanner-1.25 (clamdscan: 0.87/2614. spamassassin: 3.1.8. Clear:RC:0(69.10.147.2):SA:0(-2.6/5.0):. Processed in 1.198514 secs); 12 Mar 2008 17:22:25 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 Received: from unknown (HELO ?192.168.7.50?) (wadeklaver@itiva.com@69.10.147.2) by mail.crossflux.com with SMTP; 12 Mar 2008 12:22:24 -0500 From: Wade Klaver To: freebsd-hackers@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-L/S4LNxbzLpvKH3MrrIG" Date: Wed, 12 Mar 2008 10:33:04 -0700 Message-Id: <1205343184.4032.44.camel@wade-linux.itiva.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) X-Mailman-Approved-At: Wed, 12 Mar 2008 19:57:44 +0000 Cc: freebsd-ipfw@freebsd.org Subject: On the trail of a dummynet/bridge/ipfw bug. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 18:00:02 -0000 --=-L/S4LNxbzLpvKH3MrrIG Content-Type: text/plain Content-Transfer-Encoding: quoted-printable PROBLEM DESCRIPTION I have a bridge set up on a 7.0 box and am attempting to use it to limit HTTP connections outgoing from a box behind it to 192Kbit/s for testing. During this testing I ran into some problems. At first, I found that the number of simultaneous pipes was limited to 1024, allowing only 1024 192Kbit/s clients. Additional clients were simply blocked. I am using a very simple firewall config: ipfw pipe 1 config bw 192Kbits/s mask all ipfw add 00051 skipto 99 ip from 192.168.0.0/16 to 192.168.0.0/16 ipfw add 00052 skipto 1000 ip from any to any ipfw add 00100 pipe 1 ip from 192.168.10.88 80 to any via bridge0 ipfw add 00200 pipe 1 ip from any 25111 to any via bridge Regardless of how many clients I threw at the box, I had the limit: [root@ibm3550b ~]# ipfw pipe show | wc -l 1028 We managed to track this down to a problem in the ipfw2 userland app. The following patch to /usr/src/sbin/ipfw/ipfw2.c allowed this limit to be surpassed. It would appear that ipfw does not dynamically resize the pipe array beyond the initial 1024 elements allocated. # diff ipfw2.c ipfw2.c.orig=20 2507c2507 < int nalloc =3D 8192; /* start somewhere... */ --- > int nalloc =3D 1024; /* start somewhere... */ However, this just revealed a bigger problem, potentially do to the above patch, potentially due to something worse. Now the bridge will allow more connections, up to around 2300 where the bridge just dies. and no more traffic passes. It is worth noting that I can still connect to the bridge itself if it has an IP assigned to it, but traffic through the bridge ceases. It is also remedied by a /etc/rc.d/netif restart. ADDITIONAL NOTES Please let me know if there is any additional information I can provide. In the kernel options below, HZ=3D2000 was just something I was trying. The problem exhibits itself with HZ=3D1000 as well. I posted this to -hackers and to -ipfw. Please direct me and future corresp= ondence=20 on this issue to the most appropriate list. I just felt it was not solid enough to go to -bugs yet. SYSTEM INFORMATION IBM 3550 XEON 5345 4GB Memory [root@ibm3550b /usr/src/sys]# uname -a FreeBSD ibm3550b.itivalabs.net 7.0-STABLE FreeBSD 7.0-STABLE #13: Wed Mar 12 03:26:08 PDT 2008 root@ibm3550b.itivalabs.net:/usr/obj/usr/src/sys/WADE amd64 Bridge members: bce0: mem 0xc8000000-0xc9ffffff irq 18 at device 0.0 on pci4 bce1: mem 0xce000000-0xcfffffff irq 16 at device 0.0 on pci6 Kernel options: # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel options LIBALIAS options IPFIREWALL #firewall options IPFIREWALL_VERBOSE #enable logging to syslogd(8) options IPFIREWALL_VERBOSE_LIMIT=3D100 #limit verbosity options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default options IPFIREWALL_FORWARD #packet destination changes options IPFIREWALL_NAT #ipfw kernel nat support options IPDIVERT #divert sockets #options IPFILTER #ipfilter support #options IPFILTER_LOG #ipfilter logging #options IPFILTER_LOOKUP #ipfilter pools #options IPFILTER_DEFAULT_BLOCK #block all packets by default options IPSTEALTH #support for stealth forwarding options MBUF_STRESS_TEST options DUMMYNET options HZ=3D2000 options EXT2FS /etc/sysctl.conf net.inet.ip.fw.dyn_max=3D8192 net.inet.ip.dummynet.hash_size=3D4096 net.inet.ip.fw.dyn_buckets=3D1024 net.inet.ip.dummynet.max_chain_len=3D64 kern.ipc.nmbclusters=3D32768 --=-L/S4LNxbzLpvKH3MrrIG Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBH2BPKne3UhGESRwURAkMVAKCVjfXweg6+gXn1c9kAM2v07o4+JgCfXZga Ebsj07bJ4wcROQhzdqVcBOQ= =B200 -----END PGP SIGNATURE----- --=-L/S4LNxbzLpvKH3MrrIG-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 14:51:27 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13271106567B; Thu, 13 Mar 2008 14:51:27 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id C301D8FC26; Thu, 13 Mar 2008 14:51:26 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.2/8.14.2) with ESMTP id m2DEMRSn055338; Thu, 13 Mar 2008 09:22:27 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Thu, 13 Mar 2008 09:22:27 -0500 (CDT) From: "Sean C. Farley" To: Ivan Voras In-Reply-To: Message-ID: References: User-Agent: Alpine 1.00 (BSF 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII 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 mail.farley.org Cc: freebsd-hackers@FreeBSD.org Subject: Re: Transferring ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 14:51:27 -0000 On Thu, 13 Mar 2008, Ivan Voras wrote: *snip* > The details: imagine there are two or more full FreeBSD installation > trees in the file system (e.g. complete jails). The utility would > transfer (installed) packages from one tree to the other. The easy, > brute-force way would be to generate package files (tbz) from the > installed tree and then install them to the other tree, but I can't do > that because of performance and disk space reasons. I do not know of any such scripts but a possible solution is to use nullfs. I personally install all needed ports into the base system and use nullfs read-only to pull everything into the jails. Almost everything, files from /usr/local/etc are manually copied as needed into each jail. It lowers the disk usage and reduces risk due to most files (even system) being read-only. You just need individual /etc/fstab. files like this: /bin /usr/local/jails//bin nullfs ro 0 0 And similar lines for these (at least all that you require): /boot /lib /libexec /sbin /usr/bin /usr/games /usr/include /usr/lib /usr/libdata /usr/libexec /usr/local/bin /usr/local/cyrus /usr/local/etc/periodic /usr/local/etc/php /usr/local/etc/rc.d /usr/local/info /usr/local/lib /usr/local/libdata /usr/local/libexec /usr/local/man /usr/local/sbin /usr/local/share /usr/sbin /usr/share /var/db/pkg A basic jail runs about 9MB (mainly /etc and /usr/local/etc). Does this help? Sean -- scf@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 15:34:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7991A106566B for ; Thu, 13 Mar 2008 15:34:38 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.236]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0888FC2B for ; Thu, 13 Mar 2008 15:34:38 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by wr-out-0506.google.com with SMTP id c49so2873381wra.19 for ; Thu, 13 Mar 2008 08:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=+D4TTxHzlqQk+bifiVnimKJIxOZ33b5Aaiij1P/5JuI=; b=oEkMG25MTpz7xgxtqlBtqE1PzeEBAUSlY1xenzLDC8oeupZvKJIGP+U0GWOvzrg8u0Un87Fs8z0YnkUSKWUxZLEj0FPCb1pJlk84IYNHRgxlUS8zdBDeRjBE05F73LOKrFKMk0v88T1yKhXTzHFeo3SaQNcq0K6CmuQeA/EX9Aw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=aRpD5PiHwt7VbyY3IcB34puD16nLi3vs99MZIn6JZ9NvCa7qADz6drfYLpuXOZktGecFaOPprHMaUdnJ7kvXolmOHKhCcPs0NJeBovgIPm30gB0ACXzfexJ8sqhah+NISPosExAN17zQiahAhfLRibY2AgP3L2j/QCIaFqyhw44= Received: by 10.141.15.19 with SMTP id s19mr5802777rvi.161.1205420751026; Thu, 13 Mar 2008 08:05:51 -0700 (PDT) Received: by 10.141.212.1 with HTTP; Thu, 13 Mar 2008 08:05:50 -0700 (PDT) Message-ID: <9bbcef730803130805x413a463an74c5418c06ed6adb@mail.gmail.com> Date: Thu, 13 Mar 2008 16:05:50 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Sean C. Farley" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: fb60d85e1c05d3a2 Cc: freebsd-hackers@freebsd.org Subject: Re: Transferring ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 15:34:38 -0000 On 13/03/2008, Sean C. Farley wrote: > I do not know of any such scripts but a possible solution is to use > nullfs. > A basic jail runs about 9MB (mainly /etc and /usr/local/etc). Does this > help? No, I really need to copy them :) From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 16:15:15 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EA991065671 for ; Thu, 13 Mar 2008 16:15:15 +0000 (UTC) (envelope-from igor@gulfstream.by) Received: from linux.gulfstream.by (port-181-adslby-pool47.infonet.by [81.25.47.181]) by mx1.freebsd.org (Postfix) with ESMTP id 4F2B48FC14 for ; Thu, 13 Mar 2008 16:15:14 +0000 (UTC) (envelope-from igor@gulfstream.by) Received: from admin.gulfstream.local (admin [192.168.0.16]) by linux.gulfstream.by (Postfix) with ESMTP id C90756C84CC for ; Thu, 13 Mar 2008 13:46:46 -0200 (GMT+2) Date: Thu, 13 Mar 2008 17:51:15 +0200 From: =?windows-1251?B?yOPu8PwgyvDg8e3u8eXr/PHq6Ok=?= X-Mailer: The Bat! (v3.99.24) Professional Organization: Gulfstream X-Priority: 3 (Normal) Message-ID: <1841496593.20080313175115@gulfstream.by> To: hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 13 Mar 2008 16:19:27 +0000 Cc: Subject: new SATA chipsets support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?windows-1251?B?yOPu8PwgyvDg8e3u8eXr/PHq6Ok=?= List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 16:15:15 -0000 Hi people, I am going to build my new file- and gateway server and i wish to use any of brand new motherboards for it, such as ASUS M2N-SLI deluxe (nforce 570 SLI chipset) or Gigabyte MA790X-DS4 (AMD 790X / AMD SB600 chipset), but i can't find any information of supporting that chipsets in your current 7.0 release. Are you going to include support of that chips to your next releases, and if yes, when? Or maybe i can find that drivers somewhere else? I think that drivers from ASUS (http://support.asus.com/download/download.aspx?SLanguage=en-en&model=M2N-SLI%20Deluxe) may not work with FreeBSD? -- wbr, Igor Krasnoselski mailto:igor@gulfstream.by ICQ: 1704109 From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 16:41:08 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA7D91065740 for ; Thu, 13 Mar 2008 16:41:08 +0000 (UTC) (envelope-from john.giacomoni@colorado.edu) Received: from suburban.colorado.edu (suburban.colorado.edu [128.138.189.14]) by mx1.freebsd.org (Postfix) with ESMTP id AA6E38FC1C for ; Thu, 13 Mar 2008 16:41:08 +0000 (UTC) (envelope-from john.giacomoni@colorado.edu) Received: from [127.0.0.1] (suburban.colorado.edu [127.0.0.1]) by suburban.colorado.edu (8.13.1/8.13.1) with ESMTP id m2DDIAih029095; Thu, 13 Mar 2008 09:18:10 -0400 Message-Id: <006DB5A0-3669-473B-84B6-E3C8CC3C059D@colorado.edu> From: John Giacomoni To: freebsd-hackers@freebsd.org In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD02B35F81@orsmsx419.amr.corp.intel.com> Content-Type: multipart/mixed; boundary=Apple-Mail-473--515687753 Mime-Version: 1.0 (Apple Message framework v919.2) Date: Thu, 13 Mar 2008 10:12:58 -0600 References: <12A5C15467D5B94F8E0FF265D9498ADD02B35F81@orsmsx419.amr.corp.intel.com> X-Mailer: Apple Mail (2.919.2) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "Rao, Nikhil" Subject: Re: Shared VM address range across processes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 16:41:09 -0000 --Apple-Mail-473--515687753 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Nihkil, I'm working on something similar for a research project and the answer is that it is possible but ugly. First, are you sure you need to do this? Ensuring safety by checking pointers before dereferencing can be painful :) FreeBSD seems to have checks scattered throughout the kernel trying to ensure that the kernel address range remains unavailable to the userspace address range. These checks can obviously be bypassed but they are fairly invasive. Once all those checks are bipassed, you need to ensure that the PTEs and PDEs are have the userspace bit set for the appropriate page ranges which then requires flushing the specific pages out of the TLB using the invlpg function, note that flushing the TLB is insufficient as kernel pages are marked global and thus won't flush with any other method. files that I touched /usr/src/sys/amd64/amd64/pmap.c - pmap_enter /usr/src/sys/amd64/amd64/trap.c - trap_pfault and the allocation site needs to ensure that the user-mode bit is set on the correct PTEs and PDEs. I directly allocate memory using vm objects to help me bypass the various address range checks that can be found in the higher levels of the kernel. I'm planning on generalizing and cleaning my approach up in the next few months but I'll be glad to answer any specific questions you might have. For the FreeBSD kernel developers, Is there a reason to enforce the high/low mem address range as strongly as is done in FreeBSD? It seems that if the higher-levels of the kernel allow a mapping, the lower-levels should respect that. John G On Mar 12, 2008, at 12:46 PM, Rao, Nikhil wrote: > Hi, > > > > I want to map device memory into the same virtual address range in > multiple processes, this means I would have to add a vm_map_entry per > address range in every process, since the list of processes can be > potentially huge .. Is it allowed to point to the same list of > vm_map_entrys from multiple vm_spaces ? BSD3 had a field in the > vm_map_entry that could be a share map - would it be an idea that I > could reuse ? > > > > Nikhil > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org > " -- John.Giacomoni@colorado.edu University of Colorado at Boulder Department of Computer Science Engineering Center, ECCR 1B50 430 UCB Boulder, CO 80303-0430 USA --Apple-Mail-473--515687753 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-473--515687753-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 18:11:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 755171065670 for ; Thu, 13 Mar 2008 18:11:00 +0000 (UTC) (envelope-from mitchell@wyatt672earp.force9.co.uk) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by mx1.freebsd.org (Postfix) with ESMTP id 35B828FC18 for ; Thu, 13 Mar 2008 18:11:00 +0000 (UTC) (envelope-from mitchell@wyatt672earp.force9.co.uk) Received: from [81.174.209.234] (helo=81-174-209-234.pth-as2.dial.plus.net) by ptb-relay02.plus.net with esmtp (Exim) id 1JZrtJ-0001Dp-IU for freebsd-hackers@freebsd.org; Thu, 13 Mar 2008 18:10:58 +0000 From: Frank Mitchell To: freebsd-hackers@freebsd.org Date: Thu, 13 Mar 2008 14:48:39 +0000 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200803131448.39729.mitchell@wyatt672earp.force9.co.uk> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Plusnet-Relay: 52af5481d5a0a4d46576c0d297a66e66 Subject: Memory Locking On 64-Bit Release 6.3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 18:11:00 -0000 My machine is an Economy Model, with 512 Meg RAM, including 64 Meg which is taken by Shared Video Memory, leaving 448 Meg usable. But my program requirements are modest too. I'm developing 2 Root-Privileged Console Executables, each around 100 KB, using a total of 11 Shared Memory buffers, each 256 KB. Faictz Ce Que Vouldras: Frank Mitchell > On Sun, 9 Mar 2008 14:41:30 +0000 Frank Mitchell wrote: >> MEMORY LOCKING: >> Recompiling my root-privileged program, I get a System Call failure >> for: >> mlockall(MCL_CURRENT); >> errno says: "Resource temporarily unavailable" > how much memory is installed? >> But mlock(); works. > ... and how many bytes/pages do you lock in this operation? > note that currently the 64-bit ELF ld wastes space by allocating larger > memory blocks than its 32-bit counterpart. this has been discussed > before, but i don't remember any solution to the problem. > regards, clemens From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 18:16:25 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 276301065671 for ; Thu, 13 Mar 2008 18:16:25 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout0.freenet.de (mout0.freenet.de [IPv6:2001:748:100:40::2:2]) by mx1.freebsd.org (Postfix) with ESMTP id AB71D8FC1D for ; Thu, 13 Mar 2008 18:16:24 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.20] (helo=10.mx.freenet.de) by mout0.freenet.de with esmtpa (Exim 4.69) (envelope-from ) id 1JZryZ-0003hB-Dh; Thu, 13 Mar 2008 19:16:23 +0100 Received: from rb624.r.pppool.de ([89.54.182.36]:23586 helo=peedub.jennejohn.org) by 10.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #12) id 1JZryY-0006u6-SV; Thu, 13 Mar 2008 19:16:23 +0100 Date: Thu, 13 Mar 2008 19:16:21 +0100 From: Gary Jennejohn To: freebsd-hackers@freebsd.org Cc: Message-ID: <20080313191621.1772d40a@peedub.jennejohn.org> In-Reply-To: <1841496593.20080313175115@gulfstream.by> References: <1841496593.20080313175115@gulfstream.by> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.10.14; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: new SATA chipsets support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 18:16:25 -0000 On Thu, 13 Mar 2008 17:51:15 +0200 __________ ____________________________ wrote: > I am going to build my new file- and gateway server and i wish to use any of brand new motherboards for it, such as ASUS M2N-SLI deluxe (nforce 570 SLI chipset) or Gigabyte MA790X-DS4 (AMD 790X / AMD SB600 chipset), but i can't find any information of supporting that chipsets in your current 7.0 release. Are you going to include support of that chips to your next releases, and if yes, when? Or maybe i can find that drivers somewhere else? > Try hitting once in a while. This is all one long line! I can't speak to this, but why not use a board which is already known to work? I'm using a Gigabyte M61P-S3 myself. > I think that drivers from ASUS (http://support.asus.com/download/download.aspx?SLanguage=en-en&model=M2N-SLI%20Deluxe) may not work with FreeBSD? > These are guaranteed not to work, unless you want to port the Linux drivers. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 19:17:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFBDE1065675 for ; Thu, 13 Mar 2008 19:17:41 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by mx1.freebsd.org (Postfix) with ESMTP id 2C5CF8FC1A for ; Thu, 13 Mar 2008 19:17:41 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by ti-out-0910.google.com with SMTP id j2so1364110tid.3 for ; Thu, 13 Mar 2008 12:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=/VCCcp87fHYUPb2G7HAomPVmqURaBzRE9+BVnVQj6vk=; b=A8BYBlg6RM5omwXE9iBHG1s3agIGQhKIPcKr5wBuS8SNVH4yEUwG2FDsPX8lsFCl1sywQtHVeNdzsHsySBZilR4/4uktfIChcrYjar997f9l7uKcxePZJaHB5FV3IkAVuofclkVMxH70mFYfAjnPlLeVSp6EuXRBf5ryk0kV6B8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=tUfWXLCWWrm+JUmUpf4/1P72L0bd3MTlO5cU7/g2vF6UZQel5V4U19DywruJz0hh+oy6a5sU6+B0dh16Eanv67I6ky7AsmCdv3moguED47TXEEgqxPd/diuueSUSL8T/s4R5geV8SYyIb3XYt7a22HGg6+pOuR4kv0lAmr7/mnI= Received: by 10.151.156.2 with SMTP id i2mr5617674ybo.177.1205434192552; Thu, 13 Mar 2008 11:49:52 -0700 (PDT) Received: by 10.150.230.16 with HTTP; Thu, 13 Mar 2008 11:49:52 -0700 (PDT) Message-ID: <3c0b01820803131149s67cac66vae6834f1480c0aaa@mail.gmail.com> Date: Thu, 13 Mar 2008 14:49:52 -0400 From: "Alexander Sack" To: gary.jennejohn@freenet.de In-Reply-To: <20080313191621.1772d40a@peedub.jennejohn.org> MIME-Version: 1.0 References: <1841496593.20080313175115@gulfstream.by> <20080313191621.1772d40a@peedub.jennejohn.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: new SATA chipsets support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 19:17:41 -0000 On Thu, Mar 13, 2008 at 2:16 PM, Gary Jennejohn wrote: > > I can't speak to this, but why not use a board which is already known > to work? I'm using a Gigabyte M61P-S3 myself. > > > I think that drivers from ASUS ( > http://support.asus.com/download/download.aspx?SLanguage=en-en&model=M2N-SLI%20Deluxe) > may not work with FreeBSD? > > > > These are guaranteed not to work, unless you want to port the Linux > drivers. I see that 7.0-RELEASE has ATA Nvidia chipset support. Does that not cover the SATA nvidia chipsets of their unified MCP chipset? I'm just curious if this could be fixed by adding this particular chipset PCI information to struct ata_nvidia_ident in sys/dev/ata/ata-chipset.c. It looks MCP55 is certainly supported but again I'm stabbing slightly in the dark since I don't know SATA NV. Sorry if this is totally off. I'm new to the FreeBSD kernel but not SATA driver development in general. Its just a thought... Thanks! -aps -- "What lies behind us and what lies in front of us is of little concern to what lies within us." -Ralph Waldo Emerson From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 19:28:43 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16FAD106567D for ; Thu, 13 Mar 2008 19:28:43 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from smtp.sd73.bc.ca (smtp.sd73.bc.ca [142.24.13.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8798FC17 for ; Thu, 13 Mar 2008 19:28:42 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from localhost (localhost [127.0.0.1]) by localhost.sd73.bc.ca (Postfix) with ESMTP id 56CB31A000B1C; Thu, 13 Mar 2008 11:56:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at smtp.sd73.bc.ca Received: from smtp.sd73.bc.ca ([127.0.0.1]) by localhost (smtp.sd73.bc.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LX62mh6o1B25; Thu, 13 Mar 2008 11:56:01 -0700 (PDT) Received: from coal.local (s10.sbo [192.168.0.10]) by smtp.sd73.bc.ca (Postfix) with ESMTP id 7EB051A000B17; Thu, 13 Mar 2008 11:56:01 -0700 (PDT) From: Freddie Cash Organization: School District 73 To: =?utf-8?b?0JjQs9C+0YDRjCDQmtGA0LDRgdC90L7RgdC10LvRjNGB0LrQuNC5?= Date: Thu, 13 Mar 2008 11:55:59 -0700 User-Agent: KMail/1.9.7 References: <1841496593.20080313175115@gulfstream.by> In-Reply-To: <1841496593.20080313175115@gulfstream.by> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803131156.00184.fjwcash@gmail.com> Cc: hackers@freebsd.org Subject: Re: new SATA chipsets support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 19:28:43 -0000 On March 13, 2008 08:51 am =D0=98=D0=B3=D0=BE=D1=80=D1=8C =D0=9A=D1=80=D0= =B0=D1=81=D0=BD=D0=BE=D1=81=D0=B5=D0=BB=D1=8C=D1=81=D0=BA=D0=B8=D0=B9 wrote: > I am going to build my new file- and gateway server and i wish to use > any of brand new motherboards for it, such as ASUS M2N-SLI deluxe > (nforce 570 SLI chipset) or Gigabyte MA790X-DS4 (AMD 790X / AMD SB600 > chipset), but i can't find any information of supporting that chipsets > in your current 7.0 release. Are you going to include support of that > chips to your next releases, and if yes, when? Or maybe i can find that > drivers somewhere else? > > I think that drivers from ASUS > (http://support.asus.com/download/download.aspx?SLanguage=3Den-en&model= =3DM >2N-SLI%20Deluxe) may not work with FreeBSD? Can't say anything about the above, but ... A really nice motherboard that works really well with FreeBSD 6.3 and=20 =46reeBSD 7.0 is the Asus M2N-LR: http://ca.asus.com/products.aspx?l1=3D9&l2=3D39&l3=3D263&l4=3D0&model=3D135= 2&modelmenu=3D1 This is a single-socket AM2 motherboard with support for 1000-series AMD=20 Opteron processors (single or dual-core). 4 RAM slots supports up to 4=20 GB of DDR-800 RAM, 2x Broadcom gigabit NICs onboard (attached to PCIe), 6=20 SATA connectors. Expansion slots include a 16x PCIe slot, two 64-bit/133=20 MHz PCI-X slots, and a 32-bit/33 MHz PCI slot. We're using these for our gateway/router/firewall boxes without any issues= =20 running FreeBSD 6.3 and FreeBSD 7.0. We installed a 4-port Intel=20 Pro/1000 gigabit NIC, dual-core Opteron CPU, 2 GB RAM, and a single 80 GB=20 SATA HD in ours. Beautiful little things. Haven't been able to crash it yet. And fairly=20 inexpensive (just under $1100 CDN in short 2U rackmountable cases when we=20 purchased them in Jan 08, for the config above). Everything except one memory controller has drivers attached to it in=20 pciconf -vl output, even on 6.3. =2D-=20 =46reddie Cash fjwcash@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 19:50:09 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D66A61065672 for ; Thu, 13 Mar 2008 19:50:09 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout4.freenet.de (mout4.freenet.de [IPv6:2001:748:100:40::2:6]) by mx1.freebsd.org (Postfix) with ESMTP id 6581D8FC1E for ; Thu, 13 Mar 2008 19:50:09 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.21] (helo=11.mx.freenet.de) by mout4.freenet.de with esmtpa (Exim 4.69) (envelope-from ) id 1JZtRH-0003VP-Sr; Thu, 13 Mar 2008 20:50:07 +0100 Received: from rb624.r.pppool.de ([89.54.182.36]:41892 helo=peedub.jennejohn.org) by 11.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #12) id 1JZtRH-0002zR-Iz; Thu, 13 Mar 2008 20:50:07 +0100 Date: Thu, 13 Mar 2008 20:50:06 +0100 From: Gary Jennejohn To: "Alexander Sack" Message-ID: <20080313205006.333c6c26@peedub.jennejohn.org> In-Reply-To: <3c0b01820803131149s67cac66vae6834f1480c0aaa@mail.gmail.com> References: <1841496593.20080313175115@gulfstream.by> <20080313191621.1772d40a@peedub.jennejohn.org> <3c0b01820803131149s67cac66vae6834f1480c0aaa@mail.gmail.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.10.14; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: new SATA chipsets support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 19:50:09 -0000 On Thu, 13 Mar 2008 14:49:52 -0400 "Alexander Sack" wrote: > On Thu, Mar 13, 2008 at 2:16 PM, Gary Jennejohn > wrote: > > > > I can't speak to this, but why not use a board which is already known > > to work? I'm using a Gigabyte M61P-S3 myself. > > > > > I think that drivers from ASUS ( > > http://support.asus.com/download/download.aspx?SLanguage=en-en&model=M2N-SLI%20Deluxe) > > may not work with FreeBSD? > > > > > > > These are guaranteed not to work, unless you want to port the Linux > > drivers. > > > I see that 7.0-RELEASE has ATA Nvidia chipset support. Does that not cover > the SATA nvidia chipsets of their unified MCP chipset? I'm just curious if > this could be fixed by adding this particular chipset PCI information to > struct ata_nvidia_ident in sys/dev/ata/ata-chipset.c. It looks MCP55 is > certainly supported but again I'm stabbing slightly in the dark since I > don't know SATA NV. > > Sorry if this is totally off. I'm new to the FreeBSD kernel but not SATA > driver development in general. Its just a thought... > Well, according to "man ata" the nforce[23] MCP (among other nvidia chipsets) are supported. My motherboard has MCP61 which works just fine. But I'm no expert on nvidia chip sets and can't really evaluate whether just adding the PCI information will work. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 20:13:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD86D106566C for ; Thu, 13 Mar 2008 20:13:36 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 2A9008FC27 for ; Thu, 13 Mar 2008 20:13:35 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so589876uge.37 for ; Thu, 13 Mar 2008 13:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=kAaUxZgiymDnQEmiVSX4u11CdYDDisRgeneRIpBSuVo=; b=cAoYT99B+slan/90dgYkp/NFxsuvERZK1MMNPi3lEcZwvRPFUH9UGb3HB54GoF1huPT/g8KJ+vXirTe5XwvutkkugKgJBbtZEDXRNiAQ813cTHFz0MufB6Oh3RxmjY9DnzsLEuZc/nmB+srDXtzZGg0HptyG2zpKrJXIS4yaugY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=R0sNTKnY9qAFVFvqM7uT/G3HNQq1yAO0w8ixKXRyksDGy/k7pqlrvXVotuZzuTMxh3umQyZA7CPZLizMXZ4NQfduszIgRogiuNMSNoiIBE+mZgKsqFWjMeQ4AiN59qTMk4mqb+CUdgapXjyhRRecFr2rKmZqs7yZG+e8eU3eCj8= Received: by 10.151.61.9 with SMTP id o9mr879048ybk.139.1205439213640; Thu, 13 Mar 2008 13:13:33 -0700 (PDT) Received: by 10.150.230.16 with HTTP; Thu, 13 Mar 2008 13:13:33 -0700 (PDT) Message-ID: <3c0b01820803131313u5c848401q6f0b55d6b76c1809@mail.gmail.com> Date: Thu, 13 Mar 2008 16:13:33 -0400 From: "Alexander Sack" To: gary.jennejohn@freenet.de In-Reply-To: <20080313205006.333c6c26@peedub.jennejohn.org> MIME-Version: 1.0 References: <1841496593.20080313175115@gulfstream.by> <20080313191621.1772d40a@peedub.jennejohn.org> <3c0b01820803131149s67cac66vae6834f1480c0aaa@mail.gmail.com> <20080313205006.333c6c26@peedub.jennejohn.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: new SATA chipsets support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 20:13:36 -0000 On Thu, Mar 13, 2008 at 3:50 PM, Gary Jennejohn wrote: > On Thu, 13 Mar 2008 14:49:52 -0400 > "Alexander Sack" wrote: > > > On Thu, Mar 13, 2008 at 2:16 PM, Gary Jennejohn < > gary.jennejohn@freenet.de> > > wrote: > > > > > > I can't speak to this, but why not use a board which is already known > > > to work? I'm using a Gigabyte M61P-S3 myself. > > > > > > > I think that drivers from ASUS ( > > > > http://support.asus.com/download/download.aspx?SLanguage=en-en&model=M2N-SLI%20Deluxe > ) > > > may not work with FreeBSD? > > > > > > > > > > These are guaranteed not to work, unless you want to port the Linux > > > drivers. > > > > > > I see that 7.0-RELEASE has ATA Nvidia chipset support. Does that not > cover > > the SATA nvidia chipsets of their unified MCP chipset? I'm just curious > if > > this could be fixed by adding this particular chipset PCI information to > > struct ata_nvidia_ident in sys/dev/ata/ata-chipset.c. It looks MCP55 is > > certainly supported but again I'm stabbing slightly in the dark since I > > don't know SATA NV. > > > > Sorry if this is totally off. I'm new to the FreeBSD kernel but not > SATA > > driver development in general. Its just a thought... > > > > Well, according to "man ata" the nforce[23] MCP (among other nvidia > chipsets) are supported. My motherboard has MCP61 which works just fine. > But I'm no expert on nvidia chip sets and can't really evaluate whether > just adding the PCI information will work. > Yea I don't know either since I don't have an Nvidia spec laying around in front of me! What I would do is cross reference the PCI BoardId in the Linux SATA NV chipset driver and see if its supported. If so, there is a good chance that by adding the proper PCI information the ata infrastructure would just take over. Again, I don't know the exact MCP this motherboard is using. Cheers! -aps -- "What lies behind us and what lies in front of us is of little concern to what lies within us." -Ralph Waldo Emerson From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 21:01:32 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DD53106566B for ; Thu, 13 Mar 2008 21:01:32 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from webmail4.yandex.ru (webmail4.yandex.ru [213.180.200.35]) by mx1.freebsd.org (Postfix) with ESMTP id 10BA58FC18 for ; Thu, 13 Mar 2008 21:01:32 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from YAMAIL (webmail4) by mail.yandex.ru id S4654366AbYCMTVq for ; Thu, 13 Mar 2008 22:21:46 +0300 X-Yandex-Spam: 0 Received: from [77.72.136.70] ([77.72.136.70]) by mail.yandex.ru with HTTP; Thu, 13 Mar 2008 22:21:43 +0300 From: "Andrey V. Elsukov" To: igor@gulfstream.by In-Reply-To: 9060000000183044020 References: 9060000000183044020 MIME-Version: 1.0 Message-Id: <157871205436103@webmail4.yandex.ru> Date: Thu, 13 Mar 2008 22:21:43 +0300 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=KOI8-R Cc: hackers@freebsd.org Subject: Re: new SATA chipsets support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 21:01:32 -0000 13.03.08, 18:51, "éÇÏÒØ ëÒÁÓÎÏÓÅÌØÓËÉÊ" : > Hi people, > I am going to build my new file- and gateway server and i wish to use any of brand new motherboards for it, such as ASUS M2N-SLI deluxe (nforce 570 SLI chipset) or Gigabyte MA790X-DS4 (AMD 790X / AMD SB600 chipset), but i can't find any information of supporting that chipsets in your current 7.0 release. Are you going to include support of that chips to your next releases, and if yes, when? Or maybe i can find that drivers somewhere else? > I think that drivers from ASUS (http://support.asus.com/download/download.aspx?SLanguage=en-en&model=M2N-SLI%20Deluxe) may not work with FreeBSD? Hi, Igor. FreeBSD works well with nForce 570. It supports AMD SB600 too, but if you BIOS dosn't have an AHCI option, then it will work only with UDMA33 speed. But workaround for this problem was commited to CURRENT last week. So, i think it will be in STABLE soon. Note: seems that there are some problems with nForce chipsets and FreeBSD 6.3/7.0 on MSI motherboards. So, be careful. -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 21:31:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61EF81065671 for ; Thu, 13 Mar 2008 21:31:17 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4268FC1E for ; Thu, 13 Mar 2008 21:31:17 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 13 Mar 2008 14:30:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,496,1199692800"; d="scan'208";a="533541533" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by fmsmga001.fm.intel.com with ESMTP; 13 Mar 2008 14:28:25 -0700 Received: from orsmsx419.amr.corp.intel.com ([10.22.226.88]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 13 Mar 2008 14:27:45 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 13 Mar 2008 14:27:44 -0700 Message-ID: <12A5C15467D5B94F8E0FF265D9498ADD02B6AF6A@orsmsx419.amr.corp.intel.com> In-reply-to: <006DB5A0-3669-473B-84B6-E3C8CC3C059D@colorado.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Shared VM address range across processes Thread-Index: AciFJTdZodDWss5dQaO/0Bth7r9ZnAAK5ICQ References: <12A5C15467D5B94F8E0FF265D9498ADD02B35F81@orsmsx419.amr.corp.intel.com> <006DB5A0-3669-473B-84B6-E3C8CC3C059D@colorado.edu> From: "Rao, Nikhil" To: "John Giacomoni" , X-OriginalArrivalTime: 13 Mar 2008 21:27:45.0837 (UTC) FILETIME=[143BD5D0:01C88551] Cc: Subject: RE: Shared VM address range across processes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 21:31:17 -0000 Hi John, Is the approach that you are working on based on necessarily using the kernel address space, so is this approach not feasible with user space virtual addresses ? Nikhil -----Original Message----- From: John Giacomoni [mailto:john.giacomoni@colorado.edu]=20 Sent: Thursday, March 13, 2008 9:13 AM To: freebsd-hackers@freebsd.org Cc: Rao, Nikhil Subject: Re: Shared VM address range across processes Nihkil, I'm working on something similar for a research project and the answer is that it is possible but ugly. First, are you sure you need to do this? Ensuring safety by checking pointers before dereferencing can be painful :) FreeBSD seems to have checks scattered throughout the kernel trying to ensure that the kernel address range remains unavailable to the =20 userspace address range. These checks can obviously be bypassed but they are =20 fairly invasive. Once all those checks are bipassed, you need to ensure that =20 the PTEs and PDEs are have the userspace bit set for the appropriate page ranges which then requires flushing the specific pages out of the TLB using the invlpg function, note that flushing the TLB is insufficient as kernel pages are marked global and thus won't flush with any other =20 method. files that I touched /usr/src/sys/amd64/amd64/pmap.c - pmap_enter /usr/src/sys/amd64/amd64/trap.c - trap_pfault and the allocation site needs to ensure that the user-mode bit is set on the correct PTEs and PDEs. I directly allocate memory using vm objects to help me bypass the =20 various address range checks that can be found in the higher levels of the =20 kernel. I'm planning on generalizing and cleaning my approach up in the next few months but I'll be glad to answer any specific questions you might have. For the FreeBSD kernel developers, Is there a reason to enforce the high/low mem address range as strongly as is done in FreeBSD? It seems that if the higher-levels of the kernel allow a mapping, the lower-levels should respect that. John G On Mar 12, 2008, at 12:46 PM, Rao, Nikhil wrote: > Hi, > > > > I want to map device memory into the same virtual address range in > multiple processes, this means I would have to add a vm_map_entry per > address range in every process, since the list of processes can be > potentially huge .. Is it allowed to point to the same list of > vm_map_entrys from multiple vm_spaces ? BSD3 had a field in the > vm_map_entry that could be a share map - would it be an idea that I > could reuse ? > > > > Nikhil > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org=20 > " -- John.Giacomoni@colorado.edu University of Colorado at Boulder Department of Computer Science Engineering Center, ECCR 1B50 430 UCB Boulder, CO 80303-0430 USA From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 21:49:48 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A404106566B for ; Thu, 13 Mar 2008 21:49:48 +0000 (UTC) (envelope-from john.giacomoni@colorado.edu) Received: from suburban.colorado.edu (suburban.colorado.edu [128.138.189.14]) by mx1.freebsd.org (Postfix) with ESMTP id 383C48FC1D for ; Thu, 13 Mar 2008 21:49:48 +0000 (UTC) (envelope-from john.giacomoni@colorado.edu) Received: from [127.0.0.1] (suburban.colorado.edu [127.0.0.1]) by suburban.colorado.edu (8.13.1/8.13.1) with ESMTP id m2DIsw6m003016; Thu, 13 Mar 2008 14:54:58 -0400 Message-Id: <1339BE9A-9B99-49D0-B626-FD64C442D1EE@colorado.edu> From: John Giacomoni To: "Rao, Nikhil" In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD02B6AF6A@orsmsx419.amr.corp.intel.com> Content-Type: multipart/mixed; boundary=Apple-Mail-486--495480458 Mime-Version: 1.0 (Apple Message framework v919.2) Date: Thu, 13 Mar 2008 15:49:46 -0600 References: <12A5C15467D5B94F8E0FF265D9498ADD02B35F81@orsmsx419.amr.corp.intel.com> <006DB5A0-3669-473B-84B6-E3C8CC3C059D@colorado.edu> <12A5C15467D5B94F8E0FF265D9498ADD02B6AF6A@orsmsx419.amr.corp.intel.com> X-Mailer: Apple Mail (2.919.2) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Shared VM address range across processes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 21:49:48 -0000 --Apple-Mail-486--495480458 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Nikhil, I am using kernel addresses to ensure that once the memory region is allocated it is available to everyone, even for late joiners who might have an address range conflict. If you can predetermine or or otherwise simultaneously ensure the address range is available for everyone life maybe easier :) I haven't looked into it but mapping userspace pages should be easier. John G On Mar 13, 2008, at 3:27 PM, Rao, Nikhil wrote: > > Hi John, > > Is the approach that you are working on based on necessarily using the > kernel address space, so is this approach not feasible with user space > virtual addresses ? > > Nikhil > > -----Original Message----- > From: John Giacomoni [mailto:john.giacomoni@colorado.edu] > Sent: Thursday, March 13, 2008 9:13 AM > To: freebsd-hackers@freebsd.org > Cc: Rao, Nikhil > Subject: Re: Shared VM address range across processes > > Nihkil, > > I'm working on something similar for a research project and the answer > is that it is possible but ugly. > > First, are you sure you need to do this? Ensuring safety by checking > pointers before dereferencing can be painful :) > > FreeBSD seems to have checks scattered throughout the kernel trying to > ensure that the kernel address range remains unavailable to the > userspace > address range. These checks can obviously be bypassed but they are > fairly > invasive. Once all those checks are bipassed, you need to ensure that > the > PTEs and PDEs are have the userspace bit set for the appropriate page > ranges which then requires flushing the specific pages out of the TLB > using the invlpg function, note that flushing the TLB is > insufficient as > kernel pages are marked global and thus won't flush with any other > method. > > files that I touched > > /usr/src/sys/amd64/amd64/pmap.c - pmap_enter > > /usr/src/sys/amd64/amd64/trap.c - trap_pfault > > and the allocation site needs to ensure that the user-mode bit is > set on > the correct PTEs and PDEs. > > I directly allocate memory using vm objects to help me bypass the > various > address range checks that can be found in the higher levels of the > kernel. > > I'm planning on generalizing and cleaning my approach up in the next > few > months but I'll be glad to answer any specific questions you might > have. > > > For the FreeBSD kernel developers, > > Is there a reason to enforce the high/low mem address range as > strongly > as is done in FreeBSD? It seems that if the higher-levels of the > kernel > allow a mapping, the lower-levels should respect that. > > John G > > > > On Mar 12, 2008, at 12:46 PM, Rao, Nikhil wrote: > >> Hi, >> >> >> >> I want to map device memory into the same virtual address range in >> multiple processes, this means I would have to add a vm_map_entry per >> address range in every process, since the list of processes can be >> potentially huge .. Is it allowed to point to the same list of >> vm_map_entrys from multiple vm_spaces ? BSD3 had a field in the >> vm_map_entry that could be a share map - would it be an idea that I >> could reuse ? >> >> >> >> Nikhil >> >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org >> " > > > -- > > John.Giacomoni@colorado.edu > University of Colorado at Boulder > Department of Computer Science > Engineering Center, ECCR 1B50 > 430 UCB > Boulder, CO 80303-0430 > USA > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org > " -- John.Giacomoni@colorado.edu University of Colorado at Boulder Department of Computer Science Engineering Center, ECCR 1B50 430 UCB Boulder, CO 80303-0430 USA --Apple-Mail-486--495480458 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-486--495480458-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 21:54:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 596FF106566C; Thu, 13 Mar 2008 21:54:27 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from cp65.agava.net (cp65.agava.net [89.108.66.215]) by mx1.freebsd.org (Postfix) with ESMTP id C52DC8FC12; Thu, 13 Mar 2008 21:54:26 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by cp65.agava.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1JZudL-000IsC-VY; Fri, 14 Mar 2008 00:06:40 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id E59176E94; Fri, 14 Mar 2008 00:02:00 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 572E01702F; Fri, 14 Mar 2008 00:02:42 +0300 (MSK) Date: Fri, 14 Mar 2008 00:02:42 +0300 From: Dmitry Marakasov To: Ivan Voras Message-ID: <20080313210242.GA55395@hades.panopticon> Mail-Followup-To: Ivan Voras , freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cp65.agava.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [26 6] X-AntiAbuse: Sender Address Domain - amdmi3.ru X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Transferring ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 21:54:27 -0000 * Ivan Voras (ivoras@freebsd.org) wrote: > I have an idea and a request for people familiar with ports & pkgdb > infrastructure: a utility (preferably written in C, Python or as a shell > script) that would transfer *installed* ports from one system tree to > the other, including their dependencies. It would transfer only some > ports, specified on the command line. There's no way to do it clearly. Not only such utility will have to deal with dependencies anyway, but also there are ports that do more than just copy files on installation (such as registering uids/gids, handling user-modified configs nicely etc.). > The details: imagine there are two or more full FreeBSD installation > trees in the file system (e.g. complete jails). The utility would > transfer (installed) packages from one tree to the other. The easy, > brute-force way would be to generate package files (tbz) from the > installed tree and then install them to the other tree, but I can't do > that because of performance and disk space reasons. I think that the easiest and most correct way will be to use packages. You can share packages/ directory between jails via nullfs (or between hosts via nfs) - single set of packages surely will take no more space than a single set of installed ports in a jail. And the only performance overhead is bzipping a package one time and bunzipping number_of_jails times. And actually, what you want is done pretty easily, like this: JAIL=/path/to/target/jail pkg_info -q -L [...] | while read file; do mkdir -p $JAIL/`dirname "$file"` cp -pP "$file" $JAIL/"$file" done (this is just a scratch, use with care) > Is there a utility that would do that, and if not, does anyone have the > time to write one? Actually, I've already had an idea of utility with pretty similar functionality for a long time. The utility would copy directory hierarchies recursively based on file include/exclude list, like this: +/{etc,bin,sbin,lib} +/usr -/usr/local +/usr/local/{bin,sbin,libexec,share,lib} -/usr/share/locale +/usr/share/locale/ru_RU* so `my_cool_copy_utility / /path/to/jail` will copy /etc,/bin,/sbin,/lib and /usr dirs to jail, but in /usr/share/locale will only copy russian locales, but no others, and in usr/local it won't copy man, include and other dirs not needed in a jail. The purpose is similar - creating jails out of host system in fast and easy way, possibility to strip everything unneeded (useful for secure minimal jails or flash/livecd/embedded installations of minimal size) and add something extra, like stuff from /usr/local without installing full packages in a jail, or, say, copying over additional tree of jail-specific changes (mostly stuff under /etc and /usr/local/etc). Such an utility is something I still might start working on. -- Dmitry A. Marakasov | jabber: amdmi3@jabber.ru amdmi3@amdmi3.ru | http://www.amdmi3.ru From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 21:57:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD3D4106566C for ; Thu, 13 Mar 2008 21:57:01 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx1.freebsd.org (Postfix) with ESMTP id AFB0A8FC1E for ; Thu, 13 Mar 2008 21:57:01 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 13 Mar 2008 14:57:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,496,1199692800"; d="scan'208";a="306041710" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by fmsmga002.fm.intel.com with ESMTP; 13 Mar 2008 14:55:08 -0700 Received: from orsmsx419.amr.corp.intel.com ([10.22.226.88]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 13 Mar 2008 14:56:23 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 13 Mar 2008 14:56:22 -0700 Message-ID: <12A5C15467D5B94F8E0FF265D9498ADD02B6AFB3@orsmsx419.amr.corp.intel.com> In-reply-to: <1339BE9A-9B99-49D0-B626-FD64C442D1EE@colorado.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Shared VM address range across processes Thread-Index: AciFVFDHCfWrduQcToGEeISe5xwVBwAAHnYg References: <12A5C15467D5B94F8E0FF265D9498ADD02B35F81@orsmsx419.amr.corp.intel.com> <006DB5A0-3669-473B-84B6-E3C8CC3C059D@colorado.edu> <12A5C15467D5B94F8E0FF265D9498ADD02B6AF6A@orsmsx419.amr.corp.intel.com> <1339BE9A-9B99-49D0-B626-FD64C442D1EE@colorado.edu> From: "Rao, Nikhil" To: "John Giacomoni" X-OriginalArrivalTime: 13 Mar 2008 21:56:23.0576 (UTC) FILETIME=[14160180:01C88555] Cc: freebsd-hackers@freebsd.org Subject: RE: Shared VM address range across processes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 21:57:02 -0000 You still need to add the VA range to the proc->vm_space of every process right ? Nikhil -----Original Message----- From: John Giacomoni [mailto:john.giacomoni@colorado.edu]=20 Sent: Thursday, March 13, 2008 2:50 PM To: Rao, Nikhil Cc: freebsd-hackers@freebsd.org Subject: Re: Shared VM address range across processes Nikhil, I am using kernel addresses to ensure that once the memory region is =20 allocated it is available to everyone, even for late joiners who might have an =20 address range conflict. If you can predetermine or or otherwise simultaneously ensure the =20 address range is available for everyone life maybe easier :) I haven't looked into =20 it but mapping userspace pages should be easier. John G On Mar 13, 2008, at 3:27 PM, Rao, Nikhil wrote: > > Hi John, > > Is the approach that you are working on based on necessarily using the > kernel address space, so is this approach not feasible with user space > virtual addresses ? > > Nikhil > > -----Original Message----- > From: John Giacomoni [mailto:john.giacomoni@colorado.edu] > Sent: Thursday, March 13, 2008 9:13 AM > To: freebsd-hackers@freebsd.org > Cc: Rao, Nikhil > Subject: Re: Shared VM address range across processes > > Nihkil, > > I'm working on something similar for a research project and the answer > is that it is possible but ugly. > > First, are you sure you need to do this? Ensuring safety by checking > pointers before dereferencing can be painful :) > > FreeBSD seems to have checks scattered throughout the kernel trying to > ensure that the kernel address range remains unavailable to the > userspace > address range. These checks can obviously be bypassed but they are > fairly > invasive. Once all those checks are bipassed, you need to ensure that > the > PTEs and PDEs are have the userspace bit set for the appropriate page > ranges which then requires flushing the specific pages out of the TLB > using the invlpg function, note that flushing the TLB is =20 > insufficient as > kernel pages are marked global and thus won't flush with any other > method. > > files that I touched > > /usr/src/sys/amd64/amd64/pmap.c - pmap_enter > > /usr/src/sys/amd64/amd64/trap.c - trap_pfault > > and the allocation site needs to ensure that the user-mode bit is =20 > set on > the correct PTEs and PDEs. > > I directly allocate memory using vm objects to help me bypass the > various > address range checks that can be found in the higher levels of the > kernel. > > I'm planning on generalizing and cleaning my approach up in the next =20 > few > months but I'll be glad to answer any specific questions you might =20 > have. > > > For the FreeBSD kernel developers, > > Is there a reason to enforce the high/low mem address range as =20 > strongly > as is done in FreeBSD? It seems that if the higher-levels of the =20 > kernel > allow a mapping, the lower-levels should respect that. > > John G > > > > On Mar 12, 2008, at 12:46 PM, Rao, Nikhil wrote: > >> Hi, >> >> >> >> I want to map device memory into the same virtual address range in >> multiple processes, this means I would have to add a vm_map_entry per >> address range in every process, since the list of processes can be >> potentially huge .. Is it allowed to point to the same list of >> vm_map_entrys from multiple vm_spaces ? BSD3 had a field in the >> vm_map_entry that could be a share map - would it be an idea that I >> could reuse ? >> >> >> >> Nikhil >> >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org >> " > > > -- > > John.Giacomoni@colorado.edu > University of Colorado at Boulder > Department of Computer Science > Engineering Center, ECCR 1B50 > 430 UCB > Boulder, CO 80303-0430 > USA > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org=20 > " -- John.Giacomoni@colorado.edu University of Colorado at Boulder Department of Computer Science Engineering Center, ECCR 1B50 430 UCB Boulder, CO 80303-0430 USA From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 22:09:18 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 048F7106566C for ; Thu, 13 Mar 2008 22:09:18 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.186]) by mx1.freebsd.org (Postfix) with ESMTP id C5B798FC27 for ; Thu, 13 Mar 2008 22:09:17 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0910.google.com with SMTP id g13so2425777rvb.43 for ; Thu, 13 Mar 2008 15:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=6lGUnPsO/JfjrWG9lkHmPdvJq3ebRajg3bjDuprrl2c=; b=SdX/rcv7VYIDF2mtWJsw0o3IBd28RGr2mpYbYmbGZlO/78A8nc9AtGjOrUhWY4KNgzo0kxZm7SdTjvnqGuh37OmgkQQs4xD8yrGnHVewuw6VWfbLprE8tOOD4NUFho7fiSB7VeHBP2ytwUlDCTbdUE3C1O+LW1Y9SF+NEjJGEOI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=G5K66L+hVYFLimC2TPD/+K/7Pdi0Pq2my0ZO7LBSONRmgHirDuv0Sw7N4RZ4cY9TieEme/NcHCtPD4rki0DschgPyCDxqZ7FexLufHtiAk55tmw7MT0UgHcdnN1TJWsSTxS2GPDN3KQ+6XmLfsuaO2GpJKfMMRwB/nlBoqMvrzI= Received: by 10.141.161.6 with SMTP id n6mr6187680rvo.155.1205446157012; Thu, 13 Mar 2008 15:09:17 -0700 (PDT) Received: by 10.141.212.1 with HTTP; Thu, 13 Mar 2008 15:09:16 -0700 (PDT) Message-ID: <9bbcef730803131509i72be282bhaa50e23b0a3e44ea@mail.gmail.com> Date: Thu, 13 Mar 2008 23:09:16 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Ivan Voras" , freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org In-Reply-To: <20080313210242.GA55395@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080313210242.GA55395@hades.panopticon> X-Google-Sender-Auth: b15361382a37bb96 Cc: Subject: Re: Transferring ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 22:09:18 -0000 On 13/03/2008, Dmitry Marakasov wrote: > * Ivan Voras (ivoras@freebsd.org) wrote: > > > I have an idea and a request for people familiar with ports & pkgdb > > infrastructure: a utility (preferably written in C, Python or as a shell > > script) that would transfer *installed* ports from one system tree to > > the other, including their dependencies. It would transfer only some > > ports, specified on the command line. > There's no way to do it clearly. Not only such utility will have > to deal with dependencies anyway, but also there are ports that do more > than just copy files on installation (such as registering uids/gids, > handling user-modified configs nicely etc.). I only need the functionality that now exists by doing "pkg_create -b" to create a package, and then install it. However "pkg_create -b" does it, that's how I need it. > Actually, I've already had an idea of utility with pretty similar > functionality for a long time. The utility would copy directory > hierarchies recursively based on file include/exclude list, like this: > The purpose is similar - creating jails out of host system in fast > and easy way, possibility to strip everything unneeded (useful for > secure minimal jails or flash/livecd/embedded installations of > minimal size) and add something extra, like stuff from /usr/local > without installing full packages in a jail, or, say, copying over > additional tree of jail-specific changes (mostly stuff under /etc > and /usr/local/etc). This seems like something that would be also useful to me, if it would also read pkgdb :). I need to clarify so people don't flood me with nullfs suggestions: I don't actually need it for jails, but that was the easiest way for me to describe it - I need it to set up new installations. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 22:30:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD8CB1065671 for ; Thu, 13 Mar 2008 22:30:04 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with SMTP id 56D858FC29 for ; Thu, 13 Mar 2008 22:30:04 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 89453 invoked by uid 1001); 13 Mar 2008 22:28:29 -0000 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda.mired.org (tmda-ofmipd) with ESMTP; Thu, 13 Mar 2008 18:28:28 -0400 Date: Thu, 13 Mar 2008 18:28:27 -0400 To: freebsd-hackers@freebsd.org Message-ID: <20080313182827.530d91d4@bhuda.mired.org> In-Reply-To: <20080313210242.GA55395@hades.panopticon> References: <20080313210242.GA55395@hades.panopticon> Organization: Meyer Consulting X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; amd64-portbld-freebsd6.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Mike Meyer Subject: Re: Transferring ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 22:30:04 -0000 On Fri, 14 Mar 2008 00:02:42 +0300 Dmitry Marakasov wrote: > Actually, I've already had an idea of utility with pretty similar > functionality for a long time. The utility would copy directory > hierarchies recursively based on file include/exclude list, like this: You mean like rsync? > +/{etc,bin,sbin,lib} > +/usr > -/usr/local > +/usr/local/{bin,sbin,libexec,share,lib} > -/usr/share/locale > +/usr/share/locale/ru_RU* > > so `my_cool_copy_utility / /path/to/jail` will copy /etc,/bin,/sbin,/lib > and /usr dirs to jail, but in /usr/share/locale will only copy > russian locales, but no others, and in usr/local it won't copy > man, include and other dirs not needed in a jail. Yeah, rsync can do that. The syntax is a little (or maybe a lot) different, though. > Such an utility is something I still might start working on. If you've already checked out rsync and found it wanting, my apologies for wasting your time. If not, it's probably worth a look. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 09:33:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A852C1065672 for ; Fri, 14 Mar 2008 09:33:54 +0000 (UTC) (envelope-from greycd@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id A0C8C8FC2A for ; Fri, 14 Mar 2008 09:33:54 +0000 (UTC) (envelope-from greycd@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so4403911waf.3 for ; Fri, 14 Mar 2008 02:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=mQ7a1V0MYP/zni2L6gRYf1Lmi2/KjNcpIWYeIoeufBI=; b=N0nr94b/90JyUZm0nwxDHLwu7Uc0OTCF8tBZMzcCCrlcvuNnEqtdXYBnQap390WQy6DbGSsgCi6NAIUBXZExJkYtC4tunp+9PF3fJFv41ZD5LfFMOpszVQxCBzIewUi6keWwIbDqi04OA0KAdR+7ZCusvG0MWsy6lF9cS9zfuoE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=pF3VXdWlUtyNDCgmJ6o8Iu6+vLO/nn3a5LsNxrMmbpflPoQvbyfvfTeB3LSNmuDf+LlpIuEiSXMpVzItCd2jTPKUaOnxRtf8PFWoANbxRBPtkgTyGGpe6uW6DoiTXeZ+YaiEw7caXmw7RpdW/MReskU13jE0Jukr/nK3Tshc4HM= Received: by 10.114.135.1 with SMTP id i1mr11376279wad.88.1205485642235; Fri, 14 Mar 2008 02:07:22 -0700 (PDT) Received: from ?172.16.30.203? ( [210.13.108.116]) by mx.google.com with ESMTPS id g25sm28316670wag.37.2008.03.14.02.07.19 (version=SSLv3 cipher=RC4-MD5); Fri, 14 Mar 2008 02:07:21 -0700 (PDT) From: Timo To: freebsd Content-Type: text/plain Date: Fri, 14 Mar 2008 17:07:09 +0800 Message-Id: <1205485629.7194.9.camel@timo-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Subject: a NIS problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 09:33:54 -0000 HI Today I setup a NIS server in Freebsd6.2. Now, every client only run "ypbind -broadcast" to link this server the NIS server's domainname is "server.nis" if the client run "ypbind server.nis" can't link to the server. anyone can tell me how to debug it? From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 10:20:09 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C70B1065678 for ; Fri, 14 Mar 2008 10:20:09 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 316048FC21 for ; Fri, 14 Mar 2008 10:20:08 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Ja718-0005pF-TP for freebsd-hackers@freebsd.org; Fri, 14 Mar 2008 10:20:02 +0000 Received: from 195.208.174.178 ([195.208.174.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Mar 2008 10:20:02 +0000 Received: from vadim_nuclight by 195.208.174.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Mar 2008 10:20:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Vadim Goncharov Followup-To: gmane.os.freebsd.current Date: Fri, 14 Mar 2008 10:16:57 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 127 Message-ID: References: <200803111336.m2BDaosM084555@lurza.secnetix.de> <1205342217.44173.40.camel@bauer.cse.buffalo.edu> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.208.174.178 X-Comment-To: Ken Smith User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Cc: freebsd-current@freebsd.org Subject: Re: RELEASE discs & ISO images (for future) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 10:20:09 -0000 Hi Ken Smith! On Wed, 12 Mar 2008 13:16:57 -0400; Ken Smith wrote about 'Re: RELEASE discs & ISO images (for future)': >> I currently have no 7.0 ISOs to look at (and ftp.freebsd.org contains jus= > t >> symlink to all available packages, not only disc1). But I remember perl, >> linux and xorg on the disc1 from 6.2 times, yes. And actually the most ne= > eded >> things are just perl and linux ABI, not heavy Xorg which can be moved to >> disc2 - it=20 > Disc1 contains all the packages necessary to get to the "Would you like > to browse the pre-built packages" menu in sysinstall without needing to > switch discs (which is desirable for novices as well as being able to > complete that portion, not bother selecting packages in the menu, and > thus not need disc2/disc3). That's only list of them, not actual packages, right? > That includes xorg because it's one of the > things that can be chosen in the "Software Distributions" section. I'm > planning to change that with 8.0, no longer offering to have anything > that's not part of the baseline system installed until you get to the > "Would you like to ..." menu. Good. > That will reinforce to people that that > stuff really is packages/ports and it will make things like the monthly > snapshots less of a hack (I don't include any packages on those so you > get odd results if you select "All" in the Software Distributions menu > for example...). Also good. > But I didn't have a chance to get that stuff done for 7.0. And what for 7.1 and 6.4 ? >>> The question is: What does the majority of users want? >>=20 >> Attraction. Ability to say "Wow! Their CD is SO handy, many >> features on just one disk". Don't forget about advocacy and >> opinionating new users. > In my opinion the above setup (being able to make any of the selections > we offer in the "Distributions" section and complete an install without > needing to switch discs {provided you opt out of selecting packages from > the packages menu}) is what benefits the most users. Yes, but moving xorg to disc2 will help to reduce disk switching, isn't it? > I could be wrong > but this is one of those things that it's impossible to satisfy everyone > all the time so a decision needed to be made and that was it. Sure, but we can tune it as much as we can. Ability to use disc1 for most needs of both novice users and experienced corporate admins is good. > I *hope* > I can merge the livefs stuff back in to disc1 by eliminating Xorg from > the "Distributions" section (and the offer to install Linux as a > separate thing - let them select that from packages as well). But that > just wasn't possible for 7.0. Umm, but isn't that hacky switch the thing which can reduce disk switching? Such as, you are always installing Perl and Linux before packages, and when you get to the packages menu, you don't need to insert disc2 first, install something, then another which requires Perl and Linux as dependency, then switch to disc1 to install them, then to disc2 to continue? > We'll see if it can happen for 8.0 (and > as pointed out in this thread the base system seems to continue to grow > so we'll see :-). That's when geom_ugz can do it's job. >> I've suggested above - just Xorg can be moved, perl and linux ABI are not >> so big. > That causes even more disc shuffling pain than we have now. Disc1 > currently contains both Gnome and KDE. Trying to move Xorg to disc1 > means one of them needs to be moved to another disc, the three won't > fit. Disc1 ? May be you've meant disc2 ? > And so many packages are intertwined among those three things the > disc switching becomes way worse. As things stand now if you select > "All" in the software distributions section everything from disc1 will > wind up being installed before you get to the Packages selection menu so > it will never ask for disc1 again. Not tried it with 7.0, but 5.4 and 6.2 caused some switching. > If you then just select Gnome or KDE > disc2 goes in and it never asks for disc3. However if you select > anything more than Gnome or KDE things go downhill fast. But nowhere > near as fast as if all of either Gnome or KDE were not on disc1. > Yes, we need to make sysinstall smarter about the order it installs > stuff in. But I spent some time fiddling with the current layout given > what I had to work with as far as meta package sizes and ISO image sizes > go and this wound up being the least painful (note I don't claim > painless). Yes, but KDE and Gnome and Xorg grow with time, too. So, even without this changes, eventually all three will not fit to single disc2. > What I hope to shoot for with 8.0 is a CD-sized thing named "disc1" that > is much like the monthly snapshots - no packages at all on it. If > possible at the point we're near 8.0's release given sizes livefs will > be merged back onto it. I'll have trimmed out the stuff sysinstall > offers to do before reaching the "Would you like to browse pre-built > packages?" menu so you don't get odd failures if you select > something-or-other and no pre-built packages are available at all. Will be good. > And in addition to that CD-sized "disc1" we'll have a DVD-sized thing > that includes everything on disc1 plus some set of pre-built packages. Oh, that's long awaited. Much more packages than on 3 CDs :) -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 10:40:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72B8C1065670 for ; Fri, 14 Mar 2008 10:40:11 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id AD0608FC13 for ; Fri, 14 Mar 2008 10:40:09 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Ja7KW-0006nt-90 for freebsd-hackers@freebsd.org; Fri, 14 Mar 2008 10:40:04 +0000 Received: from 195.208.174.178 ([195.208.174.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Mar 2008 10:40:04 +0000 Received: from vadim_nuclight by 195.208.174.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Mar 2008 10:40:04 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Vadim Goncharov Followup-To: gmane.os.freebsd.current Date: Fri, 14 Mar 2008 10:38:30 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 198 Message-ID: References: <200803121749.m2CHnr1K056899@lurza.secnetix.de> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.208.174.178 X-Comment-To: Oliver Fromme User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Cc: freebsd-current@freebsd.org Subject: Re: RELEASE discs & ISO images (for future) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 10:40:11 -0000 Hi Oliver Fromme! On Wed, 12 Mar 2008 18:49:53 +0100 (CET); Oliver Fromme wrote about 'Re: RELEASE discs & ISO images (for future)': >>>>> - Disk 1 contains everything you need to install the base >>>>> FreeBSD system, as well as a few useful packages. >>>> >>>> Yes. Which? >>> The most important ones, including the linux base package >>> for the linux ABI, perl, xorg and a few other things. >>> Just look at the /packages subdirectory for details. >> >> I currently have no 7.0 ISOs to look at (and ftp.freebsd.org contains just >> symlink to all available packages, not only disc1). But I remember perl, >> linux and xorg on the disc1 from 6.2 times, yes. And actually the most needed >> things are just perl and linux ABI, not heavy Xorg which can be moved to >> disc2 - it > The xorg packages on disc1 occupy 54 MB. Not really all > that much, I think. The linux base, perl and python occupy > another 50 MB together. The rest are small utility things > and dependencies (only a few MB). But that is still valuable if geom_ugz is in use. > Also keep in mind that a new installer is in the works > and will be usable "really soon", as far as I know. > I'm sure the authors are aware of the problem of > installing packages from changeable media, and that > there will be a better solution. This will surely not be finished before 8.0, and having improvements (even slight) in 7.1 and 6.4 is needed too. >>> Until then, there are some workarounds for the problem. >>> For example, you can copy all packages from the CDs to >>> your harddisk and install from there. >> >> Not suitable for novice users. > No, it's not difficult to do that. It's only a matter > of documentation, I think. Users need to be made aware > of the possibilities, they need to be made aware that > they don't _have_ to install all the packages during > system installation and play CD changer monkey. No. Novice user should be provided with less painful way. Making them to read docs before _and_ preparing space on hard drive is too disappointing. >>>>> - The "docs" CD only contains documentation: Handbook, >>>>> FAQ and articles in various languages. These are also >>>>> available online, so there's rarely a need to download >>>>> this CD. >>>> >>>> It's handy for novice users to have them in base system, though. >>> I don't know ... I never used them. I think it's more >>> convenient to read them online. >> Because it is not your first install :) > Right, but I didn't read them either upon my first install > 15 years ago. :-) The first thing I did when I received > the Walnut Creek CDs was to go to www.freebsd.org and look > for docs. Tempora mutantur. Users nowadays rarely go for docs in first place. They need understandable guide exactly in process. >> But if you do not have Internet yet, >> ability to look to Handbook directly from installer is VERY valuable. > I guess almost everyone has internet access somehow (at > home, at the office, at a friend, or elsewhere). No, that doesn't matter. If user have only one computer online with Internet, and during install previous operating system is of course unavailable, then Internet (and docs on www!) is also unavailable. So where would you browse the docs in the process except the installer itself and first disk? > I'm not saying there should be no docs CD. In fact the > docs CD is a very good thing. What I'm saying is that > it doesn't have to be on the installation CD (disc1). > And you _can_ view the docs from the installer. > So I don't think there's a problem. Oh, HOW ? Is there something more than a little help provided by F1 in sysinstall? >>>>> As you can see, disk1 + livefs is larger than 700 MB. >>>>> The docs CD is separate anyway, which is a good thing >>>>> because many people won't need it. >>>> >>>> And what about removing packages from disc1 ? >>> The question is: What does the majority of users want? >> >> Attraction. Ability to say "Wow! Their CD is SO handy, many >> features on just one disk". Don't forget about advocacy and >> opinionating new users. > That's what the DVD is good for that you can buy (or you > can easily make one yourself). On the DVD there is enough > space for everything. Agreed, but CDs still will be an option for a long time. And care must be taken for those users who don't need packages and don't want to download DVD. > It doesn't make sense to try to cram many things on a small > CD and sacrificing usability and convenience for some or > even many users. I think the current CD images are very > usable and convenient, especially in the way they save > download time and bandwidth. Not SO very :) > Typically, many users only need to download disc1 and then > install software from the ports collection, or install > packages from the network. I think only very few users > really need disk2 or disc3, or even the docs cd. > Unfortunately the download numbers from the FTP servers > don't say much, because many people blindly dowanload > everything. You again forget about advocacy, new users coming from other OSes and possibly comparing with some Linux distros. Imagine a review like this: "That SuSe or Debian are wonderful with great number of software instantly available and with this FreeBSD I must wait for download and then compile?! Such shit! Don't use it, if they can't do this, they can't do other usable things!" >>> I think there are more users who install packages than >>> users who want "fixit" on disk1. In other words, more >>> users benefit from the packages, and for most people it >>> seems to be OK to have "fixit" on a separate CD. >>> Those who want to have a combined install+fixit CD without >>> packages can easily make one themselves. Or even a DVD >>> with everything. Or buy one from one of the vendors who >>> sell FreeBSD DVDs. >> Yes, but: livefs and disc1 have many things in common, > No, they dont. The only thing they have in common is the > /boot directory, which is relatively small (about 30 MB). And what about at least shell and some other tools? This _can_ be combined, as previous releases have proven. >>> I'm also not sure that using bzip2 for the base install bits >>> would be a good idea. Decompression is a lot slower with >>> bzip2, especially on older machines. I remember someone >>> tried it and reported on the lists, it was like fife times >>> slower, but saved only a few percent space for the base >>> system (which is mostly binaries and already compressed >>> files, like manual pages). Not worth it. >> Really? Have benchmarks? If it is really hust a few percent, then it is not >> worth, of course. > I can't find the article right now, I'm afraid. :-( > When I have some time at the weekend, I might make a > little benchmark myself. Would be godd, I'll wait :) > (It's a well-known fact, though, that bzip2 is _much_ > slower than gzip, even in decompression.) Ive already agreed with this :) >>> You can't compress the docs CD that way, because then you >>> wouldn't be able to read them from another system. The >>> docs must not be compressed. >> >> Is it needed? > Yes! People need to be able to pop the docs CD into a > Windows machine, a Mac or anything else and read the docs. > The docs CD _must_ work without having to boot FreeBSD > in the first place. So, let it be available alone. But that's not sounts for duplicating docs on disc1... >> I think that ability to read docs directly from installer is much >> more handy. > You can already do that. How? How many?.. >>> As far as the live FS is concerned, yes, it might be >>> possible to compress it. The performance will be worse, >>> and I think it also requires more RAM, but it's certainly >>> something that could be done. Whether it's really worth >>> it is a different question. >> >> Performance will be not so worse. As someone said, 7.0 livefs can also do >> install, > Uhm, no. There's no such thing as an installer that > installs from the live FS (the DragonFly people have > something like that). > Of course, you can manually do the whole dance from the > live FS (fdisk, bsdlabel, newfs, cpio ...), but that's > definitely not for novice users. So, livefs still contains base system available for install, just as disc1 ? :) -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 07:47:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6063A106566C for ; Fri, 14 Mar 2008 07:47:44 +0000 (UTC) (envelope-from 5000700@mail.ru) Received: from relay.eltrast.ru (cl105-147-5-195.cl.metrocom.ru [195.5.147.105]) by mx1.freebsd.org (Postfix) with ESMTP id 34CDD8FC1A for ; Fri, 14 Mar 2008 07:47:44 +0000 (UTC) (envelope-from 5000700@mail.ru) Received: from 50.eltrast.ru (50.eltrast.ru [192.168.0.50]) by relay.eltrast.ru (Postfix) with ESMTP id DEDEB2B45F for ; Fri, 14 Mar 2008 10:22:32 +0300 (MSK) Date: Fri, 14 Mar 2008 10:19:39 +0300 From: Igor_Z <5000700@mail.ru> X-Mailer: The Bat! (v3.99.3) Professional Organization: R&C X-Priority: 3 (Normal) Message-ID: <305960225.20080314101939@mail.ru> To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 14 Mar 2008 11:36:02 +0000 Subject: Graphic boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Igor_Z <5000700@mail.ru> List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 07:47:44 -0000 =C7=E4=F0=E0=E2=F1=F2=E2=F3=E9=F2=E5, . Does anybody know something about graphic boot loader? I mean how to make this? I know that some guy is did it, but how? That is the question! =3D) --=20 =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC, Igor_Z mailto:5000700@mail.ru From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 12:04:53 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6F5E1065708 for ; Fri, 14 Mar 2008 12:04:53 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id A16FB8FC17 for ; Fri, 14 Mar 2008 12:04:53 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 64DD51CC06E; Fri, 14 Mar 2008 05:04:53 -0700 (PDT) Date: Fri, 14 Mar 2008 05:04:53 -0700 From: Jeremy Chadwick To: Igor_Z <5000700@mail.ru> Message-ID: <20080314120453.GA9740@eos.sc1.parodius.com> References: <305960225.20080314101939@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <305960225.20080314101939@mail.ru> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org Subject: Re: Graphic boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 12:04:56 -0000 On Fri, Mar 14, 2008 at 10:19:39AM +0300, Igor_Z wrote: > ????????????, . > > Does anybody know something about graphic boot loader? > I mean how to make this? > I know that some guy is did it, but how? That is the question! =) This is currently "in development", as I understand it. The individual working on it is Oliver Fromme . -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 12:30:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 778311065673 for ; Fri, 14 Mar 2008 12:30:13 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 042E18FC16 for ; Fri, 14 Mar 2008 12:30:12 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fg-out-1718.google.com with SMTP id 16so3389709fgg.35 for ; Fri, 14 Mar 2008 05:30:10 -0700 (PDT) Received: by 10.82.115.8 with SMTP id n8mr26075779buc.10.1205497810346; Fri, 14 Mar 2008 05:30:10 -0700 (PDT) Received: by 10.82.185.8 with HTTP; Fri, 14 Mar 2008 05:30:10 -0700 (PDT) Message-ID: Date: Fri, 14 Mar 2008 14:30:10 +0200 From: "Vlad GALU" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080307223723.X42870@fledge.watson.org> Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 12:30:13 -0000 On 3/8/08, Vlad GALU wrote: > On 3/8/08, Robert Watson wrote: > > On Fri, 7 Mar 2008, Vlad GALU wrote: > > > > > > > I see an unusual symptom with one of our in-house applications. The main I/O > > > loop calls kevent(), which in turn returns two events with EV_EOF error set, > > > always for the same descriptors (they're both socket descriptors). As the > > > man page is not pretty clear about it and I don't have my UNP copy at hand, > > > I would like to ask the list whether the error events are supposed to be > > > one-shot or not. > > > > > > I wonder if it's returning one event for the read socket buffer, and one event > > for the write socket buffer, since there are really two event sources for each > > socket? Not that this is desirable behavior, but it might explain it. If you > > shutdown() only read, do you get back one EOF kevent and one writable kevent? > > > I'll try that and see. The only issue being the low frequency this > symptom appears at. I'll get back to the list once I have more info. Haven't gotten to the point of testing shutdown() behavior, but here's a truss excerpt of the symptom: -- cut here -- kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) -- and here -- So two EOF are returrned for descriptor 7, and errno would be ECONNRESET. The question is now, why isn't it oneshot? > > > > > > Robert N M Watson > > Computer Laboratory > > University of Cambridge > > > > > > -- > Mahnahmahnah! > -- Mahnahmahnah! From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 12:53:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 762661065674 for ; Fri, 14 Mar 2008 12:53:41 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id 02CE78FC1E for ; Fri, 14 Mar 2008 12:53:40 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fg-out-1718.google.com with SMTP id 16so3396642fgg.35 for ; Fri, 14 Mar 2008 05:53:39 -0700 (PDT) Received: by 10.82.121.15 with SMTP id t15mr26485518buc.8.1205499219315; Fri, 14 Mar 2008 05:53:39 -0700 (PDT) Received: by 10.82.185.8 with HTTP; Fri, 14 Mar 2008 05:53:39 -0700 (PDT) Message-ID: Date: Fri, 14 Mar 2008 14:53:39 +0200 From: "Vlad GALU" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080307223723.X42870@fledge.watson.org> Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 12:53:41 -0000 On 3/14/08, Vlad GALU wrote: > On 3/8/08, Vlad GALU wrote: > > On 3/8/08, Robert Watson wrote: > > > On Fri, 7 Mar 2008, Vlad GALU wrote: > > > > > > > > > > I see an unusual symptom with one of our in-house applications. The main I/O > > > > loop calls kevent(), which in turn returns two events with EV_EOF error set, > > > > always for the same descriptors (they're both socket descriptors). As the > > > > man page is not pretty clear about it and I don't have my UNP copy at hand, > > > > I would like to ask the list whether the error events are supposed to be > > > > one-shot or not. > > > > > > > > > I wonder if it's returning one event for the read socket buffer, and one event > > > for the write socket buffer, since there are really two event sources for each > > > socket? Not that this is desirable behavior, but it might explain it. If you > > > shutdown() only read, do you get back one EOF kevent and one writable kevent? > > > > > > I'll try that and see. The only issue being the low frequency this > > symptom appears at. I'll get back to the list once I have more info. > > > Haven't gotten to the point of testing shutdown() behavior, but > here's a truss excerpt of the symptom: > > -- cut here -- > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 > 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > -- and here -- > > So two EOF are returrned for descriptor 7, and errno would be > ECONNRESET. The question is now, why isn't it oneshot? Ah one more thing. When EOF is caught, a handler which forcibly removes the event is called, but it keeps poping up again and again. > > > > > > > > > > > > Robert N M Watson > > > Computer Laboratory > > > University of Cambridge > > > > > > > > > > > -- > > Mahnahmahnah! > > > > > > -- > Mahnahmahnah! > -- Mahnahmahnah! From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 16:02:03 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F870106566B for ; Fri, 14 Mar 2008 16:02:03 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 3E03D8FC2C for ; Fri, 14 Mar 2008 16:02:03 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.2/8.14.2) id m2EFc14n048462; Fri, 14 Mar 2008 10:38:01 -0500 (CDT) (envelope-from dan) Date: Fri, 14 Mar 2008 10:38:01 -0500 From: Dan Nelson To: Vlad GALU Message-ID: <20080314153801.GB30116@dan.emsphone.com> References: <20080307223723.X42870@fledge.watson.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 16:02:03 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In the last episode (Mar 14), Vlad GALU said: > On 3/14/08, Vlad GALU wrote: > > On 3/8/08, Vlad GALU wrote: > > > On 3/8/08, Robert Watson wrote: > > > > On Fri, 7 Mar 2008, Vlad GALU wrote: > > > > > I see an unusual symptom with one of our in-house > > > > > applications. The main I/O loop calls kevent(), which in turn > > > > > returns two events with EV_EOF error set, always for the same > > > > > descriptors (they're both socket descriptors). As the man > > > > > page is not pretty clear about it and I don't have my UNP > > > > > copy at hand, I would like to ask the list whether the error > > > > > events are supposed to be one-shot or not. > > > > > > > > I wonder if it's returning one event for the read socket > > > > buffer, and one event for the write socket buffer, since there > > > > are really two event sources for each socket? Not that this > > > > is desirable behavior, but it might explain it. If you > > > > shutdown() only read, do you get back one EOF kevent and one > > > > writable kevent? > > > > > > I'll try that and see. The only issue being the low frequency > > > this symptom appears at. I'll get back to the list once I have > > > more info. > > > > Haven't gotten to the point of testing shutdown() behavior, but > > here's a truss excerpt of the symptom: > > > > -- cut here -- > > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > > -- and here -- > > > > So two EOF are returrned for descriptor 7, and errno would be > > ECONNRESET. The question is now, why isn't it oneshot? > > Ah one more thing. When EOF is caught, a handler which forcibly > removes the event is called, but it keeps poping up again and again. Are you sure the event is being removed? I used to have a hack that made the kernel return its current eventlist for a kqueue when you called kevent() with nchanges set to -1 (handy for placing in a program and using truss to print the result), but it has rotted. I'm attaching it in case anyone wants to make it work again. Since you got EOF status for both the read and write halves of the socket, why not just close the fd? From my reading of the manpages, unless you specified EV_ONESHOT when you added the event, events will fire until you remove them or the condition that triggers them stops. -- Dan Nelson dnelson@allantgroup.com --DocE+STaALJfprDB Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="kern_kevent.c.diff" Index: kern_event.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_event.c,v retrieving revision 1.113 diff -u -r1.113 kern_event.c --- kern_event.c 14 Jul 2007 21:23:30 -0000 1.113 +++ kern_event.c 17 Jul 2007 18:10:47 -0000 @@ -659,6 +659,41 @@ nerrors = 0; +#if 0 /* 1.92 broke this */ + if (nchanges == -1) { + /* dump our eventlist into k_ops->arg */ + int i; + int count = 0; + struct knote *kn; + error = 0; + KQ_LOCK(kq); + + /* Walk our filedescriptor lists */ + for (i = 0; i < kq->kq_knlistsize && count < nevents; i++) { + SLIST_FOREACH(kn, &kq->kq_knlist[i], kn_link) { + copyout(&kn->kn_kevent, &(struct kevent)k_ops->arg[count], sizeof(kn->kn_kevent)); + count++; + if (count >= nevents) + break; + } + } + + /* Walk our hash tables */ + if (kq->kq_knhashmask != 0) { + for (i = 0; i <= kq->kq_knhashmask && count < nevents; i++) { + SLIST_FOREACH(kn, &kq->kq_knhash[i], kn_link) { + copyout(&kn->kn_kevent, &(struct kevent)k_ops->arg[count], sizeof(kn->kn_kevent)); + count++; + if (count >= nevents) + break; + } + } + } + KQ_UNLOCK(kq); + td->td_retval[0] = count; + goto done; + } +#endif while (nchanges > 0) { n = nchanges > KQ_NEVENTS ? KQ_NEVENTS : nchanges; error = k_ops->k_copyin(k_ops->arg, keva, n); @@ -961,10 +996,12 @@ if ((kev->flags & EV_DISABLE) && ((kn->kn_status & KN_DISABLED) == 0)) { kn->kn_status |= KN_DISABLED; + kn->kn_kevent.flags |= EV_DISABLE; } if ((kev->flags & EV_ENABLE) && (kn->kn_status & KN_DISABLED)) { kn->kn_status &= ~KN_DISABLED; + kn->kn_kevent.flags &= ~EV_DISABLE; if ((kn->kn_status & KN_ACTIVE) && ((kn->kn_status & KN_QUEUED) == 0)) knote_enqueue(kn); --DocE+STaALJfprDB-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 16:05:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2F8810656A6 for ; Fri, 14 Mar 2008 16:05:28 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.186]) by mx1.freebsd.org (Postfix) with ESMTP id 75CCE8FC13 for ; Fri, 14 Mar 2008 16:05:28 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fk-out-0910.google.com with SMTP id b27so4796221fka.11 for ; Fri, 14 Mar 2008 09:05:27 -0700 (PDT) Received: by 10.82.155.10 with SMTP id c10mr193547bue.7.1205510726745; Fri, 14 Mar 2008 09:05:26 -0700 (PDT) Received: by 10.82.185.8 with HTTP; Fri, 14 Mar 2008 09:05:26 -0700 (PDT) Message-ID: Date: Fri, 14 Mar 2008 18:05:26 +0200 From: "Vlad GALU" To: "Dan Nelson" In-Reply-To: <20080314153801.GB30116@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080307223723.X42870@fledge.watson.org> <20080314153801.GB30116@dan.emsphone.com> Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 16:05:29 -0000 On 3/14/08, Dan Nelson wrote: > In the last episode (Mar 14), Vlad GALU said: > > On 3/14/08, Vlad GALU wrote: > > > On 3/8/08, Vlad GALU wrote: > > > > On 3/8/08, Robert Watson wrote: > > > > > On Fri, 7 Mar 2008, Vlad GALU wrote: > > > > > > I see an unusual symptom with one of our in-house > > > > > > applications. The main I/O loop calls kevent(), which in turn > > > > > > returns two events with EV_EOF error set, always for the same > > > > > > descriptors (they're both socket descriptors). As the man > > > > > > page is not pretty clear about it and I don't have my UNP > > > > > > copy at hand, I would like to ask the list whether the error > > > > > > events are supposed to be one-shot or not. > > > > > > > > > > I wonder if it's returning one event for the read socket > > > > > buffer, and one event for the write socket buffer, since there > > > > > are really two event sources for each socket? Not that this > > > > > is desirable behavior, but it might explain it. If you > > > > > shutdown() only read, do you get back one EOF kevent and one > > > > > writable kevent? > > > > > > > > I'll try that and see. The only issue being the low frequency > > > > this symptom appears at. I'll get back to the list once I have > > > > more info. > > > > > > Haven't gotten to the point of testing shutdown() behavior, but > > > here's a truss excerpt of the symptom: > > > > > > -- cut here -- > > > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > > > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > > > kevent(3,0x0,0,{0x7,EVFILT_WRITE,EV_EOF,54,0x832c,0x800d08080 0x7,EVFILT_READ,EV_EOF,54,0x2a,0x800d08080},1024,0x0) = 2 (0x2) > > > > -- and here -- > > > > > > So two EOF are returrned for descriptor 7, and errno would be > > > ECONNRESET. The question is now, why isn't it oneshot? > > > > Ah one more thing. When EOF is caught, a handler which forcibly > > removes the event is called, but it keeps poping up again and again. > > > Are you sure the event is being removed? I used to have a hack that > made the kernel return its current eventlist for a kqueue when you > called kevent() with nchanges set to -1 (handy for placing in a program > and using truss to print the result), but it has rotted. I'm attaching > it in case anyone wants to make it work again. > Yep, I'm sure, I've just read the app logs again, we close the descriptor in the connection destructor.. > Since you got EOF status for both the read and write halves of the > socket, why not just close the fd? From my reading of the manpages, > unless you specified EV_ONESHOT when you added the event, events will > fire until you remove them or the condition that triggers them stops. > > > -- > Dan Nelson > dnelson@allantgroup.com > > -- Mahnahmahnah! From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 21:45:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D4891065670 for ; Fri, 14 Mar 2008 21:45:00 +0000 (UTC) (envelope-from kayve@sfsu.edu) Received: from iron1.sfsu.edu (iron1.sfsu.edu [130.212.10.35]) by mx1.freebsd.org (Postfix) with ESMTP id 558C88FC13 for ; Fri, 14 Mar 2008 21:45:00 +0000 (UTC) (envelope-from kayve@sfsu.edu) X-onepass: IPPSC X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAICO2keC1Apk/2dsb2JhbACqBQ Received: from smtp01.sfsu.edu ([130.212.10.100]) by iron1.sfsu.edu with ESMTP; 14 Mar 2008 14:44:59 -0700 Received: from libra.sfsu.edu ([130.212.10.238]) by mail05a.sfsu.edu (Lotus Domino Release 7.0.3HF378) with ESMTP id 2008031414445831-613 ; Fri, 14 Mar 2008 14:44:58 -0700 Date: Fri, 14 Mar 2008 14:44:58 -0700 (PDT) From: KAYVEN RIESE To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on MAIL05a/SERVERS/SFSU(Release 7.0.3HF378 | February 28, 2008) at 03/14/2008 14:44:58, Serialize by Router on SMTP01/SERVERS/SFSU(Release 7.0.3HF378 | February 28, 2008) at 03/14/2008 14:44:59, Serialize complete at 03/14/2008 14:44:59 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freeBSD hardware list Subject: Failure to Project OOImpress X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 21:45:00 -0000 Couldn't connect to projector for presentation. I was supposed to give a class presentation and we tried to hook my computer into the 15 pin female joint (sorry I forget what it is called three rows of 5 pins each on the computer, hooking to 15 pins on the wire) that I guess is usually a monitor connector. The professor kept saying "hit function-f8" but that didn't go. I am running gnome on freeBSD [kayve@kv_bsd ~]$ uname -a FreeBSD kv_bsd 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 [kayve@kv_bsd ~]$ He said it was all about BIOS, but we were trying to hit func-f8 during gnome running, so I thought I would get a second opinion. Here is a link with pictures of the model decal: http://www.monkeyview.net/id/965/fsck/dmesg/index.vhtml *----------------------------------------------------------* Kayven Riese, BSCS, MS (Physiology and Biophysics) (415) 902 5513 cellular http://kayve.net Webmaster http://ChessYoga.org *----------------------------------------------------------* From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 14 23:45:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05046106567A for ; Fri, 14 Mar 2008 23:45:02 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by mx1.freebsd.org (Postfix) with ESMTP id B60128FC2B for ; Fri, 14 Mar 2008 23:45:01 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by scruffy.exit2shell.com (8.14.1/8.14.1) with ESMTP id m2ENE5Sn004812 for ; Fri, 14 Mar 2008 19:14:10 -0400 (EDT) (envelope-from skreuzer@scruffy.exit2shell.com) Received: (from skreuzer@localhost) by scruffy.exit2shell.com (8.14.1/8.14.1/Submit) id m2ENE4aE004811 for freebsd-hackers@freebsd.org; Fri, 14 Mar 2008 19:14:04 -0400 (EDT) (envelope-from skreuzer) Date: Fri, 14 Mar 2008 19:14:04 -0400 From: Steven Kreuzer To: freebsd-hackers@freebsd.org Message-ID: <20080314231404.GB99765@scruffy.exit2shell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: OpenBSD sdiff Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 23:45:02 -0000 Greetings- I am currently working on replacing the GNU version of sdiff with a version of sdiff that was released into the public domain and is used in OpenBSD Xin LI has been guiding me along with the project and he suggested I post here to see what you guys think. I achieve 100% compatability with the GNU version, I need to add -v/--version and the issue I ran into is that since this program would become part of the base os, what exactly should be displayed. My idea is to simply print __FreeBSD_version but I am open to other suggestions. For reference: $ sdiff -v sdiff (GNU diffutils) 2.8.7 Written by Thomas Lord. Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. And my port from OpenBSD: $ ./sdiff -v sdiff (BSD diffutils) 602111 Written by Raymond Lai. This work has been released into the public domain. -- Steven Kreuzer http://www.exit2shell.com/~skreuzer From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 03:08:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA87B1065671 for ; Sat, 15 Mar 2008 03:08:51 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.175]) by mx1.freebsd.org (Postfix) with ESMTP id 712AF8FC15 for ; Sat, 15 Mar 2008 03:08:51 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by wf-out-1314.google.com with SMTP id 25so4224497wfa.7 for ; Fri, 14 Mar 2008 20:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=zW5jrxLXBFpE5Fp7pH1c1sSIRSIjHmuizspgkFBvZK0=; b=MyybGLHbahg2Md5CgNf+xUJlqFtVWxPWfqWSGtxgHULjdWVuxinZi1SjK+3B7WgCKVHTJ4fISw/UagzfdziU/gDCWZ2S0G4TlIvXapEoA1fnZzh4ukCuFKMcwago+G7LncOEZkfUkkN4gx/MPWKyR6X7jUWbFLAxYRf6hgCF+jw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=L2LOYL8qmVl9GtCLrnsV5eUEWltrMWxX0t/jESdblxL4tSfOsLP1Dxfr74BCFODOpavr2M4paBffLmF5OkHoIGK0/V7epqBw4V2kXQd04tOV28llemYxEV2M63APfaDEIVb1oLgPKBU5QovkscR9MJjsca0qqnfJXgjXMlApk9g= Received: by 10.142.131.18 with SMTP id e18mr5427174wfd.207.1205549052093; Fri, 14 Mar 2008 19:44:12 -0700 (PDT) Received: by 10.142.178.11 with HTTP; Fri, 14 Mar 2008 19:44:12 -0700 (PDT) Message-ID: <3a142e750803141944y390fb3aai9263bb4c0bcb2104@mail.gmail.com> Date: Sat, 15 Mar 2008 03:44:12 +0100 From: "Paul B. Mahol" To: "KAYVEN RIESE" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org, freeBSD hardware list Subject: Re: Failure to Project OOImpress X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 03:08:51 -0000 Was it connected prior or after Xorg startup? On 3/14/08, KAYVEN RIESE wrote: > > > Couldn't connect to projector for presentation. > > I was supposed to give a class presentation and we tried to hook > my computer into the 15 pin female joint (sorry I forget what it is > called three rows of 5 pins each on the computer, hooking to 15 pins > on the wire) that I guess is usually a monitor connector. The professor > kept saying "hit function-f8" but that didn't go. > > I am running gnome on freeBSD > > [kayve@kv_bsd ~]$ uname -a > FreeBSD kv_bsd 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC > 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 > [kayve@kv_bsd ~]$ > > > He said it was all about BIOS, but we were trying to hit func-f8 during > gnome running, so I thought > I would get a second opinion. > > Here is a link with pictures of the model decal: > > http://www.monkeyview.net/id/965/fsck/dmesg/index.vhtml > > *----------------------------------------------------------* > Kayven Riese, BSCS, MS (Physiology and Biophysics) > (415) 902 5513 cellular > http://kayve.net > Webmaster http://ChessYoga.org > *----------------------------------------------------------* > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 06:56:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9B3F1065671 for ; Sat, 15 Mar 2008 06:56:51 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 6C54F8FC24 for ; Sat, 15 Mar 2008 06:56:51 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so4920440waf.3 for ; Fri, 14 Mar 2008 23:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=fuwRZfljiXaPrCaaDaazdCmug8h3KFunMhwhUeROpho=; b=UZJ+7CdvFyW6/4Wz3oNPvcfagueT3s/ts0oHlq+zbNrBj6tOA6WNAbjjUr2iNWFxtrv855o/8jRmWrEOkYwUB4+LG5seiRZxBgqb5iAt2etTOwZZacfF/0fidtXxrRXsn6CE/EnNpA3GQdPpV97c8GXSQbHWDcLvMSZ43HnbrT8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=Fv7X2C0/YEJOGvBByYtAlweGrgycF8py66wRtLUtiREHxqN+RMLfoY7/Za/LowZzs4Ayku4Lg9cCWiLGxUWanBVnaiZLPbGCdbYivFN+1+AN150r91UuSCmZWg6gbBvNCc9D9XUHXjkf+fO0nvbULCmaXsIvEsMTtfS8FqPws2Y= Received: by 10.114.151.13 with SMTP id y13mr13256956wad.145.1205562480252; Fri, 14 Mar 2008 23:28:00 -0700 (PDT) Received: from ?192.168.10.43? ( [99.151.254.141]) by mx.google.com with ESMTPS id m40sm10082717wag.0.2008.03.14.23.27.58 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Mar 2008 23:27:59 -0700 (PDT) Message-Id: From: Garrett Cooper To: Steven Kreuzer In-Reply-To: <20080314231404.GB99765@scruffy.exit2shell.com> 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: Fri, 14 Mar 2008 23:27:54 -0700 References: <20080314231404.GB99765@scruffy.exit2shell.com> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-hackers@freebsd.org Subject: Re: OpenBSD sdiff Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 06:56:51 -0000 On Mar 14, 2008, at 4:14 PM, Steven Kreuzer wrote: > Greetings- > > I am currently working on replacing the GNU version of sdiff with a > version > of sdiff that was released into the public domain and is used in > OpenBSD > > Xin LI has been guiding me along with the project and he suggested I > post > here to see what you guys think. > > I achieve 100% compatability with the GNU version, I need to add > -v/--version and the issue I ran into is that since this program would > become part of the base os, what exactly should be displayed. > > My idea is to simply print __FreeBSD_version but I am open to other > suggestions. > > For reference: > $ sdiff -v > sdiff (GNU diffutils) 2.8.7 > Written by Thomas Lord. > > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There > is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > And my port from OpenBSD: > $ ./sdiff -v > sdiff (BSD diffutils) 602111 > Written by Raymond Lai. > > This work has been released into the public domain. > > -- > Steven Kreuzer > http://www.exit2shell.com/~skreuzer Keeping the generic BSD diffutils version string might be wiser as autoconf and friends will be better able to pick up on the version and features available, etc, unless you plan on doing something non- standard with your version (i.e. remove features, add others, etc). My 2 cents. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 13:28:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0A14106564A for ; Sat, 15 Mar 2008 13:28:13 +0000 (UTC) (envelope-from jgordeev@dir.bg) Received: from dir.bg (mail.dir.bg [194.145.63.28]) by mx1.freebsd.org (Postfix) with ESMTP id 6FBB18FC27 for ; Sat, 15 Mar 2008 13:28:12 +0000 (UTC) (envelope-from jgordeev@dir.bg) Received: from [78.90.113.14] (account jgordeev@dir.bg [78.90.113.14] verified) by srv.dir.bg (CommuniGate Pro SMTP 5.2.0) with ESMTPSA id 28927885 for freebsd-hackers@freebsd.org; Sat, 15 Mar 2008 14:58:10 +0200 Message-ID: <47DBC800.8030601@dir.bg> Date: Sat, 15 Mar 2008 14:58:40 +0200 From: Jordan Gordeev User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20070606 X-Accept-Language: bg, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: vkernel & GSoC, some questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 13:28:14 -0000 Hello! I am a student who considers applying for Google's Summer of Code programme. One of my ideas for a GSoC project has the following synopsis: Add virtual kernel (vkernel) support to FreeBSD for the i386 and amd64 architectures. The vkernel support in question is the one found in DragonFlyBSD. I wonder if vkernel support would have its place among the myriad of virtualisation technologies, and if it would aid kernel hackers in their kernel development work. I also wonder if anybody would be interested in mentoring this. From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 13:59:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 752C2106564A for ; Sat, 15 Mar 2008 13:59:20 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 2DB0E8FC23 for ; Sat, 15 Mar 2008 13:59:19 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from [78.110.49.49] (helo=quasar.ht-systems.ru) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1JaWur-0003H1-Ba; Sat, 15 Mar 2008 16:59:17 +0300 Received: by quasar.ht-systems.ru (Postfix, from userid 1024) id 481D67D1125; Sat, 15 Mar 2008 16:59:16 +0300 (MSK) Date: Sat, 15 Mar 2008 16:59:16 +0300 From: Stanislav Sedov To: Steven Kreuzer Message-ID: <20080315135916.GH68662@dracon.ht-systems.ru> References: <20080314231404.GB99765@scruffy.exit2shell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080314231404.GB99765@scruffy.exit2shell.com> Organization: The FreeBSD Project X-Voice: +7 916 849 20 23 X-XMPP: ssedov@jabber.ru X-Yahoo: stanislav_sedov X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-University: MEPhI X-Mailer: carrier-pigeon X-Operating-System: FreeBSD quasar.ht-systems.ru 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE Cc: freebsd-hackers@freebsd.org Subject: Re: OpenBSD sdiff Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 13:59:20 -0000 On Fri, Mar 14, 2008 at 07:14:04PM -0400 Steven Kreuzer mentioned: > Greetings- > > I am currently working on replacing the GNU version of sdiff with a version > of sdiff that was released into the public domain and is used in OpenBSD > > Xin LI has been guiding me along with the project and he suggested I post > here to see what you guys think. > > I achieve 100% compatability with the GNU version, I need to add > -v/--version and the issue I ran into is that since this program would > become part of the base os, what exactly should be displayed. > > My idea is to simply print __FreeBSD_version but I am open to other > suggestions. > > For reference: > $ sdiff -v > sdiff (GNU diffutils) 2.8.7 > Written by Thomas Lord. > > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > And my port from OpenBSD: > $ ./sdiff -v > sdiff (BSD diffutils) 602111 > Written by Raymond Lai. > > This work has been released into the public domain. > Do we really need to display program version on -v switch? BSD has no tradition to keep separate program version, it's just a part of an entire OS. I believe we might just abandone this switch. -- Stanislav Sedov ST4096-RIPE From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 19:51:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EFF21065672; Sat, 15 Mar 2008 19:51:55 +0000 (UTC) (envelope-from kayve@sfsu.edu) Received: from iron1.sfsu.edu (iron1.sfsu.edu [130.212.10.35]) by mx1.freebsd.org (Postfix) with ESMTP id 9B9CF8FC1B; Sat, 15 Mar 2008 19:51:55 +0000 (UTC) (envelope-from kayve@sfsu.edu) X-onepass: IPPSC X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAM/E20eC1Apk/2dsb2JhbACncg Received: from smtp01.sfsu.edu ([130.212.10.100]) by iron1.sfsu.edu with ESMTP; 15 Mar 2008 12:51:55 -0700 Received: from libra.sfsu.edu ([130.212.10.238]) by mail05a.sfsu.edu (Lotus Domino Release 7.0.3HF378) with ESMTP id 2008031512515369-651 ; Sat, 15 Mar 2008 12:51:53 -0700 Date: Sat, 15 Mar 2008 12:51:53 -0700 (PDT) From: KAYVEN RIESE To: "Paul B. Mahol" In-Reply-To: <3a142e750803141944y390fb3aai9263bb4c0bcb2104@mail.gmail.com> Message-ID: References: <3a142e750803141944y390fb3aai9263bb4c0bcb2104@mail.gmail.com> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on MAIL05a/SERVERS/SFSU(Release 7.0.3HF378 | February 28, 2008) at 03/15/2008 12:51:53, Serialize by Router on SMTP01/SERVERS/SFSU(Release 7.0.3HF378 | February 28, 2008) at 03/15/2008 12:51:54, Serialize complete at 03/15/2008 12:51:54 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, freeBSD hardware list Subject: Re: Failure to Project OOImpress X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 19:51:55 -0000 On Sat, 15 Mar 2008, Paul B. Mahol wrote: > Was it connected prior or after Xorg startup? I think we connected prior. Should we have? I had my computer turned off, and I booted it up. The projector was on during boot. I thought the boot process would take care of it but it didn't. > > On 3/14/08, KAYVEN RIESE wrote: >> >> >> Couldn't connect to projector for presentation. >> >> I was supposed to give a class presentation and we tried to hook >> my computer into the 15 pin female joint (sorry I forget what it is >> called three rows of 5 pins each on the computer, hooking to 15 pins >> on the wire) that I guess is usually a monitor connector. The professor >> kept saying "hit function-f8" but that didn't go. >> >> I am running gnome on freeBSD >> >> [kayve@kv_bsd ~]$ uname -a >> FreeBSD kv_bsd 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC >> 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >> [kayve@kv_bsd ~]$ >> >> >> He said it was all about BIOS, but we were trying to hit func-f8 during >> gnome running, so I thought >> I would get a second opinion. >> >> Here is a link with pictures of the model decal: >> >> http://www.monkeyview.net/id/965/fsck/dmesg/index.vhtml >> >> *----------------------------------------------------------* >> Kayven Riese, BSCS, MS (Physiology and Biophysics) >> (415) 902 5513 cellular >> http://kayve.net >> Webmaster http://ChessYoga.org >> *----------------------------------------------------------* >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >> > *----------------------------------------------------------* Kayven Riese, BSCS, MS (Physiology and Biophysics) (415) 902 5513 cellular http://kayve.net Webmaster http://ChessYoga.org *----------------------------------------------------------* From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 22:21:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A778F1065671 for ; Sat, 15 Mar 2008 22:21:02 +0000 (UTC) (envelope-from xistence@0x58.com) Received: from mailexchange.osnn.net (1e.66.5646.static.theplanet.com [70.86.102.30]) by mx1.freebsd.org (Postfix) with SMTP id 7C88A8FC19 for ; Sat, 15 Mar 2008 22:21:02 +0000 (UTC) (envelope-from xistence@0x58.com) Received: (qmail 86379 invoked by uid 0); 15 Mar 2008 22:21:01 -0000 Received: from unknown (HELO wideload.network.lan) (xistence@0x58.com@68.228.228.123) by mailexchange.osnn.net with SMTP; 15 Mar 2008 22:21:01 -0000 Message-Id: <432044E0-812E-4C13-A62D-EEA7170DADB9@0x58.com> From: Bert JW Regeer To: Stanislav Sedov In-Reply-To: <20080315135916.GH68662@dracon.ht-systems.ru> Content-Type: multipart/signed; boundary=Apple-Mail-2--320804957; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sat, 15 Mar 2008 15:21:01 -0700 References: <20080314231404.GB99765@scruffy.exit2shell.com> <20080315135916.GH68662@dracon.ht-systems.ru> X-Mailer: Apple Mail (2.919.2) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers , Steven Kreuzer Subject: Re: OpenBSD sdiff Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 22:21:02 -0000 --Apple-Mail-2--320804957 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Mar 15, 2008, at 06:59 , Stanislav Sedov wrote: > On Fri, Mar 14, 2008 at 07:14:04PM -0400 Steven Kreuzer mentioned: >> [...] >> >> For reference: >> $ sdiff -v >> sdiff (GNU diffutils) 2.8.7 >> Written by Thomas Lord. >> >> Copyright (C) 2004 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. >> There is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> >> And my port from OpenBSD: >> $ ./sdiff -v >> sdiff (BSD diffutils) 602111 >> Written by Raymond Lai. >> >> This work has been released into the public domain. >> > > Do we really need to display program version on -v switch? BSD has no > tradition to keep separate program version, it's just a part of an > entire OS. I believe we might just abandone this switch. > > -- > Stanislav Sedov > ST4096-RIPE Even if BSD has no tradition to keep a separate program version, it is still very handy to be able to give this data to other developers if something is failing. Programs that don't have a -v or --version switch are frustrating to people who are trying to find a workaround for a bug that is in that program, or when looking at documentation online, when the documentation is for one version and not for a newer version. It is a lot like uname on Linux not displaying what distribution it is running, making it harder to quickly figure out where stuff is located. Dropping -v would be a bad thing, and make the tools not compatible, thus breaking many scripts that do expect a -v. Bert JW Regeer p.s. Sorry Stan about the double email. I replied to your privately first, and then noticed my mistake. --Apple-Mail-2--320804957-- From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 23:05:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE5C7106566B for ; Sat, 15 Mar 2008 23:05:33 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 548FC8FC18 for ; Sat, 15 Mar 2008 23:05:33 +0000 (UTC) (envelope-from max@love2party.net) Received: from amd64.laiers.local (dslb-088-066-008-052.pools.arcor-ip.net [88.66.8.52]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis) id 0MKwtQ-1JafRS0m6j-0007pZ; Sun, 16 Mar 2008 00:05:32 +0100 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sun, 16 Mar 2008 00:05:36 +0100 User-Agent: KMail/1.9.7 X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<%}*_BD U_or=\mOZf764&nYj=JYbR1PW0ud>|!~, , CPC.1-D$FG@0h3#'5"k{V]a~. X-Provags-ID: V01U2FsdGVkX1/KagC/zRPsqxXj9e3tbO0wLA+Y5QjexV7cw5X I58YrUzWZTP3X/UJyKCMZoIGnrQAPb3oEHfbnHZPzSxAmgZb5S 8qP4L9IKI266c9c4g3zqJ5K18yC8nADjkZEsoeLEvg= Subject: Review please: pfil FIRST/LAST X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 23:05:33 -0000 --nextPart3260259.LKNuToB0ym Content-Type: multipart/mixed; boundary="Boundary-01=_AZF3H42vZy1W3mH" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_AZF3H42vZy1W3mH Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, attached is a small diff to allow pfil(9) consumers to force a sticky=20 position on the head/tail of the processing queue. This can be used to=20 do traffic conditioning kind of tasks w/o disturbing the other filters. =20 I will need this to implement carp(4) ip based load balancing. While=20 here I also removed a few paragraphs in BUGS which are no longer true=20 (since we are using rmlocks for pfil(9)). I'd appreciate review of the logic in pfil_list_add - just to make sure I=20 didn't botch it. Thanks. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_AZF3H42vZy1W3mH Content-Type: text/x-diff; charset="us-ascii"; name="pfil_FIRST_LAST.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pfil_FIRST_LAST.diff" Index: sys/net/pfil.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/pfil.c,v retrieving revision 1.15 diff -u -r1.15 pfil.c =2D-- sys/net/pfil.c 25 Nov 2007 12:41:47 -0000 1.15 +++ sys/net/pfil.c 15 Mar 2008 22:35:50 -0000 @@ -182,6 +182,9 @@ struct packet_filter_hook *pfh2 =3D NULL; int err; =20 + if ((flags & (PFIL_FIRST|PFIL_LAST)) =3D=3D (PFIL_FIRST|PFIL_LAST)) + return (EDOOFUS); + /* Get memory */ if (flags & PFIL_IN) { pfh1 =3D (struct packet_filter_hook *)malloc(sizeof(*pfh1),=20 @@ -267,23 +270,50 @@ static int pfil_list_add(pfil_list_t *list, struct packet_filter_hook *pfh1, int flag= s) { =2D struct packet_filter_hook *pfh; + struct packet_filter_hook *pfh, *fh, *lh; =20 /* * First make sure the hook is not already there. */ =2D TAILQ_FOREACH(pfh, list, pfil_link) + fh =3D TAILQ_FIRST(list); + lh =3D NULL; + TAILQ_FOREACH(pfh, list, pfil_link) { + /* fh is the first hook not marked PFIL_FIRST */ + if (pfh->pfil_flags & PFIL_FIRST) + fh =3D TAILQ_NEXT(pfh, pfil_link); + /* lh ist the last hook not marked PFIL_LAST */ + if (!(pfh->pfil_flags & PFIL_LAST)) + lh =3D pfh; if (pfh->pfil_func =3D=3D pfh1->pfil_func && pfh->pfil_arg =3D=3D pfh1->pfil_arg) return EEXIST; + } + /* * insert the input list in reverse order of the output list * so that the same path is followed in or out of the kernel. */ =2D if (flags & PFIL_IN) + if (flags & PFIL_FIRST) { TAILQ_INSERT_HEAD(list, pfh1, pfil_link); =2D else + } else if (flags & PFIL_LAST) { TAILQ_INSERT_TAIL(list, pfh1, pfil_link); + } else { + if (flags & PFIL_IN) { + if (fh) + TAILQ_INSERT_BEFORE(fh, pfh1, pfil_link); + else if (!TAILQ_EMPTY(list)) + TAILQ_INSERT_TAIL(list, pfh1, pfil_link); + else + TAILQ_INSERT_HEAD(list, pfh1, pfil_link); + } else { + if (lh) + TAILQ_INSERT_AFTER(list, lh, pfh1, pfil_link); + else if (!TAILQ_EMPTY(list)) + TAILQ_INSERT_HEAD(list, pfh1, pfil_link); + else + TAILQ_INSERT_TAIL(list, pfh1, pfil_link); + } + } =20 return 0; } Index: sys/net/pfil.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/pfil.h,v retrieving revision 1.17 diff -u -r1.17 pfil.h =2D-- sys/net/pfil.h 25 Nov 2007 12:41:47 -0000 1.17 +++ sys/net/pfil.h 15 Mar 2008 22:34:44 -0000 @@ -54,10 +54,12 @@ int pfil_flags; }; =20 =2D#define PFIL_IN 0x00000001 =2D#define PFIL_OUT 0x00000002 =2D#define PFIL_WAITOK 0x00000004 =2D#define PFIL_ALL (PFIL_IN|PFIL_OUT) +#define PFIL_IN (1<<0) +#define PFIL_OUT (1<<2) +#define PFIL_WAITOK (1<<3) +#define PFIL_ALL (PFIL_IN|PFIL_OUT) +#define PFIL_FIRST (1<<4) +#define PFIL_LAST (1<<5) =20 typedef TAILQ_HEAD(pfil_list, packet_filter_hook) pfil_list_t; =20 Index: share/man/man9/pfil.9 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/share/man/man9/pfil.9,v retrieving revision 1.22 diff -u -r1.22 pfil.9 =2D-- share/man/man9/pfil.9 18 Sep 2006 15:24:20 -0000 1.22 +++ share/man/man9/pfil.9 15 Mar 2008 22:50:48 -0000 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD: src/share/man/man9/pfil.9,v 1.22 2006/09/18 15:24:20 ru Exp $ .\" =2D.Dd September 29, 2004 +.Dd March 15, 2008 .Dt PFIL 9 .Os .Sh NAME @@ -115,6 +115,11 @@ or .Dv PFIL_OUT ) that the packet is traveling. +.Dv PFIL_FIRST +and +.Dv PFIL_LAST +can be used to force a sticky positioning of the hook in the front or the +tail of the processing queue respectively. The filter may change which mbuf the .Vt "mbuf\ **" argument references. @@ -134,15 +139,6 @@ .Fn pfil_remove_hook functions return 0 if successful. =2DIf called with flag =2D.Dv PFIL_WAITOK , =2D.Fn pfil_remove_hook =2Dis expected to always succeed. =2D.Pp =2DThe =2D.Fn pfil_head_unregister =2Dfunction =2Dmight sleep! .Sh SEE ALSO .Xr bpf 4 , .Xr if_bridge 4 @@ -203,14 +199,3 @@ .Dv AF_INET6 traffic according to its sysctl settings, but contrary to the above statements, the data is provided in host byte order. =2D.Pp =2DWhen a =2D.Vt pfil_head =2Dis being modified, no traffic is diverted =2D(to avoid deadlock). =2DThis means that traffic may be dropped unconditionally for a short period =2Dof time. =2D.Fn pfil_run_hooks =2Dwill return =2D.Er ENOBUFS =2Dto indicate this. --Boundary-01=_AZF3H42vZy1W3mH-- --nextPart3260259.LKNuToB0ym Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBH3FZJXyyEoT62BG0RAulNAJ4nREpIJr8Ykor+QHlv1jmBSTN8EACfZDzr 1QWjz4gk8YD3PS0TJ6Rv6zw= =RP4z -----END PGP SIGNATURE----- --nextPart3260259.LKNuToB0ym--