From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 8 18:05:55 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4FD716A400 for ; Sun, 8 Apr 2007 18:05:55 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.freebsd.org (Postfix) with ESMTP id B475713C44B for ; Sun, 8 Apr 2007 18:05:55 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141] (may be forged)) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l38I5tXF032543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 8 Apr 2007 11:05:55 -0700 X-Auth-Received: from [192.168.10.45] (c-24-7-142-221.hsd1.ca.comcast.net [24.7.142.221]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l38I5srx009184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 8 Apr 2007 11:05:55 -0700 Message-ID: <46192EFC.6030906@u.washington.edu> Date: Sun, 08 Apr 2007 11:05:48 -0700 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.10 (X11/20070325) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.4.8.105133 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Discovering list of open files from "kernel level" without using utils like lsof 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, 08 Apr 2007 18:05:55 -0000 Hello, I'm trying to see whether it's possible to grab the list of files open from a kernel level on FreeBSD, using a userland library interface as opposed to lsof. I'm trying to see if there's a simple tool that I could code in C/C++ if necessary to spin down disks automatically to save power and disk life. Plus, I think that lsof actually would probe the devices and 'wake them up' instead of keeping them as-is. However, I could be wrong so if I am please let me know. TIA, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 04:27:42 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86FD316A403 for ; Mon, 9 Apr 2007 04:27:42 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 5795113C4B8 for ; Mon, 9 Apr 2007 04:27:42 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.222] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id l393tAH7080943; Sun, 8 Apr 2007 20:55:10 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <4619B91E.6010803@freebsd.org> Date: Sun, 08 Apr 2007 20:55:10 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org References: <20070407174756.GA46385@roadrunner.q.local> <4617F67B.7050304@freebsd.org> <20070408080233.GB40103@roadrunner.q.local> In-Reply-To: <20070408080233.GB40103@roadrunner.q.local> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Ulrich Spoerlein Subject: 'opaque' flag? 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, 09 Apr 2007 04:27:42 -0000 Does anyone understand the semantics of the 'opaque' flag? I'm trying to understand an issue with packages built on union file systems. It appears the 'opaque' flag is set on some symlinks, which the package tools then archive. The archived flag is somehow interfering with later installation of the package. I've read McKusick's paper on unionfs which explains the opaque flag for directories created on a unionfs, but I have a bunch of questions: * Why is it appearing on symlinks? * How could the opaque flag interfere with package installs? * Should bsdtar ignore opaque flags? Any input appreciated, Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 05:55:07 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F20F416A400 for ; Mon, 9 Apr 2007 05:55:07 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id B8F6913C44B for ; Mon, 9 Apr 2007 05:55:07 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (unknown [192.168.1.99]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 7A2545DDE for ; Mon, 9 Apr 2007 15:33:35 +1000 (EST) From: Alan Garfield To: freebsd-hackers@freebsd.org Content-Type: text/plain Date: Mon, 09 Apr 2007 15:33:35 +1000 Message-Id: <1176096815.4064.6.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: RFI: Ethernet driver ported from Linux 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, 09 Apr 2007 05:55:08 -0000 Hello all! I've got a couple of Sun Fire V20z (re-badged NewISys E2100) which have little dedicated Service Processor on-board running Linux. The "SP" can communicate via IPMI and also by Ethernet. It talks Ethernet to the SP by using two small fifo buffers in the PRS via the LPC. I have the GPL Linux source for the so-called 'jnet' Ethernet device. By my reading of the code and the comments it's basically a small Ethernet-looking driver that wraps around these 256 byte PRS buffers and a single interrupt for events from each side of the PRS buffers. -- FROM THE GPL DRIVER COMMENTS Jnet is a ethernet adapter driver. As such, it provides what appears to be a typical ethernet adapter interface which the platform can use to send/receive IP traffic to the SP. The actual physical medium is the PRS, which resides on the LPC bus, and provides two 256 byte fifo's along with an interrupt and a status register. When an interrupt is received, the status register can be read, which will indicate either a Data Available (DAV), or a Data Acknowledge (DAK). We can then choose to read or write data to the fifo, and thus facilitate communication between the SP and Platform. Because the fifo's provided by the PRS are only 256 bytes, our packet size is limited. As a result, the only feature we can't support is DHCP, since a DHCP packet is 313 bytes. -- I'd like to port/re-write this driver for FreeBSD but I cannot find enough documentation and examples of a basic Ethernet driver for FreeBSD. (if_wlan and if_ef look like good candidates but if_clone and the miibus confuse me a bit and there isn't any clear docs on them) Can someone point me in the direction of an example or the relevant man pages I should be reading to help with this. The device driver for Linux seems quite simple. Any help would be gratefully appreciated. Many thanks, Alan Garfield. From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 06:09:49 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3206316A405 for ; Mon, 9 Apr 2007 06:09:49 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from heff.fud.org.nz (203-109-251-39.static.bliink.ihug.co.nz [203.109.251.39]) by mx1.freebsd.org (Postfix) with ESMTP id C849A13C459 for ; Mon, 9 Apr 2007 06:09:48 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id 2DDD31CC58; Mon, 9 Apr 2007 18:09:47 +1200 (NZST) Date: Mon, 9 Apr 2007 18:09:47 +1200 From: Andrew Thompson To: Alan Garfield Message-ID: <20070409060947.GE64415@heff.fud.org.nz> References: <1176096815.4064.6.camel@hiro.auspc.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1176096815.4064.6.camel@hiro.auspc.com.au> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: RFI: Ethernet driver ported from Linux 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, 09 Apr 2007 06:09:49 -0000 On Mon, Apr 09, 2007 at 03:33:35PM +1000, Alan Garfield wrote: > Hello all! > > I've got a couple of Sun Fire V20z (re-badged NewISys E2100) which have > little dedicated Service Processor on-board running Linux. The "SP" can > communicate via IPMI and also by Ethernet. It talks Ethernet to the SP > by using two small fifo buffers in the PRS via the LPC. > > -- > > I'd like to port/re-write this driver for FreeBSD but I cannot find > enough documentation and examples of a basic Ethernet driver for > FreeBSD. (if_wlan and if_ef look like good candidates but if_clone and > the miibus confuse me a bit and there isn't any clear docs on them) > > Can someone point me in the direction of an example or the relevant man > pages I should be reading to help with this. > > The device driver for Linux seems quite simple. > > Any help would be gratefully appreciated. You should look at the edsc driver, its a dummy ethernet driver and a template for writing one. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/if_edsc.c Andrew From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 12:11:08 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D29F516A405 for ; Mon, 9 Apr 2007 12:11:08 +0000 (UTC) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (mail.qubeconnect.com [202.190.74.25]) by mx1.freebsd.org (Postfix) with SMTP id 1616713C45B for ; Mon, 9 Apr 2007 12:11:07 +0000 (UTC) (envelope-from dinesh@alphaque.com) Received: (qmail 61351 invoked by uid 0); 9 Apr 2007 11:44:28 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.190.74.25) by lucifer.net-gw.com with SMTP; 9 Apr 2007 11:44:28 -0000 Received: from prophet.alphaque.com (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.8/8.13.4) with ESMTP id l39AMoTa098350 for ; Mon, 9 Apr 2007 18:22:50 +0800 (MYT) (envelope-from dinesh@alphaque.com) Date: Mon, 9 Apr 2007 18:22:50 +0800 From: Dinesh Nair To: freebsd-hackers@freebsd.org Message-ID: <20070409182250.4436f0db@prophet.alphaque.com> In-Reply-To: <46163987.4010409@vwsoft.com> References: <7.1.0.9.0.20070405163059.16b8a220@sentex.net> <200704061130.l36BUtjW064328@lava.sentex.ca> <46163987.4010409@vwsoft.com> Organization: Alphaque. Anytime. Anywhere X-Mailer: Sylpheed-Claws 2.3.1 (GTK+ 2.8.12; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: fixing IRQ storms 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, 09 Apr 2007 12:11:08 -0000 On Fri, 06 Apr 2007 14:13:59 +0200, Volker wrote: > You need to patch your kernel sources a bit (all info in the PR) and > your silo overflows will be gone. I've done that to get a Merlin i was about to comment on that, given that i extensively use a Huawei 3G/UMTS card without experiencing any of the symptoms before i realized that i've got HZ=1000 in my kernel config. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.openmalaysiablog.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 13:04:53 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FB6B16A401 for ; Mon, 9 Apr 2007 13:04:53 +0000 (UTC) (envelope-from yurtesen-dated-1176986289.3ab7d9@ispro.net.tr) Received: from smtp.ispro.net.tr (smtp.ispro.net.tr [62.244.220.178]) by mx1.freebsd.org (Postfix) with SMTP id 875D113C4B0 for ; Mon, 9 Apr 2007 13:04:52 +0000 (UTC) (envelope-from yurtesen-dated-1176986289.3ab7d9@ispro.net.tr) Received: (qmail 29899 invoked by uid 89); 9 Apr 2007 12:38:09 -0000 Received: from [84.250.2.137] (dsl-tkubrasgw1-fe02fa00-137.dhcp.inet.fi [84.250.2.137]) by localhost.my.domain (tmda-ofmipd) with ESMTP; Mon, 09 Apr 2007 15:38:04 +0300 (EEST) Message-ID: <461A33A9.4070809@ispro.net.tr> Date: Mon, 09 Apr 2007 15:38:01 +0300 User-Agent: Thunderbird 1.5.0.10 (X11/20070408) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Evren Yurtesen X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) X-Primary-Address: yurtesen@ispro.net.tr X-Mailman-Approved-At: Mon, 09 Apr 2007 13:23:43 +0000 Cc: Subject: jail cpu/memory resource limits 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: Mon, 09 Apr 2007 13:04:53 -0000 Hi, FreeBSD supports jail cpu/memory resource limits. http://wiki.freebsd.org/JailResourceLimits I hear that these are very inefficient (compared to FreeVPS for example) and with over 1000 processes it creates noticable overhead. Is this true? Thanks, Evren From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 15:35:25 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3DE3D16A400 for ; Mon, 9 Apr 2007 15:35:25 +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 ECCC813C4D5 for ; Mon, 9 Apr 2007 15:35:14 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan@localhost [127.0.0.1]) by dan.emsphone.com (8.14.0/8.13.8) with ESMTP id l39FZ8fc074316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 9 Apr 2007 10:35:08 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.0/8.14.0/Submit) id l39FZ82L074315; Mon, 9 Apr 2007 10:35:08 -0500 (CDT) (envelope-from dan) Date: Mon, 9 Apr 2007 10:35:08 -0500 From: Dan Nelson To: Garrett Cooper Message-ID: <20070409152956.GB93087@dan.emsphone.com> References: <46192EFC.6030906@u.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46192EFC.6030906@u.washington.edu> X-OS: FreeBSD 6.2-STABLE User-Agent: Mutt/1.5.14 (2007-02-12) Cc: freebsd-hackers@freebsd.org Subject: Re: Discovering list of open files from "kernel level" without using utils like lsof 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, 09 Apr 2007 15:35:25 -0000 In the last episode (Apr 08), Garrett Cooper said: > I'm trying to see whether it's possible to grab the list of > files open from a kernel level on FreeBSD, using a userland library > interface as opposed to lsof. > I'm trying to see if there's a simple tool that I could code in > C/C++ if necessary to spin down disks automatically to save power and > disk life. Plus, I think that lsof actually would probe the devices > and 'wake them up' instead of keeping them as-is. However, I could be > wrong so if I am please let me know. Take a look at how /usr/bin/fstat does it. There is apparently a "kern.file" sysctl that holds the open file table, but fstat digs through kernel memory. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 15:38:23 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F37716A401 for ; Mon, 9 Apr 2007 15:38:23 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB1F13C45D for ; Mon, 9 Apr 2007 15:38:23 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.222] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id l39FcMH7084382; Mon, 9 Apr 2007 08:38:23 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <461A5DEE.6000606@freebsd.org> Date: Mon, 09 Apr 2007 08:38:22 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org References: <20070407174756.GA46385@roadrunner.q.local> <4617F67B.7050304@freebsd.org> <20070408080233.GB40103@roadrunner.q.local> <4619B91E.6010803@freebsd.org> In-Reply-To: <4619B91E.6010803@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Ulrich Spoerlein Subject: Re: 'opaque' flag? 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, 09 Apr 2007 15:38:23 -0000 Tim Kientzle wrote: > Does anyone understand the semantics of the 'opaque' flag? > > I'm trying to understand an issue with packages built > on union file systems. It appears the 'opaque' flag > is set on some symlinks, which the package tools then > archive. The archived flag is somehow interfering with > later installation of the package. > > I've read McKusick's paper on unionfs which explains > the opaque flag for directories created on a unionfs, > but I have a bunch of questions: > * Why is it appearing on symlinks? > * How could the opaque flag interfere with package installs? > * Should bsdtar ignore opaque flags? Okay, I now understand the answer to the second question: there's a bug in libarchive restoring symlinks with flags. I'll fix that shortly. The other two questions still puzzle me. Tim From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 15:59:54 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C65716A402; Mon, 9 Apr 2007 15:59:54 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id EE82313C448; Mon, 9 Apr 2007 15:59:53 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 2E0CF1A4D84; Mon, 9 Apr 2007 08:59:58 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 22D9D517C9; Mon, 9 Apr 2007 11:59:52 -0400 (EDT) Date: Mon, 9 Apr 2007 11:59:52 -0400 From: Kris Kennaway To: Tim Kientzle Message-ID: <20070409155952.GA31477@xor.obsecurity.org> References: <20070407174756.GA46385@roadrunner.q.local> <4617F67B.7050304@freebsd.org> <20070408080233.GB40103@roadrunner.q.local> <4619B91E.6010803@freebsd.org> <461A5DEE.6000606@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <461A5DEE.6000606@freebsd.org> User-Agent: Mutt/1.4.2.2i Cc: hackers@freebsd.org, Ulrich Spoerlein Subject: Re: 'opaque' flag? 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, 09 Apr 2007 15:59:54 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 09, 2007 at 08:38:22AM -0700, Tim Kientzle wrote: > Tim Kientzle wrote: > >Does anyone understand the semantics of the 'opaque' flag? > > > >I'm trying to understand an issue with packages built > >on union file systems. It appears the 'opaque' flag > >is set on some symlinks, which the package tools then > >archive. The archived flag is somehow interfering with > >later installation of the package. > > > >I've read McKusick's paper on unionfs which explains > >the opaque flag for directories created on a unionfs, > >but I have a bunch of questions: > > * Why is it appearing on symlinks? > > * How could the opaque flag interfere with package installs? > > * Should bsdtar ignore opaque flags? >=20 > Okay, I now understand the answer to the second question: > there's a bug in libarchive restoring symlinks with flags. > I'll fix that shortly. >=20 > The other two questions still puzzle me. I suspect the opaque flag should be ignored since it is a property of a specific unionfs stack, so it is not suitable for transporting elsewhere via bsdtar. Similarly with the snapshot flag. Kris --AhhlLboLdkugWU4S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGGmL3Wry0BWjoQKURAiaHAKDbFGIbyjSjD3WEjZJt1AaMG/VLgACgmbuj o2h11ybruK5ejOZG9Far7V4= =LpMF -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 18:44:30 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BC2B16A401 for ; Mon, 9 Apr 2007 18:44:30 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout2.cac.washington.edu (mxout2.cac.washington.edu [140.142.33.4]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2DD13C4C3 for ; Mon, 9 Apr 2007 18:44:30 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from hymn09.u.washington.edu (hymn09.u.washington.edu [140.142.12.183]) by mxout2.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l39IiTox025884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Apr 2007 11:44:29 -0700 Received: from localhost (localhost [127.0.0.1]) by hymn09.u.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l39IiSvr027513; Mon, 9 Apr 2007 11:44:28 -0700 X-Auth-Received: from [134.134.136.2] by hymn09.u.washington.edu via HTTP; Mon, 09 Apr 2007 11:44:28 PDT Date: Mon, 9 Apr 2007 11:44:28 -0700 (PDT) From: youshi10@u.washington.edu To: David Malone In-Reply-To: <20070409081500.GA5325@walton.maths.tcd.ie> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.4.9.113033 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='NO_REAL_NAME 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Cc: freebsd-hackers@freebsd.org Subject: Re: Discovering list of open files from "kernel level" without using utils like lsof 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, 09 Apr 2007 18:44:30 -0000 On Mon, 9 Apr 2007, David Malone wrote: > On Sun, Apr 08, 2007 at 11:05:48AM -0700, Garrett Cooper wrote: >> I'm trying to see whether it's possible to grab the list of files open >> from a kernel level on FreeBSD, using a userland library interface as >> opposed to lsof. > > Have a look at the source code for the fstat utility. It does this > in a relatively clean way. > > David. > Will do. Thanks a lot! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 18:49:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DEE316A403 for ; Mon, 9 Apr 2007 18:49:45 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.freebsd.org (Postfix) with ESMTP id 5EE1C13C4C1 for ; Mon, 9 Apr 2007 18:49:45 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from hymn09.u.washington.edu (hymn09.u.washington.edu [140.142.12.183]) by mxout4.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l39InffJ024385 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 9 Apr 2007 11:49:42 -0700 Received: from localhost (localhost [127.0.0.1]) by hymn09.u.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l39InfvI003783 for ; Mon, 9 Apr 2007 11:49:41 -0700 X-Auth-Received: from [134.134.136.2] by hymn09.u.washington.edu via HTTP; Mon, 09 Apr 2007 11:49:41 PDT Date: Mon, 9 Apr 2007 11:49:41 -0700 (PDT) From: youshi10@u.washington.edu To: freebsd-hackers@freebsd.org In-Reply-To: <20070409152956.GB93087@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.4.9.113833 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='NO_REAL_NAME 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Subject: Re: Discovering list of open files from "kernel level" without using utils like lsof 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, 09 Apr 2007 18:49:45 -0000 On Mon, 9 Apr 2007, Dan Nelson wrote: > In the last episode (Apr 08), Garrett Cooper said: >> I'm trying to see whether it's possible to grab the list of >> files open from a kernel level on FreeBSD, using a userland library >> interface as opposed to lsof. >> I'm trying to see if there's a simple tool that I could code in >> C/C++ if necessary to spin down disks automatically to save power and >> disk life. Plus, I think that lsof actually would probe the devices >> and 'wake them up' instead of keeping them as-is. However, I could be >> wrong so if I am please let me know. > > Take a look at how /usr/bin/fstat does it. There is apparently a > "kern.file" sysctl that holds the open file table, but fstat digs > through kernel memory. > > -- > Dan Nelson > dnelson@allantgroup.com Ok, excellent. Thanks for more info. I'm thinking of changing "spinning down" to "adjusting acoustics level", i.e. reduce spindle speed to avoid pricey spin-downs, which may cause long-term serious damage to disks. Trying to keep my electric bills down and keep my disk life up :). -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 20:23:06 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C364216A400 for ; Mon, 9 Apr 2007 20:23:06 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 5001513C4C5 for ; Mon, 9 Apr 2007 20:23:06 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 87929 invoked by uid 2001); 9 Apr 2007 19:56:24 -0000 Date: Mon, 9 Apr 2007 14:56:24 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20070409195624.GA87746@keira.kiwi-computer.com> References: <46192EFC.6030906@u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46192EFC.6030906@u.washington.edu> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Discovering list of open files from "kernel level" without using utils like lsof X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2007 20:23:06 -0000 On Sun, Apr 08, 2007 at 11:05:48AM -0700, Garrett Cooper wrote: > I'm trying to see if there's a simple tool that I could code in C/C++ > if necessary to spin down disks automatically to save power and disk > life. Plus, I think that lsof actually would probe the devices and 'wake > them up' instead of keeping them as-is. However, I could be wrong so if > I am please let me know. I read somewhere once that keeping disks spinning makes them last 10x longer. Personally, I've seen more disk failures on workstations which are power-cycled regularly than on systems which are always running. I've also seen disks work just fine while powered that just plain quit immediately after a power cycle. So you may save power by spinning the disks down, but I doubt you're saving disk life (unless they're powered down for weeks at a time). -- Rick C. Petty From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 20:25:32 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45A4F16A401 for ; Mon, 9 Apr 2007 20:25:32 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.freebsd.org (Postfix) with ESMTP id DDCF413C487 for ; Mon, 9 Apr 2007 20:25:31 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from hymn09.u.washington.edu (hymn09.u.washington.edu [140.142.12.183]) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l39KPSdR008345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 9 Apr 2007 13:25:28 -0700 Received: from localhost (localhost [127.0.0.1]) by hymn09.u.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l39KPSNY014227 for ; Mon, 9 Apr 2007 13:25:28 -0700 X-Auth-Received: from [134.134.136.2] by hymn09.u.washington.edu via HTTP; Mon, 09 Apr 2007 13:25:28 PDT Date: Mon, 9 Apr 2007 13:25:28 -0700 (PDT) From: youshi10@u.washington.edu To: freebsd-hackers@freebsd.org In-Reply-To: <20070409195624.GA87746@keira.kiwi-computer.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.4.9.131233 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='NO_REAL_NAME 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Subject: Re: Discovering list of open files from "kernel level" without using utils like lsof 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, 09 Apr 2007 20:25:32 -0000 On Mon, 9 Apr 2007, Rick C. Petty wrote: > On Sun, Apr 08, 2007 at 11:05:48AM -0700, Garrett Cooper wrote: >> I'm trying to see if there's a simple tool that I could code in C/C++ >> if necessary to spin down disks automatically to save power and disk >> life. Plus, I think that lsof actually would probe the devices and 'wake >> them up' instead of keeping them as-is. However, I could be wrong so if >> I am please let me know. > > I read somewhere once that keeping disks spinning makes them last 10x > longer. > > Personally, I've seen more disk failures on workstations which are > power-cycled regularly than on systems which are always running. > > I've also seen disks work just fine while powered that just plain quit > immediately after a power cycle. > > So you may save power by spinning the disks down, but I doubt you're > saving disk life (unless they're powered down for weeks at a time). > > -- Rick C. Petty Hence the followup post. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 02:21:01 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C5BF16A407 for ; Tue, 10 Apr 2007 02:21:01 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB2A13C45D for ; Tue, 10 Apr 2007 02:21:00 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (unknown [192.168.1.99]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 23F105C7A for ; Tue, 10 Apr 2007 12:20:56 +1000 (EST) From: Alan Garfield To: freebsd-hackers@freebsd.org In-Reply-To: <1176096815.4064.6.camel@hiro.auspc.com.au> References: <1176096815.4064.6.camel@hiro.auspc.com.au> Content-Type: text/plain Date: Tue, 10 Apr 2007 12:20:56 +1000 Message-Id: <1176171656.4276.8.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: Finding an IRQ mapping in APIC 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, 10 Apr 2007 02:21:01 -0000 Hello all! I'm wondering if someone can point me in the direction of a solution to my little problem. I've been porting a Linux driver across to FreeBSD and I've come against this lovely little hack in it's code. I've tried to bus_alloc_resource() the IOAPIC_DEFAULT_ADDR and IOAPIC_WINDOW but I never seem get allocated. Plus to my knowing-little-about-kernels eye this seems like a really horrid hack to figure out the IRQ. Any suggestions? Thanks, Alan. ---------------------- /**************************************************************** Function: determineIrq Arguments: none Returns: IRQ vector Purpose: The issue is as follows. The Jnet interrupt is really at PCI_INT_D. Depending on how the OS configures the IOAPIC, that could translate to IRQ_19, or IRQ_?, (where ? = a pci interrupt lower than 15, usually 7, 10, or 11). Different kernel version do this differently. So, what we do to figure this out, is we read the IOAPIC configuration for IRQ_19 and see if it has a valid interrupt vector, (non-zero). If it does, then the IOAPIC is in fact configured, and we will be on IRQ_19. If it's not, then we must be using one of the PCI interrupts, which we can determine by reading from the PCI config space. ****************************************************************/ int determineIrq(void) { volatile uint32_t * addr = (uint32_t *)ioremap(IOAPIC_DEFAULT_ADDR, sizeof(uint32_t)); volatile uint32_t * data = (uint32_t *)ioremap(IOAPIC_WINDOW, IOAPIC_WINDOW_SIZE*sizeof(uint32_t)); int irq; uint32_t val; struct pci_dev *pciPtr; u16 vector; if(addr == NULL || data == NULL) { if(addr != NULL) { iounmap((void *)addr); } if(data != NULL) { iounmap((void *)data); } return -1; } *addr = IOAPIC_PCI_INTD_OFFSET; //we use pci_intd val = *data; if( (val & 0xff) > 0) { //if any bits are set, consider it configured #if LINUX_2_6_KERNEL irq = val & 0xff; #else irq = IRQL; #endif } else { [SNIP - looks at pci config and slot data to find IRQ] } iounmap((void *)data); iounmap((void *)addr); return irq; } ---------------------- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 04:05:42 2007 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66AE416A403; Tue, 10 Apr 2007 04:05:42 +0000 (UTC) (envelope-from so14k@valentine.liquidneon.com) Received: from valentine.liquidneon.com (valentine.liquidneon.com [216.38.206.180]) by mx1.freebsd.org (Postfix) with ESMTP id 193C713C459; Tue, 10 Apr 2007 04:05:42 +0000 (UTC) (envelope-from so14k@valentine.liquidneon.com) Received: by valentine.liquidneon.com (Postfix, from userid 1018) id 1FC898FCD6; Mon, 9 Apr 2007 21:51:07 -0600 (MDT) Date: Mon, 9 Apr 2007 21:51:07 -0600 From: Brad Davis To: hackers@FreeBSD.org Message-ID: <20070410035107.GE11741@valentine.liquidneon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: stable@FreeBSD.org, current@FreeBSD.org Subject: FreeBSD Quarterly Status Report, First Quarter of 2007 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, 10 Apr 2007 04:05:42 -0000 Introduction This report covers FreeBSD related projects between January and March 2007. This quarter ended with a big bang as a port of Sun's critically acclaimed ZFS was added to the tree and thus will be available in the upcoming FreeBSD 7.0 release. Earlier this year exciting benchmark results showed the fruits of our SMP work. Read more on the details in the "SMP Scalability" report. During the summer, FreeBSD will once again take part in Google's Summer of Code initiative. Student selection is underway and we are looking forward to a couple of exciting projects to come. BSDCan is approaching rapidly, and will be held May 16-19th in Ottawa. Thanks to all the reporters for the excellent work! We hope you enjoy reading. _________________________________________________________________ Projects * FreeBSD and ZFS * SMP Scalability * USB FreeBSD Team Reports * FreeBSD Security Officer and Security Team * Problem Report Database * Release Engineering * The FreeBSD Foundation Kernel * Building Linux Device Drivers on FreeBSD * Update of the Linux compatibility environment in the kernel Network Infrastructure * FAST_IPSEC Upgrade * Importing trunk(4) from OpenBSD * Intel 3945ABG Wireless LAN Driver: wpi * Multi-link PPP daemon (MPD) Userland Programs * GCC 4.1 integration * malloc(3) Ports * Ports Collection * X.Org 7.2 integration Miscellaneous * BSDCan 2007 * EuroBSDCon 2007 _________________________________________________________________ BSDCan 2007 URL: http://www.bsdcan.org/2007/ Contact: Dan Langille The Schedule and the Tutorials have been released. Once again, we have a very strong collection of Speakers . BSDCan: Low Cost. High Value. Something for Everyone. Everyone is going to be there. Make your plans now. _________________________________________________________________ Building Linux Device Drivers on FreeBSD URL: http://info.iet.unipi.it/~luigi/FreeBSD/linux_bsd_kld.html Contact: Luigi Rizzo The above URL documents some work done around January to build an emulation layer for the Linux kernel API that would allow Linux device driver to be built on FreeBSD with as little as possible modifications. Initially the project focused on USB webcams, a category of devices for which there was basically no support so far. The emulation layer, available as a port ( devel/linux-kmod-compat ) simulates enough of the Linux USB stack to let us build, from unmodified Linux sources, two webcam drivers, also available as ports ( multimedia/linux-gspca-kmod and multimedia/linux-ov511-kmod ), with the former supporting over 200 different cameras. While some of the functions map one-to-one, for others it was necessary to build a full emulation (e.g. collecting input from various function calls, and then mapping sets of Linux data structures into functionally equivalent sets of FreeBSD data structures). But overall, this project shows that the software interfaces are reasonably orthogonal to each other so one does not need to implement the full Linux kernel API to get something working. More work is necessary to cover other aspects of the Linux kernel API, e.g. memory mapping, PCI bus access, and the network stack API, so we can extend support to other families of peripherals. Open tasks: 1. Implement more subsystems (e.g. the network interface API; the memory management/pci bus access API). 2. Address licensing issues. In the current port, the C code is entirely new and under a FreeBSD license. Many of the headers have been rewritten (and documented) from scratch (and so under a FreeBSD license as well). Some of the other headers are still taken from various Linux distributions and need to be rewritten to generate BSD-licensed code that can be imported in the kernel instead of being made available as a port. While this is not a concern with GNU drivers, it may be an important feature for drivers that are available under a dual license. _________________________________________________________________ EuroBSDCon 2007 URL: http://2007.EuroBSDCon.org/ Contact: EuroBSDCon 2007 Organizing Committee The sixth EuroBSDCon will take place at Symbion in Copenhagen, Denmark on Friday the 14th and Saturday 15th of September 2007. The estimated price for the two day conference is 200EUR, excluding Legoland trip and social event. The whole-day trip to Legoland is expected to cost around 130EUR including transportation, some food on the way, and entry fee. Arrangements have been made with a newly renovated Hostel which offers beds for 23EUR per night and 10EUR breakfast. A lounge with sponsored Internet connection will be available at the Hostel. Staying at the hostel is of course entirely optional and several Hotels exists in the area. Reservation for the conference and exact prices are expected to be ready no later than 1st of May. As of this writing 10 presentations have been accepted and more are in the process of being evaluated. For FreeBSD Developers, a by invitation Developers summit will be held in connection with the conference. Exactly when this will take place has not yet been decided. We are still looking for more sponsors. A public IRC channel #eurobsdcon on EFnet has been created for discussion and questions about the conference. More details will follow on the EuroBSDCon 2007 web site as they become available. _________________________________________________________________ FAST_IPSEC Upgrade URL: http://people.freebsd.org/~gnn/fast_ipv6.20070430.diff Contact: George Neville-Neil Contact: Bjoern Zeeb There are currently two p4 branches being used for this work: gnn_fast_ipsec: a dual stack branch which contains both Kame and FAST_IPSEC with v6 enabled. gnn_radical_ipsec: a single stack branch, still in progress, where Kame IPsec has been removed and only FAST remains. Open tasks: 1. Test the patch! _________________________________________________________________ FreeBSD and ZFS URL: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/pjd/zfs URL: http://www.opensolaris.org/os/community/zfs/ URL: http://lists.freebsd.org/pipermail/freebsd-current/2007-April/070544.html URL: http://lists.freebsd.org/pipermail/freebsd-current/2007-April/070616.html Contact: Pawel Jakub Dawidek The ZFS file system in now part of the FreeBSD operating system. ZFS was ported from the OpenSolaris operating system and is under CDDL license. As an experimental feature ZFS will be available in FreeBSD 7.0-RELEASE. _________________________________________________________________ FreeBSD Security Officer and Security Team URL: http://www.freebsd.org/security/ URL: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/staff-listing.html#STAFF-SECTEAM URL: http://vuxml.freebsd.org/ Contact: Security Officer Contact: Security Team In the time since the last status report, one security advisory has been issued concerning a problem in the base system of FreeBSD; this problem was in "contributed" code maintained outside of FreeBSD. In addition, several Errata Notices have been issued in collaboration with the release engineering team, including one concerning FreeBSD Update. The Vulnerabilities and Exposures Markup Language (VuXML) document has continued to be updated by the Security Team and Ports Committers documenting new vulnerabilities in the FreeBSD Ports Collection; since the last status report, 21 new entries have been added, bringing the total up to 890. The following FreeBSD releases are supported by the FreeBSD Security Team: FreeBSD 5.5, FreeBSD 6.1, and FreeBSD 6.2. Of particular note, FreeBSD 4.11 and FreeBSD 6.0 are no longer supported. The respective End of Life dates of supported releases are listed on the web site. _________________________________________________________________ GCC 4.1 integration Contact: Alexander Kabaev Contact: Kris Kennaway A version of GCC 4.1 is being prepared for inclusion into FreeBSD 7.0-CURRENT. Work was started late in 2006 but progress on certain technical points (e.g. correctly integrating and bootstrapping a shared libgcc_s into the build) was slow due to lack of developer time. The remaining outstanding issue is that compiling with -O2 is shown to lead to runtime failures of certain binaries (e.g. some port builds); it is not currently known whether these are due to application errors or GCC miscompilations. It is believed that the current snapshot is otherwise ready for inclusion, and this will likely happen within a week or two. _________________________________________________________________ Importing trunk(4) from OpenBSD URL: http://people.freebsd.org/~thompsa/if_trunk-20070402.diff Contact: Andrew Thompson Work has completed to port over trunk(4) from OpenBSD and this also includes merging 802.3ad LACP from agr(4) in NetBSD. This driver allows aggregation of multiple network interfaces as one virtual interface using a number of different protocols/algorithms. * failover - Sends traffic through the secondary port if the master becomes inactive. * fec - Supports Cisco Fast EtherChannel. * lacp - Supports the IEEE 802.3ad Link Aggregation Control Protocol (LACP) and the Marker Protocol. * loadbalance - Static loadbalancing using an outgoing hash. * roundrobin - Distributes outgoing traffic using a round-robin scheduler through all active ports. This will be committed shortly, further testing is welcome. _________________________________________________________________ Intel 3945ABG Wireless LAN Driver: wpi URL: http://perforce.FreeBSD.org/depotTreeBrowser.cgi?FSPC=//depot/user/benjsc/wpi URL: http://www.clearchain.com/wiki/Wpi Contact: Benjamin Close Work is slowly continuing on this driver, focusing mainly on dealing with the newly released firmware for the card. The old firmware was not redistributable, the new firmware can be redistributed but has a completely different API. With the new firmware changes almost complete, the driver is approaching a state ready for -CURRENT. Open tasks: 1. Fix mbuf leakage (potential fix pending). 2. Integrate s/w control of radio transmitter. _________________________________________________________________ malloc(3) URL: http://lists.freebsd.org/pipermail/freebsd-current/2007-March/070303.html Contact: Jason Evans malloc(3) has recently been enhanced to reduce memory overhead, fragmentation, and mapped memory retention. As an added bonus, it tends to be a bit faster. See the above URL for my email to the -current mailing list for a more detailed description of the enhancements. _________________________________________________________________ Multi-link PPP daemon (MPD) URL: http://sourceforge.net/projects/mpd/ URL: http://mpd.sourceforge.net/doc/mpd5.html Contact: Alexander Motin Stable release 4.1 of mpd4 branch was released in February providing many new features and fixes. Mpd3 branch was declared legacy. Since the release several new features have been implemented in CVS: * Link repeater functionality (aka L2TP/PPTP Access Concentrator), * Per-interface traffic filtering using ng_bpf, * Very fast traffic shaping/rate-limiting using ng_car. ng_car node has been updated, to support shaping and very fast Cisco-like rate-limiting. ng_ppp node has been completely re-factored to confirm to the protocol stack model. Open tasks: 1. LAC/PAC testing. 2. Traffic filtering/shaping/rate-limiting testing. 3. PPTP modification for multiple bindings support. 4. Dynamic link/bundle creation. _________________________________________________________________ Ports Collection URL: http://www.freebsd.org/ports/ URL: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributing-ports/ URL: http://people.freebsd.org/~fenner/portsurvey/ URL: http://portsmon.FreeBSD.org/index.html URL: http://www.freebsd.org/portmgr/index.html URL: http://tinderbox.marcuscom.com Contact: Mark Linimon The ports count is nearing 17,000. The PR count has been stable at around 700. The 'new port' PR backlog is at a multi-year low. We appreciate all the hard work of our ports committers. Since the long 6.2 release cycle ended, portmgr has once again been able to do experimental ports runs. As a result of six run/commit cycles, the portmgr PR count is now the lowest in quite some time. Please see the CHANGES and UPDATING files for details. Many thanks to Pav among others for keeping the build cluster busy. We have received new hardware, resulting in a significant speedup of our package building capability: the AMD64 package builds now use 4 8-core machines (and one lonely UP system), which means a full AMD64 build is about 5 times faster than it was. Also, the i386 cluster gained an 8-core and roughly doubled its performance too. Two of the sparc64 build machines have recently brought back online, so package builds there have been restarted there after a long period offline. linimon continues to work on improvements to portsmon to allow graphing of the dependent ports of ignored/failed ports. This work will be presented at BSDCan. In addition, pages that show the state of port uploads on ftp*.FreeBSD.org have been added, as well as ports that have NO_PACKAGE set. Also, the individual port overview page now shows the latest package that has been uploaded to the ftp servers for each buildenv. A number of absent maintainers have been replaced by some new volunteers who had been sending PRs to update and/or fix their ports. Welcome! This helps to spread the workload. Since the last report, support for FreeBSD 4.X has been dropped from the Ports Collection. Anyone still using RELENG_4 should have stayed with the ports infrastructure as of the RELENG_4_EOL tag, as later commits remove that support. 4.X served us long and well but the burden of trying to support 4 major branches finally became too much to ask of our volunteers. Use of 4.X, even with the RELENG_4_EOL tag, is no longer recommended; we recommend either 6.2-RELEASE or RELENG_6, depending on your needs. There have been new releases of the ports tinderbox code, the portmaster update utility, and portupgrade. A new utility, pkgupgrade, has been introduced by Michel Talon, which appears interesting. KDE was updated to 3.5.6. GNOME was updated to 2.18. XFree86 version 3 was removed as being years out of date. We have added 3 new committers since the last report. Open tasks: 1. Most of the remaining ports PRs are "existing port/PR assigned to committer". Although the maintainer-timeout policy is helping to keep the backlog down, we are going to need to do more to get the ports in the shape they really need to be in. 2. Although we have added many maintainers, we still have many unmaintained ports. The number of buildable packages on AMD64 lags behind a bit; sparc64 requires even more work. _________________________________________________________________ Problem Report Database URL: http://www.freebsd.org/support.html#gnats Contact: Mark Linimon We have added Remko Lodder to the bugmeister team. Remko has been doing a great deal of work to go through antique PRs, especially in the i386 category, and it was time to recognize that hard work. As a result of his work the i386 count is at a multi-year low. Remko has also been instrumental in working with some new volunteers who are interested in finding out how they can contribute. Our current plans are to ask them to look through the PR backlog and, firstly, ask for feedback from the submitters, and secondly, identify PRs that need action by committers. We also have some committers who have volunteered to review those PRs. If you are interested in helping, please subscribe to bugbusters@FreeBSD.org. Our thanks to our current helpers, including Harrison Grundy. The overall PR count has dropped to around 5100, a significant reduction. _________________________________________________________________ Release Engineering URL: http://www.FreeBSD.org/releng/ URL: http://www.FreeBSD.org/snapshots/ Contact: Release Engineering Team During the past quarter, the Release Engineering team has begun planning and preparing for FreeBSD 7.0, which is scheduled for release later in 2007. The HEAD codeline has been placed in a "slush" mode, meaning that large changes should be coordinated with the Release Engineering team before being committed. The RE team also produced snapshots of FreeBSD 6.2-STABLE and 7.0-CURRENT for February and March 2007, corresponding roughly to the state of those development branches at the start of the respective months. While they have not had the benefit of extensive testing, and should not be used in production, they can be useful for experimenting with or testing new features. _________________________________________________________________ SMP Scalability URL: http://people.freebsd.org/~kris/scaling/mysql.html URL: http://wiki.freebsd.org/SMPTODO Contact: Kris Kennaway Contact: Jeff Roberson Contact: Attilio Rao Contact: Robert Watson Over the past few months there has been a substantially increased focus on improving scalability of FreeBSD on large SMP hardware. This has been driven in part by the new availability of 8-core hardware to the project, which allows easy profiling of scalability bottlenecks and benchmarking of proposed changes. Significant progress has been made on certain application workloads such as MySQL and PostgreSQL, with the result that FreeBSD 7 now has excellent scaling to at least 8-CPU systems with prospects for further improvements. Progress with other application workloads has been limited by the need to set up a suitable test case; please contact me if you are interested in helping. As part of this general effort, work is progressing steadily on removing the last remaining Giant-locked code from the kernel. A complete list of remaining Giant-locked code is found here: http://wiki.freebsd.org/SMPTODO Many of these sub-tasks have owners, but some do not. The major remaining Giant-locked subsystem with no owner is the TTY subsystem. In parallel, profiling of contention and bottlenecks in other subsystems has lead to a number of experimental changes which are being developed. Work is in progress by Jeff Roberson and Attilio Rao to break up the global scheduler spinlock in favor of a set of per-CPU scheduling locks, which is expected to improve performance on systems with many CPUs. Experimental changes by Robert Watson to allow for multiple netisr threads show good promise for improving loopback IP performance on large SMP systems, which can otherwise easily saturate a single netisr thread. A variety of other changes are being profiled and evaluated to improve SMP performance under various workloads. The majority of these changes are collected in the //depot/user/kris/contention/ Perforce branch. _________________________________________________________________ The FreeBSD Foundation URL: http://www.freebsdfoundation.org Contact: Deb Goodkin The FreeBSD Foundation ended Q1 raising over $65,000. We're a quarter of the way to our goal of raising $250,000 this year. We continued our mission of supporting developer communication by helping FreeBSD developers attend AsiaBSDCon. We are a sponsor of BSDCan and are currently accepting travel grant applications for this conference. The foundation provided support that helped the ZFS file system development. We continued working to upgrade the project's network testbed with 10Gigabit interconnects. We attended SCALE where we received an offer from No Starch Press to include a foundation ad in their BSD books. Our first ad will appear in the book "Designing BSD Rootkits." For more information on what we've been up to, check out our website at http://www.freebsdfoundation.org . _________________________________________________________________ Update of the Linux compatibility environment in the kernel URL: http://wiki.FreeBSD.org/linux-kernel URL: http://wiki.FreeBSD.org/linux-kernel/ltp Contact: Alexander Leidinger Contact: Roman Divacky Contact: Emulation Mailinglist Since the last status report AMD64 was feature synced with i386. Notably TLS and futexes are now available on AMD64. Many thanks to Jung-Uk Kim for doing the TLS work. Currently the focus is to implement the *at() family of linux syscalls and to find and fix the remaining futex problems. We need some more testers and bug reporters. So if you have a little bit of time and a favorite linux application, please play around with it on -CURRENT. If there is a problem, have a look at the Wiki if we already know about it and report on emulation@. We are specially interested in reports about the 2.6 compatibility (sysctl compat.linux.osversion=2.6.16), but only with the most recent -current and maybe with some patches we have in the perforce repository (available from the wiki). We would like to thank all the people which tested the changes / submitted patches and thus helped improve the linux compatibility environment. _________________________________________________________________ USB URL: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/usb/src/sys/dev/usb&HIDEDEL=NO URL: http://www.turbocat.net/~hselasky/usb4bsd URL: http://www.turbocat.net/~hselasky/usb4bsd/dev_new_usb.pdf Contact: Hans Petter Sirevaag Selasky During the last three months not too much has changed. Here is a quick list of changes: 1. There has been some cleanups in the UCOM layer, generally to to create a context for all the callbacks so that they can call sleeping functions. This is achieved using the USB config thread system. The reason for this is that the code becomes simpler when synchronous operation is applied versus asynchronous. But asynchronous behavior is the most secure, hence then all USB resources are preallocated for each transfer. After the change, only data transfers are done asynchronously. All configuration is now done synchronously. This makes the USB device drivers look more like in the old USB stack. 2. moscom.c has been imported from OpenBSD. It is called umoscom.c under FreeBSD. 3. ugensa.c has been imported from NetBSD. 4. f_axe.c has now has support for Ax88178 and Ax88772, which is derived from OpenBSD. In my last status report I asked for access to Sparc64 boxes with FreeBSD installed. Testing is ongoing and some problems remain with EHCI PCI Cards. I am not exactly sure where the problem is, but it appears that DMA-able memory does not get synced properly. Markus Brueffer is still working on the USB HID parser and support. Nothing has been committed yet. Several people have reported success with my new USB stack. Some claim 2x improvements, others have seen more. But don't expect too much. If you want to test the new USB stack, checkout the USB perforce tree or download the SVN version of the USB driver from my USB homepage. At the moment the tarballs are a little out of date. Ideas and comments with regard to the new USB API are welcome at freebsd-usb@freebsd.org . _________________________________________________________________ X.Org 7.2 integration URL: http://wiki.freebsd.org/ModularXorg Contact: Florent Thoumie Contact: Dejan Lesjak Contact: Kris Kennaway X.Org 7.2 is now on final approach for landing into the ports tree. Work had proceeded at a slow pace for the first few months of the year due to reduced availability of flz@, the single developer working on integration. Recently lesi@ was recruited back into the task and readiness of the ports collection was pushed to completion (i.e. there are no major regressions apparent on package builds). The remaining tasks which need to be completed are a review of the diff to make sure no unintentional changes or regressions slip in to the CVS tree in the big merge, and completion of an upgrade script to manage the migration from X.Org 6.9 (X.Org 7.2 is so fundamentally different that it cannot be upgraded "automatically" using the existing tools like portupgrade). We hope to have these finished within a week or two, at which stage the ports collection will be frozen for the integration, and we will likely remain in a ``mini-freeze'' for a week or two in order to focus committer attention on resolving the inevitable undetected problems which will emerge from this major change. _________________________________________________________________ From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 04:24:20 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57F4416A406 for ; Tue, 10 Apr 2007 04:24:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5FD13C487 for ; Tue, 10 Apr 2007 04:24:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l3A4MoUC066517; Mon, 9 Apr 2007 22:22:51 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 09 Apr 2007 22:23:00 -0600 (MDT) Message-Id: <20070409.222300.-1350498722.imp@bsdimp.com> To: alan@fromorbit.com From: "M. Warner Losh" In-Reply-To: <1176096815.4064.6.camel@hiro.auspc.com.au> References: <1176096815.4064.6.camel@hiro.auspc.com.au> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 09 Apr 2007 22:22:51 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: RFI: Ethernet driver ported from Linux 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, 10 Apr 2007 04:24:20 -0000 In message: <1176096815.4064.6.camel@hiro.auspc.com.au> Alan Garfield writes: : I'd like to port/re-write this driver for FreeBSD but I cannot find : enough documentation and examples of a basic Ethernet driver for : FreeBSD. (if_wlan and if_ef look like good candidates but if_clone and : the miibus confuse me a bit and there isn't any clear docs on them) : : Can someone point me in the direction of an example or the relevant man : pages I should be reading to help with this. : : The device driver for Linux seems quite simple. : : Any help would be gratefully appreciated. In addition to the other advise, you might also look at if_ed.c. It is a little complicated since it talks to real hardware, and that hardware is, ummm, a little icky. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 05:30:25 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA5C916A402 for ; Tue, 10 Apr 2007 05:30:25 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id 82A9013C44B for ; Tue, 10 Apr 2007 05:30:25 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (unknown [192.168.1.99]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id F0A855CDC for ; Tue, 10 Apr 2007 15:30:21 +1000 (EST) From: Alan Garfield To: freebsd-hackers@freebsd.org In-Reply-To: <1176171656.4276.8.camel@hiro.auspc.com.au> References: <1176096815.4064.6.camel@hiro.auspc.com.au> <1176171656.4276.8.camel@hiro.auspc.com.au> Content-Type: text/plain Date: Tue, 10 Apr 2007 15:30:21 +1000 Message-Id: <1176183021.5525.4.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: Re: Finding an IRQ mapping in APIC 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, 10 Apr 2007 05:30:25 -0000 On Tue, 2007-04-10 at 12:20 +1000, Alan Garfield wrote: > Hello all! > > I'm wondering if someone can point me in the direction of a solution to > my little problem. > > I've been porting a Linux driver across to FreeBSD and I've come against > this lovely little hack in it's code. > > I've tried to bus_alloc_resource() the IOAPIC_DEFAULT_ADDR and > IOAPIC_WINDOW but I never seem get allocated. Plus to my > knowing-little-about-kernels eye this seems like a really horrid hack to > figure out the IRQ. > > Any suggestions? Further to this I've done the following :- --------------------------- static void jnet_identify(driver_t *driver, device_t parent) { uint32_t pci_intline; device_t dev; dev = pci_find_bsf(PCI_BUS, PCI_DEV, PCI_FUN); if(dev == NULL) { return; } device_printf(parent, "Looking for IRQ....\n"); pci_intline = pci_read_config(dev, PCIR_INTLINE, 1); printf("%x\n", pci_intline); return; } --------------------------- which just output the IRQ for the given bus,device,function. I can locate the IRQ's for all devices I care to throw at it, but the 0:7:3 device is found, but the PCIR_INTLINE is always 0xFF. Looking at the linux code I should get back 0x19. Am I totally missing something? Thanks in advance, Alan. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 11:40:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B14A16A402 for ; Tue, 10 Apr 2007 11:40:45 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id BA8AE13C459 for ; Tue, 10 Apr 2007 11:40:44 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (c220-239-255-86.rivrw3.nsw.optusnet.com.au [220.239.255.86]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id D266E5C19 for ; Tue, 10 Apr 2007 21:40:41 +1000 (EST) From: Alan Garfield To: freebsd-hackers@freebsd.org In-Reply-To: <1176183021.5525.4.camel@hiro.auspc.com.au> References: <1176096815.4064.6.camel@hiro.auspc.com.au> <1176171656.4276.8.camel@hiro.auspc.com.au> <1176183021.5525.4.camel@hiro.auspc.com.au> Content-Type: text/plain Date: Tue, 10 Apr 2007 21:40:40 +1000 Message-Id: <1176205240.4514.3.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: Re: Finding an IRQ mapping in APIC 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, 10 Apr 2007 11:40:45 -0000 On Tue, 2007-04-10 at 15:30 +1000, Alan Garfield wrote: > On Tue, 2007-04-10 at 12:20 +1000, Alan Garfield wrote: > > Hello all! > > > > I'm wondering if someone can point me in the direction of a solution to > > my little problem. > > > > I've been porting a Linux driver across to FreeBSD and I've come against > > this lovely little hack in it's code. > > > > I've tried to bus_alloc_resource() the IOAPIC_DEFAULT_ADDR and > > IOAPIC_WINDOW but I never seem get allocated. Plus to my > > knowing-little-about-kernels eye this seems like a really horrid hack to > > figure out the IRQ. > > > > Any suggestions? Well I think I've found a much nicer way that the low-level irq bashing the Linux driver suffered from. ------- DRIVER_MODULE(jnet, acpi, jnet_driver, jnet_devclass, 0, 0); /** * jnet_probe() * * Probes for the JNet device */ static int jnet_probe(device_t dev) { ACPI_HANDLE h; char *handle_str; // Only accept device types if(acpi_get_type(dev) != ACPI_TYPE_DEVICE) return(ENXIO); // Get the acpi handle and the device name h = acpi_get_handle(dev); handle_str = acpi_name(h); // Compare the name looking for JNET if(strcmp(handle_str, JNET_ACPI_NAME) != 0) return(ENXIO); // Woo we found it, set the description so we know what we are. device_set_desc(dev, JNET_NAME); return (BUS_PROBE_DEFAULT); } ------- I found the device was in the acpi data. I now have the interrupt and the io ports available without any hacks (I hope). Does this look sane to anyone?? Thanks again, Alan. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 11:45:57 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8FDF16A403 for ; Tue, 10 Apr 2007 11:45:57 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from pd4mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6485013C4B0 for ; Tue, 10 Apr 2007 11:45:57 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from pd2mr2so.prod.shaw.ca (pd2mr2so-qfe3.prod.shaw.ca [10.0.141.109]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JGA0005F38LK4F0@l-daemon> for freebsd-hackers@freebsd.org; Tue, 10 Apr 2007 04:45:57 -0600 (MDT) Received: from pn2ml10so.prod.shaw.ca ([10.0.121.80]) by pd2mr2so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JGA00MZ138LBM31@pd2mr2so.prod.shaw.ca> for freebsd-hackers@freebsd.org; Tue, 10 Apr 2007 04:45:58 -0600 (MDT) Received: from soralx.cydem.org ([24.87.27.3]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JGA00KT438K4911@l-daemon> for freebsd-hackers@freebsd.org; Tue, 10 Apr 2007 04:45:56 -0600 (MDT) Date: Tue, 10 Apr 2007 03:45:53 -0700 From: soralx@cydem.org In-reply-to: To: freebsd-hackers@freebsd.org Message-id: <20070410034553.3afa9ea9@soralx.cydem.org> MIME-version: 1.0 X-Mailer: Claws Mail 2.8.1 (GTK+ 2.10.11; i386-portbld-freebsd5.4) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <20070409152956.GB93087@dan.emsphone.com> Cc: youshi10@u.washington.edu Subject: Re: Discovering list of open files from "kernel level" without using utils like lsof 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, 10 Apr 2007 11:45:57 -0000 good_localtime(all); > I'm thinking of changing "spinning down" to "adjusting acoustics > level", i.e. reduce spindle speed to avoid pricey spin-downs, which > may cause long-term serious damage to disks. Whoa, hold your horses. Recall that the friction between air and rotating plates inside your winchester creates a definite gas flow. I can think of at least 3 design objectives (there could be more) that utilize that circulation: 0a. Float the magnetic head micrometers above plate's surface; AFAICT, it is this fluid 'cushion' that resists any force directed normal to the head towards the plate, thus preventing head crashes. 0b. Circulate the inside air throug a filter and a dessicant. 0c. Detract arm's stopper when the plates get up to speed. 0d. Cooling of other components? Modern low-speed (7200 RPM) IDE hard drives have bearings quiet enough to cause little trouble. You're better off switching the 'acoustic mode' setting (or what ever it is called) from 'performace' mode to 'low noise'. I know, it's hard (lowering performace of the 'puter with your own hands -- OMG!), and the heart rightfully rebels agains such a [lacking the right word], but mediate, let out your deep Zen powers, and just do it ;) This way, the drive should try to keep itself quiet (not throw the arm round too fast, slow down [maybe?] when possible), and it should really know better how and when to do that (given that the factory blessed it's brain with a good firmware). 'Tis supposed to be better than just slowing down the motor. > Trying to keep my electric bills down and keep my disk life up :). 00. Risking disk life to save a few watts? That's rather crazy, or too much courage? Undue stress on electronics (the inverter, plus maybe something else) as well... 01. I know that some gyro rotors (which use ball bearing and spin at 22k RPM) may last a decade or even two. If you don't quite believe me, then you're right: they are not running with 100% duty cycle. Still, the idea here is that precision ball bearings may last for some time. Now, sleeve bearings (such as those used in modern hard drives -- the fancy term 'hydrodynamic uber-duper whatever" means not a lot more than that) last even longer. Sometimes far longer. I've seen a lot of failed disks in my life (notably, all of them IDE), but none died because of bearing failure. In fact, I still have an ancient Seagate Barracuda that sounds like a whole platoon of high speed drills working their chucks off, but still is functional. BTW, I've done autopsy on many of them, and the most common causes of malfunction are: 0a. electronics going crazy in the head; 0b. head crash. > -Garrett [SorAlx] ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 20:02:10 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2518716A402 for ; Tue, 10 Apr 2007 20:02:10 +0000 (UTC) (envelope-from john@kozubik.com) Received: from kozubik.com (kozubik.com [69.43.165.2]) by mx1.freebsd.org (Postfix) with ESMTP id 071D613C44B for ; Tue, 10 Apr 2007 20:02:09 +0000 (UTC) (envelope-from john@kozubik.com) Received: from kozubik.com (localhost [127.0.0.1]) by kozubik.com (8.12.11/8.12.11) with ESMTP id l3AJjEei084487; Tue, 10 Apr 2007 12:45:14 -0700 (PDT) (envelope-from john@kozubik.com) Received: from localhost (john@localhost) by kozubik.com (8.12.11/8.12.11/Submit) with ESMTP id l3AJjDYa084483; Tue, 10 Apr 2007 12:45:14 -0700 (PDT) (envelope-from john@kozubik.com) Date: Tue, 10 Apr 2007 12:45:13 -0700 (PDT) From: John Kozubik To: "Sean C. Farley" In-Reply-To: <20070409193137.D90697@thor.farley.org> Message-ID: <20070410123936.B35599@kozubik.com> References: <20070409193137.D90697@thor.farley.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: VMware5 port - bounty proposed 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, 10 Apr 2007 20:02:10 -0000 Sean, On Mon, 9 Apr 2007, Sean C. Farley wrote: > I have spent a good deal of time last year attempting to port VMware > 5.5.x to FreeBSD. Due to time, too many other projects and a beginning > level of driver development knowledge (someday I will fix this part :)), > I do not feel I can continue on it. To help others get a little > further, I put up a description of the status[1] on my web site. Many > thanks to Orlando Bassotto's effort on a port of 4.5.2 from which I > started. > > Sean > 1. http://www.farley.org/freebsd/tmp/vmware5/ To reiterate - I am offering an immediate cash payment of $500, plus the other, smaller, informal contributions that have been submitted, to whoever can merely commit to making vmware 5 work on FreeBSD (6 or 7). Upon delivery additional monies will be paid. I am also interested in organizing ongoing funding to maintain the current status of a vmware5 port with the intention of eventually implementing vmwares proposed 3d hardware virtualization into the FreeBSD vmware port. I am cross-posting this to freebsd-hackers so as to spread the word a bit beyond freebsd-emulation. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 23:11:10 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28F9C16A40B for ; Tue, 10 Apr 2007 23:11:10 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id DB13013C4CC for ; Tue, 10 Apr 2007 23:11:07 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so2199299ana for ; Tue, 10 Apr 2007 16:11:07 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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:content-transfer-encoding:content-disposition:references; b=sXji2Ux8MVnDc/GwPgjRz2xvf6gFPu88EudX3X7lGvsTtgxnjVmFTD1rJnsH4EC+CGA430oBzaTObhN14HjlZP6kIHCbTDnbrczE4qEnpu5fHVtxAkNlGGszF6YM1XR9yotj0VPIT1hO0Um4xMNNJyZG/5YzIpMo8QgcnEblpzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rnD4+1fOBFYoZVF9NDt5mIlaOQZiHg7HScdtJvA9jI/OzF418mIiYdcASfPUHm+V+hKeoLQJPIpX1VOt1Z63QT3miktWo5brJCG5ZagD/9pMWYqV9pMQ/bOQuJepIUUxl5viDYDplVg28J9mf3j5GdzlFglQYlEtUjSGde7EOJ4= Received: by 10.114.60.19 with SMTP id i19mr2998032waa.1176246666696; Tue, 10 Apr 2007 16:11:06 -0700 (PDT) Received: by 10.114.192.12 with HTTP; Tue, 10 Apr 2007 16:11:06 -0700 (PDT) Message-ID: Date: Wed, 11 Apr 2007 01:11:06 +0200 From: usleepless@gmail.com To: "Rick Nekus" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: pvr-350 not working - how to debug? 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, 10 Apr 2007 23:11:10 -0000 Rick, On 4/11/07, Rick Nekus wrote: > > yup, I was just doin' that but i didn't see it patched in .../src/... ? > > [rick@tiger /usr/ports/multimedia/pvrxxx]$ sudo make patch-iicbb > echo 602105 > 602105 > Hmm... Looks like a new-style context diff to me... > The text leading up to this was: > -------------------------- > |*** dev/iicbus/iicbb.c.ORIGINAL Sun Aug 24 13:49:13 2003 > |--- dev/iicbus/iicbb.c Fri Jul 1 15:55:21 2005 > -------------------------- > Patching file dev/iicbus/iicbb.c using Plan A... > Hunk #1 succeeded at 66. > Hunk #2 succeeded at 83. > Hunk #3 succeeded at 132. > Hunk #4 succeeded at 404 with fuzz 1. > Hmm... The next patch looks like a new-style context diff to me... > The text leading up to this was: > -------------------------- > |*** dev/iicbus/iicbus_if.m.ORIGINAL Wed Apr 13 14:25:01 2005 > |--- dev/iicbus/iicbus_if.m Mon Oct 24 00:51:05 2005 > -------------------------- > Patching file dev/iicbus/iicbus_if.m using Plan A... > Ignoring previously applied (or reversed) patch. > Hunk #1 ignored at 91. > 1 out of 1 hunks ignored--saving rejects to dev/iicbus/iicbus_if.m.rej > Hmm... The next patch looks like a new-style context diff to me... > The text leading up to this was: > -------------------------- > |*** dev/iicbus/iiconf.h.ORIGINAL Wed Jun 16 22:51:57 2004 > |--- dev/iicbus/iiconf.h Mon Oct 24 00:43:41 2005 > -------------------------- > Patching file dev/iicbus/iiconf.h using Plan A... > Hunk #1 succeeded at 116 (offset 2 lines). > Hmm... The next patch looks like a new-style context diff to me... > The text leading up to this was: > -------------------------- > |*** dev/iicbus/iiconf.c.ORIGINAL Wed Jun 16 22:51:57 2004 > |--- dev/iicbus/iiconf.c Mon Oct 24 00:47:32 2005 > -------------------------- > Patching file dev/iicbus/iiconf.c using Plan A... > Hunk #1 succeeded at 234. > done > *** Error code 1 > > Stop in /usr/ports/multimedia/pvrxxx. ehhhh, i am not sure that these errors are fatal. try to rebuild and install your kernel. if that works, fetch a new version ( fixes support for ntsc ): http://usleepless.110mb.com/pvrxxx_port-10042007.tgz regards, usleep From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 23:22:17 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5EEF816A407 for ; Tue, 10 Apr 2007 23:22:17 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2032713C4D0 for ; Tue, 10 Apr 2007 23:22:17 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so1427046pyh for ; Tue, 10 Apr 2007 16:22:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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:content-transfer-encoding:content-disposition:references; b=JgX4H+2cbo4SA4sXRL7ddinlkcnpcZKD9gint1pZGrcpkFOWo2Xu6RTXeyV/SgPylScBt998PGEQWg8olxYHB0N80DBcEDfNm8mcT7Msv1+VRzj6EbkRYC/tkUQARGkXuTXWWZ/Vd4ZRErREf8UYYDv/a11j2ZBnTDcQUwibj1c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=koy4qdXjC/4jkggCbnOA6Na7pEHPl9JSsu6mjnQWwTkCmuNoMI6LspSoApQQLSGO4OpJlfWzwpdXVGNBSKCDjsCYVlu8KbxTKkD7i1C+lgW44SHlJ8G+p3KvEkX1vJrh4Iu9tBryrL3MTdEmUBZ6aLVsUX/Wj/AeDoGiTh9yRSw= Received: by 10.114.56.1 with SMTP id e1mr1622195waa.1176245825878; Tue, 10 Apr 2007 15:57:05 -0700 (PDT) Received: by 10.114.192.12 with HTTP; Tue, 10 Apr 2007 15:57:05 -0700 (PDT) Message-ID: Date: Wed, 11 Apr 2007 00:57:05 +0200 From: usleepless@gmail.com To: "Rick Nekus" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: pvr-350 not working - how to debug? 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, 10 Apr 2007 23:22:17 -0000 Rick, List, On 4/11/07, Rick Nekus wrote: > Hi all, > > uname -a: > FreeBSD 6.2-STABLE-200703 FreeBSD 6.2-STABLE-200703 #0: Tue Mar 6 22:32:15 > UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 > > ok, well I've upgraded to 6.2-STABLE, that is, from ie. the .iso (i386) from > ..../pub/FreeBSD/snapshots/200703 > Is this correct, or stable enuf ? if not, please let me know. > > -the other thing is my newer STABLE "firmware.h" file is or should be > correct now, although now it actually doesn't even get that far when using > the pvrxxx-20070904 from usleep. > I tried a couple older versions of the pvrxxx port with same non-completed > results. -with no cxm drivers being loaded. > -again, this however somehow worked fine when I used the older > multimedia/pvr250 port ? last week, but of course now I can't reproduce that > since I've re-installed. -i know, backups are great. > > anyway here's the make output again : > ------------------------------------------------------------------------------------------------------ > [rick@tiger /usr/ports/multimedia/pvrxxx]$ sudo make makesum > ===> Vulnerability check disabled, database not found > => cxm-20051030.shar.gz doesn't seem to exist in /usr/ports/distfiles/. > => Attempting to fetch from http://usleepless.110mb.com/. > cxm-20051030.shar.gz 100% of 35 kB 60 kBps > => pvr250-1.2.tar.gz doesn't seem to exist in /usr/ports/distfiles/. > => Attempting to fetch from http://usleepless.110mb.com/. > pvr250-1.2.tar.gz 100% of 3946 B 1397 kBps > => pvrxxx_gpl-09042007.tgz doesn't seem to exist in /usr/ports/distfiles/. > => Attempting to fetch from http://usleepless.110mb.com/. > pvrxxx_gpl-09042007.tgz 100% of 45 kB 68 kBps > => firmware.tar.gz doesn't seem to exist in /usr/ports/distfiles/. > => Attempting to fetch from http://usleepless.110mb.com/. > fetch: http://usleepless.110mb.com/firmware.tar.gz: Moved Temporarily > => Attempting to fetch from http://dl.ivtvdriver.org/ivtv/firmware/. > firmware.tar.gz 100% of 121 kB 80 kBps > > [rick@tiger /usr/ports/multimedia/pvrxxx]$ sudo make > ===> Vulnerability check disabled, database not found > ===> Extracting for pvrxxx-20070904 > => MD5 Checksum OK for cxm-20051030.shar.gz. > => SHA256 Checksum OK for cxm-20051030.shar.gz. > => MD5 Checksum OK for pvr250-1.2.tar.gz. > => SHA256 Checksum OK for pvr250-1.2.tar.gz. > /bin/mkdir -p /usr/ports/multimedia/pvrxxx/work > cd /usr/ports/multimedia/pvrxxx/work; cat > /usr/ports/distfiles/cxm-20051030.shar.gz | gunzip | /bin/sh; /usr/bin/gzip > -nf -9 -dc /usr/ports/distfiles//pvr250-1.2.tar.gz | /usr/bin/tar -xf -; cd > modules/cxm/cxm; /usr/bin/gzip -nf -9 -dc > /usr/ports/distfiles//pvrxxx_gpl-09042007.tgz | /usr/bin/tar -xf -; > c - dev/cxm > x - dev/cxm/Patch.iicbb-fbsd4 > x - dev/cxm/Patch.iicbb-fbsd5 > x - dev/cxm/cxm.c > x - dev/cxm/cxm.h > x - dev/cxm/cxm_audio.c > x - dev/cxm/cxm_eeprom.c > x - dev/cxm/cxm_i2c.c > x - dev/cxm/cxm_ir.c > x - dev/cxm/cxm_tuner.c > x - dev/cxm/cxm_video.c > x - dev/cxm/cxm_extract_fw.c > c - modules/cxm > x - modules/cxm/Makefile > c - modules/cxm/cxm > x - modules/cxm/cxm/Makefile > c - modules/cxm/cxm_iic > x - modules/cxm/cxm_iic/Makefile > ===> Patching for pvrxxx-20070904 > ===> Applying FreeBSD patches for pvrxxx-20070904 > /usr/bin/sed -i.bak -e 's/tuner0/cxm0/' > /usr/ports/multimedia/pvrxxx/work/pvr250-1.2/setchannel.c > ===> Configuring for pvrxxx-20070904 > cd /usr/ports/multimedia/pvrxxx/work/modules/cxm; cd cxm_cx25840fw; tar xzf > /usr/ports/distfiles//firmware.tar.gz v4l-cx25840.fw; cd ../cxm_decfw; tar > xzf /usr/ports/distfiles//firmware.tar.gz v4l-cx2341x-dec.fw; cd > ../cxm_encfw; tar xzf /usr/ports/distfiles//firmware.tar.gz > v4l-cx2341x-enc.fw > ===> Building for pvrxxx-20070904 > cd /usr/ports/multimedia/pvrxxx/work/modules/cxm; make > ===> cxm (all) > Warning: Object directory not changed from original > /usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm > @ -> /usr/src/sys > machine -> /usr/src/sys/i386/include > :> opt_cxm.h > awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h > awk -f @/tools/makeobjops.awk @/kern/device_if.m -h > awk -f @/tools/makeobjops.awk @/dev/iicbus/iicbb_if.m -h > awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h > awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p > awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q > awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h > cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE -nostdinc > -I- -I../../.. -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include > -finline-limit=8000 -fno-common -mno-align-long-strings > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual > -fformat-extensions -std=c99 -c > /usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm.c > cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE -nostdinc > -I- -I../../.. -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include > -finline-limit=8000 -fno-common -mno-align-long-strings > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual > -fformat-extensions -std=c99 -c > /usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm_audio.c > /usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm_audio.c: > In function `cxm_msp_dpl_write': > /usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm_audio.c:280: > warning: passing arg 2 of `iicbus_write' discards qualifiers from pointer > target type > *** Error code 1 this error indicates you need to "make patch-iicbb" from /usr/ports/multimedia/pvrxxx, and rebuild your kernel. i strongly regret this is still the case. i have sent in a PR to request these patches to be applied to the kernel. the PR has been noticed but is not acted upon due to "plans". this is slowing down development and adoption, just like the lack of tuner support ( which i hope to have solved with the inclusion of the linux-tuner module ). so: cd /usr/ports/multimedia/pvrxxx make patch-iicbb cd /usr/src make buildkernel make installkernel reboot cd /usr/ports/multimedia/pvrxxx make make install etc.... regards, usleep From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 23:47:09 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E957B16A402 for ; Tue, 10 Apr 2007 23:47:09 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 7877413C484 for ; Tue, 10 Apr 2007 23:47:09 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so2336ugh for ; Tue, 10 Apr 2007 16:47:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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:content-transfer-encoding:content-disposition:references; b=JWtD/g9E0cwDT3lK+hZ8pi45qmzTQXizN5t3KTDCfyP3yqJrBDQohXD5DBdpkgyrbECdWJy6JzHELhX1yTIgjP79A32UksOx3QRRyavJUoV2Ezz/t1hd8Jxz+TVR6/Oixy11e1Xln7Z/JWNnzuAlseXPnvfCOu3toGJtGY+6Szo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CsEPZZkCUHZudXeVgzi6nqXO1qJAjhEM3NEbZIy7OVwuSlLXDi6Y6VynZbl2Jzc69sKSGMirjLvxv/8+m9zFHTntemeAxOPbRhmHwCK92AMIO0kHpK406rr3WsioUQMWACBSfHU1wHOcxYZNGnmOYfMlCPHTPD7HoZKx8MAxZeY= Received: by 10.67.29.12 with SMTP id g12mr2755ugj.1176248818315; Tue, 10 Apr 2007 16:46:58 -0700 (PDT) Received: by 10.114.192.12 with HTTP; Tue, 10 Apr 2007 16:46:52 -0700 (PDT) Message-ID: Date: Wed, 11 Apr 2007 01:46:52 +0200 From: usleepless@gmail.com To: "Sean West" In-Reply-To: <50feecaf0704101625j644470e9j7d4be6ffaca848fe@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <50feecaf0704101625j644470e9j7d4be6ffaca848fe@mail.gmail.com> Cc: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org, Rick Nekus Subject: Re: pvr-350 not working - how to debug? 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, 10 Apr 2007 23:47:10 -0000 Sean, On 4/11/07, Sean West wrote: > > if that works, fetch a new version ( fixes support for ntsc ): > > http://usleepless.110mb.com/pvrxxx_port-10042007.tgz > > Complies, installs and loads fine here (outputs 'cxm0: Eeprom PAL', is > this an issue?). Still static for me, though. thank you for testing. it is indeed an issue. can you post the relevant parts of /var/log/messages? regards, usleep From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 23:14:54 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D2B116A400 for ; Tue, 10 Apr 2007 23:14:54 +0000 (UTC) (envelope-from solarux@hotmail.com) Received: from bay0-omc1-s6.bay0.hotmail.com (bay0-omc1-s6.bay0.hotmail.com [65.54.246.78]) by mx1.freebsd.org (Postfix) with ESMTP id 7A1D313C448 for ; Tue, 10 Apr 2007 23:14:54 +0000 (UTC) (envelope-from solarux@hotmail.com) Received: from hotmail.com ([65.55.139.105]) by bay0-omc1-s6.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 10 Apr 2007 16:02:54 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 10 Apr 2007 16:02:54 -0700 Message-ID: Received: from 65.55.139.123 by by134fd.bay134.hotmail.msn.com with HTTP; Tue, 10 Apr 2007 23:02:52 GMT X-Originating-IP: [74.101.147.246] X-Originating-Email: [solarux@hotmail.com] X-Sender: solarux@hotmail.com In-Reply-To: From: "Rick Nekus" To: usleepless@gmail.com Date: Tue, 10 Apr 2007 23:02:52 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 10 Apr 2007 23:02:54.0327 (UTC) FILETIME=[5F22C870:01C77BC4] X-Mailman-Approved-At: Wed, 11 Apr 2007 04:42:18 +0000 Cc: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: pvr-350 not working - how to debug? 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, 10 Apr 2007 23:14:54 -0000 yup, I was just doin' that but i didn't see it patched in .../src/... ? [rick@tiger /usr/ports/multimedia/pvrxxx]$ sudo make patch-iicbb echo 602105 602105 Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** dev/iicbus/iicbb.c.ORIGINAL Sun Aug 24 13:49:13 2003 |--- dev/iicbus/iicbb.c Fri Jul 1 15:55:21 2005 -------------------------- Patching file dev/iicbus/iicbb.c using Plan A... Hunk #1 succeeded at 66. Hunk #2 succeeded at 83. Hunk #3 succeeded at 132. Hunk #4 succeeded at 404 with fuzz 1. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** dev/iicbus/iicbus_if.m.ORIGINAL Wed Apr 13 14:25:01 2005 |--- dev/iicbus/iicbus_if.m Mon Oct 24 00:51:05 2005 -------------------------- Patching file dev/iicbus/iicbus_if.m using Plan A... Ignoring previously applied (or reversed) patch. Hunk #1 ignored at 91. 1 out of 1 hunks ignored--saving rejects to dev/iicbus/iicbus_if.m.rej Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** dev/iicbus/iiconf.h.ORIGINAL Wed Jun 16 22:51:57 2004 |--- dev/iicbus/iiconf.h Mon Oct 24 00:43:41 2005 -------------------------- Patching file dev/iicbus/iiconf.h using Plan A... Hunk #1 succeeded at 116 (offset 2 lines). Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** dev/iicbus/iiconf.c.ORIGINAL Wed Jun 16 22:51:57 2004 |--- dev/iicbus/iiconf.c Mon Oct 24 00:47:32 2005 -------------------------- Patching file dev/iicbus/iiconf.c using Plan A... Hunk #1 succeeded at 234. done *** Error code 1 Stop in /usr/ports/multimedia/pvrxxx. >From: usleepless@gmail.com >To: "Rick Nekus" >CC: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org >Subject: Re: pvr-350 not working - how to debug? >Date: Wed, 11 Apr 2007 00:57:05 +0200 > >Rick, List, > >On 4/11/07, Rick Nekus wrote: >>Hi all, >> >>uname -a: >>FreeBSD 6.2-STABLE-200703 FreeBSD 6.2-STABLE-200703 #0: Tue Mar 6 >>22:32:15 >>UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 >> >>ok, well I've upgraded to 6.2-STABLE, that is, from ie. the .iso (i386) >>from >>..../pub/FreeBSD/snapshots/200703 >>Is this correct, or stable enuf ? if not, please let me know. >> >>-the other thing is my newer STABLE "firmware.h" file is or should be >>correct now, although now it actually doesn't even get that far when using >>the pvrxxx-20070904 from usleep. >>I tried a couple older versions of the pvrxxx port with same non-completed >>results. -with no cxm drivers being loaded. >>-again, this however somehow worked fine when I used the older >>multimedia/pvr250 port ? last week, but of course now I can't reproduce >>that >>since I've re-installed. -i know, backups are great. >> >>anyway here's the make output again : >>------------------------------------------------------------------------------------------------------ >>[rick@tiger /usr/ports/multimedia/pvrxxx]$ sudo make makesum >>===> Vulnerability check disabled, database not found >>=> cxm-20051030.shar.gz doesn't seem to exist in /usr/ports/distfiles/. >>=> Attempting to fetch from http://usleepless.110mb.com/. >>cxm-20051030.shar.gz 100% of 35 kB 60 kBps >>=> pvr250-1.2.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >>=> Attempting to fetch from http://usleepless.110mb.com/. >>pvr250-1.2.tar.gz 100% of 3946 B 1397 kBps >>=> pvrxxx_gpl-09042007.tgz doesn't seem to exist in /usr/ports/distfiles/. >>=> Attempting to fetch from http://usleepless.110mb.com/. >>pvrxxx_gpl-09042007.tgz 100% of 45 kB 68 kBps >>=> firmware.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >>=> Attempting to fetch from http://usleepless.110mb.com/. >>fetch: http://usleepless.110mb.com/firmware.tar.gz: Moved Temporarily >>=> Attempting to fetch from http://dl.ivtvdriver.org/ivtv/firmware/. >>firmware.tar.gz 100% of 121 kB 80 kBps >> >>[rick@tiger /usr/ports/multimedia/pvrxxx]$ sudo make >>===> Vulnerability check disabled, database not found >>===> Extracting for pvrxxx-20070904 >>=> MD5 Checksum OK for cxm-20051030.shar.gz. >>=> SHA256 Checksum OK for cxm-20051030.shar.gz. >>=> MD5 Checksum OK for pvr250-1.2.tar.gz. >>=> SHA256 Checksum OK for pvr250-1.2.tar.gz. >>/bin/mkdir -p /usr/ports/multimedia/pvrxxx/work >>cd /usr/ports/multimedia/pvrxxx/work; cat >>/usr/ports/distfiles/cxm-20051030.shar.gz | gunzip | /bin/sh; >>/usr/bin/gzip >>-nf -9 -dc /usr/ports/distfiles//pvr250-1.2.tar.gz | /usr/bin/tar -xf -; >>cd >>modules/cxm/cxm; /usr/bin/gzip -nf -9 -dc >>/usr/ports/distfiles//pvrxxx_gpl-09042007.tgz | /usr/bin/tar -xf -; >>c - dev/cxm >>x - dev/cxm/Patch.iicbb-fbsd4 >>x - dev/cxm/Patch.iicbb-fbsd5 >>x - dev/cxm/cxm.c >>x - dev/cxm/cxm.h >>x - dev/cxm/cxm_audio.c >>x - dev/cxm/cxm_eeprom.c >>x - dev/cxm/cxm_i2c.c >>x - dev/cxm/cxm_ir.c >>x - dev/cxm/cxm_tuner.c >>x - dev/cxm/cxm_video.c >>x - dev/cxm/cxm_extract_fw.c >>c - modules/cxm >>x - modules/cxm/Makefile >>c - modules/cxm/cxm >>x - modules/cxm/cxm/Makefile >>c - modules/cxm/cxm_iic >>x - modules/cxm/cxm_iic/Makefile >>===> Patching for pvrxxx-20070904 >>===> Applying FreeBSD patches for pvrxxx-20070904 >>/usr/bin/sed -i.bak -e 's/tuner0/cxm0/' >>/usr/ports/multimedia/pvrxxx/work/pvr250-1.2/setchannel.c >>===> Configuring for pvrxxx-20070904 >>cd /usr/ports/multimedia/pvrxxx/work/modules/cxm; cd cxm_cx25840fw; tar >>xzf >>/usr/ports/distfiles//firmware.tar.gz v4l-cx25840.fw; cd ../cxm_decfw; >>tar >>xzf /usr/ports/distfiles//firmware.tar.gz v4l-cx2341x-dec.fw; cd >>../cxm_encfw; tar xzf /usr/ports/distfiles//firmware.tar.gz >>v4l-cx2341x-enc.fw >>===> Building for pvrxxx-20070904 >>cd /usr/ports/multimedia/pvrxxx/work/modules/cxm; make >>===> cxm (all) >>Warning: Object directory not changed from original >>/usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm >>@ -> /usr/src/sys >>machine -> /usr/src/sys/i386/include >>:> opt_cxm.h >>awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h >>awk -f @/tools/makeobjops.awk @/kern/device_if.m -h >>awk -f @/tools/makeobjops.awk @/dev/iicbus/iicbb_if.m -h >>awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h >>awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p >>awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q >>awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h >>cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE -nostdinc >>-I- -I../../.. -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include >>-finline-limit=8000 -fno-common -mno-align-long-strings >>-mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 >>-ffreestanding -Wall -Wredundant-decls -Wnested-externs >>-Wstrict-prototypes >>-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual >>-fformat-extensions -std=c99 -c >>/usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm.c >>cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE -nostdinc >>-I- -I../../.. -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include >>-finline-limit=8000 -fno-common -mno-align-long-strings >>-mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 >>-ffreestanding -Wall -Wredundant-decls -Wnested-externs >>-Wstrict-prototypes >>-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual >>-fformat-extensions -std=c99 -c >>/usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm_audio.c >>/usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm_audio.c: >>In function `cxm_msp_dpl_write': >>/usr/ports/multimedia/pvrxxx/work/modules/cxm/cxm/../../../dev/cxm/cxm_audio.c:280: >>warning: passing arg 2 of `iicbus_write' discards qualifiers from pointer >>target type >>*** Error code 1 > >this error indicates you need to "make patch-iicbb" from >/usr/ports/multimedia/pvrxxx, and rebuild your kernel. > >i strongly regret this is still the case. i have sent in a PR to >request these patches to be applied to the kernel. the PR has been >noticed but is not acted upon due to "plans". this is slowing down >development and adoption, just like the lack of tuner support ( which >i hope to have solved with the inclusion of the linux-tuner module ). > >so: >cd /usr/ports/multimedia/pvrxxx >make patch-iicbb >cd /usr/src >make buildkernel >make installkernel >reboot >cd /usr/ports/multimedia/pvrxxx >make >make install >etc.... > >regards, > >usleep _________________________________________________________________ Don’t waste time standing in line—try shopping online. Visit Sympatico / MSN Shopping today! http://shopping.sympatico.msn.ca From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 23:54:15 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BCEE16A400 for ; Tue, 10 Apr 2007 23:54:15 +0000 (UTC) (envelope-from sean.west@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4BEB513C459 for ; Tue, 10 Apr 2007 23:54:15 +0000 (UTC) (envelope-from sean.west@gmail.com) Received: by nz-out-0506.google.com with SMTP id r28so1929nza for ; Tue, 10 Apr 2007 16:54:14 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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:content-transfer-encoding:content-disposition:references; b=acOQ5I+vyESgMdJ8+J/3NitilwSwaBZd0bL24V3DpDuS+rDFGxjg3lrxZccmmTLL4RTwH4P7dd9LoJcVEKnStVpIEpwIFPsgiVnVTCkVXGiyQcSWoj5HBPMEUpqHcKH0k83NRLFN0ipNCKwi6vLzXoU2YV8wrBOxlyNP4V03kxk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OHhU/XhuVPK5qmsTYcp6aHCDnRpu3GBl8Dw82JtHmeZeINPh4qvqNz9cOajz9Vpy872dvGsO5/YA8MicqFZfD//GDabUzR+VfrX44Y0Ti5JtZWEE7+P8P92PX/O8eAHEpwbRI2pBJQHyz1i2VdL4bfoTOKjFJ9guu9L7nZEAdKE= Received: by 10.114.159.1 with SMTP id h1mr3010463wae.1176247556427; Tue, 10 Apr 2007 16:25:56 -0700 (PDT) Received: by 10.114.121.4 with HTTP; Tue, 10 Apr 2007 16:25:55 -0700 (PDT) Message-ID: <50feecaf0704101625j644470e9j7d4be6ffaca848fe@mail.gmail.com> Date: Tue, 10 Apr 2007 16:25:55 -0700 From: "Sean West" To: "usleepless@gmail.com" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Mailman-Approved-At: Wed, 11 Apr 2007 04:42:54 +0000 Cc: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org, Rick Nekus Subject: Re: pvr-350 not working - how to debug? 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, 10 Apr 2007 23:54:15 -0000 > if that works, fetch a new version ( fixes support for ntsc ): > http://usleepless.110mb.com/pvrxxx_port-10042007.tgz Complies, installs and loads fine here (outputs 'cxm0: Eeprom PAL', is this an issue?). Still static for me, though. Is the -m option fixed? Sean From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 10 23:55:20 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0DDEB16A404 for ; Tue, 10 Apr 2007 23:55:20 +0000 (UTC) (envelope-from sean.west@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by mx1.freebsd.org (Postfix) with ESMTP id BFE6213C46A for ; Tue, 10 Apr 2007 23:55:19 +0000 (UTC) (envelope-from sean.west@gmail.com) Received: by wr-out-0506.google.com with SMTP id 50so2051wra for ; Tue, 10 Apr 2007 16:55:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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:content-transfer-encoding:content-disposition:references; b=eWhObX6OL8d+VlDjBFHEozAhnbEteQ7B2lgpeacy81etEVVuW7h9CH2TZ3VMfYsz0Wv0KZtt307i1rOlDezQGJl3fC/9q14CFI82d0qtFgHRKOQ4RbOsBb07lh6cSQLeAhkafoc0hukxKsuYUlpd73oRFfPPoe86PvBM5Ua8qsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VxZa3VhZ4IAmxvy04GK2Hy9dfmaY7Y75Jq1AkbAuJc5NhZ7Jj3U/Vrmrh54tnq0/FZkobb6Td8ZnDdjcU317riaH/OjbR83Agw1f4xqMQGFJsjD3SUNLcDABX6DHgpaF4z7/GGQbXU35ckWGpq6vFE0nrQqGoa8MuHSu/7ODqcQ= Received: by 10.114.183.1 with SMTP id g1mr2384waf.1176249318760; Tue, 10 Apr 2007 16:55:18 -0700 (PDT) Received: by 10.114.121.4 with HTTP; Tue, 10 Apr 2007 16:55:18 -0700 (PDT) Message-ID: <50feecaf0704101655m1ad2e9b3p2ce79312614ce860@mail.gmail.com> Date: Tue, 10 Apr 2007 16:55:18 -0700 From: "Sean West" To: "usleepless@gmail.com" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <50feecaf0704101625j644470e9j7d4be6ffaca848fe@mail.gmail.com> X-Mailman-Approved-At: Wed, 11 Apr 2007 04:43:16 +0000 Cc: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org, Rick Nekus Subject: Re: pvr-350 not working - how to debug? 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, 10 Apr 2007 23:55:20 -0000 On 4/10/07, usleepless@gmail.com wrote: > Sean, > > On 4/11/07, Sean West wrote: > > > if that works, fetch a new version ( fixes support for ntsc ): > > > http://usleepless.110mb.com/pvrxxx_port-10042007.tgz > > > > Complies, installs and loads fine here (outputs 'cxm0: Eeprom PAL', is > > this an issue?). Still static for me, though. > > thank you for testing. it is indeed an issue. can you post the > relevant parts of /var/log/messages? Certainly!... Apr 10 16:18:14 unf kernel: cxm0: mem 0xe0000000-0xe3ffffff irq 17 at device 8.0 on pci2 Apr 10 16:18:14 unf kernel: cxm_iic0: on cxm0 Apr 10 16:18:14 unf kernel: iicbb0: on cxm_iic0 Apr 10 16:18:14 unf kernel: iicbus0: on iicbb0 master-only Apr 10 16:18:14 unf kernel: <2>tveeprom: Second (radio) tuner idx 101 Apr 10 16:18:14 unf kernel: <2>tveeprom: ivtv version Apr 10 16:18:14 unf kernel: <2>tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 8024262 Apr 10 16:18:14 unf kernel: <2>tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57) Apr 10 16:18:14 unf kernel: <2>tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000) Apr 10 16:18:14 unf kernel: <2>tveeprom: audio processor = CX25843 (type = 25) Apr 10 16:18:14 unf kernel: <2>tveeprom: decoder processor = CX25843 (type = 1e) Apr 10 16:18:14 unf kernel: tuner type: 57 Apr 10 16:18:14 unf kernel: cxm0: Eeprom PAL Apr 10 16:18:14 unf kernel: tuner: type set to 57 (Philips FQ1236A MK4) by cxm Apr 10 16:18:14 unf kernel: tuner: switching to v4l2 Apr 10 16:18:14 unf kernel: tuner: tv freq set to 55.25 Apr 10 16:18:14 unf kernel: tuner: tv 0x06 0x50 0x8e 0x01 Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Video signal: not present Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Detected format: NTSC-M Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Detected audio mode: forced mode Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Detected audio standard: forced audio standard Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Audio muted: no Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Audio microcontroller: running Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Configured audio standard: A2-BG Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Configured audio mode: undefined Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified standard: PAL-BDGHI Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified input: Tuner Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified audio input: Tuner Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified audioclock freq: 48 kHz Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Preferred audio mode: stereo Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Selected 65 MHz format: autodetect Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Selected 45 MHz format: chroma Apr 10 16:18:14 unf kernel: cxm0: [FAST] Apr 10 16:18:14 unf kernel: cxm0: encoder firmware version 0x2060039 Apr 10 16:18:14 unf kernel: cxm1: mem 0xe4000000-0xe7ffffff irq 18 at device 9.0 on pci2 Apr 10 16:18:14 unf kernel: cxm_iic1: on cxm1 Apr 10 16:18:14 unf kernel: iicbb1: on cxm_iic1 Apr 10 16:18:14 unf kernel: iicbus1: on iicbb1 master-only Apr 10 16:18:14 unf kernel: <2>tveeprom: Second (radio) tuner idx 101 Apr 10 16:18:14 unf kernel: <2>tveeprom: ivtv version Apr 10 16:18:14 unf kernel: <2>tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 8024262 Apr 10 16:18:14 unf kernel: <2>tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57) Apr 10 16:18:14 unf kernel: <2>tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000) Apr 10 16:18:14 unf kernel: <2>tveeprom: audio processor = CX25843 (type = 25) Apr 10 16:18:14 unf kernel: <2>tveeprom: decoder processor = CX25843 (type = 1e) Apr 10 16:18:14 unf kernel: tuner type: 57 Apr 10 16:18:14 unf kernel: cxm1: Eeprom PAL Apr 10 16:18:14 unf kernel: tuner: type set to 57 (Philips FQ1236A MK4) by cxm Apr 10 16:18:14 unf kernel: tuner: switching to v4l2 Apr 10 16:18:14 unf kernel: tuner: tv freq set to 55.25 Apr 10 16:18:14 unf kernel: tuner: tv 0x06 0x50 0x8e 0x01 Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Video signal: not present Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Detected format: NTSC-4.43 Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Detected audio mode: forced mode Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Detected audio standard: forced audio standard Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Audio muted: no Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Audio microcontroller: running Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Configured audio standard: A2-BG Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Configured audio mode: undefined Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified standard: PAL-BDGHI Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified input: Tuner Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified audio input: Tuner Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Specified audioclock freq: 48 kHz Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Preferred audio mode: stereo Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Selected 65 MHz format: autodetect Apr 10 16:18:14 unf kernel: <2>cxm 0-0000: Selected 45 MHz format: chroma Apr 10 16:18:14 unf kernel: cxm1: [FAST] Apr 10 16:18:14 unf kernel: cxm1: encoder firmware version 0x2060039 pvr250-setchannel 331.25 Apr 10 16:18:53 unf kernel: before tuner_command! Apr 10 16:18:53 unf kernel: tuner: tv freq set to 331.25 Apr 10 16:18:53 unf kernel: tuner: tv 0x17 0x90 0x8e 0x02 Apr 10 16:18:53 unf kernel: done waiting for cx25840 = 21 Apr 10 16:18:53 unf kernel: mmmmmmsmmmmmsssssssss I used: cat /dev/cxm0 > test mplayer test to test output. I have been using 01042007 for a couple days now without a hitch. I think my reboots before were related to a SATA harddrive (well, controller) that's been giving me troubles. Since I unmounted it and removed it from the fstab, the cxm driver (01042007) has been working great. Sean From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 09:05:38 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3F1416A404 for ; Wed, 11 Apr 2007 09:05:37 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id B4FB613C44B for ; Wed, 11 Apr 2007 09:05:37 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (unknown [192.168.1.99]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 125CA5DD4 for ; Wed, 11 Apr 2007 19:05:33 +1000 (EST) From: Alan Garfield To: freebsd-hackers@freebsd.org In-Reply-To: <1176205240.4514.3.camel@hiro.auspc.com.au> References: <1176096815.4064.6.camel@hiro.auspc.com.au> <1176171656.4276.8.camel@hiro.auspc.com.au> <1176183021.5525.4.camel@hiro.auspc.com.au> <1176205240.4514.3.camel@hiro.auspc.com.au> Content-Type: text/plain Date: Wed, 11 Apr 2007 19:05:33 +1000 Message-Id: <1176282333.4134.4.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: Resources and ACPI 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, 11 Apr 2007 09:05:38 -0000 Hi all, When you have say :- ---- static int jnet_probe(device_t dev) { static char *jnet_ids[] = { "NWS8001", NULL }; if (acpi_disabled("jnet") || ACPI_ID_PROBE(device_get_parent(dev), dev, jnet_ids) == NULL) return (ENXIO); // Woo we found it, set the description s we know what we are. device_set_desc(dev, "JNet Ethernet System Interface"); return (BUS_PROBE_DEFAULT); } ---- and when the device is kldload'ed you get :- ---- jnet0: port 0xa8,0xae-0xaf irq 19 on acpi0 ---- are these resources automagically allocated for me? Or do I have to allocate them myself? I've got my driver mostly working but at the moment I've hard-coded in the resources and I'm thinking this isn't correct given the acpi bus knows what resources I'm expecting and lists them helpfully in the dmesg output. If the resources are allocated how do I access/see them? I've been all through device_t and bus.h this and acpi.h that, and I cannot find a good example of getting resources from the acpi bus. Any help would be appreciated! Thanks, Alan. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 09:51:33 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B979216A400 for ; Wed, 11 Apr 2007 09:51:33 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from sana.init-main.com (104.194.138.210.bn.2iij.net [210.138.194.104]) by mx1.freebsd.org (Postfix) with ESMTP id 5714C13C465 for ; Wed, 11 Apr 2007 09:51:33 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from ns.init-main.com (localhost [127.0.0.1]) by sana.init-main.com (8.13.8/8.13.8) with ESMTP id l3B9p4hT024402; Wed, 11 Apr 2007 18:51:04 +0900 (JST) (envelope-from takawata@ns.init-main.com) Message-Id: <200704110951.l3B9p4hT024402@sana.init-main.com> To: Alan Garfield From: takawata@jp.freebsd.org In-reply-to: Your message of "Wed, 11 Apr 2007 19:05:33 +1000." <1176282333.4134.4.camel@hiro.auspc.com.au> Date: Wed, 11 Apr 2007 18:51:04 +0900 Sender: takawata@init-main.com Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 09:51:33 -0000 In message <1176282333.4134.4.camel@hiro.auspc.com.au>, wrote: >Hi all, > >When you have say :- > >---- >static int >jnet_probe(device_t >dev) > >{ > static char *jnet_ids[] = { "NWS8001", >NULL }; > > > if (acpi_disabled("jnet") >|| > > ACPI_ID_PROBE(device_get_parent(dev), dev, >jnet_ids) == NULL) > return (ENXIO); > > // Woo we found it, set the description s we know what we >are. > device_set_desc(dev, "JNet Ethernet System >Interface"); > > return (BUS_PROBE_DEFAULT); >} >---- > >and when the device is kldload'ed you get :- > >---- >jnet0: port 0xa8,0xae-0xaf irq 19 on >acpi0 >---- > >are these resources automagically allocated for me? Or do I have to >allocate them myself? You have to allocate the resource. >I've got my driver mostly working but at the moment I've hard-coded in >the resources and I'm thinking this isn't correct given the acpi bus >knows what resources I'm expecting and lists them helpfully in the dmesg >output. > >If the resources are allocated how do I access/see them? sc->sc_rid1 = 0; sc->sc_res1 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_ACTIVE); sc->sc_rid2 = 0; sc->sc_res2 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_ACTIVE); value_af = bus_space_read_8(rman_get_bustag(sc->sc_res2), rman_get_bushandle(sc->sc_res2), 1); >I've been all through device_t and bus.h this and acpi.h that, and I >cannot find a good example of getting resources from the acpi bus. It is almost same as ISA-PnP aware device driver for devices that requires I/O port resources. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 11:48:27 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F9D316A405 for ; Wed, 11 Apr 2007 11:48:27 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id E143913C457 for ; Wed, 11 Apr 2007 11:48:26 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.197] (c220-239-255-86.rivrw3.nsw.optusnet.com.au [220.239.255.86]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 15B4C5DD4; Wed, 11 Apr 2007 21:25:19 +1000 (EST) Message-ID: <461CC586.5060507@fromorbit.com> Date: Wed, 11 Apr 2007 21:24:54 +1000 From: Alan Garfield User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: takawata@jp.freebsd.org References: <200704110951.l3B9p4hT024402@sana.init-main.com> In-Reply-To: <200704110951.l3B9p4hT024402@sana.init-main.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 11:48:27 -0000 takawata@jp.freebsd.org wrote: >> If the resources are allocated how do I access/see them? > > sc->sc_rid1 = 0; > sc->sc_res1 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_ACTIVE); > sc->sc_rid2 = 0; > sc->sc_res2 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, RF_ACTIVE); > value_af = bus_space_read_8(rman_get_bustag(sc->sc_res2), rman_get_bushandle(sc->sc_res2), 1); Thanks for this, but how does on tell which resources have been allocated to which other than manually specifying them with bus_alloc_resource()? This is the bit that's confusing me, it seem like magic happens but I need to know which resource is which. Many thanks in advance! Alan. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 11:48:36 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 024EE16A403; Wed, 11 Apr 2007 11:48:36 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from sana.init-main.com (104.194.138.210.bn.2iij.net [210.138.194.104]) by mx1.freebsd.org (Postfix) with ESMTP id A32E813C48C; Wed, 11 Apr 2007 11:48:35 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from ns.init-main.com (localhost [127.0.0.1]) by sana.init-main.com (8.13.8/8.13.8) with ESMTP id l3BBm47D024911; Wed, 11 Apr 2007 20:48:04 +0900 (JST) (envelope-from takawata@ns.init-main.com) Message-Id: <200704111148.l3BBm47D024911@sana.init-main.com> To: Alan Garfield From: takawata@jp.freebsd.org In-reply-to: Your message of "Wed, 11 Apr 2007 21:24:54 +1000." <461CC586.5060507@fromorbit.com> Date: Wed, 11 Apr 2007 20:48:04 +0900 Sender: takawata@init-main.com Cc: acpi@freebsd.org, hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 11:48:36 -0000 In message <461CC586.5060507@fromorbit.com>, Alan Garfield $B$5$s$$$o$/(B: >takawata@jp.freebsd.org wrote: >>> If the resources are allocated how do I access/see them? >> >> sc->sc_rid1 = 0; >> sc->sc_res1 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, >RF_ACTIVE); >> sc->sc_rid2 = 0; Oops! sc->sc_rid2 = 1; >> sc->sc_res2 = bus_alloc_resource_any(self, SYS_RES_IOPORT, &sc->sc_rid, >RF_ACTIVE); >> value_af = bus_space_read_8(rman_get_bustag(sc->sc_res2), rman_get_bus >handle(sc->sc_res2), 1); > >Thanks for this, but how does on tell which resources have been >allocated to which other than manually specifying them with >bus_alloc_resource()? Resource manager will do it. Device driver for a PnP aware bus will set resource location for each device under the bus. At that time, the resource is not allocated and activated. Then a device driver for a child device will allocate bus resource. rid parameter tells the order of resource you want to get. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 11:49:39 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B41C16A400 for ; Wed, 11 Apr 2007 11:49:39 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id D1B3B13C4C9 for ; Wed, 11 Apr 2007 11:49:38 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.197] (c220-239-255-86.rivrw3.nsw.optusnet.com.au [220.239.255.86]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 23EE15DD4; Wed, 11 Apr 2007 21:49:38 +1000 (EST) Message-ID: <461CCB3D.1090402@fromorbit.com> Date: Wed, 11 Apr 2007 21:49:17 +1000 From: Alan Garfield User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: takawata@jp.freebsd.org References: <200704110951.l3B9p4hT024402@sana.init-main.com> In-Reply-To: <200704110951.l3B9p4hT024402@sana.init-main.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 11:49:39 -0000 takawata@jp.freebsd.org wrote: >> and when the device is kldload'ed you get :- >> >> ---- >> jnet0: port 0xa8,0xae-0xaf irq 19 on >> acpi0 >> ---- >> >> are these resources automagically allocated for me? Or do I have to >> allocate them myself? > > You have to allocate the resource. Ok cool, but how do I get the resource list from acpi to allocated them then? Other than having an array of ioports and irqs, is there a way to get this information from acpi? I've done an acpidump and indeed the are _CRS and _PRS ResourceTemplates that describe the io and irq requirements perfectly. How do I access this data? ACPI seems to have very little documentation and nothing else seems to get resource lists (except fdc_acpi.c and uart_bus_acpi.c which don't seem to be complete. ACPI_EVALUATE_OBJECT?!?) Thanks, Alan. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 14:19:05 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48E1816A400 for ; Wed, 11 Apr 2007 14:19:05 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 39D4B13C469 for ; Wed, 11 Apr 2007 14:19:05 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id 4AF3B11A81; Wed, 11 Apr 2007 09:09:28 -0500 (CDT) Date: Wed, 11 Apr 2007 09:09:26 -0500 From: Craig Boston To: Alan Garfield , takawata@jp.freebsd.org, hackers@freebsd.org Message-ID: <20070411140926.GB60020@nowhere> Mail-Followup-To: Craig Boston , Alan Garfield , takawata@jp.freebsd.org, hackers@freebsd.org References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> <20070411140214.GA60020@nowhere> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070411140214.GA60020@nowhere> User-Agent: Mutt/1.4.2.2i Cc: Subject: Re: Resources and ACPI 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, 11 Apr 2007 14:19:05 -0000 On Wed, Apr 11, 2007 at 09:02:14AM -0500, Craig Boston wrote: > If it seems like magic, that's because it is. :) For PnP busses like > PCI, ISAPnP, and ISA-ACPI/LPC-ACPI, the OS takes care of figuring out > what resources to use and allocates them. I almost forgot, the busdma functions work for non-PnP busses like really old ISA cards as well. The only difference is that the user has to specify the resources manually in /boot/device.hints, but there's a standard API for this as well. Craig From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 14:19:05 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48F6C16A402 for ; Wed, 11 Apr 2007 14:19:05 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 399A113C455 for ; Wed, 11 Apr 2007 14:19:05 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id AC03211143; Wed, 11 Apr 2007 09:02:16 -0500 (CDT) Date: Wed, 11 Apr 2007 09:02:14 -0500 From: Craig Boston To: Alan Garfield Message-ID: <20070411140214.GA60020@nowhere> Mail-Followup-To: Craig Boston , Alan Garfield , takawata@jp.freebsd.org, hackers@freebsd.org References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <461CCB3D.1090402@fromorbit.com> User-Agent: Mutt/1.4.2.2i Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 14:19:05 -0000 On Wed, Apr 11, 2007 at 09:49:17PM +1000, Alan Garfield wrote: > I've done an acpidump and indeed the are _CRS and _PRS ResourceTemplates > that describe the io and irq requirements perfectly. How do I access > this data? ACPI seems to have very little documentation and nothing else > seems to get resource lists (except fdc_acpi.c and uart_bus_acpi.c which > don't seem to be complete. ACPI_EVALUATE_OBJECT?!?) In general, you're not supposed to. Use bus_alloc_resource and the bus_space_* functions. busdma was introduced in order to make it possible to write device drivers without having to worry about the specifics of resource allocation / access on any given platform. If it seems like magic, that's because it is. :) For PnP busses like PCI, ISAPnP, and ISA-ACPI/LPC-ACPI, the OS takes care of figuring out what resources to use and allocates them. You only need to specify the type (Memory, IO Port, IRQ) that you want and it takes care of whatever needs to be done for the particular architecture and bus your device is attached to. This means that your driver will work regardless if the resources are specified by ACPI, or if in the future if some mad scientist attaches the hardware to the PCI bus on a SPARC64 instead (with only minimal driver changes). Craig From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 14:37:09 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFA6B16A404 for ; Wed, 11 Apr 2007 14:37:09 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id AA89813C48A for ; Wed, 11 Apr 2007 14:37:09 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (c220-239-255-86.rivrw3.nsw.optusnet.com.au [220.239.255.86]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 368C35C19; Thu, 12 Apr 2007 00:37:08 +1000 (EST) From: Alan Garfield To: Craig Boston In-Reply-To: <20070411140214.GA60020@nowhere> References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> <20070411140214.GA60020@nowhere> Content-Type: text/plain Date: Thu, 12 Apr 2007 00:37:07 +1000 Message-Id: <1176302227.5057.12.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 14:37:10 -0000 On Wed, 2007-04-11 at 09:02 -0500, Craig Boston wrote: > This means that your driver will work regardless if the resources are > specified by ACPI, or if in the future if some mad scientist attaches > the hardware to the PCI bus on a SPARC64 instead (with only minimal > driver changes). Ok now I'm thoroughly confused! :) I've got a very machine specific device (eg. it's built into the PRS controller on the motherboard) so I don't think I have to worry about machine independence. At the moment I've got the io ports and irq's being hardcoded into the driver, which seems icky to me. The acpi bus when the device is attached outputs all the appropriate resources so _something_ knows what they are. All I want is a way to access them and to know what they are. Do I use bus_space_* to do this? Or is it simply the rid I pass to bus_alloc_resource_any that gets my io ports and irq's? At the moment I'm doing :- ---- // Allocate io resources for(i = 0; i < IO_MAX; i++) { if(sc->io[i] == NULL) { sc->io_rid[i] = i; sc->io[i] = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid[i], jnet_io_ports[i].addr, jnet_io_ports[i].addr, 1, RF_ACTIVE); if(sc->io[i] == NULL) { device_printf(dev, "can't allocate io port %x - %s\n", jnet_io_ports[i].addr, jnet_io_ports[i].desc); return (ENOSPC); } sc->io_allocated[i] = 0; } } // Allocate irq resource if(sc->irq == NULL) { sc->irq_rid = 0; sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irq_rid, JNET_IRQ, JNET_IRQ, 1, RF_ACTIVE); if(sc->irq == NULL) { device_printf(dev, "can't allocate irq %02i\n", JNET_IRQ); return (ENOSPC); } sc->irq_allocated = 0; } ---- How do I know which io port/irq I get when I use bus_alloc_resource_any? I should be able to get to the resources the acpi bus lists in dmesg without hard-coding them in the driver surely. I know I'm probably missing something completely obvious! Many thanks in advance. Alan. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 15:37:08 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A708116A402 for ; Wed, 11 Apr 2007 15:37:08 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 9A12D13C469 for ; Wed, 11 Apr 2007 15:37:06 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id 1BA651125D; Wed, 11 Apr 2007 10:37:06 -0500 (CDT) Date: Wed, 11 Apr 2007 10:37:03 -0500 From: Craig Boston To: Alan Garfield Message-ID: <20070411153703.GC60020@nowhere> Mail-Followup-To: Craig Boston , Alan Garfield , hackers@freebsd.org References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> <20070411140214.GA60020@nowhere> <1176302227.5057.12.camel@hiro.auspc.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1176302227.5057.12.camel@hiro.auspc.com.au> User-Agent: Mutt/1.4.2.2i Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 15:37:08 -0000 Ok, well just for the record it's been a while since I've worked with busdma so my knowledge is more of a high level overview. Hopefully if I get anything wrong someone will step in and correct me. :) On Thu, Apr 12, 2007 at 12:37:07AM +1000, Alan Garfield wrote: > I've got a very machine specific device (eg. it's built into the PRS > controller on the motherboard) so I don't think I have to worry about > machine independence. Machine independence is just a side benefit of using busdma, really it's the standard "FreeBSD driver API" way of doing things. > At the moment I've got the io ports and irq's being hardcoded into the > driver, which seems icky to me. The acpi bus when the device is attached > outputs all the appropriate resources so _something_ knows what they > are. All I want is a way to access them and to know what they are. The question is, do you really need to know what they are? The way it's supposed to work is you do something like this. int rid; rid = i; /* Allocate the i-th IO port resource */ sc->io[i] = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); /* Get a tag for use with bus_space */ sc->iot[i] = rman_get_bustag(sc->io[i]); /* Get a handle describing the resource */ sc->ioh[i] = rman_get_bushandle(sc->io[i]); bus_alloc_resource_any tells the OS to use the "default" resource allocation, which for a device that's enumerated through ACPI will be the values that you're seeing through acpi. The rman_get_* functions retrieve the tag and handle associated with the resource for use with the bus_space_* functions. AFAIK these are valid until you call bus_release_resource on sc->io[i], at which point they should be discarded. Then to read or write to registers within your IO range, you would do something like this: bus_space_write_1(sc->iot[0], sc->ioh[0], offset, value); /* Write a single byte to (your first IO port) + offset */ value = bus_space_read_2(sc->iot[1], sc->ioh[1], offset); /* Read a word from (your second IO port) + offset */ When you use bus_space_*, you don't need to know the exact starting address of your ports like you would with outb(). You only need to know the offset within the range that your device uses, the API automatically takes care of the rest. Many drivers wrap bus_space_read_* and write_* in a set of macros that automatically fill in the tag and handler, for convenience. If you really want to know the address, for example to print out for debugging messages: start = rman_get_start(sc->io[i]); size = rman_get_size(sc->io[i]); The "io 0x??? - 0x??? irq X" messages that are printed when the device attaches are normally handled by your parent bus, so you normally don't even need to worry about what the actual port base is. For an IRQ you typically call bus_setup_intr() with your resource pointer and handler function. If you need to know the IRQ number for some reason, rman_get_start() should work on that as well. There are lots of examples of using the busdma API in the kernel tree (virtually every driver). Hope this helps, Craig From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 16:22:34 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96B7D16A407 for ; Wed, 11 Apr 2007 16:22:34 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id 6343813C48A for ; Wed, 11 Apr 2007 16:22:34 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (c220-239-255-86.rivrw3.nsw.optusnet.com.au [220.239.255.86]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 8C9545DDD; Thu, 12 Apr 2007 02:22:32 +1000 (EST) From: Alan Garfield To: Craig Boston In-Reply-To: <20070411153703.GC60020@nowhere> References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> <20070411140214.GA60020@nowhere> <1176302227.5057.12.camel@hiro.auspc.com.au> <20070411153703.GC60020@nowhere> Content-Type: text/plain Date: Thu, 12 Apr 2007 02:22:31 +1000 Message-Id: <1176308551.5949.7.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 16:22:34 -0000 On Wed, 2007-04-11 at 10:37 -0500, Craig Boston wrote: > Ok, well just for the record it's been a while since I've worked with > busdma so my knowledge is more of a high level overview. Hopefully if > I get anything wrong someone will step in and correct me. :) You da man! ---- jnet0: port 0xa8,0xae-0xaf irq 19 on acpi0 jnet0: alloc io port: 00a8 size: 1 jnet0: alloc io port: 00ae size: 2 jnet0: Ethernet address: 00:09:3d:00:00:03 ---- Now for the irq! Looking at this all now it's kind of obvious how it works but until you gave me the break I was neck deep in confusion. The whole rid thing and not knowing about rman_get_start() and rman_get_size() so I could see what ports I was getting allocated was giving me grief. I was poking around in the dark with a blunt stick! Many thanks! Alan. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 16:38:26 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2693516A405 for ; Wed, 11 Apr 2007 16:38:26 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.173]) by mx1.freebsd.org (Postfix) with ESMTP id 190CD13C484 for ; Wed, 11 Apr 2007 16:38:26 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin04-en2 [10.13.10.149]) by smtpout.mac.com (Xserve/smtpout03/MantshX 4.0) with ESMTP id l3BGQtIZ024303; Wed, 11 Apr 2007 09:26:59 -0700 (PDT) Received: from [192.168.1.3] (c-24-6-177-228.hsd1.ca.comcast.net [24.6.177.228]) (authenticated bits=0) by mac.com (Xserve/smtpin04/MantshX 4.0) with ESMTP id l3BGQqWg027891 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 11 Apr 2007 09:26:53 -0700 (PDT) In-Reply-To: <461CCB3D.1090402@fromorbit.com> References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Wed, 11 Apr 2007 08:45:10 -0700 To: Alan Garfield X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 16:38:26 -0000 On Apr 11, 2007, at 4:49 AM, Alan Garfield wrote: >>> are these resources automagically allocated for me? Or do I have to >>> allocate them myself? >> You have to allocate the resource. > > Ok cool, but how do I get the resource list from acpi to allocated > them then? Other than having an array of ioports and irqs, is there > a way to get this information from acpi? The device driver knows about the hardware and as such knows what resources it needs and/or what resources the hardware makes available. You allocate what you need. Use the resource ID in combination with resource type to get what you want. If you try to allocate something that's not there, then you have a new situation that the driver needs to know about and you code accordingly. HTH, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 16:40:59 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9537B16A401 for ; Wed, 11 Apr 2007 16:40:59 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 87AFD13C483 for ; Wed, 11 Apr 2007 16:40:52 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id 47C6110E8F; Wed, 11 Apr 2007 11:40:52 -0500 (CDT) Date: Wed, 11 Apr 2007 11:40:50 -0500 From: Craig Boston To: Alan Garfield Message-ID: <20070411164050.GD60020@nowhere> Mail-Followup-To: Craig Boston , Alan Garfield , hackers@freebsd.org References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> <20070411140214.GA60020@nowhere> <1176302227.5057.12.camel@hiro.auspc.com.au> <20070411153703.GC60020@nowhere> <1176308551.5949.7.camel@hiro.auspc.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1176308551.5949.7.camel@hiro.auspc.com.au> User-Agent: Mutt/1.4.2.2i Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 11 Apr 2007 16:40:59 -0000 On Thu, Apr 12, 2007 at 02:22:31AM +1000, Alan Garfield wrote: > ---- > jnet0: port 0xa8,0xae-0xaf irq 19 on acpi0 > jnet0: alloc io port: 00a8 size: 1 > jnet0: alloc io port: 00ae size: 2 > jnet0: Ethernet address: 00:09:3d:00:00:03 > ---- Looks like it's on the right track, glad I could help! > Looking at this all now it's kind of obvious how it works but until you > gave me the break I was neck deep in confusion. Looking back at the thread I see that you're porting a Linux driver, that explains a lot of the confusion. It's been a while since I've worked with the Linux kernel in depth, but I seem to remember that a lot of drivers (especially machine-specific ones) would get the resource directly, e.g. IO port base address, and then do stuff like outb(base_addr + offset, value); value = inb(base_addr + offset); or write to mapped memory directly by constructing a pointer to the address. While doing this is possible in FreeBSD, it's discouraged as the bus_space API tends to make for cleaner code and is also more portable. On architectures with peculiar alignment requirements, or other restrictions (DMA buffers having to be below a particular address comes to mind, or bounce buffers for PAE), the OS will take care of most of the nitty gritty details for you and allow the driver to contain higher-level code. Craig From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 17:38:49 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D71416A400 for ; Wed, 11 Apr 2007 17:38:49 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E6F2A13C4B7 for ; Wed, 11 Apr 2007 17:38:48 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 486AE2090; Wed, 11 Apr 2007 19:38:42 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 395022081; Wed, 11 Apr 2007 19:38:41 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 939D8A10AC; Wed, 11 Apr 2007 19:38:41 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: keith@kgparts.com References: <200704111307.l3BD7RKp069142@pro26.abac.com> <86r6qrujwa.fsf@dwp.des.no> <20070411181800.0eb9afc1.breath@unix.net> <867isjug0f.fsf@dwp.des.no> <1279.70.106.82.159.1176304608.squirrel@70.106.82.159> <1043.70.106.82.159.1176305385.squirrel@70.106.82.159> <86y7kyudi2.fsf@dwp.des.no> <2311.70.106.82.159.1176307617.squirrel@70.106.82.159> Date: Wed, 11 Apr 2007 19:38:41 +0200 In-Reply-To: <2311.70.106.82.159.1176307617.squirrel@70.106.82.159> (keith@kgparts.com's message of "Wed, 11 Apr 2007 09:06:57 -0700 (PDT)") Message-ID: <86ps6ayfoe.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Erroneous delivery of list e-mail 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, 11 Apr 2007 17:38:49 -0000 writes: > Dag-Erling Sm=F8rgrav writes: > > Because you aren't - somebody is forwarding list traffic to you, > > possibly maliciously. > How can I stop it? I don't know, we need to figure out who's forwarding this to you. > I really hate to keep imposing on this list, but it is driving me > NUTS I understand, it doesn't make me happy either. Someone is either using us to annoy you, or using you to annoy us. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 22:23:14 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 115F516A46B for ; Wed, 11 Apr 2007 22:23:14 +0000 (UTC) (envelope-from mashtizadeh@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by mx1.freebsd.org (Postfix) with ESMTP id 7A23A13C48C for ; Wed, 11 Apr 2007 22:23:13 +0000 (UTC) (envelope-from mashtizadeh@gmail.com) Received: by nz-out-0506.google.com with SMTP id r28so259075nza for ; Wed, 11 Apr 2007 15:23:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=O/NbjXGGlmJoEOaXUtbzKR+Hz5JonJKmra3l57qeVYVkSVhRqHsToyIk6mr5F3AY0RjAiK+o/G2uaWOQStHWhZNLfFG/vvBH0cXII/To3fc7PXH8JQiUl/bySiHOot7sZybrO58/SVNBeC/dp38SfEk6Os1e0tM/iIDkA8QqhMs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=i7jQ/0Bpfg7t29650TvDTNbbpzDNOefPutcTWswS3TpivRiqeXvOWs3r1KHE2ZcGFTVvLqJ9XNpPe/HkiztFF7uQsd3tB3d06v/AAPAK7OhD1xTFPQcLwArg7GBzRzXeg43MDnxT9cVHOK5Er0/5l4px9EoxoRdFjv0YvyX79Wo= Received: by 10.114.161.11 with SMTP id j11mr469253wae.1176328706084; Wed, 11 Apr 2007 14:58:26 -0700 (PDT) Received: by 10.114.135.15 with HTTP; Wed, 11 Apr 2007 14:58:26 -0700 (PDT) Message-ID: <440b3e930704111458i354a98f8g47a03ed5ca507a5@mail.gmail.com> Date: Wed, 11 Apr 2007 17:58:26 -0400 From: "Ali Mashtizadeh" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ATAPI CD Insertion 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, 11 Apr 2007 22:23:14 -0000 SGkgRXZlcnlvbmUsCgpJcyB0aGVyZSBhIHdheSB0byBkZXRlY3QgYSBjZHJvbSBpbnNlcnQvZWpl Y3QgKGluIHRoZSBrZXJuZWwgb3IgdXNlcm1vZGUpPwpPciBpcyB0aGVyZSBhIHdheSB0byBjaGVj ayBhIG1lZGlhIGNoYW5nZT8gSSBrbm93IGF0YWRldi0+ZmxhZ3MgZ2V0cyBzZXQKd2l0aCBBVEFf RF9NRURJQV9DSEFOR0VEIHVuZGVyIGNlcnRhaW4gY29uZGl0aW9ucyBidXQgSSB3YW50IHRoYXQg dG8gaGFwcGVuCndoZW4gSSBlamVjdCAvIGluc2VydCB0aGUgbWVkaWE/IChtYXliZSBpdCBhbHJl YWR5IGhhcHBlbnMgYW5kIEknbSBkb2luZwpzb21ldGhpbmcgZWxzZSB3cm9uZykKClRoYW5rcywK LS0gCkFsaSBNYXNodGl6YWRlaArYudmE24wg2YXYtNiq24wg2LLYp9iv2YcK From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 11 22:44:41 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3EBB16A400 for ; Wed, 11 Apr 2007 22:44:41 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id AAB4E13C458 for ; Wed, 11 Apr 2007 22:44:41 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 2C99720A1; Thu, 12 Apr 2007 00:44:38 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id AA67E2094; Thu, 12 Apr 2007 00:44:37 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 98E42A10AC; Thu, 12 Apr 2007 00:44:37 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: "Ali Mashtizadeh" References: <440b3e930704111458i354a98f8g47a03ed5ca507a5@mail.gmail.com> Date: Thu, 12 Apr 2007 00:44:37 +0200 In-Reply-To: <440b3e930704111458i354a98f8g47a03ed5ca507a5@mail.gmail.com> (Ali Mashtizadeh's message of "Wed, 11 Apr 2007 17:58:26 -0400") Message-ID: <866482msyy.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: ATAPI CD Insertion 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, 11 Apr 2007 22:44:42 -0000 "Ali Mashtizadeh" writes: > Is there a way to detect a cdrom insert/eject (in the kernel or usermode)? > Or is there a way to check a media change? No, you have to poll. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 12 03:03:12 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D63CF16A401 for ; Thu, 12 Apr 2007 03:03:12 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from thing1.auspcmarket.com.au (mail.fromorbit.com [203.31.169.65]) by mx1.freebsd.org (Postfix) with ESMTP id 9C26413C465 for ; Thu, 12 Apr 2007 03:03:12 +0000 (UTC) (envelope-from alan@fromorbit.com) Received: from [192.168.1.99] (unknown [192.168.1.99]) by thing1.auspcmarket.com.au (Postfix) with ESMTP id 416365C76; Thu, 12 Apr 2007 13:03:07 +1000 (EST) From: Alan Garfield To: Craig Boston In-Reply-To: <20070411164050.GD60020@nowhere> References: <200704110951.l3B9p4hT024402@sana.init-main.com> <461CCB3D.1090402@fromorbit.com> <20070411140214.GA60020@nowhere> <1176302227.5057.12.camel@hiro.auspc.com.au> <20070411153703.GC60020@nowhere> <1176308551.5949.7.camel@hiro.auspc.com.au> <20070411164050.GD60020@nowhere> Content-Type: text/plain Date: Thu, 12 Apr 2007 13:03:07 +1000 Message-Id: <1176346987.4175.2.camel@hiro.auspc.com.au> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Resources and ACPI 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, 12 Apr 2007 03:03:12 -0000 On Wed, 2007-04-11 at 11:40 -0500, Craig Boston wrote: > Looking back at the thread I see that you're porting a Linux driver, > that explains a lot of the confusion. It's been a while since I've > worked with the Linux kernel in depth, but I seem to remember that a lot > of drivers (especially machine-specific ones) would get the resource > directly, e.g. IO port base address, and then do stuff like > > outb(base_addr + offset, value); > value = inb(base_addr + offset); > > or write to mapped memory directly by constructing a pointer to the > address. Indeed mapped memory is how this is driver is written. > While doing this is possible in FreeBSD, it's discouraged as the > bus_space API tends to make for cleaner code and is also more portable. > On architectures with peculiar alignment requirements, or other > restrictions (DMA buffers having to be below a particular address comes > to mind, or bounce buffers for PAE), the OS will take care of most of > the nitty gritty details for you and allow the driver to contain > higher-level code. Yes bus_space seems much nicer, and very useful I'm sure for platform independence. Cheers, Alan. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 12 19:35:32 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65C6C16A401 for ; Thu, 12 Apr 2007 19:35:32 +0000 (UTC) (envelope-from daniel_h_taylor@yahoo.co.uk) Received: from web27705.mail.ukl.yahoo.com (web27705.mail.ukl.yahoo.com [217.146.177.239]) by mx1.freebsd.org (Postfix) with SMTP id D2A1E13C483 for ; Thu, 12 Apr 2007 19:35:31 +0000 (UTC) (envelope-from daniel_h_taylor@yahoo.co.uk) Received: (qmail 63357 invoked by uid 60001); 12 Apr 2007 19:08:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2x2bnKtyS4SjXke2dcKDWr8f9Dhe5ekwG23iO42W3WzKiAjYLhVlx9ngTiZa7zk3svAjA+reoykcdHjkFXuDmLI1yuQaGHXGUwKXm7PN44sFijx7x2QGX8+lNr3Uu1OVi3vq9+i+29hVGfVf/K5K5VtI7KRTkhkihP6gc1D/5AA= ; Message-ID: <20070412190849.63355.qmail@web27705.mail.ukl.yahoo.com> X-YMail-OSG: F850BhQVM1lWRo3o6nMkPbx7pYq.cVEmZg84.QN28e1qzQWoApAD1F0oyXAGplyi7dIISkISkAWq6dYqrxJoJ6rLmb6QRU64K4EyUzM8b3p8Kk5rcEWNmjVilc0- Received: from [38.117.185.138] by web27705.mail.ukl.yahoo.com via HTTP; Thu, 12 Apr 2007 20:08:49 BST Date: Thu, 12 Apr 2007 20:08:49 +0100 (BST) From: Daniel Taylor To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: tcp connection splitter 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, 12 Apr 2007 19:35:32 -0000 Not a FreeBSD question per se but I thought I'd ask anyway, as there are many knowledgeable people here. I am writing a server (which btw is going to run on FreeBSD), acting as a streaming gateway for multiple TCP clients. The server connects to a source of data (which only accepts a single connection) and needs to distribute this data to multiple TCP clients. With the exception of the initial login sequence, communication is mostly one-way (data source to server, and server to clients). What is the most efficient data structure for this scenario? I need something that would scale to many client connections. The simplest solution is to maintain a separate packet queue for each client, and copy each packet received from the source to all N client queues. Of course, this solution involves a lot of memory allocations (the server receives 1-10MB of data/second), a lot of memcpy()s, and doesn't scale very well. Also, adding a packet to N queues is expensive because it needs to acquire and release N mutex locks (one for each client queue.) At the moment, I have a solution which allocates a reference-counted packet, and adds a *pointer* to it to each of the N client queues. This saves on memcpy because copying a pointer is very fast. Each enqueue bumps the refcount, each dequeue decreases it; when the refcount drops to 0, the packet is free()'d (by whomever happened to dequeue it last). If the clients are "slow" (can't keep up with the source), it's ok to drop them; hence I'm toying with the idea of having a single circular queue accessed by N clients. It would certainly save on memory allocation, but at the same time increase lock contention, because the server and N clients will all be locking the same queue mutex to access it. I could use read-write locks here (single writer, multiple readers) but it doesn't help with write lock contention. There must be some clever lockless algorithm to achieve the same effect. Any suggestions? Thanks, Dan ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 12 19:50:28 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0902B16A400 for ; Thu, 12 Apr 2007 19:50:28 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from mail.classis.ru (classis.ru [213.248.60.120]) by mx1.freebsd.org (Postfix) with ESMTP id B71D813C46A for ; Thu, 12 Apr 2007 19:50:27 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from CITRIN (ppp91-76-84-245.pppoe.mtu-net.ru [91.76.84.245]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: citrin.citrin.ru) by mail.classis.ru (Postfix) with ESMTP id 69F291227BE2 for ; Thu, 12 Apr 2007 23:50:25 +0400 (MSD) Date: Thu, 12 Apr 2007 23:49:11 +0400 From: Anton Yuzhaninov X-Mailer: The Bat! (v3.62.14) Professional Organization: Rambler X-Priority: 3 (Normal) Message-ID: <1891307882.20070412234911@citrin.ru> To: freebsd-hackers@freebsd.org In-Reply-To: <20070412190849.63355.qmail@web27705.mail.ukl.yahoo.com> References: <20070412190849.63355.qmail@web27705.mail.ukl.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: tcp connection splitter 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, 12 Apr 2007 19:50:28 -0000 Hello Daniel, You wrote on Thursday, April 12, 2007, 11:08:49 PM: DT> I could use read-write locks here (single writer, DT> multiple readers) but it doesn't help with write DT> lock contention. DT> There must be some clever lockless algorithm to DT> achieve the same effect. Try see FSM server model (e. g. using libevent). If all clients served by single thread, and signle process (using noblocking sockets) then no locks need. This model scale up to 50k-100k connections per host. -- Anton Yuzhaninov. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 12 20:00:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAEF516A408 for ; Thu, 12 Apr 2007 20:00:45 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id 5486E13C4BC for ; Thu, 12 Apr 2007 20:00:45 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 1511 invoked by uid 1001); 12 Apr 2007 20:00:27 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Thu, 12 Apr 2007 16:00:27 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17950.36826.926845.213901@bhuda.mired.org> Date: Thu, 12 Apr 2007 16:00:26 -0400 To: Daniel Taylor In-Reply-To: <20070412190849.63355.qmail@web27705.mail.ukl.yahoo.com> References: <20070412190849.63355.qmail@web27705.mail.ukl.yahoo.com> X-Mailer: VM 7.17 under 21.4 (patch 20) "Double Solitaire" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: tcp connection splitter 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, 12 Apr 2007 20:00:45 -0000 In <20070412190849.63355.qmail@web27705.mail.ukl.yahoo.com>, Daniel Taylor typed: > data/second), a lot of memcpy()s, and doesn't scale > very well. Also, adding a packet to N queues is > expensive because it needs to acquire and release > N mutex locks (one for each client queue.) You can't escape that with this architecture. In paticular: > Each > enqueue bumps the refcount, each dequeue decreases it; > when the refcount drops to 0, the packet is free()'d > (by whomever happened to dequeue it last). These operations have to be locked, so you have to acquire and release 1 mutex lock N+1 times. The FSM model already suggested works well, though I tend to call it the async I/O model, because all your I/O is done async. You track the state of each socket, and events on the socket trigger state transitions for that socket. The programming for a single execution path is a bit more complicated, because the state has to be tracked explicitly instead of being implicit in the PC, but *all* the concurrency issues go away, so overall it's a win. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 12 20:33:56 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4436516A403 for ; Thu, 12 Apr 2007 20:33:56 +0000 (UTC) (envelope-from daniel_h_taylor@yahoo.co.uk) Received: from web27714.mail.ukl.yahoo.com (web27714.mail.ukl.yahoo.com [217.146.177.248]) by mx1.freebsd.org (Postfix) with SMTP id BA2EA13C45E for ; Thu, 12 Apr 2007 20:33:55 +0000 (UTC) (envelope-from daniel_h_taylor@yahoo.co.uk) Received: (qmail 27928 invoked by uid 60001); 12 Apr 2007 20:33:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=aCQFupl5XOANuesoX9fRAAQIuzfYCq7/QgcKc+/s1T9sPu9xf7f+A6JMN4sRtE0jJTZU9niO6uHN14RdTMy0NlMupaXDsdfWyGHsrmKsElN5XDKgSL0Mqdz3+UutOXOus9xrVKBbdWw2nZMHw/w5wJRD0QJblV3IU9pjjdGxQ+k= ; Message-ID: <20070412203354.27926.qmail@web27714.mail.ukl.yahoo.com> X-YMail-OSG: KR9cheIVM1n3EbsAH4Av_kod0M1t1V04pEx8knM5JtX33ZaF.pYrwrXjcu28KMopYcBlAyUcqnHX3QIq53ncgMhFkETO9a7H6KzgkK4knwLftXMsPjEsc59dlV8- Received: from [38.117.185.138] by web27714.mail.ukl.yahoo.com via HTTP; Thu, 12 Apr 2007 21:33:54 BST Date: Thu, 12 Apr 2007 21:33:54 +0100 (BST) From: Daniel Taylor To: freebsd-hackers@freebsd.org In-Reply-To: <17950.36826.926845.213901@bhuda.mired.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: tcp connection splitter 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, 12 Apr 2007 20:33:56 -0000 > > Each > > enqueue bumps the refcount, each dequeue decreases > it; > > when the refcount drops to 0, the packet is > free()'d > > (by whomever happened to dequeue it last). > > These operations have to be locked, so you have to > acquire and release > 1 mutex lock N+1 times. Well, I was using atomic counters (based on cmpxchgl), which are much faster than pthread mutexes, but still. > The FSM model already suggested works well, though I > tend to call it > the async I/O model, because all your I/O is done > async. You track the > state of each socket, and events on the socket > trigger state > transitions for that socket. The programming for a > single execution > path is a bit more complicated, because the state > has to be tracked > explicitly instead of being implicit in the PC, but > *all* the > concurrency issues go away, so overall it's a win. I'm beginning to think that async I/O within a single thread is the only way to go. Unless there's some fancy lockless single writer multiple reader queue algorithm that I can use to avoid it. My problem with async I/O is that it's unnecessarily complex and inherently unportable. (I was thinking along the lines of "maintain two queues, one for reading, one for writing, and switch them in one atomic op when the clients drain the reader queue", only less crude.) Dan ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 12 20:47:05 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94A4516A404 for ; Thu, 12 Apr 2007 20:47:05 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id 39DC713C45A for ; Thu, 12 Apr 2007 20:47:04 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 2775 invoked by uid 1001); 12 Apr 2007 20:46:48 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Thu, 12 Apr 2007 16:46:48 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17950.39608.313810.327993@bhuda.mired.org> Date: Thu, 12 Apr 2007 16:46:48 -0400 To: Daniel Taylor In-Reply-To: <20070412203354.27926.qmail@web27714.mail.ukl.yahoo.com> References: <17950.36826.926845.213901@bhuda.mired.org> <20070412203354.27926.qmail@web27714.mail.ukl.yahoo.com> X-Mailer: VM 7.17 under 21.4 (patch 20) "Double Solitaire" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: tcp connection splitter 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, 12 Apr 2007 20:47:05 -0000 In <20070412203354.27926.qmail@web27714.mail.ukl.yahoo.com>, Daniel Taylor typed: > queue algorithm that I can use to avoid it. My > problem with async I/O is that it's unnecessarily > complex and inherently unportable. I don't know about "unnecessarily" complex. It's certainly less complex than most of the alternatives. As for unportable - no more so than anything else. Yeah, if you want it to run on a cell phone or your watch, you may have problems (then again, you may not - see below). On the other hand, the only thing about doing async I/O that's creates any portability issues is detecting events. That's got the usual portability/speed tradeoff. If portability is really important, use select() (the major problem here is that certain desktop platforms don't support select() on a disk file, but that doesn't matter in your case). Need more perforamce but still want some portability? Use libevent, which can live on top of a number of different mechanisms. Want to go as fast as you can and don't care about portability? Use kqueue (on FreeBSD, anyway). For most such things, you're spending most of your time waiting on network I/O, so using a VM of some sort (Java, Perl, Python, etc.) is perfectly acceptable. In that case, the portability issues are liable to have been taken care of by the folks porting it to your platform, so you can run it on any platform they support - like Python on the Symbian phones, or Java on most JME phones. > (I was thinking along the lines of "maintain two > queues, one for reading, one for writing, and switch > them in one atomic op when the clients drain the > reader queue", only less crude.) If you find it, I could use it as well. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 13 06:28:39 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCB0916A403 for ; Fri, 13 Apr 2007 06:28:39 +0000 (UTC) (envelope-from yurtesen-dated-1177308115.e64473@ispro.net) Received: from smtp.ispro.net.tr (smtp.ispro.net.tr [62.244.220.178]) by mx1.freebsd.org (Postfix) with SMTP id 087F413C480 for ; Fri, 13 Apr 2007 06:28:36 +0000 (UTC) (envelope-from yurtesen-dated-1177308115.e64473@ispro.net) Received: (qmail 39029 invoked by uid 89); 13 Apr 2007 06:01:55 -0000 Received: from [84.250.2.137] (dsl-tkubrasgw1-fe02fa00-137.dhcp.inet.fi [84.250.2.137]) by localhost.my.domain (tmda-ofmipd) with ESMTP; Fri, 13 Apr 2007 09:01:48 +0300 (EEST) Message-ID: <461F1CCB.7070504@ispro.net> Date: Fri, 13 Apr 2007 09:01:47 +0300 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit From: Evren Yurtesen X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) X-Primary-Address: yurtesen@ispro.net.tr X-Mailman-Approved-At: Fri, 13 Apr 2007 11:29:55 +0000 Subject: any plans to enhance 'locate'? 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, 13 Apr 2007 06:28:39 -0000 Hi, I am wondering if there are any plans to enhance the locate command. As you know, Linux slocate is storing file owner/perm info into database and it is able to show all files when the user is root compared to FreeBSD locate where you can only search files which can be listed by nobody user. I realized that this comes very handy when I am looking for certain files if I can see the files owned by root 'only' when I am root. Is there a reason why there is no port for slocate or the FreeBSD locate to not to be enhanced this way? There seems to be a port for this for Mac OS X: http://slocate.darwinports.com/dports/sysutils/slocate/ There are people trying to do workarounds: http://freebsd.munk.me.uk/archives/207-Let-root-see-all-files-with-locate.html Thanks, Evren From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 13 11:42:15 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD0A616A401 for ; Fri, 13 Apr 2007 11:42:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [83.98.131.211]) by mx1.freebsd.org (Postfix) with ESMTP id 7724E13C44B for ; Fri, 13 Apr 2007 11:42:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 2E53A1CC1C; Fri, 13 Apr 2007 13:42:14 +0200 (CEST) Date: Fri, 13 Apr 2007 13:42:14 +0200 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20070413114214.GF81821@hoeg.nl> References: <461F1CCB.7070504@ispro.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="27ZtN5FSuKKSZcBU" Content-Disposition: inline In-Reply-To: <461F1CCB.7070504@ispro.net> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Evren Yurtesen Subject: Re: any plans to enhance 'locate'? 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, 13 Apr 2007 11:42:15 -0000 --27ZtN5FSuKKSZcBU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, Just wanted to say that I think we should at least add this one to the ideas page when there's no-one who's going to do this in the nearby future. :-) --=20 Ed Schouten WWW: http://g-rave.nl/ --27ZtN5FSuKKSZcBU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGH2yW52SDGA2eCwURAqQOAJ9hiYWUzQuCWyrOUXwF8YctLQI0OACfWb7x 1ju/YhWttQ3Uk9SM72AfDfs= =RqBJ -----END PGP SIGNATURE----- --27ZtN5FSuKKSZcBU-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 13 11:51:23 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EBF616A403 for ; Fri, 13 Apr 2007 11:51:23 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail4out.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD8913C44B for ; Fri, 13 Apr 2007 11:51:23 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail4out.barnet.com.au (Postfix, from userid 1001) id 1CF5A37CAAF; Fri, 13 Apr 2007 21:35:38 +1000 (EST) X-Viruscan-Id: <461F6B0A0000F0C5CBE738@BarNet> Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail4.barnet.com.au (Postfix) with ESMTP id E4E614220C8; Fri, 13 Apr 2007 21:35:37 +1000 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail4auth.barnet.com.au (Postfix) with ESMTP id A912237BA9C; Fri, 13 Apr 2007 21:35:37 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 677E2D6; Fri, 13 Apr 2007 21:35:37 +1000 (EST) Date: Fri, 13 Apr 2007 21:35:37 +1000 From: Edwin Groothuis To: Evren Yurtesen Message-ID: <20070413113537.GA1028@k7.mavetju> Mail-Followup-To: Edwin Groothuis , Evren Yurtesen , freebsd-hackers@freebsd.org References: <461F1CCB.7070504@ispro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <461F1CCB.7070504@ispro.net> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: any plans to enhance 'locate'? 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, 13 Apr 2007 11:51:23 -0000 On Fri, Apr 13, 2007 at 09:01:47AM +0300, Evren Yurtesen wrote: > Is there a reason why there is no port for slocate or the FreeBSD > locate to not to be enhanced this way? > > There seems to be a port for this for Mac OS X: > http://slocate.darwinports.com/dports/sysutils/slocate/ Port it to FreeBSD, and submit it for in the ports collection :-) Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/ From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 13 11:53:56 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F47816A403 for ; Fri, 13 Apr 2007 11:53:56 +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 A7CAC13C4BE for ; Fri, 13 Apr 2007 11:53:55 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5C6CC.dip0.t-ipconnect.de [84.165.198.204]) by redbull.bpaserver.net (Postfix) with ESMTP id 975732E1AB; Fri, 13 Apr 2007 13:53:49 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 812735B4882; Fri, 13 Apr 2007 13:53:46 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l3DBrkT9025482; Fri, 13 Apr 2007 13:53:46 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Fri, 13 Apr 2007 13:53:46 +0200 Message-ID: <20070413135346.fs09pmvjo8cg4888@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Fri, 13 Apr 2007 13:53:46 +0200 From: Alexander Leidinger To: ajay gopalakrishnan References: <20070324145233.21891248@Magellan.Leidinger.net> <200703251948.l2PJmRrP084218@fire.jhs.private> In-Reply-To: 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.3) / FreeBSD-7.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=-14.864, required 8, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Fri, 13 Apr 2007 12:15:22 +0000 Cc: freebsd-hackers@freebsd.org, mlaier@freebsd.org Subject: Re: Have people started working on any Google Summer of code 2007 project? 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, 13 Apr 2007 11:53:56 -0000 Quoting ajay gopalakrishnan (from Tue, 27 Mar =20 2007 20:55:09 +0530): > Hi, > > Is FreeBSD restricting non-students from not taking up any project that = is > 'suitable for summer of code'? > For eg. > I was planning to take up the 'super tunnel daemon' project some time back= . > I had done some initial work but now i find that it has also been marked a= s > 'Suitable for summer of code'. I am no longer a student. I am working > currently at a firm. So i dont think that i will be eligible for the summe= r > of code. Can i still take up the project or am i forced to take up those > that are not marked as 'suitable for summer of code'? > Also, if someone has taken a summer of code project can no-one else take i= t > up as a normal project to contribute to FreeBSD ? As promised a followup now that the SoC projects are known. The Super Tunnel Daemon project is taken by a SoC student. I suggest =20 you talk with mlaier@ (project mentor) if there's a way to collaborate. Bye, Alexander. > Awaiting a reply, > Ajay. > > On 3/26/07, Julian H. Stacey wrote: >> >> Alexander Leidinger wrote: >>> Quoting "ajay gopalakrishnan" (Sat, 24 Mar 2007 >> 15:53:11 +0530): >>> >>> > Have people started working on any Google Summer of code 2007 project? >> I saw >>> > some project ideas marked as "Suitable for Summer of code" on the >> project >>> > ideas web page. But have any of those projects been taken up? >>> >>> Proposals are submitted by students to Google and available for rating >>> in the mentor-interface. No proposal is selected yet and we don't know >>> yet how many seats for students we have in this SoC. >>> >>> I suggest to have a look at the Google SoC pages, they provide a >>> timeline there. >> >> Quoting http://code.google.com/soc/ >> We've extended the deadline for student applications to Monday, March 26, >> 2007. >> >> -- >> Julian Stacey. Munich Computer Consultant, BSD Unix C Linux. >> http://berklix.com >> Escape Microsoft 20th April 2007: http://berklix.com/free/talk/ >> Ihr Rauch =3D mein allergischer Kopfschmerz. >> > _______________________________________________ > 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 If you took all the women at the Harvard Prom and laid them end to end, I wouldn't be a bit surprised. =09=09-- Dorothy Parker 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 Fri Apr 13 12:16:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 539D016A404 for ; Fri, 13 Apr 2007 12:16:45 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail4out.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) by mx1.freebsd.org (Postfix) with ESMTP id DA05D13C448 for ; Fri, 13 Apr 2007 12:16:44 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail4out.barnet.com.au (Postfix, from userid 1001) id E8D2A37CBB7; Fri, 13 Apr 2007 22:16:43 +1000 (EST) X-Viruscan-Id: <461F74AB000118C0D42F81@BarNet> Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail4.barnet.com.au (Postfix) with ESMTP id A42DB423595; Fri, 13 Apr 2007 22:16:43 +1000 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail4auth.barnet.com.au (Postfix) with ESMTP id 25EE737BB9D; Fri, 13 Apr 2007 22:16:43 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id A90DBF0; Fri, 13 Apr 2007 22:16:42 +1000 (EST) Date: Fri, 13 Apr 2007 22:16:42 +1000 From: Edwin Groothuis To: Evren Yurtesen , freebsd-hackers@freebsd.org Message-ID: <20070413121642.GB1028@k7.mavetju> Mail-Followup-To: Edwin Groothuis , Evren Yurtesen , freebsd-hackers@freebsd.org References: <461F1CCB.7070504@ispro.net> <20070413113537.GA1028@k7.mavetju> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070413113537.GA1028@k7.mavetju> User-Agent: Mutt/1.4.2.2i Cc: Subject: Re: any plans to enhance 'locate'? 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, 13 Apr 2007 12:16:45 -0000 On Fri, Apr 13, 2007 at 09:35:37PM +1000, Edwin Groothuis wrote: > On Fri, Apr 13, 2007 at 09:01:47AM +0300, Evren Yurtesen wrote: > > Is there a reason why there is no port for slocate or the FreeBSD > > locate to not to be enhanced this way? > > > > There seems to be a port for this for Mac OS X: > > http://slocate.darwinports.com/dports/sysutils/slocate/ > > Port it to FreeBSD, and submit it for in the ports collection :-) In case you're brave, the basic work is done. All you need to do is something which does do the mkdir and pw group add slocate at the installation. Don't forget portlint :-) # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # slocate/ # slocate/Makefile # slocate/distinfo # slocate/files # slocate/files/patch-main.c # echo c - slocate/ mkdir -p slocate/ > /dev/null 2>&1 echo x - slocate/Makefile sed 's/^X//' >slocate/Makefile << 'END-of-slocate/Makefile' XPORTNAME= slocate XPORTVERSION= 2.7 XCATEGORIES= sysutils security XMASTER_SITES= http://www.mirrors.wiretapped.net/security/host-security/slocate/src/ X XCOMMENT= slocate XMAINTAINER= you X XUSE_GMAKE= yes XUSE_AUTOTOOLS= automake:14 XHAS_CONFIGURE= yes X XPLIST_FILES= bin/slocate X X# X# mkdir /var/db/slocate X# pw group add slocate X# slocate -u X# X X.include END-of-slocate/Makefile echo x - slocate/distinfo sed 's/^X//' >slocate/distinfo << 'END-of-slocate/distinfo' XMD5 (slocate-2.7.tar.gz) = 4872830642ea2ed5f9aff932720583c9 XSHA256 (slocate-2.7.tar.gz) = ddff733fcc5f240d40361c5acbce0011b2204efc506efb0da63c8d0e38947dcf XSIZE (slocate-2.7.tar.gz) = 87240 END-of-slocate/distinfo echo c - slocate/files mkdir -p slocate/files > /dev/null 2>&1 echo x - slocate/files/patch-main.c sed 's/^X//' >slocate/files/patch-main.c << 'END-of-slocate/files/patch-main.c' X--- main.c.orig Fri Apr 13 22:01:37 2007 X+++ main.c Fri Apr 13 22:07:18 2007 X@@ -540,53 +540,6 @@ X } X X X-#ifdef __FreeBSD__ X-/* Get File System type in the form of a string. "*fstype*" */ X- X-char * X- get_fs_type(int fs_type) X-{ X- if (fs_type == MOUNT_UFS) X- return("*UFS*"); X- else if (fs_type == MOUNT_NFS) X- return("*NFS*"); X- else if (fs_type == MOUNT_MFS) X- return("*MFS*"); X- else if (fs_type == MOUNT_MSDOS) X- return("*MSDOS*"); X- else if (fs_type == MOUNT_LFS) X- return("*LFS*"); X- else if (fs_type == MOUNT_LOFS) X- return("*LOFS*"); X- else if (fs_type == MOUNT_FDESC) X- return("*FDESC*"); X- else if (fs_type == MOUNT_PORTAL) X- return("*PORTAL*"); X- else if (fs_type == MOUNT_NULL) X- return("*NULL*"); X- else if (fs_type == MOUNT_UMAP) X- return("*UMAP*"); X- else if (fs_type == MOUNT_KERNFS) X- return("*KERNFS*"); X- else if (fs_type == MOUNT_PROCFS) X- return("*PROCFS*"); X- else if (fs_type == MOUNT_AFS) X- return("*AFS*"); X- else if (fs_type == MOUNT_CD9660) X- return("*CD9660*"); X- else if (fs_type == MOUNT_UNION) X- return("*UNION*"); X- else if (fs_type == MOUNT_DEVFS) X- return("*DEVFS*"); X- else if (fs_type == MOUNT_EXT2FS) X- return("*EXT2FS*"); X- else if (fs_type == MOUNT_TFS) X- return("*TFS*"); X- else X- return("*NONE*"); X-} X-#endif X- X /* Parse File System Type Exclusion */ X int X parse_fs_exclude(char *estr) X@@ -637,7 +590,7 @@ X num_mounts = getfsstat(fs_stat,bufsize,MNT_WAIT); X X for (i = 0; i < num_mounts; i+=1) { X- if (strstr(estr,get_fs_type(fs_stat[i].f_type))) { X+ if (strstr(estr,fs_stat[i].f_fstypename)) { X if (!exclude_str) { X exclude_str = malloc(strlen(fs_stat[i].f_mntonname)+1); X if (!exclude_str) END-of-slocate/files/patch-main.c exit Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/ From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 14 01:25:51 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A864316A401 for ; Sat, 14 Apr 2007 01:25:51 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.freebsd.org (Postfix) with ESMTP id 5BDE813C458 for ; Sat, 14 Apr 2007 01:25:51 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from [85.21.245.235] (helo=phonon.SpringDaemons.com) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1HcOmY-0000HS-TN; Fri, 13 Apr 2007 20:37:55 +0400 Received: from localhost (localhost [127.0.0.1]) by phonon.SpringDaemons.com (Postfix) with SMTP id 4A347114A9; Fri, 13 Apr 2007 20:37:18 +0400 (MSD) Date: Fri, 13 Apr 2007 20:37:17 +0400 From: Stanislav Sedov To: "Joseph Koshy" Message-Id: <20070413203717.ee7a55ef.stas@FreeBSD.org> In-Reply-To: References: <84dead720612112006r5573a04fge2664ffe3a93f796@mail.gmail.com> <84dead720612112024w16466c65vb656e1b8088b15c5@mail.gmail.com> Organization: The FreeBSD Project X-Mailer: carrier-pigeon X-Voice: +7 916 849 20 23 X-XMPP: ssedov@jabber.ru X-ICQ: 208105021 X-Yahoo: stanislav_sedov X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-University: MEPhI Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Fri__13_Apr_2007_20_37_17_+0400_m_5W37DEN7ECSNUR" X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.6.0 Cc: freebsd-hackers@freebsd.org Subject: Re: pmcstat and squid 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, 14 Apr 2007 01:25:51 -0000 --Signature=_Fri__13_Apr_2007_20_37_17_+0400_m_5W37DEN7ECSNUR Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit Hi! Have the problem been solved somehow? I'm experiencing the same problems on 6-STABLE with squid. Apache seems to be OK. -- Stanislav Sedov ST4096-RIPE --Signature=_Fri__13_Apr_2007_20_37_17_+0400_m_5W37DEN7ECSNUR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGH7G9K/VZk+smlYERApv+AJ4k+onAJl5WglHhWvqz6S/Huj1+9ACeJfgS ZcF7zLL/NndDtavghOw+Gmg= =MQe6 -----END PGP SIGNATURE----- --Signature=_Fri__13_Apr_2007_20_37_17_+0400_m_5W37DEN7ECSNUR-- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 14 16:06:47 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D46FE16A400 for ; Sat, 14 Apr 2007 16:06:47 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id 9C2A213C455 for ; Sat, 14 Apr 2007 16:06:47 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from localhost (unknown [200.46.204.183]) by hub.org (Postfix) with ESMTP id E8A0285C8FC; Sat, 14 Apr 2007 12:45:42 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 28339-07; Sat, 14 Apr 2007 12:45:43 -0300 (ADT) Received: from ganymede.hub.org (blk-89-241-126.eastlink.ca [24.89.241.126]) by hub.org (Postfix) with ESMTP id 8714685C8E8; Sat, 14 Apr 2007 12:45:42 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 7BF7F4A93B; Sat, 14 Apr 2007 12:45:42 -0300 (ADT) Date: Sat, 14 Apr 2007 12:45:42 -0300 From: "Marc G. Fournier" To: Evren Yurtesen , hackers@freebsd.org Message-ID: In-Reply-To: <461A33A9.4070809@ispro.net.tr> References: <461A33A9.4070809@ispro.net.tr> X-Mailer: Mulberry/4.0.7 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: jail cpu/memory resource limits 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, 14 Apr 2007 16:06:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - --On Monday, April 09, 2007 15:38:01 +0300 Evren Yurtesen wrote: > Hi, > > FreeBSD supports jail cpu/memory resource limits. > http://wiki.freebsd.org/JailResourceLimits > > I hear that these are very inefficient (compared to FreeVPS for example) > and with over 1000 processes it creates noticable overhead. Is this true? Unless I'm missing something, these aren't included *in* FreeBSD at this time, but are only distributed as patches to it ... - ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email . scrappy@hub.org MSN . scrappy@hub.org Yahoo . yscrappy Skype: hub.org ICQ . 7615664 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFGIPcm4QvfyHIvDvMRAqVjAJ9Zz7136v341RnqvLvdiy+LkUUTvQCffyoL teIcJfeSXqjrob53cF6L+qo= =dFQd -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 14 14:51:29 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77A0E16A401 for ; Sat, 14 Apr 2007 14:51:29 +0000 (UTC) (envelope-from aatyrael@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 3A84C13C455 for ; Sat, 14 Apr 2007 14:51:29 +0000 (UTC) (envelope-from aatyrael@gmail.com) Received: by an-out-0708.google.com with SMTP id c18so1409478anc for ; Sat, 14 Apr 2007 07:51:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=F4T3hMVyKfosGqdFZ1d7ahptNrdL/0WH1mipq8Yuxj3MS80ZJOdLRdSKwScyKIORB3K/xikRWnTXS6nAI0BqOC6xpaE7C7nn3IS5Q7gWQwZHQdt9zDdhPAmL63WbwTaf85xEvXrYO3lFOclsVZW3yl7rpyad1ALU08B64+7a8uA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qLTul/j+Uubn59FFjceKV8ToTabIP8nWshEfA+GxRUyZh0cyaqAfOjgflrK2iA4Nhb+v+1CAK5qqlC74lj0DErC0aBsbN2Dzu+IqeI/+lrloQgtzJem2ULd8Jq/8pQK9NBFzztqq14SK3/8cFwgaUeLd0zgX+sOSRxgh6ODx6oM= Received: by 10.100.191.5 with SMTP id o5mr3102524anf.1176560656620; Sat, 14 Apr 2007 07:24:16 -0700 (PDT) Received: by 10.100.140.11 with HTTP; Sat, 14 Apr 2007 07:24:16 -0700 (PDT) Message-ID: <41a3236c0704140724v1e6e4254r20adb5e7cc7c214e@mail.gmail.com> Date: Sat, 14 Apr 2007 17:24:16 +0300 From: Tyrael To: freebsd-hackers@freebsd.org. MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 14 Apr 2007 16:43:44 +0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: prebind support status 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, 14 Apr 2007 14:51:29 -0000 Has anyone started working on porting 'prebind' from OpenBSD? Has there been any discussion over this matter; as to how much work this would require ? I would be interested into looking over this and see if i can implement it, so any info any of you has would help a lot Thx in advance :-) From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 14 21:47:38 2007 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE87116A401 for ; Sat, 14 Apr 2007 21:47:38 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 9B96A13C46E for ; Sat, 14 Apr 2007 21:47:38 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 84103 invoked by uid 0); 14 Apr 2007 21:47:36 -0000 Received: from 190.55.91.88 (HELO deimos.mars.bsd) (190.55.91.88) by relay03.pair.com with SMTP; 14 Apr 2007 21:47:36 -0000 X-pair-Authenticated: 190.55.91.88 Date: Sat, 14 Apr 2007 18:47:19 -0300 From: Alejandro Pulver To: freebsd-hackers@FreeBSD.org Message-ID: <20070414184719.110deaa2@deimos.mars.bsd> X-Mailer: Claws Mail 2.8.1 (GTK+ 2.10.11; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_wTUqSEX3_XIwvWBvlkv6AFN; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: High disk load +mount/atacontrol/NFS/SMBFS crashes the system 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, 14 Apr 2007 21:47:39 -0000 --Sig_wTUqSEX3_XIwvWBvlkv6AFN Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello. I have experienced the following problem a couple of times in 2 different machines and FreeBSD versions (see below): when the disk is continuously reading/writing (like when copying/extracting a file, checking the filesystem in the background, etc.) my system crashes sometimes (it's not an everyday thing, but quite frustrating when it happens). When copying from another machine by NFS/SMBFS more than one file at the same time (or when using the disk, like described above) often crashes (and the disk light indicator turns off). Running "atacontrol ad0 mode UDMA100" when it was UDMA133 crashed the system (the disk activity indicator was always on) when I tried to solve the problem that way. Also when I was installing a port which installs many files on the second machine without using NFS/SMBFS, trying to mount a local NTFS filesystem (with kernel driver) crashed. The first machine is an Athlon XP 2400+ with FreeBSD 6.1-RELEASE and custom kernel (see below) and the second one a new Athlon64 X2 3500 with FreeBSD 6.2-RELEASE running in i386 mode, with generic SMP kernel. See the boot messages and kernel config here: http://people.freebsd.org/~alepulver/disk-crash.tar.bz2 Also I got (only twice, when checking the filesystem after one of these crashes) the following error on the first machine, that I don't know if it's related or not to the previous problems: fsync: giving up on dirty 0xc51d6990: tag devfs, type VCHR usecount 1, writecount 0, refcount 806 mountedhere 0xc51a4000 flags () v_object 0xc144cb58 ref 0 pages 3232 lock type devfs: EXCL (count 1) by thread 0xc54e2c00 (pid 837) dev ad2s1f I would appreciate any help. If you need more information just ask. Thanks and Best Regards, Ale P.S.: please CC me as I'm not subscribed. --Sig_wTUqSEX3_XIwvWBvlkv6AFN Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGIUvniV05EpRcP2ERAlswAJ4hek0oUG/0HkwzgTJ2sTXTD2Y/HQCgpo3X rFMXe6R+f9pyPbNRpAmapKc= =IumU -----END PGP SIGNATURE----- --Sig_wTUqSEX3_XIwvWBvlkv6AFN-- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 14 22:19:26 2007 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 941AB16A401 for ; Sat, 14 Apr 2007 22:19:26 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay02.pair.com (relay02.pair.com [209.68.5.16]) by mx1.freebsd.org (Postfix) with SMTP id 34C4113C46A for ; Sat, 14 Apr 2007 22:19:26 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 51885 invoked by uid 0); 14 Apr 2007 22:19:24 -0000 Received: from 190.55.91.88 (HELO deimos.mars.bsd) (190.55.91.88) by relay02.pair.com with SMTP; 14 Apr 2007 22:19:24 -0000 X-pair-Authenticated: 190.55.91.88 Date: Sat, 14 Apr 2007 19:18:42 -0300 From: Alejandro Pulver To: freebsd-hackers@FreeBSD.org Message-ID: <20070414191842.15e2f8b1@deimos.mars.bsd> X-Mailer: Claws Mail 2.8.1 (GTK+ 2.10.11; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_JNsYRczDJYKbQg=ASDN=HRK"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: Gaim log writing delays the system 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, 14 Apr 2007 22:19:26 -0000 --Sig_JNsYRczDJYKbQg=ASDN=HRK Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello. I have enabled logging in Gaim, and when a chat message arrives and it is logged the disk writing delays (freezes) the system for less than a second, it can be noticed for example with XMMS which does a strange sound during that period. I think this problem is related to the system and not the port, that's why I asked here. Also I guess more information is needed about this, like ktrace/truss output of Gaim together with kernel statistics (vmstat/iostat). But other than ktrace, I don't use them. What would be the commands to get the most relevant information about this? I am using FreeBSD 6.2-RELEASE, and the boot message is here (the file dmesg_machine_2.txt): http://people.freebsd.org/~alepulver/disk-crash.tar.bz2 Thanks and Best Regards, Ale P.S.: please CC me as I'm not subscribed. --Sig_JNsYRczDJYKbQg=ASDN=HRK Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGIVNCiV05EpRcP2ERAuS4AKDNljzHt7f2HTQ4oFHuYlr+TPwsBACcDlOK SxHOxY230WnNdW3epgsm1kQ= =necN -----END PGP SIGNATURE----- --Sig_JNsYRczDJYKbQg=ASDN=HRK--