From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 8 00:10:14 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 9AEE016A400 for ; Sun, 8 Jul 2007 00:10:14 +0000 (UTC) (envelope-from xistence@0x58.com) Received: from mailexchange.osnn.net (1e.66.5646.static.theplanet.com [70.86.102.30]) by mx1.freebsd.org (Postfix) with SMTP id 504EA13C46E for ; Sun, 8 Jul 2007 00:10:14 +0000 (UTC) (envelope-from xistence@0x58.com) Received: (qmail 47700 invoked by uid 0); 7 Jul 2007 23:59:48 -0000 Received: from unknown (HELO ?10.10.10.22?) (xistence@0x58.com@72.208.132.56) by mailexchange.osnn.net with SMTP; 7 Jul 2007 23:59:48 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) To: usb@freebsd.org, hackers@freebsd.org, current@freebsd.org Message-Id: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-3--612617406; protocol="application/pkcs7-signature" From: Bert JW Regeer Date: Sat, 7 Jul 2007 17:03:32 -0700 X-Mailer: Apple Mail (2.752.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: device rue causes kernel panic 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 Jul 2007 00:10:14 -0000 --Apple-Mail-3--612617406 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hello, I have a USB 10/100 FastEthernet device, that is identified as a RealTek device. On 6.2-RELEASE it works without any issues, and some older versions of CURRENT it worked perfectly as well. I csup'ed to CURRENT today (2007-07-07 at 16:30 MST), rebuild my kernel and it failed, so I grabbed the hard drive, made a copy into a VMWare image, recompiled the same CURRENT with debugging enabled, and retrieved the following backtrace from kgdb from a secondary VMWare running FreeBSD 6.2-RELEASE with kgdb: (kgdb) bt #0 kdb_enter (msg=0xc0a90fed "panic") at /usr/src/sys/kern/ subr_kdb.c:310 #1 0xc074b9b4 in panic (fmt=0xc0a94933 "Trying sleep, but thread marked as sleeping prohibited") at /usr/src/sys/kern/kern_shutdown.c:547 #2 0xc077a912 in sleepq_add (wchan=0xc2322c00, lock=0x0, wmesg=0xc0a85dc8 "usbsyn", flags=0, queue=0) at /usr/src/sys/kern/subr_sleepqueue.c:289 #3 0xc0753d33 in _sleep (ident=0xc2322c00, lock=Variable "lock" is not available. ) at /usr/src/sys/kern/kern_synch.c:201 #4 0xc06cc498 in usbd_transfer (xfer=0xc2322c00) at /usr/src/sys/dev/ usb/usbdi.c:333 #5 0xc06cc5e6 in usbd_sync_transfer (xfer=0xc2322c00) at /usr/src/ sys/dev/usb/usbdi.c:406 #6 0xc06cc678 in usbd_do_request_flags_pipe (dev=0xc2275300, pipe=0xc2275100, req=0xcbd46bb8, data=0xcbd46bd3, flags=Variable "flags" is not available. ) at /usr/src/sys/dev/usb/usbdi.c:1098 #7 0xc06cc7cc in usbd_do_request_flags (dev=0xc2275300, req=0xcbd46bb8, data=0xcbd46bd3, flags=Variable "flags" is not available. ) at /usr/src/sys/dev/usb/usbdi.c:1068 #8 0xc06cc807 in usbd_do_request (dev=0xc2275300, req=0xcbd46bb8, data=0xcbd46bd3) at /usr/src/sys/dev/usb/usbdi.c:1060 #9 0xc06ae924 in rue_read_mem (sc=0xc2264d00, addr=Variable "addr" is not available. ) at /usr/src/sys/dev/usb/if_rue.c:227 #10 0xc06ae9cc in rue_csr_read_1 (sc=Variable "sc" is not available. ) at /usr/src/sys/dev/usb/if_rue.c:276 #11 0xc06aea47 in rue_miibus_readreg (dev=0xc2275080, phy=0, reg=311) at /usr/src/sys/dev/usb/if_rue.c:376 #12 0xc05f01eb in miibus_readreg (dev=0xc2274d00, phy=0, reg=311) at miibus_if.h:26 #13 0xc05f5b6e in ruephy_service (sc=0xc2278440, mii=0xc2278d00, cmd=1) at miibus_if.h:26 #14 0xc05efc14 in mii_tick (mii=0xc2278d00) at /usr/src/sys/dev/mii/ mii.c:390 #15 0xc06aef53 in rue_tick (xsc=0xc2264d00) at /usr/src/sys/dev/usb/ if_rue.c:935 #16 0xc075d229 in softclock (dummy=0x0) at /usr/src/sys/kern/ kern_timeout.c:281 #17 0xc0730905 in ithread_loop (arg=0xc21152b0) at /usr/src/sys/kern/ kern_intr.c:1036 #18 0xc072dd88 in fork_exit (callout=0xc0730750 , arg=0xc21152b0, frame=0xcbd46d38) at /usr/src/sys/kern/kern_fork.c:797 #19 0xc09e0820 in fork_trampoline () at /usr/src/sys/i386/i386/ exception.s:205 Steps to reproduce: 1. Plug in a rue device 2. plug in a cable so that it's status is active 3. ifconfig rue0 up 4. Wait for the kernel to panic about a second or so later If there is anything else you guys need me to do, please let me know and I will see what I can do. Bert JW Regeer p.s. I am not on the current@freebsd.org mailling list, please CC all replies to me. --Apple-Mail-3--612617406-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 8 04:02:43 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 85D1216A47B; Sun, 8 Jul 2007 04:02:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3B09C13C455; Sun, 8 Jul 2007 04:02:42 +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 l6841Lak099270; Sat, 7 Jul 2007 22:01:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 07 Jul 2007 22:02:03 -0600 (MDT) Message-Id: <20070707.220203.776519881.imp@bsdimp.com> To: xistence@0x58.com From: "M. Warner Losh" In-Reply-To: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> References: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> X-Mailer: Mew version 5.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]); Sat, 07 Jul 2007 22:01:21 -0600 (MDT) Cc: usb@freebsd.org, hackers@freebsd.org, current@freebsd.org Subject: Re: device rue causes kernel panic 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 Jul 2007 04:02:44 -0000 In message: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> Bert JW Regeer writes: : I have a USB 10/100 FastEthernet device, that is identified as a : RealTek device. On 6.2-RELEASE it works without any issues, and some : older versions of CURRENT it worked perfectly as well. I csup'ed to : CURRENT today (2007-07-07 at 16:30 MST), rebuild my kernel and it : failed: : panic (fmt=0xc0a94933 "Trying sleep, but thread marked as sleeping prohibited") : _sleep (ident=0xc2322c00...) at /usr/src/sys/kern/kern_synch.c:201 : usbd_transfer (xfer=0xc2322c00) at /usr/src/sys/dev/usb/usbdi.c:333 : usbd_sync_transfer (xfer=0xc2322c00) at /usr/src/sys/dev/usb/usbdi.c:406 : usbd_do_request_flags_pipe ... at /usr/src/sys/dev/usb/usbdi.c:1098 : usbd_do_request_flags ...at /usr/src/sys/dev/usb/usbdi.c:1068 : usbd_do_request at /usr/src/sys/dev/usb/usbdi.c:1060 : rue_read_mem at /usr/src/sys/dev/usb/if_rue.c:227 : rue_csr_read_1 at /usr/src/sys/dev/usb/if_rue.c:276 : rue_miibus_readreg at /usr/src/sys/dev/usb/if_rue.c:376 ... : ruephy_service at miibus_if.h:26 /* Likely wrong */ : mii_tick at /usr/src/sys/dev/mii/mii.c:390 : rue_tick at /usr/src/sys/dev/usb/if_rue.c:935 : softclock at /usr/src/sys/kern/kern_timeout.c:281 ... This driver needs to be re-written ala aue, axe, kue and udav to use a taskqueue for the mii ticking. It appears to be the only usb driver in the tree to still do stuff directly in a callout. This context can't sleep... Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 8 04:14: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 6A04216A421; Sun, 8 Jul 2007 04:14:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1014513C480; Sun, 8 Jul 2007 04:14:41 +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 l684E2lt099333; Sat, 7 Jul 2007 22:14:02 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 07 Jul 2007 22:14:44 -0600 (MDT) Message-Id: <20070707.221444.-1816826594.imp@bsdimp.com> To: xistence@0x58.com From: "M. Warner Losh" In-Reply-To: <20070707.220203.776519881.imp@bsdimp.com> References: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> <20070707.220203.776519881.imp@bsdimp.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Jul__7_22_14_44_2007_946)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 07 Jul 2007 22:14:03 -0600 (MDT) Cc: usb@freebsd.org, hackers@freebsd.org, current@freebsd.org Subject: Re: device rue causes kernel panic 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 Jul 2007 04:14:42 -0000 ----Next_Part(Sat_Jul__7_22_14_44_2007_946)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In message: <20070707.220203.776519881.imp@bsdimp.com> "M. Warner Losh" writes: : In message: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> : Bert JW Regeer writes: : : I have a USB 10/100 FastEthernet device, that is identified as a : : RealTek device. On 6.2-RELEASE it works without any issues, and some : : older versions of CURRENT it worked perfectly as well. I csup'ed to : : CURRENT today (2007-07-07 at 16:30 MST), rebuild my kernel and it : : failed: : : panic (fmt=0xc0a94933 "Trying sleep, but thread marked as sleeping prohibited") : : _sleep (ident=0xc2322c00...) at /usr/src/sys/kern/kern_synch.c:201 : : usbd_transfer (xfer=0xc2322c00) at /usr/src/sys/dev/usb/usbdi.c:333 : : usbd_sync_transfer (xfer=0xc2322c00) at /usr/src/sys/dev/usb/usbdi.c:406 : : usbd_do_request_flags_pipe ... at /usr/src/sys/dev/usb/usbdi.c:1098 : : usbd_do_request_flags ...at /usr/src/sys/dev/usb/usbdi.c:1068 : : usbd_do_request at /usr/src/sys/dev/usb/usbdi.c:1060 : : rue_read_mem at /usr/src/sys/dev/usb/if_rue.c:227 : : rue_csr_read_1 at /usr/src/sys/dev/usb/if_rue.c:276 : : rue_miibus_readreg at /usr/src/sys/dev/usb/if_rue.c:376 : ... : : ruephy_service at miibus_if.h:26 /* Likely wrong */ : : mii_tick at /usr/src/sys/dev/mii/mii.c:390 : : rue_tick at /usr/src/sys/dev/usb/if_rue.c:935 : : softclock at /usr/src/sys/kern/kern_timeout.c:281 : ... : : This driver needs to be re-written ala aue, axe, kue and udav to use a : taskqueue for the mii ticking. It appears to be the only usb driver : in the tree to still do stuff directly in a callout. This context : can't sleep... You might try this patch. Warner ----Next_Part(Sat_Jul__7_22_14_44_2007_946)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rue-task.diff" Index: if_rue.c =================================================================== RCS file: /cache/ncvs/src/sys/dev/usb/if_rue.c,v retrieving revision 1.39 diff -u -r1.39 if_rue.c --- if_rue.c 20 Jun 2007 05:10:52 -0000 1.39 +++ if_rue.c 8 Jul 2007 04:13:16 -0000 @@ -142,6 +142,7 @@ static void rue_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); static void rue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); static void rue_tick(void *); +static void rue_tick_task(void *); static void rue_rxstart(struct ifnet *); static void rue_start(struct ifnet *); static int rue_ioctl(struct ifnet *, u_long, caddr_t); @@ -594,6 +595,8 @@ goto error; } + usb_init_task(&sc->rue_tick_task, rue_tick_task, sc); + err = usbd_device2interface_handle(uaa->device, RUE_IFACE_IDX, &iface); if (err) { device_printf(sc->rue_dev, "getting interface handle failed\n"); @@ -704,6 +707,7 @@ sc->rue_dying = 1; untimeout(rue_tick, sc, sc->rue_stat_ch); + usb_rem_task(sc->rue_udev, &sc->rue_tick_task); ether_ifdetach(ifp); if_free(ifp); @@ -916,6 +920,20 @@ static void rue_tick(void *xsc) { + struct rue_softc *sc = xsc; + + if (sc == NULL) + return; + if (sc->rue_dying) + return; + + /* Perform periodic stuff in process context */ + usb_add_task(sc->rue_udev, &sc->rue_tick_task, USB_TASKQ_DRIVER); +} + +static void +rue_tick_task(void *xsc) +{ struct rue_softc *sc = xsc; struct ifnet *ifp; struct mii_data *mii; Index: if_ruereg.h =================================================================== RCS file: /cache/ncvs/src/sys/dev/usb/if_ruereg.h,v retrieving revision 1.7 diff -u -r1.7 if_ruereg.h --- if_ruereg.h 12 May 2007 05:53:53 -0000 1.7 +++ if_ruereg.h 8 Jul 2007 04:11:39 -0000 @@ -204,6 +204,7 @@ char rue_dying; struct timeval rue_rx_notice; struct usb_qdat rue_qdat; + struct usb_task rue_tick_task; }; #if defined(__FreeBSD__) ----Next_Part(Sat_Jul__7_22_14_44_2007_946)---- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 8 07:21:04 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 B25C316A47A for ; Sun, 8 Jul 2007 07:21:04 +0000 (UTC) (envelope-from xistence@0x58.com) Received: from mailexchange.osnn.net (1e.66.5646.static.theplanet.com [70.86.102.30]) by mx1.freebsd.org (Postfix) with SMTP id 68F2113C4AE for ; Sun, 8 Jul 2007 07:21:04 +0000 (UTC) (envelope-from xistence@0x58.com) Received: (qmail 67346 invoked by uid 0); 8 Jul 2007 07:17:18 -0000 Received: from unknown (HELO ?10.10.10.22?) (xistence@0x58.com@72.208.132.56) by mailexchange.osnn.net with SMTP; 8 Jul 2007 07:17:18 -0000 In-Reply-To: <20070707.221444.-1816826594.imp@bsdimp.com> References: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> <20070707.220203.776519881.imp@bsdimp.com> <20070707.221444.-1816826594.imp@bsdimp.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-5--586368409; protocol="application/pkcs7-signature" Message-Id: <89437BFD-62EF-49FB-9405-8364719F1CFE@0x58.com> From: Bert JW Regeer Date: Sun, 8 Jul 2007 00:21:01 -0700 To: M. Warner Losh X-Mailer: Apple Mail (2.752.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: usb@freebsd.org, hackers@freebsd.org, current@freebsd.org Subject: Re: device rue causes kernel panic 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 Jul 2007 07:21:04 -0000 --Apple-Mail-5--586368409 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Jul 7, 2007, at 9:14 PM, M. Warner Losh wrote: > In message: <20070707.220203.776519881.imp@bsdimp.com> > "M. Warner Losh" writes: > : In message: <9496044C-3275-4D9C-8FFF-FD1FCE1F6728@0x58.com> > : Bert JW Regeer writes: > : : I have a USB 10/100 FastEthernet device, that is identified as a > : : RealTek device. On 6.2-RELEASE it works without any issues, and > some > : : older versions of CURRENT it worked perfectly as well. I > csup'ed to > : : CURRENT today (2007-07-07 at 16:30 MST), rebuild my kernel and it > : : failed: > : : panic (fmt=0xc0a94933 "Trying sleep, but thread marked as > sleeping prohibited") > : : _sleep (ident=0xc2322c00...) at /usr/src/sys/kern/kern_synch.c:201 > : : usbd_transfer (xfer=0xc2322c00) at /usr/src/sys/dev/usb/usbdi.c: > 333 > : : usbd_sync_transfer (xfer=0xc2322c00) at /usr/src/sys/dev/usb/ > usbdi.c:406 > : : usbd_do_request_flags_pipe ... at /usr/src/sys/dev/usb/usbdi.c: > 1098 > : : usbd_do_request_flags ...at /usr/src/sys/dev/usb/usbdi.c:1068 > : : usbd_do_request at /usr/src/sys/dev/usb/usbdi.c:1060 > : : rue_read_mem at /usr/src/sys/dev/usb/if_rue.c:227 > : : rue_csr_read_1 at /usr/src/sys/dev/usb/if_rue.c:276 > : : rue_miibus_readreg at /usr/src/sys/dev/usb/if_rue.c:376 > : ... > : : ruephy_service at miibus_if.h:26 /* Likely wrong */ > : : mii_tick at /usr/src/sys/dev/mii/mii.c:390 > : : rue_tick at /usr/src/sys/dev/usb/if_rue.c:935 > : : softclock at /usr/src/sys/kern/kern_timeout.c:281 > : ... > : > : This driver needs to be re-written ala aue, axe, kue and udav to > use a > : taskqueue for the mii ticking. It appears to be the only usb driver > : in the tree to still do stuff directly in a callout. This context > : can't sleep... > > You might try this patch. > > Warner > Index: if_rue.c > =================================================================== > RCS file: /cache/ncvs/src/sys/dev/usb/if_rue.c,v > retrieving revision 1.39 > diff -u -r1.39 if_rue.c > --- if_rue.c 20 Jun 2007 05:10:52 -0000 1.39 > +++ if_rue.c 8 Jul 2007 04:13:16 -0000 > @@ -142,6 +142,7 @@ > static void rue_rxeof(usbd_xfer_handle, usbd_private_handle, > usbd_status); > static void rue_txeof(usbd_xfer_handle, usbd_private_handle, > usbd_status); > static void rue_tick(void *); > +static void rue_tick_task(void *); > static void rue_rxstart(struct ifnet *); > static void rue_start(struct ifnet *); > static int rue_ioctl(struct ifnet *, u_long, caddr_t); > @@ -594,6 +595,8 @@ > goto error; > } > > + usb_init_task(&sc->rue_tick_task, rue_tick_task, sc); > + > err = usbd_device2interface_handle(uaa->device, RUE_IFACE_IDX, > &iface); > if (err) { > device_printf(sc->rue_dev, "getting interface handle failed\n"); > @@ -704,6 +707,7 @@ > > sc->rue_dying = 1; > untimeout(rue_tick, sc, sc->rue_stat_ch); > + usb_rem_task(sc->rue_udev, &sc->rue_tick_task); > ether_ifdetach(ifp); > if_free(ifp); > > @@ -916,6 +920,20 @@ > static void > rue_tick(void *xsc) > { > + struct rue_softc *sc = xsc; > + > + if (sc == NULL) > + return; > + if (sc->rue_dying) > + return; > + > + /* Perform periodic stuff in process context */ > + usb_add_task(sc->rue_udev, &sc->rue_tick_task, USB_TASKQ_DRIVER); > +} > + > +static void > +rue_tick_task(void *xsc) > +{ > struct rue_softc *sc = xsc; > struct ifnet *ifp; > struct mii_data *mii; > Index: if_ruereg.h > =================================================================== > RCS file: /cache/ncvs/src/sys/dev/usb/if_ruereg.h,v > retrieving revision 1.7 > diff -u -r1.7 if_ruereg.h > --- if_ruereg.h 12 May 2007 05:53:53 -0000 1.7 > +++ if_ruereg.h 8 Jul 2007 04:11:39 -0000 > @@ -204,6 +204,7 @@ > char rue_dying; > struct timeval rue_rx_notice; > struct usb_qdat rue_qdat; > + struct usb_task rue_tick_task; > }; > > #if defined(__FreeBSD__) > _______________________________________________ > 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" This patch works, in that no more Kernel panics are created, however the following did show up in dmesg//var/log/messages as I was using dhclient rue0: Jul 7 16:15:53 FreeBSD-VMWare root: Unknown USB device: vendor 0x0bda product 0x8150 bus uhub0 Jul 7 16:15:53 FreeBSD-VMWare kernel: rue0: on uhub0 Jul 7 16:15:53 FreeBSD-VMWare kernel: miibus0: on rue0 Jul 7 16:15:53 FreeBSD-VMWare kernel: ruephy0: PHY 0 on miibus0 Jul 7 16:15:53 FreeBSD-VMWare kernel: ruephy0: 10baseT, 10baseT- FDX, 100baseTX, 100baseTX-FDX, auto Jul 7 16:15:53 FreeBSD-VMWare kernel: rue0: using obsoleted if_watchdog interface Jul 7 16:15:53 FreeBSD-VMWare kernel: rue0: Ethernet address: 00:10:60:e0:ab:a8 Jul 7 16:15:53 FreeBSD-VMWare kernel: rue0: if_start running deferred for Giant Jul 7 16:15:53 FreeBSD-VMWare kernel: rue0: link state changed to DOWN Jul 7 16:15:54 FreeBSD-VMWare kernel: uhub2: on uhub0 Jul 7 16:15:54 FreeBSD-VMWare kernel: uhub2: 7 ports with 7 removable, self powered Jul 7 16:15:57 FreeBSD-VMWare kernel: rue0: link state changed to UP Jul 7 16:15:57 FreeBSD-VMWare kernel: rue0: link state changed to DOWN Jul 7 16:15:57 FreeBSD-VMWare kernel: rue0: link state changed to UP Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: lock order reversal: (Giant after non-sleepable) Jul 7 16:16:09 FreeBSD-VMWare kernel: 1st 0xc0bf334c in_multi_mtx (in_multi_mtx) @ /usr/src/sys/netinet/in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: 2nd 0xc0ba47a8 Giant (Giant) @ /usr/src/sys/kern/kern_synch.c:235 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:09 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:09 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/in.c:506 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:12 FreeBSD-VMWare kernel: Sleeping on "usbsyn" with the following non-sleepable locks held: Jul 7 16:16:12 FreeBSD-VMWare kernel: exclusive sleep mutex in_multi_mtx r = 0 (0xc0bf334c) locked @ /usr/src/sys/netinet/ in_mcast.c:317 Jul 7 16:16:12 FreeBSD-VMWare dhclient: New IP Address (rue0): 10.10.10.228 Jul 7 16:16:12 FreeBSD-VMWare dhclient: New Subnet Mask (rue0): 255.255.255.0 Jul 7 16:16:12 FreeBSD-VMWare dhclient: New Broadcast Address (rue0): 10.10.10.255 Jul 7 16:16:12 FreeBSD-VMWare dhclient: New Routers (rue0): 10.10.10.11 Bert JW Regeer --Apple-Mail-5--586368409-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 8 13:38:11 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 9A6EB16A468 for ; Sun, 8 Jul 2007 13:38:11 +0000 (UTC) (envelope-from simias.n@gmail.com) Received: from simias.hd.free.fr (vit94-5-82-243-51-8.fbx.proxad.net [82.243.51.8]) by mx1.freebsd.org (Postfix) with ESMTP id 2C40C13C458 for ; Sun, 8 Jul 2007 13:38:10 +0000 (UTC) (envelope-from simias.n@gmail.com) Received: from simias.hd.free.fr (localhost [127.0.0.1]) by simias.hd.free.fr (8.14.1/8.14.1) with ESMTP id l68DNEoJ044392 for ; Sun, 8 Jul 2007 15:23:14 +0200 (CEST) (envelope-from simias.n@gmail.com) Received: (from simias@localhost) by simias.hd.free.fr (8.14.1/8.14.1/Submit) id l68DMwIo044391; Sun, 8 Jul 2007 15:22:58 +0200 (CEST) (envelope-from simias.n@gmail.com) X-Authentication-Warning: simias.hd.free.fr: simias set sender to simias.n@gmail.com using -f From: Simias To: freebsd-hackers@freebsd.org Date: Sun, 08 Jul 2007 15:22:43 +0200 Message-ID: <868x9rav30.fsf@simias.hd.free.fr> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: playing with tun 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 Jul 2007 13:38:11 -0000 Hello hackers, I'm trying to make an ip tunnel using the tun(4) interface. I successfully open the tunnel, and after configuration it with ifconfig, I receive and send the ip packets without problem. However, I'd like to do this without ifconfig, so i can set the ip/netmask/broadcast/... by myself in the program. I've found the proper ioctls in the ifconfig source code, but i don't know how to use them, since it seems I have to know the name of the tunX interface (or at least, that's what i think). So my question is: once I've opened /dev/tun, how can i know the name of the network interface it created, so i can configure it? Thank you, -- Simias From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 8 18:44:31 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 3478A16A400 for ; Sun, 8 Jul 2007 18:44:31 +0000 (UTC) (envelope-from clcchu@hotmail.com) Received: from bay0-omc1-s40.bay0.hotmail.com (bay0-omc1-s40.bay0.hotmail.com [65.54.246.112]) by mx1.freebsd.org (Postfix) with ESMTP id 229C713C46C for ; Sun, 8 Jul 2007 18:44:31 +0000 (UTC) (envelope-from clcchu@hotmail.com) Received: from hotmail.com ([65.55.139.119]) by bay0-omc1-s40.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sun, 8 Jul 2007 11:32:31 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 8 Jul 2007 11:32:30 -0700 Message-ID: Received: from 65.55.139.123 by by134fd.bay134.hotmail.msn.com with HTTP; Sun, 08 Jul 2007 18:32:27 GMT X-Originating-IP: [61.93.45.16] X-Originating-Email: [clcchu@hotmail.com] X-Sender: clcchu@hotmail.com From: "Clarence Chu" To: freebsd-hackers@freebsd.org Date: Mon, 09 Jul 2007 02:32:27 +0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 08 Jul 2007 18:32:30.0966 (UTC) FILETIME=[58061960:01C7C18E] Subject: IT-CareFree: a way of using FreeBSD 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 Jul 2007 18:44:31 -0000 Hi hackers, I'd canned some applications and is using Solaris as a bootserver to serve diskless, or un-bootable windoz:) please comment on http://www.compass.com.hk thanks for the bandwidth, and your precious time. Clarence CHU clcchu@hotmail.com _________________________________________________________________ Learn English via Shopping Game, FREE! http://www.linguaphonenet.com/BannerTrack.asp?EMSCode=MSN06-03ETFJ-0211E From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 03:14:13 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 2EC5216A468 for ; Mon, 9 Jul 2007 03:14:13 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from ercist.iscas.ac.cn (ercist.iscas.ac.cn [124.16.138.3]) by mx1.freebsd.org (Postfix) with SMTP id CA4F913C48C for ; Mon, 9 Jul 2007 03:14:11 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: (qmail 57435 invoked by uid 98); 9 Jul 2007 03:05:00 -0000 Received: from 222.191.237.170 by ercist.iscas.ac.cn (envelope-from , uid 89) with qmail-scanner-1.25 (spamassassin: 3.1.0. Clear:RC:1(222.191.237.170):SA:0(0.0/10.0):. Processed in 12.211863 secs); 09 Jul 2007 03:05:00 -0000 X-Spam-Status: No, hits=0.0 required=10.0 X-Qmail-Scanner-Mail-From: zhouzhouyi@FreeBSD.org via ercist.iscas.ac.cn X-Qmail-Scanner: 1.25 (Clear:RC:1(222.191.237.170):SA:0(0.0/10.0):. Processed in 12.211863 secs) Received: from unknown (HELO zzy.H.qngy.gscas) (zhouzhouyi@ercist.iscas.ac.cn@222.191.237.170) by 0 with SMTP; 9 Jul 2007 03:04:48 -0000 Date: Mon, 9 Jul 2007 11:02:16 +0800 From: zhouyi zhou To: zhouyi zhou Message-Id: <20070709110216.459ca250.zhouzhouyi@FreeBSD.org> In-Reply-To: <20070709105547.71827eb8.zhouzhouyi@FreeBSD.org> References: <20070709105547.71827eb8.zhouzhouyi@FreeBSD.org> Organization: Institute of Software X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: rewrite src/sys/i386/i386/in_cksum.c 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 Jul 2007 03:14:13 -0000 Sorry, previously send the preprocessed version of in_cksum.c: What really needs to be replaced is for example: 408 if (mlen >= 16) { 409 ADD(0); 410 ADDC(4); 411 ADDC(8); 412 ADDC(12); 413 MOP; 414 w += 8; 415 mlen -= 16; 416 } On Mon, 9 Jul 2007 10:55:47 +0800 zhouyi zhou wrote: > Hey, > Since FreeBSD update gcc from 3.4.x to 4.2.0, the FreeBSD gdb remote debugger in i386 platform > will find the TCP/UPD checksum will not be computed right, when calling macro in_cksum > which calls in_cksum_skip in src/sys/i386/i386/in_cksum.c in case of getting rid of -O flag > supplied to gcc when compiling(The optimize will interfere with comfortable gdb debugging). > > The reason is for example in src/sys/i386/i386/in_cksum.c: > 126 if (mlen >= 16) { > 127 __asm volatile ("addl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[0 / 4])); > 128 __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[4 / 4])); > 129 __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[8 / 4])); > 130 __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[12 / 4])); > 131 __asm volatile ("adcl $0, %0" : "+r" (sum)); > 132 w += 8; > 133 mlen -= 16; > 134 } > From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 03:27:31 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 CBD2B16A468 for ; Mon, 9 Jul 2007 03:27:31 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from ercist.iscas.ac.cn (ercist.iscas.ac.cn [124.16.138.3]) by mx1.freebsd.org (Postfix) with SMTP id ACE2313C46E for ; Mon, 9 Jul 2007 03:27:28 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: (qmail 55506 invoked by uid 98); 9 Jul 2007 02:58:19 -0000 Received: from 222.191.237.170 by ercist.iscas.ac.cn (envelope-from , uid 89) with qmail-scanner-1.25 (spamassassin: 3.1.0. Clear:RC:1(222.191.237.170):SA:0(0.0/10.0):. Processed in 1.014499 secs); 09 Jul 2007 02:58:19 -0000 X-Spam-Status: No, hits=0.0 required=10.0 X-Qmail-Scanner-Mail-From: zhouzhouyi@FreeBSD.org via ercist.iscas.ac.cn X-Qmail-Scanner: 1.25 (Clear:RC:1(222.191.237.170):SA:0(0.0/10.0):. Processed in 1.014499 secs) Received: from unknown (HELO zzy.H.qngy.gscas) (zhouzhouyi@ercist.iscas.ac.cn@222.191.237.170) by 0 with SMTP; 9 Jul 2007 02:58:17 -0000 Date: Mon, 9 Jul 2007 10:55:47 +0800 From: zhouyi zhou To: freebsd-hackers@FreeBSD.org Message-Id: <20070709105547.71827eb8.zhouzhouyi@FreeBSD.org> Organization: Institute of Software X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: rewrite src/sys/i386/i386/in_cksum.c 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 Jul 2007 03:27:31 -0000 Hey, Since FreeBSD update gcc from 3.4.x to 4.2.0, the FreeBSD gdb remote debugger in i386 platform will find the TCP/UPD checksum will not be computed right, when calling macro in_cksum which calls in_cksum_skip in src/sys/i386/i386/in_cksum.c in case of getting rid of -O flag supplied to gcc when compiling(The optimize will interfere with comfortable gdb debugging). The reason is for example in src/sys/i386/i386/in_cksum.c: 126 if (mlen >= 16) { 127 __asm volatile ("addl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[0 / 4])); 128 __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[4 / 4])); 129 __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[8 / 4])); 130 __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[12 / 4])); 131 __asm volatile ("adcl $0, %0" : "+r" (sum)); 132 w += 8; 133 mlen -= 16; 134 } This is OK with gcc-3.4.x, because the compiler will not insert add instructions between the _asm expressions, but in gcc-4.x.x case, the compiler will insert add instruction between the _asm expressions which will let carrage bit in eflags cleared. 0x0804877c : cmpl $0xf,0xffffffec(%ebp) 0x08048780 : jle 0x80487d0 0x08048782 : mov 0xffffffe4(%ebp),%eax 0x08048785 : mov (%eax),%eax 0x08048787 : mov 0xffffffe8(%ebp),%edx 0x0804878a : add %eax,%edx 0x0804878c : mov %edx,0xffffffe8(%ebp) 0x0804878f : mov 0xffffffe4(%ebp),%eax ---Type to continue, or q to quit--- 0x08048792 : add $0x4,%eax 0x08048795 : mov (%eax),%eax 0x08048797 : mov 0xffffffe8(%ebp),%edx 0x0804879a : adc %eax,%edx 0x0804879c : mov %edx,0xffffffe8(%ebp) 0x0804879f : mov 0xffffffe4(%ebp),%eax 0x080487a2 : add $0x8,%eax 0x080487a5 : mov (%eax),%eax 0x080487a7 : mov 0xffffffe8(%ebp),%edx 0x080487aa : adc %eax,%edx 0x080487ac : mov %edx,0xffffffe8(%ebp) 0x080487af : mov 0xffffffe4(%ebp),%eax 0x080487b2 : add $0xc,%eax 0x080487b5 : mov (%eax),%eax 0x080487b7 : mov 0xffffffe8(%ebp),%edx 0x080487ba : adc %eax,%edx 0x080487bc : mov %edx,0xffffffe8(%ebp) So, I suggest rewrite src/sys/i386/i386/in_cksum.c in following style, for example: --- in_cksum.c 2007-07-06 22:45:52.000000000 +0000 +++ in_cksum1.c 2007-07-07 00:18:25.000000000 +0000 @@ -124,11 +124,14 @@ mlen -= 32; } if (mlen >= 16) { - __asm volatile ("addl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[0 / 4])); - __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[4 / 4])); - __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[8 / 4])); - __asm volatile ("adcl %1, %0" : "+r" (sum) : "g" (((const unsigned int *)w)[12 / 4])); - __asm volatile ("adcl $0, %0" : "+r" (sum)); + __asm volatile ("addl %1, %0 \n" + "adcl %2, %0 \n" + "adcl %3, %0 \n" + "adcl %4, %0 \n" + "adcl $0, %0": "+r"(sum): "g" (((const unsigned int *)w)[0 / 4]), + "g" (((const unsigned int *)w)[4 / 4]), + "g" (((const unsigned int *)w)[8 / 4]), + "g" (((const unsigned int *)w)[12 / 4])); w += 8; mlen -= 16; } If someone is interested in it, he can lend me a hand to rewrite all of the similiar cases. Sincerely yours Zhouyi Zhou From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 07:00: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 6FC3616A41F; Mon, 9 Jul 2007 07:00:39 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id 4B6F413C455; Mon, 9 Jul 2007 07:00:38 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id E8BACEB5599; Mon, 9 Jul 2007 15:00:33 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id RYm2-Ej3AdiJ; Mon, 9 Jul 2007 15:00:28 +0800 (CST) Received: from LI-Xins-MacBook.local (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 07870EB5595; Mon, 9 Jul 2007 15:00:28 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=M1xsPtU4czbz4Y5rKgebVbM2cOyh0/kugwjUzJdIc7ElMMiaqpyAEqvqhu+89bfmD Xuzk9XWGBYs1I3iOH3P9w== Message-ID: <4691DD05.2090407@delphij.net> Date: Mon, 09 Jul 2007 15:00:21 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.4 (Macintosh/20070604) MIME-Version: 1.0 To: Robert Watson References: <20070705122650.GE1302@britannica.bec.de> <468E16E6.6030608@delphij.net> <20070706112453.GA3217@hoeg.nl> <468E7007.5050607@elischer.org> <20070706174321.M17956@fledge.watson.org> In-Reply-To: <20070706174321.M17956@fledge.watson.org> X-Enigmail-Version: 0.95.2 OpenPGP: url=http://www.delphij.net/delphij.asc Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig81B7DCE97DE52E2C444B710B" Cc: FreeBSD Hackers , d@delphij.net, Julian Elischer , Ed Schouten Subject: Re: add closefrom() call X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2007 07:00:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig81B7DCE97DE52E2C444B710B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Robert Watson wrote: > The Solaris implementation appears to implement two strategies: >=20 > (1) If procfs is mounted, list the fd directory to get a list of open f= ds, > then close those by number. >=20 > (2) If procfs is not mounted, query the number of open fds using the > resource > limit interface, then sequentially close until the right number clo= se. >=20 > Hence my question as to whether there's actually a big benefit or not -= - > do we think closefrom() is a performance-critical function? Nope. I will try to see if we have some way to expose lastfile to userland, or whether we have some better approach to implement this in userland next week if I would have some spare time... Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig81B7DCE97DE52E2C444B710B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkd0FOfuToMruuMARCmsbAJ9svdtYrisLLES1xLoAxkRc0AYUVgCfZHY1 H8Zpj5K7/RH9PgXbQbAJ+Lc= =Aucr -----END PGP SIGNATURE----- --------------enig81B7DCE97DE52E2C444B710B-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 10:28:33 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 7C74B16A400 for ; Mon, 9 Jul 2007 10:28:33 +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 34CA113C484 for ; Mon, 9 Jul 2007 10:28:33 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A579F8.dip.t-dialin.net [84.165.121.248]) by redbull.bpaserver.net (Postfix) with ESMTP id DD1C62E25F; Mon, 9 Jul 2007 11:58:48 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 8FE6F5B5A49; Mon, 9 Jul 2007 11:56:37 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l699ubWK069540; Mon, 9 Jul 2007 11:56:37 +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; Mon, 09 Jul 2007 11:56:37 +0200 Message-ID: <20070709115637.sapzl5uq3osw4gc4@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 09 Jul 2007 11:56:37 +0200 From: Alexander Leidinger To: zhouyi zhou References: <20070709105547.71827eb8.zhouzhouyi@FreeBSD.org> In-Reply-To: <20070709105547.71827eb8.zhouzhouyi@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) / 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.3, required 8, BAYES_00 -15.00, DKIM_POLICY_SIGNSOME 0.00, J_CHICKENPOX_93 0.60, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Mon, 09 Jul 2007 11:22:05 +0000 Cc: freebsd-hackers@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: rewrite src/sys/i386/i386/in_cksum.c 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 Jul 2007 10:28:33 -0000 Quoting zhouyi zhou (from Mon, 9 Jul 2007 =20 10:55:47 +0800): > Hey, > Since FreeBSD update gcc from 3.4.x to 4.2.0, the FreeBSD gdb =20 > remote debugger in i386 platform > will find the TCP/UPD checksum will not be computed right, when =20 > calling macro in_cksum > which calls in_cksum_skip in src/sys/i386/i386/in_cksum.c in case of =20 > getting rid of -O flag > supplied to gcc when compiling(The optimize will interfere with =20 > comfortable gdb debugging). > If someone is interested in it, he can lend me a hand to rewrite =20 > all of the similiar cases. A rewrite (port from DFly) of the IP checksum code exists since a long =20 time. ATM I don't remember who ported it (sorry!). I know that Andre =20 wanted to review the code as part of his network-fundraising work, but =20 I don't remember the outcome (or if there's an outcome at all). Search the archives of net/current/arch, maybe you can find it there =20 and test if it solves your problem. Bye, Alexander. --=20 Ignorance should be painful. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 12:15:02 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 7CD5716A421 for ; Mon, 9 Jul 2007 12:15:02 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from ercist.iscas.ac.cn (ercist.iscas.ac.cn [124.16.138.3]) by mx1.freebsd.org (Postfix) with SMTP id 9103913C4B9 for ; Mon, 9 Jul 2007 12:15:01 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: (qmail 78319 invoked by uid 98); 9 Jul 2007 12:12:31 -0000 Received: from 222.191.237.170 by ercist.iscas.ac.cn (envelope-from , uid 89) with qmail-scanner-1.25 (spamassassin: 3.1.0. Clear:RC:1(222.191.237.170):SA:0(0.0/10.0):. Processed in 3.962652 secs); 09 Jul 2007 12:12:31 -0000 X-Spam-Status: No, hits=0.0 required=10.0 X-Qmail-Scanner-Mail-From: zhouzhouyi@FreeBSD.org via ercist.iscas.ac.cn X-Qmail-Scanner: 1.25 (Clear:RC:1(222.191.237.170):SA:0(0.0/10.0):. Processed in 3.962652 secs) Received: from unknown (HELO iosdf17a8152bc) (zhouzhouyi@ercist.iscas.ac.cn@222.191.237.170) by 0 with SMTP; 9 Jul 2007 12:12:27 -0000 Message-ID: <00d901c7c222$109cb310$f100a8c0@iosdf17a8152bc> From: "Zhouyi Zhou" To: "Alexander Leidinger" References: <20070709105547.71827eb8.zhouzhouyi@FreeBSD.org> <20070709115637.sapzl5uq3osw4gc4@webmail.leidinger.net> Date: Mon, 9 Jul 2007 20:09:54 +0800 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-RFC2646: Format=Flowed; Response Cc: freebsd-hackers@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: rewrite src/sys/i386/i386/in_cksum.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Zhouyi Zhou List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2007 12:15:02 -0000 The patch supplied by Gordon http://generic.0xfce3.net/20060524-ipchecksum.patch no longer exists, but I take a look at DragonFlyBSD, I feel that modification follows my idea is modestly to FreeBSD implementation. Zhouyi ----- Original Message ----- From: "Alexander Leidinger" To: "zhouyi zhou" Cc: ; Sent: Monday, July 09, 2007 5:56 PM Subject: Re: rewrite src/sys/i386/i386/in_cksum.c Quoting zhouyi zhou (from Mon, 9 Jul 2007 10:55:47 +0800): > Hey, > Since FreeBSD update gcc from 3.4.x to 4.2.0, the FreeBSD gdb remote > debugger in i386 platform > will find the TCP/UPD checksum will not be computed right, when calling > macro in_cksum > which calls in_cksum_skip in src/sys/i386/i386/in_cksum.c in case of > getting rid of -O flag > supplied to gcc when compiling(The optimize will interfere with > comfortable gdb debugging). > If someone is interested in it, he can lend me a hand to rewrite all > of the similiar cases. A rewrite (port from DFly) of the IP checksum code exists since a long time. ATM I don't remember who ported it (sorry!). I know that Andre wanted to review the code as part of his network-fundraising work, but I don't remember the outcome (or if there's an outcome at all). Search the archives of net/current/arch, maybe you can find it there and test if it solves your problem. Bye, Alexander. -- Ignorance should be painful. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 19:13: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 6C24C16A400 for ; Mon, 9 Jul 2007 19:13:07 +0000 (UTC) (envelope-from loafier@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by mx1.freebsd.org (Postfix) with ESMTP id 2D5AA13C465 for ; Mon, 9 Jul 2007 19:13:06 +0000 (UTC) (envelope-from loafier@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so230477anc for ; Mon, 09 Jul 2007 12:13:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=iu7Habc54skYW0tmdRQDo3D2wWbbb74Jnd2CKNNUnZJTXLmfnb7z2UkxPKESVoEu3KzYj8dK2vW30TLEo2t/UdARjPXN1gR9zj/GOeVUsAPX7LDfso4joIknnlxY7AhZeSVMaGn5yxAL0+mS93ir/rcn2cuACpri3fTBP5pgWoE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=O56l04sMTXupAZF3zTdVhd6UcupLYK8MjAt5dCjQOW7Qdpy+sIvGfvd1eyXks9QZk7YuzU1VZv/GFZxoCwMSAN8RKuh2uPi1Wqx9XWSr/01Qfj+2wXJN4tplawXoXKYAa4UJ9I5xI3NANGMSjNwk0RETMxPRh7Ytabpfp8wXXKM= Received: by 10.100.106.5 with SMTP id e5mr1766877anc.1184006834265; Mon, 09 Jul 2007 11:47:14 -0700 (PDT) Received: by 10.100.109.17 with HTTP; Mon, 9 Jul 2007 11:47:14 -0700 (PDT) Message-ID: Date: Mon, 9 Jul 2007 11:47:14 -0700 From: "Christopher Davis" Sender: loafier@gmail.com To: multimedia@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: d3d0a54fbe4c9f81 Cc: Subject: Audio driver template 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 Jul 2007 19:13:07 -0000 http://people.freebsd.org/~cg/template.c Thought I would take a look at the audio driver template as part of my task to modernize drivers, soc2007. I would simplify the read and write functions to avoid using the bus tag and handle, but I'm not sure what else to do to bring it up to date. How else can it be improved? -- Christopher Davis From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 19:39:16 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 CAA5216A46F for ; Mon, 9 Jul 2007 19:39:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swip.net [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 0FB8813C4D5 for ; Mon, 9 Jul 2007 19:39:15 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [212.17.141.54] (account mc467741@c2i.net HELO [10.150.241.19]) by mailfe10.swip.net (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 372192689; Mon, 09 Jul 2007 21:39:11 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 9 Jul 2007 21:39:10 +0200 User-Agent: KMail/1.9.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707092139.10519.hselasky@c2i.net> Cc: Christopher Davis , multimedia@freebsd.org Subject: Re: Audio driver template 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 Jul 2007 19:39:16 -0000 On Monday 09 July 2007 20:47, Christopher Davis wrote: > http://people.freebsd.org/~cg/template.c > > Thought I would take a look at the audio driver template as > part of my task to modernize drivers, soc2007. I would simplify > the read and write functions to avoid using the bus tag and > handle, but I'm not sure what else to do to bring it up to date. > > How else can it be improved? Regarding echo cancelling, you should add some code that time-stamps the audio data, and computes the current number of bytes in the RX/TX FIFOs! Look at the exported functions in the Echo Canceller for I4B: http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/i4b/layer1/i4b_echo_cancel.c The echo canceller above is a work in progress. --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 21:07:04 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 C677D16A41F; Mon, 9 Jul 2007 21:07:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 24A2E13C4B0; Mon, 9 Jul 2007 21:07:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l69L6q1W064323; Mon, 9 Jul 2007 17:06:55 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Hans Petter Selasky Date: Mon, 9 Jul 2007 15:34:43 -0400 User-Agent: KMail/1.9.6 References: <200707040901.33019.hselasky@c2i.net> <200707061641.36396.jhb@freebsd.org> <200707071814.24578.hselasky@c2i.net> In-Reply-To: <200707071814.24578.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707091534.44421.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 09 Jul 2007 17:06:55 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3616/Mon Jul 9 15:27:14 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org, John-Mark Gurney , freebsd-usb@freebsd.org Subject: Re: New USB stack and Zero copy. 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 Jul 2007 21:07:04 -0000 On Saturday 07 July 2007 12:14:24 pm Hans Petter Selasky wrote: > On Friday 06 July 2007 22:41, John Baldwin wrote: > > On Friday 06 July 2007 02:59:39 am Hans Petter Selasky wrote: > > > On Friday 06 July 2007 01:35, John Baldwin wrote: > > > > On Thursday 05 July 2007 04:25:17 pm John Baldwin wrote: > > > > > On Thursday 05 July 2007 03:31:59 am Hans Petter Selasky wrote: > > > > > > On Wednesday 04 July 2007 19:35, John-Mark Gurney wrote: > > > > > > > Hans Petter Selasky wrote this message on Wed, Jul 04, 2007 at > > > > > Huh? The bounce pages are preallocated, so bus_dmamap_load() isn't going > > to be allocating things. > > When are they allocated ? UTSL. bus_dma_tag_create() (if you pass BUS_DMA_ALLOCNOW) or bus_dmamap_create() for the first map belonging to a tag. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 23:11:27 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 B38CD16A469 for ; Mon, 9 Jul 2007 23:11:27 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.freebsd.org (Postfix) with SMTP id 17D1F13C44C for ; Mon, 9 Jul 2007 23:11:26 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 9 Jul 2007 22:42:17 +0100 (BST) Date: Mon, 9 Jul 2007 22:42:16 +0100 From: David Malone To: Ivan Voras Message-ID: <20070709214216.GA72912@walton.maths.tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Debugging times 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 Jul 2007 23:11:27 -0000 On Mon, Jul 09, 2007 at 11:25:46PM +0200, Ivan Voras wrote: > The date is set wrong either on boot or very early after the kernel has > booted (I've verified it's wrong before hostid rc.d script, which is one > of the first to be executed). I have some patches to make the code that reads the date from the bios print errors if there is a problem parsing the date. I was going to commit them to -current, but it might be useful for you to test them? David. From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 02:09:22 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 33FC916A468; Tue, 10 Jul 2007 02:09:22 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 0670313C4B7; Tue, 10 Jul 2007 02:09:21 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (l53txg4hws87tpez@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l6A29LaV016123; Mon, 9 Jul 2007 19:09:21 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l6A29LQw016122; Mon, 9 Jul 2007 19:09:21 -0700 (PDT) (envelope-from jmg) Date: Mon, 9 Jul 2007 19:09:21 -0700 From: John-Mark Gurney To: Christopher Davis Message-ID: <20070710020921.GB1221@funkthat.com> Mail-Followup-To: Christopher Davis , multimedia@freebsd.org, freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@FreeBSD.org, multimedia@FreeBSD.org Subject: Re: Audio driver template X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2007 02:09:22 -0000 Christopher Davis wrote this message on Mon, Jul 09, 2007 at 11:47 -0700: > http://people.freebsd.org/~cg/template.c > > Thought I would take a look at the audio driver template as > part of my task to modernize drivers, soc2007. I would simplify > the read and write functions to avoid using the bus tag and > handle, but I'm not sure what else to do to bring it up to date. > > How else can it be improved? Use bus_alloc_resources instead of using bus_alloc_resource... Maybe use pci_enable_busmaster and friends instead of using pci_write_config... (In the future for suspend/resume, I would hope our pci layer would save the state, which it might not if you write directly to the config registers.) You should also use bus_get_dma_tag for getting the parent tag when creating your own tag w/ bus_dma_tag_create... Can't think of any others right now... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 03:46:34 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 3860416A400 for ; Tue, 10 Jul 2007 03:46:34 +0000 (UTC) (envelope-from ighighi@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.freebsd.org (Postfix) with ESMTP id EB72C13C458 for ; Tue, 10 Jul 2007 03:46:33 +0000 (UTC) (envelope-from ighighi@gmail.com) Received: by py-out-1112.google.com with SMTP id a73so2277161pye for ; Mon, 09 Jul 2007 20:46:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type; b=GjNtVAefcSaP7DnCm/+J/I/Y0/CyE0UWzy2HVAjO0XecEfpbV5TFNvA/oZOXioF/UBImKudSLOR2K9hePTGN2ywJG3aiS7+4VM/sVRu4ViITSGU9sHG/jRVwcSvHDblfijNRlv6BfmCGr1tr01cwirv1RSOO8WTFLPAjzrzUiYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type; b=DcJXbIpFNZ/WeEml60RR+P29A8CgzGWkMvkYz2jn7A9mz7HVxCJHJKj7oxcJi3vZi6tjallhHuOjQl6imMmPuqSu0wLhnkgwpFf20n7GzmGdpNyQ8xaNOLoxXxKieyQlVgwEDBtlYNKRWjExFmrxTxRwycTx/988qt9kLkg79LM= Received: by 10.35.17.8 with SMTP id u8mr7786471pyi.1184039193288; Mon, 09 Jul 2007 20:46:33 -0700 (PDT) Received: from orion.nebula.mil ( [200.44.87.45]) by mx.google.com with ESMTP id w38sm22972364pyg.2007.07.09.20.46.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Jul 2007 20:46:31 -0700 (PDT) Message-ID: <46930106.3040503@gmail.com> Date: Mon, 09 Jul 2007 23:46:14 -0400 From: Ighighi User-Agent: Thunderbird 2.0.0.4 (X11/20070616) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: multipart/mixed; boundary="------------010005020304020706060506" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: add closefrom() call 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 Jul 2007 03:46:34 -0000 This is a multi-part message in MIME format. --------------010005020304020706060506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >Date: Mon, 09 Jul 2007 15:00:21 +0800 >From: LI Xin > >Subject: Re: add closefrom() call >To: Robert Watson > >Cc: FreeBSD Hackers >, d@delphij.net , Julian Elischer >, Ed Schouten > >Message-ID: <4691DD05.2090407@delphij.net > >Content-Type: text/plain; charset="iso-8859-1" LI Xin wrote: >Nope. > >I will try to see if we have some way to expose lastfile to userland, or >whether we have some better approach to implement this in userland next >week if I would have some spare time... F_MAXFD is easy to implement... Attached is a diff that should work for CURRENT. I'm working on a 6-STABLE. See closefrom.c for an implementation based on F_MAXFD. Still, it doesn't pay to implement it this way... Calling F_MAXFD everytime we close a file descriptor would be heavy having too much fd's. On the other hand, it wouldn't make much a difference to just start from getdtablesize() - 1. >Cheers, >-- >Xin LI > http://www.delphij.net/ >FreeBSD - The Power to Serve! --------------010005020304020706060506 Content-Type: text/x-patch; name="maxfd.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="maxfd.diff" --- src/sys/kern/kern_descrip.c.orig Tue Jul 3 22:27:19 2007 +++ src/sys/kern/kern_descrip.c Mon Jul 9 22:19:35 2007 @@ -623,6 +623,13 @@ vfslocked = 0; fdrop(fp, td); break; + + case F_MAXFD: + FILEDESC_SLOCK(fdp); + td->td_retval[0] = fdp->fd_lastfile; + FILEDESC_SUNLOCK(fdp); + break; + default: error = EINVAL; break; --- src/sys/sys/fcntl.h.orig Wed Apr 7 00:19:49 2004 +++ src/sys/sys/fcntl.h Mon Jul 9 22:26:27 2007 @@ -176,6 +176,9 @@ #define F_GETLK 7 /* get record locking information */ #define F_SETLK 8 /* set record locking information */ #define F_SETLKW 9 /* F_SETLK; wait if blocked */ +#if __BSD_VISIBLE +#define F_MAXFD 11 /* return the max open fd (NetBSD) */ +#endif /* file descriptor flags (F_GETFD, F_SETFD) */ #define FD_CLOEXEC 1 /* close-on-exec flag */ --------------010005020304020706060506-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 10:14: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 B6D9D16A421; Tue, 10 Jul 2007 10:14:08 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 94B2613C468; Tue, 10 Jul 2007 10:14:07 +0000 (UTC) (envelope-from max@love2party.net) Received: from [88.66.11.242] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis), id 0ML31I-1I8CjN0wMX-0004BO; Tue, 10 Jul 2007 12:14:06 +0200 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Tue, 10 Jul 2007 12:16:26 +0200 User-Agent: KMail/1.9.7 X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<%}*_BD U_or=\mOZf764&nYj=JYbR1PW0ud>|!~, , CPC.1-D$FG@0h3#'5"k{V]a~. X-Provags-ID: V01U2FsdGVkX1+Qvb5GxdVV4c9EbPD/glyC5WGa/wvoEE+72xx qfmrwPpgS9nHoWuvWIyMRB81sBdini6aYZeujsZTN64C9yHIBu RM2cK7fd0e1l98wuYMLCAAV58Wc9LCe1vcZPNj2oo8= Cc: freebsd-current@freebsd.org Subject: FreeBSD Status Reports Q2/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 Jul 2007 10:14:08 -0000 --Boundary-00=_8x1kGLTmGz2Z4zJ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-00=_8x1kGLTmGz2Z4zJ Content-Type: text/plain; charset="us-ascii"; name="report-2007-04-2007-06.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="report-2007-04-2007-06.txt" =46reeBSD Quarterly Status Report Introduction This report covers FreeBSD related projects between April and June 2007. Again an exciting quarter for FreeBSD. In May we saw one of the biggest developers summits to date at BSDCan , our 25 Google Summer of Code students started working on their projects - progress reports are available below, and finally the 7.0 release cycle was started three weeks ago. If your are curious about what's new in FreeBSD 7.0 we suggest reading Ivan Voras' excellent summary at: http://ivoras.sharanet.org/freebsd/freebsd7.html and of course these reports. The next gathering of the BSD community will be at EuroBSDCon in Copenhagen , September 14-15. More details about the conference and the developer summit are available in the respective reports below. Thanks to all the reporters for the excellent work! We hope you enjoy reading. __________________________________________________________________ Google summer of code * A GUI audit analyzer for FreeBSD * Apple's MacBook on FreeBSD * BSD Bintools project * Distributed Logging Daemon * finstall * FreeBSD-update front end * Gvinum improvements * http support for PXE * Linuxulator update * lockmgr rewriting * mtund - Magic Tunnel Daemon * Multicast DNS and Service Discovery * Porting Linux KVM to FreeBSD * Porting OpenBSD's sysctl Hardware Sensors Framework to FreeBSD * Ports Collection infrastructure improvements * Security Regression Test * tarfs: A tar File System Projects * FreeBSD/xen * HDTV Drivers (ATSC) * Kernel contention reduction using mysql * Stack trace capture in PMCTools * TrustedBSD Audit * TrustedBSD MAC Framework * USB * USB update =46reeBSD Team Reports * Ports Collection * Problem Report Database * Release Engineering * Security Officer and Security Team * The FreeBSD Foundation Kernel * Fine grain thread locking * gvirstor * SCHED_SMP and SCHED_ULE * TrustedBSD priv(9) Network Infrastructure * 10Gigabit Network Support * FAST_IPSEC Upgrade * FreeBSD and Wake On Lan * Multi-link PPP daemon (MPD) * Multiprocessor Network Stack * Network Stack Virtualization * Wireless Networking Vendor / 3rd Party Software * FreeBSD and Coverity Prevent * FreeSBIE * OpenBSD packet filter - pf * PC-BSD Miscellaneous * EuroBSDcon 2007 * EuroBSDCon 2007 Developer Summit * libarchive/bsdtar * The Hungarian Documentation Project __________________________________________________________________ 10Gigabit Network Support Contact: Kip Macy Contact: Andrew Gallatin Contact: Jack Vogel Contact: Robert Watson Support was added for two more 10gigabit network drivers and there were major advances on improving system performance over 10g media. Kip Macy committed a new driver for the Chelsio adapters. The cxgb driver supports all current 10g adapters, as well as the new four-port gigabit model. The cxgb driver work was supported by Chelsio. Drew Gallatin made significant improvements to the Myricom 10g driver mxge. With these updates the driver does line rate transfers with less system overhead. Neterion contributed the nxge driver to support all their Xframe 10Gbe Server/Storage adapters. The initial driver import was done by Sam Leffler; a switch over to vendor support will happen soon. Jack Vogel is preparing a driver to support the latest Intel 10g hardware devices. The new driver - ixgbe - will complement the existing ixgb driver that supports older Intel 10g cards. Kip and Drew worked with other folks on performance analysis and tuning. This work improved cpu affinity and reduced overhead for managing network resources. Work is also underway to define a common Large Receive Offlaod (LRO) infrastructure. LRO is analogous to TSO on the receive side enabling drivers to receive at near line rate with normal sized frames. This common code base will help replace driver-specific code. __________________________________________________________________ A GUI audit analyzer for FreeBSD URL: Contact: Dongmei Liu This project is due to provide a GUI audit log analysis tool for FreeBSD. Refer to ethereal/wireshark packet parsing engine and its framework to view and parse audit logs. Open tasks: 1. Get a GUI framework using GTK2.0 include menu bar, toolbar, list view and tree view. 2. Parse and display audit log in the trailer file in the list view and tree view. 3. Online capture audit log and parse and display them in the list view and tree view 4. Add the filter mechanism 5. Add the statistic mechanism 6. Remote audit log analysis mechanism __________________________________________________________________ Apple's MacBook on FreeBSD URL: http://repoman.freebsd.org/depotTreeBrowser.cgi?FSPC=3D//depot/projects/s oc2007/rpaulo%2dmacbook/ URL: http://wiki.freebsd.org/AppleMacbook Contact: Rui Paulo Apple's MacBook computers are nicely designed and have neat features that other laptops don't. While Mac OS X is a nice operating system, UNIX folks (like me) would prefer to run other operating systems like FreeBSD. This project aims to bring bug fixes and new drivers to FreeBSD that would help running this OS on this platform. Open tasks: 1. Write drivers or fix issues for/with the touchpad, keyboard, remote control IR reciever, Bluetooth. 2. Fix reboot, halt, suspend/resume issues. __________________________________________________________________ BSD Bintools project URL: http://wiki.freebsd.org/BSDBintools Contact: Kai Wang A basic implementation of ar(1) (include ranlib) was finished and available in the perforce repository. Currently it provides all the main functions an ar(1) should have and it is based on the libarchive and libelf library thus is expected to have a better and simpler structure than the GPL'ed version. The work left in this part of the project is to perform a elaborate test and add additional functions. __________________________________________________________________ Distributed Logging Daemon URL: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D232192+0+/usr/local/www/db /text/2007/freebsd-hackers/20070527.freebsd-hackers URL: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=3D//depot/projects/ soc2007/karma%5faudit/dlog&HIDEDEL=3DNO Contact: Alexey Mikhailov Contact: Bjoern Zeeb The basic idea behind this project is to implement secure and reliable log file shipping to remote hosts. While the implementation focuses on audit logs, the goal is to build tools that will make it possible to perform distributed logging for any application by using a simple API and linking with a shared library. Open tasks: 1. Network protocol implementation 2. Spooling 3. SSL support __________________________________________________________________ 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 programme is ready and online at the webpage. Registration is open. Details about tutorials and Legoland trip are ready too. The keynote will be John Hartman: Real men's pipes If you share a room with friends at the hostel, then lodging is really inexpensive, and the lounge has high speed Internet access. Staying at the hostel is of course optional, and the area has several hotels. KD85.com and O'Reilly will each have a booth at the conference. We are still looking for more sponsors. A public IRC channel #eurobsdcon on EFnet has been created for discussion and questions about the conference. __________________________________________________________________ EuroBSDCon 2007 Developer Summit URL: http://wiki.freebsd.org/200709DevSummit Contact: Poul-Henning Kamp The next developer summit will be different from the previous ones. Very different. Gone are the auditorium style seating, beamers, endless presentations and soggy sandwiches. Instead we head out to a an old village school in the beautiful Danish countryside, we hang around all over the place, sleep in the old science room, cook our own food and hack the living daylights out of anything we care for. September 17th and 18th, right after EuroBSDcon2007 in Copenhagen. (Well, right after the optional trip to legoland...) Be there! PS: Yes, it's not uncivilized, there is a full speed ADSL and WLAN. __________________________________________________________________ =46AST_IPSEC Upgrade Contact: George Neville-Neil Contact: Bjoern Zeeb FAST_IPSEC has now replaced Kame IPsec as the IPsec stack in HEAD. This will be part of the 7.0 release. The merge happened in early July with George handling the kernel bits and Bjoern handling user space. The kernel option IPSEC is now the ONLY option for IPsec support in the FreeBSD kernel. Open tasks: 1. Test test test!!!! __________________________________________________________________ =46ine grain thread locking Contact: Jeff Roberson Contact: Attilio Rao Contact: Kris Kennaway Over the past 6 months several developers undertook an effort to replace the global scheduler lock with a finer-grain interface modeled on the Solaris container lock approach. This significantly reduces contention on higher-end multiprocessor machines. This patch went into 7.0-CURRENT and has proven to be very stable. The last remaining bugs are in rusage and effect only process time accounting statistics. __________________________________________________________________ finstall URL: http://wiki.freebsd.org/finstall Contact: Ivan Voras Project "finstall" aims to create a next-generation FreeBSD installer that will make use of the newest features present in the system. The project should yield something usable for 7.0-RELEASE, but the intention is to keep it as a "second" installer system during 7.x, alongside sysinstall. In any case, sysinstall will be kept for architectures not supported by finstall (e.g. all except i386 and amd64). Open tasks: 1. The work is progressing well and on plan. There's a small setback currently with X11 applications executing of a read-only file system (at least that's the currently recognizable symptom). 2. Any interested testers are very much welcome! __________________________________________________________________ =46reeBSD and Coverity Prevent Contact: Pawel Jakub Dawidek Contact: David Maxwell FreeBSD's static analysis scans have been updated with a recent version of Coverity Prevent. Coverity is providing additional advice on configuration of the analysis to maximize the benefit from the tools. At BSDCan2007, Coverity provided FreeBSD with a license for an additional analysis tool called Extend, which allows writing custom FreeBSD specific code checkers. David Maxwell presented training material for interested FreeBSD developers. Some applications of custom checkers have been considered, and more results will be forthcoming as they are implemented and tested. __________________________________________________________________ =46reeBSD and Wake On Lan URL: http://stsp.name/wol/ URL: http://stsp.name/wol/README.txt URL: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D83807&cat=3Dkern Contact: Stefan Sperling I have been working on making wake on lan (WOL) work with FreeBSD. Contrary to popular believe OS support is required for WOL to work properly. In particular network card drivers need to configure network cards for WOL during system shutdown, else the cards won't wake up. WOL is _not_ just a BIOS issue. This is work in progress. Currently the following cards/chipsets are supported: * NatSemi DP83815 (if_sis) * Via Rhine (if_vr, only VT6102 and up chips support WOL) * Nvidia nForce (if_nve, needs testing ) * 3Com Etherlink XL and Fast Etherlink XL (if_xl, needs testing , only 3c905B type adapters support WOL) I would be glad to get more feedback on my patch. I can add support for more chipsets but I need testers for hardware I don't have. I would appreciate access to data sheets for any NIC chipsets that are supported by FreeBSD and have WOL support. I would especially appreciate technical feedback on the patch, preferably by a committer who is willing to nitpick the patch to make it ready for inclusion in -CURRENT. I currently maintain the patch against RELENG_6_2 for my own use but I would port it to -CURRENT for inclusion. __________________________________________________________________ =46reeBSD-update front end URL: http://wiki.freebsd.org/FreeBSDUpdateFrontend Contact: Andrew Turner The project is split up with a front end to interact with the user and a back end to interact with freebsd-update. The back and front ends are able to communicate with each other using an XML protocol. The GUI is almost at the point it can take a command from the user and send it to the back end. The back end is able to detect when updates are ready. __________________________________________________________________ =46reeBSD/xen Contact: Rink Springer Work is well under way to finish Kip Macy's FreeBSD/xen port, and get it into a shape which is suitable for inclusion in 7.0. Generally, the port is stable and performs quite well. The major bottleneck is the inability to work with GCC 4.2, this is the last major TODO before the work can be committed. Open tasks: 1. Fix the port to correctly work with GCC 4.2. 2. Port the Xen drivers to newbus. 3. Test/fix PAE support. 4. Start on amd64 support. __________________________________________________________________ =46reeSBIE URL: http://www.freesbie.org URL: http://liste.gufi.org/mailman/listinfo/freesbie Contact: Matteo Riondato Contact: FreeSBIE Staff Contact: FreeSBIE ML After the success of FreeSBIE-2.0.1-RELEASE, development slew down a bit, but we have a big task for the summer: enable unionfs again and trying the new efficient memory filesystem, tmpfs. For all new ISO images we will be following RELENG_7, with the hope to release a stable image once 7.0-RELEASE have been released. Open tasks: 1. Build and test an ISO image with FreeSBIE+unionfs+tmpfs. __________________________________________________________________ Gvinum improvements URL: http://folk.ntnu.no/lulf/patches/freebsd/gvinum/soc2007 URL: http://blogs.freebsdish.org/lulf/ URL: http://wiki.freebsd.org/UlfLilleengen/SOC Contact: Ulf Lilleengen My previous status reports contained a lot of code that updated gvinum with the old vinum features. This year gvinum has been significantly rewritten. Lukas Ertl began rewriting the way gvinum is organized from using a multi consumer/provider model, to use a single consumer and provider, and having an event-system that first handles user-requests, and then runs normal I/O operations (Much like other GEOM classes). This makes the code easier to read, and perhaps there will be less bugs :) 1. setstate on plexes and volumes. 2. attach/detach command now works. 3. concat/stripe/mirror commands. The previous code conflicted more than I expected with the new gvinum system, but it should work now. 4. (Mounted) rebuilds possible. 5. (Mounted) sync possible. 6. Some refactoring of old code (Basically updating old code to use the new event system, and add some abstractions where possible) And of course, some time has gone to work out how things should be done, and to fix other bugs. I hope some of you are interested in trying this out (all the work has been in perforce so far), a patch can be found in the URL section. . This is a bit experimental, and although I've done much testing to hunt down bugs, there are most probably bugs left. I have other goals this summer as well. However, since some parts of gvinum was rewritten, I might not be able to do all of these, but growing is already working for the concatenated volumes (and also mirrored). I'd also like to implement growing for Raid5 arrays as well. Logging plexes would also be cool to have, but this is not really needed, since we have g_journal. Both these features will be addressed after I've made sure gvinum does all old vinum does, and also perhaps better. As I might have some extra time on my hands this summer, so I gladly accept suggestions on what else I might fix or implement "while I'm at it". Open tasks: 1. Stability, stability, stability. I want gvinum to work really well. To accomplish that I have several test-machines I'm going to do different tests on. I sort of have a little test-plan in the working that I'll be using. 2. A gvinumadmin tool that would make gvinum easier to use for unexperienced users. Perhaps integrate this into the installer. This is now probably something I'll do at the end, when hopefully everything works :) I might poke Ivan Voras a bit on this. 3. Documenting gvinum and it's differences to vinum better. I take notes on where I need to document, so this is in progress. 4. Implementing growing and shrinking of volumes. 5. Implement logging plexes. Log all parity data being written. __________________________________________________________________ gvirstor URL: http://wiki.freebsd.org/gvirstor Contact: Ivan Voras Gvirstor is a GEOM class which provides virtual storage capacity (something like virtual memory for storage devices). It's ready to be committed to HEAD (the plan is for it to get into 7.0-RELEASE). Open tasks: 1. Any interested testers are welcome! __________________________________________________________________ HDTV Drivers (ATSC) URL: http://perforce.freebsd.org/fileSearch.cgi?FSPC=3D%2F%2Fdepot%2Fuser%2Fjm g%2Fbktrau%2F...&ignore=3DGO%21 URL: http://perforce.freebsd.org/fileSearch.cgi?FSPC=3D%2F%2Fdepot%2Fuser%2Fjm g%2Fcxd%2F...&ignore=3DGO%21 Contact: John-Mark Gurney This entry was previously the Bt878 Audio Driver (aka FusionHDTV 5 Lite driver) announcement, but as work expanded slightly, it's a bit more generic now. A few bugs in bktrau has been fixed since January. If you have been running an earlier version, it is recommended to upgrade as the driver could panic. The driver works with multiple cards in the same machine (tested with two). FusionHDTV 5 Lite -- Due to lack of documentation from DViCO and LG, I have copied magic values from the Linux driver to get ATSC capturing working. ATI HDTV Wonder -- After years of trying to get into the ATI developer program, they have finally suspended it, so no support from ATI. I have started work on a driver, cxd, for the Conexant CX2388x based cards. The ATI HDTV Wonder uses ATI's own demodulator, and I was able to get it to tune, after cribbing from the Linux driver. When capturning, I get some valid data, but not all the data. Due to lack of support from ATI and linux-dvb the project has been put on indefinate hold. If someone has another CX2388x based card, it shouldn't be too hard to take the driver and get it working with a different tuner. A Python module is available for both drivers/cards, along w/ a sample capture application using it. The module is now known to work well with threads so that tuning (expensive due to i2c ioctl's) can happen in another thread without causing program slow down. The module is working well with a custom PVR backend. Open tasks: 1. Provide support for NTSC and FM tuning. 2. Add support for other cards and tuners that use the Bt878 chip. 3. Add support for other cards and tuners that use the CX2388x chip. __________________________________________________________________ http support for PXE URL: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=3D//depot/projects/ soc2007/taleks-pxe_http URL: http://wiki.freebsd.org/http_support_for_PXE Contact: Alexey Tarasov Main goal of project is to introduce code working in PXE preboot environment, able to download from web server via direct connection or http proxy and prepare booting of FreeBSD kernel. Already implemented, but haven't thoroughly tested: PXE wrappers core code, ARP, ICMP echo request/reply, sockets code similar to common sockets (UDP and TCP modules). On base of sockets: simple DHCP client, DNS client. Currently working on http client, TCP testing, kernel booting and documenting main concepts of project modules. Open tasks: 1. Testing PXE API related code in different PXE implementations. 2. Testing of implemented protocols. __________________________________________________________________ Kernel contention reduction using mysql URL: http://jeffr-tech.livejournal.com/ Contact: Jeff Roberson FreeBSD developers have been using mysql as a testbed to find kernel contention hotspots in the kernel. As a result of this we have seen a 5x performance improvement over 6.0 on 8way machines. Recent changes include finer locking in fcntl(), removing Giant from flock and fcntl F_SETLK. These changes will be available in 7.0 and primarily improve write performance. Experimental changes to select() have also been discussed on arch@ that solve contention issues there however these will not be ready in the 7.0 timeframe. __________________________________________________________________ libarchive/bsdtar URL: http://people.freebsd.org/~kientzle/libarchive/ Contact: Tim Kientzle Contact: Colin Percival Both libarchive 2 and bsdtar 2 are now in -CURRENT and will be in 7.0. Libarchive 1.9 and bsdtar 1.9 should be in 6-STABLE in time for 6.3. libarchive 2 is much faster writing to disk than libarchive 1. It also supports new formats, has several minor API/ABI corrections, is more portable, and has many fewer bugs. Of special note is "libarchive_test", a new program that exercises much of the libarchive functionality; anyone interested in working on libarchive should become familiar with this test suite. bsdtar 2 is less ambitious, but does have a number of bug fixes and takes advantage of several new features in libarchive 2. libarchive 1.9 is identical to libarchive 2 except it maintains the old API/ABI. Similarly, bsdtar 1.9 is nearly identical to bsdtar 2, lacking only a few features that would prevent it from being used with existing libarchive 1 libraries. Open tasks: 1. Tim Kientzle has started work on a libarchive-based cpio implementation that should be ready for inclusion with FreeBSD 8. 2. Volunteer needed: We want a libarchive-based pax to replace our out-of-date pax implementation. 3. Volunteer needed: pkg_add should use libarchive instead of forking an external tar; this could eventually make it much faster. 4. Volunteer(s) needed: libarchive should write more cpio variants (easy); libarchive should read and write mtree format (not difficult); libarchive should write GNUtar 1.0 format sparse tar entries (tricky); bsdtar should support --metadata=3D to read names and properties from one archive, with data from disk, to create a new archive (mtree support in libarchive would make this very useful); bsdtar should preserve sparseness when creating archives. __________________________________________________________________ Linuxulator update URL: http://wiki.freebsd.org/linux-soc2007 Contact: Roman Divacky Contact: Konstantin Belousov Just like last year I got the opportunity to work on updating the Linuxulator to Linux version 2.6. This year I work on finishing futexes, *at syscalls and epoll/inotify. I, cooperating with Konstantin Belousov, have managed to fix futexes to the state of passing the official futex testing program. The fix was committed and 7.0R will ship with correct futex implementation. Work is planned on removing Giant locking from futexes. This only needs some carefull review and testing. These days I mostly focus on *at syscalls, the patch is almost finished for commiting and I hope that it will make it into 7.0R. As a part of this work I implemented native FreeBSD syscalls as well. Watch arch mailing list as I post the patch there. I also finished writing my master thesis describing how the Linuxulator works and Gabor Kovesdan is working on integrating it into official FreeBSD articles. No work has happened in the epoll/inotify area but I hope to work on it right after I finish the *at syscalls.h Open tasks: 1. Finishing *at syscalls. 2. Start the epoll/inotify work. 3. Finish removal of Giant from futexes. __________________________________________________________________ lockmgr rewriting URL: http://wiki.freebsd.org/AttilioRao Contact: Attilio Rao Contact: Jeff Roberson The project consists in a rewriting of the lockmgr(9) interface on a lighter basis, using atomic instructions and direct usage of the sleepqueue interface. This should lead to a faster primitive, a saner interface and an higher maintainability of the code. So far, 3 newly files called kern/kern_lockng.c, sys/_lockmgrng.h and sys/lockmgrng.h have been created for the new primitive and an initial implementation has been committed into the perforce branch: //depot/user/attilio/attilio_lockmgr/... The implementation contains a good set of code intended to replace old lockmgr. Actually it only misses the support for lock draining that will be committed after an initial phase of testing and the inclusion of a better wake-up algorithm (which will simplify draining a lot and will improve performance on wakeup). Open tasks: 1. Need some testing __________________________________________________________________ mtund - Magic Tunnel Daemon URL: http://wiki.freebsd.org/SuperTunnelDaemon Contact: Matus Harvan IP can easily be tunneled over a plethora of network protocols at various layers, such as IP, ICMP, UDP, TCP, DNS, HTTP, SSH. While a direct connection may not always be possible due to a firewall, the IP packets could be encapsulated as payload in other protocols, which would get through. However, each such encapsulation requires the setup of a different program and the user has to manually probe different encapsulations to find out which of them works in a given environment. mtund is a tunneling daemon using run-time loadable plugins for the different encapsulations. It automagically selects the best encapsulation in each environment and fails over to another encapsulation in case the environment changes. There already is running code available, capable of tunneling via TCP and UDP with a working failover mechanism. As this is a Summer of Code project, rapid changes and addition of new features can be expected during the summer. Please see the wiki page for more details and up-to-date information. Note that the project originally started under the name of Super Tunnel Daemon, but was later renamed to mtund for Magic Tunnel Daemon. Open tasks: 1. I am always happy to hear from others trying out the code and providing feedback, both positive and negative. __________________________________________________________________ Multi-link PPP daemon (MPD) URL: http://sourceforge.net/projects/mpd/ URL: http://mpd.sourceforge.net/doc/mpd5.html Contact: Alexander Motin Mpd-4.2 has been released. It includes many new features, performance improvements and fixes. The most significant and unique new feature is a link repeater functionality. It allows mpd to accept incoming connection of any supported type and forward it out as same or different type outgoing connection. As example, this functionality allows mpd to implement real LAC with accepting incoming PPPoE connection from client and forwarding it using L2TP tunnel to LNS. All other software L2TP implementations I know is only a LAC emulators without real incoming calls forwarding abilities. Also mpd-4.2 presents: * PPTP listening on multiple different IPs, * L2TP tunnel authentication with shared secret, * fast traffic filtering, shaping and rate-limiting using ng_bpf and ng_car, * new 'ext-auth' auth backend as full-featured local alternative to 'radius-auth', * NetFlow generation for both incoming and outgoing packets same time. Replacing external ifconfig and route calls with their internal implementations and other optimizations in 4.2 gave significant performance boost in session management. Newly implemented overload protection mechanism partially drops incoming connection requests for periods of critical load by monitoring daemon's internal message queue. As result, simple 2GHz P4 system is now able to accept, authenticate and completely process spike of 1000 concurrent PPPoE connections in just a 30 seconds. Open tasks: 1. Implement dynamic link/bundle creation. 2. Auth proxying support in repeater mode. It is required for some LAC/PAC and Tunnel Switching Aggregator (TSA) setups. 3. Remove static phys - link - bundle and phys - repeater relations. Implement ability to differentiate incoming connections processing depending on user login, domain and/or other parameters. __________________________________________________________________ Multicast DNS and Service Discovery URL: http://wiki.freebsd.org/MulticastDNS Contact: Fredrik Lindberg This project aims to create a multicast DNS daemon and service discovery utilities suitable for the base system. Multicast DNS is a part of Zero Configuration Networking (Zeroconf) and provides the ability to address hosts using DNS-like names without the need of an existing (unicast), managed DNS server. Work on the responder daemon is well underway and the only large missing piece of the puzzle is a way for local clients to do queries. The code can be found in the p4 branch projects/soc2007/fli-mdns_sd if anyone would like to give it a spin, even though it's incomplete. The project plan can be found on the wiki. __________________________________________________________________ Multiprocessor Network Stack URL: http://www.FreeBSD.org/projects/netperf/ Contact: Robert Watson Contact: The custom file descriptor array lock has been replaced with an optimized sx lock, resulting in 2x-4x improvement in MySQL transaction rates on 8-core MySQL benchmarks. This improvement is due to moving to shared locking for frequent fd lookup operations, as well as significant optimization of the case where the filedesc lock is highly contended (as occurs in the threaded MySQL server performing constant socket I/O). The custom socket buffer I/O serialization lock (sblock), previously created by interlocking SB_WANT and SB_LOCK flags with the socket buffer mutex, has been replaced with an optimized sx lock, leading to a 10% performance improvement in MySQL and PostgreSQL benchmarks on 8-core systems. As part of this change, sx locks now have interruptible sleep primitives to allow the SB_NOINTR flag to work properly. These changes also correct a long-standing bug in socket buffer lock contention and SB_NOWAIT reported by Isilon; a simpler patch has been merged to 6.x to fix this bug without merging loocking changes. TCP debugging is now properly synchronized using a new tcp_debug_mtx. UMA allocation counters are now used for pipes rather than custom atomic counters, resulting in lowered overhead for pipe allocation and free. Significant code cleanup, commenting, and in some cases MFC'ing, has taken place with respect to the network stack and synchronization. Additional DDB debugging commands for sockets of various sorts have been added, allowing listing of socket state from DDB without the use of GDB. Certain non-MPSAFE subsystems have been removed or will be removed from FreeBSD 7.0, including IPX over IP tunneling (not general IPX/SPX support, just the tunneling over IP), KAME IPSEC (FAST_IPSEC is MPSAFE and now now supports IPv6), i4b, netatm (two other ATM stacks are still present), and ng_h4. Some of these features will be reintroduced in FreeBSD 7.1, but by removing them now, we are able to remove the NET_NEEDS_GIANT compatibility infrastructure that significant complicates and obfuscates the socket and network stack code. Other measurement and optimization projects continue; however, the 7.0 locking/synchronization work for the network stack is essentially complete. Open tasks: 1. New work to parallelize the netisr thread (netisr2) as well as distribute UDP and TCP processing over multiple CPUs by connection, rather than just by input source as in 7.0, was presented at BSDCan. This work will be targeted at the 8-CURRENT branch. 2. Complete netatm and NET_NEEDS_GIANT removal for 7.0. 3. Complete MPSAFE locking of mld6 and nd6 IPv6 subsystems, which currently run under a global lock. __________________________________________________________________ Network Stack Virtualization URL: http://imunes.tel.fer.hr/virtnet/ Contact: Marko Zec The network stack virtualization project aims at extending the FreeBSD kernel to maintain multiple independent instances of networking state. This will allow for complete networking independence between jails on a system, including giving each jail its own firewall, virtual network interfaces, rate limiting, routing tables, and IPSEC configuration. I believe that the prototype, which is kept in sync with FreeBSD -CURRENT, is now sufficiently stable for testing. It virtualizes the basic INET and INET6 kernel structures and subsystems, including IPFW and PF firewalls, and more. In the next month I plan to have the IPSEC code fully virtualized, and refine and document the management APIs. The short-term goal is to deliver production-grade kernel support for virtualized networking for FreeBSD 7.0-RELEASE (as a snap-in kernel replacement), while continuing to keep the code in sync with -CURRENT for possible merging at a later date. __________________________________________________________________ OpenBSD packet filter - pf Contact: Max Laier pf in HEAD (soon to be FreeBSD 7.0) has been updated to OpenBSD 4.1 bringing in a couple of new features: * ftp-proxy has been rewritten, and a tftp version, tftp-proxy, has been added * pf(4) now supports Unicast Reverse Path Forwarding (uRPF) checks for simplified ingress filtering * The pflog(4) interface is now clonable. pf(4) can log to multiple pflog interfaces now, each rule can specify which pflog interface to log to * pflogd(8) can now be told which pflog interface to work with * pfctl(8) can now expire table entries * keep state is now the default for pf.conf(5) rules, as is the flags S/SA option on TCP connections. no state and flags any can be used to disable stateful filtering or TCP flags checking * The pfctl(8) ruleset optimiser can be enabled in pf.conf(5) * pf(4) anchors can now be loaded inline in the main pf.conf(5) and can be printed recursively * Allow pf(4) rules inside anchors to have their counters reset, and make counter read & reset an atomic operation Some patches that went into OpenBSD after 4.1 and improve performance significantly will be merged later. Work to support pf and netgraph interaction is underway and will be imported after 7.0. As all required ABI changes have been made during the update, we will be able to MFC this work for 7.1 later on. __________________________________________________________________ PC-BSD URL: http://www.pcbsd.org/ Contact: Kris Moore The last major updates are currently being made to PC-BSD 1.4, which will include KDE 3.5.7, Beryl, Flash, Intel Wireless, Nvidia Drivers and more! This release will also include new utilities to make running PC-BSD on the desktop easier than ever, including: * Network Manager with WIFI Support * Add / Remove Components * Firewall Manager for PF * Xorg Display setup wizard Once any final major issues are resolved, we will be issuing a public beta of PC-BSD 1.4 to ensure compatibility across a variety of platforms. __________________________________________________________________ Porting Linux KVM to FreeBSD URL: http://wiki.freebsd.org/FabioChecconi/PortingLinuxKVMToFreeBSD Contact: Fabio Checconi Contact: Luigi Rizzo The Linux kernel-based Virtual Machine (KVM) is a mechanism to exploit the virtualization extensions present in some modern CPUs (e.g., Intel VT and AMD-V). Virtualization extensions let ordinary processes execute a subset of privileged instructions in a controlled way at near-native speed. This in turn may improve the performance of system emulators such as qemu, xen, vmware, vkernel, User Mode Linux (UML), etc. This project consists in porting to FreeBSD the Linux KVM, implemented as a loadable module, lkvm.ko. We use the approach in ports/devel/linux-kmod-compat to reuse the original Linux source code almost unmodified. We will also port a modified version of qemu which exploits the facilities made available by the Linux KVM to speed up emulation. The URL above links to progress report detailing the exact project goals, milestones reached, and commit log details. As of end of June 2007, we have mainly extended linux-kmod-compat to support the kernel API used by the Linux KVM code. The required functions have been implemented at various degrees, from simple stubs to fully functional ones. We have also imported the modified qemu and the libraries that are used to build the Linux KVM userspace client. In the second half of the SoC work we plan to complete the implementation of the kernel API and have a fully functional Linux KVM module, together with its client (qemu). __________________________________________________________________ Porting OpenBSD's sysctl Hardware Sensors Framework to FreeBSD URL: http://mojo.ru/us/GSoC2007.FreeBSD.cnst-sensors.proposal.html URL: http://cnst.livejournal.com/tag/GSoC2007 URL: http://cnst.livejournal.com/data/atom?tag=3DGSoC2007 URL: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=3D//depot/projects/ soc2007/cnst-sensors/ Contact: Constantine A. Murenin Contact: Shteryana Shopova OpenBSD includes sysctl hw.sensors framework since 2003; since 2005 the frameworks supports raid drives and most known i2c sensors; since 2006 the framework is redesigned with a sensor device concept in mind to accommodate continued growth. Consists of kernel api, sysctl(3)/sysctl(8), sensorsd(8), ntpd(8), systat(1), ports/sysutils/symon and 51 drivers as of 2007-07-07. This GSoC2007 project is to port the underpinnings of this unified hardware monitoring interface to FreeBSD. Whilst it won't be possible to port all of the drivers due to architecture differences, we aim at porting all other parts of the framework and accompanying userland utilities. At this time, lm(4) at isa and some kernel api have already been ported. The next big step is to complete sysctl(3) glue code so that further work on porting userland utilities could be accomplished. Details about sysctl are being discussed on arch@. Open tasks: 1. sysctl(3) glue code __________________________________________________________________ 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 over 17,300. The PR count has been stable at around 800; we have not quite cleared up the backlog that showed up during the freeze to import xorg7.2. There have been 4 experimental runs on the build cluster, most notably resulting in some speedups for package registration. A further experimental run to genericize autotools handling is in progress. One of the most sweeping ports commits to happen in years was the upgrade of xorg from 6.9 to 7.2. This involved a complete rework of the internals of the port, as X.org itself has effectively pushed the responsibility for packaging to the OSes that incorporate it. The idea was to be able for them to update individual code (such as video drivers) without having to reroll the entire distribution. This commit caused us to have the longest period of preparation work, and actual tree lockdown, that I am aware of. The commit continues to be controversial, partly due to the fact that none of our port upgrade tools was up to the task of doing the upgrade without manual intervention. At the same time that xorg was upgraded, we moved the installation directory from the obsolete /usr/X11R6 to our default /usr/local. This further complicated the upgrade. There have been new releases of the ports tinderbox code, the portmaster update utility, and portupgrade. GNOME was updated to 2.18.2. We have added 7 new committers since the last report. We appreciate all the new help. However, a few committers have turned in their commit bits for safekeeping, due to lack of time. Unfortunately, Clement Laforet has also had to step down from portmgr due to lack of time. We thank him for his help so far. Erwin, Kris and Mark met up at BSDCan and reviewed all the portmgr-owned PRs. A large number were closed, or suspended pending more work from the submitter. After closing the PRs that were committed after the -exp builds, the number of portmgr owned PRs came down to an all time low of 48 from around 70. We hope to make further progress during the rest of the year. Open tasks: 1. gcc4.2 has been imported to the base for 7.0. Unfortunately, this breaks a large number of ports. We need committer and maintainer help to get these in good shape for the release. 2. 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. 3. Although we have added many maintainers, we still have many unmaintained ports. The packages on amd64 are lagging behind a bit; those on sparc64 require even more work. __________________________________________________________________ Ports Collection infrastructure improvements URL: http://wiki.freebsd.org/G%C3%A1borSoC2007 Contact: G=E1bor K=F6vesd=E1n Contact: Andrew Pantyukhin G=E1bor K=F6vesd=E1n is working on some improvements for the Ports Colle= ction infrastructure. This year, he aimed to work on long-standing issues, which are tracked in GNATS, but we have not had a volunteer for recently. With the mentorship of Andrew Pantyukhin, he is also reimplementing the DESTDIR support for Ports Collection in a more practical way. The complete description and status of this project is available on G=E1bor's SoC 2007 Wiki page. Open tasks: 1. Please see the Wiki page for the current status. __________________________________________________________________ Problem Report Database URL: http://www.freebsd.org/support.html#gnats URL: http://people.freebsd.org/~bsd/prstats/ Contact: Mark Linimon Gavin Atkinson has joined the bugbuster team via getting a GNATS account on the FreeBSD cluster. He is following in the footsteps of Matteo Riondato, who later graduated to a full src commit bit. So far, he has helped close nearly 150 PRs, including many that had become stale. Welcome! Our short-term goal is to try to identify bugs that we might be easily able to fix before the 6.3/7.0 simultaneous release. So far, great progress has been made on ata- and usb-related PRs. The goal for the rest of this year is to generate more developer interest in fixing bugs. To do this, we are, first, trying to do more work on triaging PRs as they come in, to help flag ones that seem to be valid problems (especially if they include patches.) Secondly, we have started a new weekly periodic posting to the freebsd-bugbusters@FreeBSD.org mailing list, which is a short list of PRs that we feel are ready for committer action. This posting is automatically generated from a text-file list that we maintain. We are continuing to try to manage our community's expectations of what we can do with the incoming PRs. In particular, we are trying to discourage submissions of the form "I cannot get the XYZ function to work". In practice, these PRs are not worked on. Instead, we are now encouraging these postings to go to one of the mailing lists such as freebsd-questions@, freebsd-x11@, and so forth. The idea is to emphasize GNATS as a "Problem Report" method, rather than a "general FreeBSD support" method. I feel that, otherwise, we were creating a false expectation. The overall PR count has dropped to below 5000, despite the extra PRs still not cleared up from the ports freeze for the xorg7.2 import. Significant progress has been made on the i386, kern, and bin PRs, as well as PRs in the 'feedback' state. In addition, Warner Losh has made progress on closing many of the usb PRs. Open tasks: 1. Please join us on the freebsd-bugbusters@ mailing list, or on #freebsd-bugbusters on EFNet, to help us triage PRs as they come in and also help us to work through the backlog, and help us to try to create a bugbusting "community". __________________________________________________________________ Release Engineering URL: http://www.FreeBSD.org/releng/ URL: http://www.FreeBSD.org/snapshots/ Contact: Release Engineering Team Code freeze in preparation for FreeBSD 7.0 began on June 18th. There are several large projects still being finished up as well as some issues that resulted as "fallout" from the work done just before the code freeze started (e.g. things resulting from the GCC 4.2 import). A schedule for the 7.0 release has not been set yet but the hope is that the first BETA build will be done near the end of July with a "fairly normal" release cycle (a few BETA builds followed by two or three RCs, each separated by around two weeks). We are planning to release FreeBSD 6.3 around the same time as FreeBSD 7.0 is released so the release schedule for that will be set at the same point we set the release cycle for 7.0, hopefully late in July. __________________________________________________________________ SCHED_SMP and SCHED_ULE URL: http://jeffr-tech.livejournal.com/ Contact: Jeff Roberson SCHED_SMP is a fork of the ULE scheduler which makes use of the new fine grain scheduler locking in 7.0-CURRENT to significantly improve SMP performance on some workloads. It has improved and stronger affinity, smarter CPU load balancing, structural improvements and many sysctl tunables. This can be considered ULE 3.0. Discussions are ongoing as to whether this will go into 7.0 as SCHED_SMP or as SCHED_ULE in 7.0 or 7.1. SCHED_ULE has had many bugfixes and performance improvements over the 7.0 development cycle and should no longer be considered unstable or experimental. On most workloads it significantly outperforms SCHED_4BSD on SMP and even slightly outperforms it on UP. There are some pathlogical workloads which exhibit as much as a 5% performance penalty. Many thanks to Kris Kennaway and current users for bug reports and performance testing. __________________________________________________________________ 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, two security advisories have been issued concerning problems in the base system of FreeBSD; both of these problems were in "contributed" code maintained outside of FreeBSD. The FreeBSD Vulnerabilities and Exposures Markup Language (VuXML) document has continued to be updated; since the last status report, 35 new entries have been added, bringing the total up to 925. In order to improve handling of security issues in the FreeBSD Ports Collection a new "ports-security" team has been created to include ports committers who periodically help with fixing ports security issues and documenting them in the FreeBSD VuXML document. Committers who wish to help with this effort can contact simon@ for details. The following FreeBSD releases are supported by the FreeBSD Security Team: FreeBSD 5.5, FreeBSD 6.1, and FreeBSD 6.2. The respective End of Life dates of supported releases are listed on the web site; it is expected that of the upcoming releases, FreeBSD 6.3 will be supported for two years after release, while FreeBSD 7.0 will be supported for one year after release. __________________________________________________________________ Security Regression Test URL: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=3D//depot/projects/ soc2007/zhouzhouyi%5fmactest%5fsoc Contact: Zhouyi Zhou Contact: Robert Watson Security Regression Test is supported by the project of Google summer code 2007. The main objective of this stage is to test the correctness of FreeBSD Mandatory Access Control Framework including correctly passing the security label from userland to kernel and non-bypassibility of Mandatory Access Control Hooks. Work performed in the last month: 1. Constructed a pair of pseudo ethernet drivers used for testing network related hooks. To avoid the packet go through the lo interface, the IP address in the packet is twisted in the driver. 2. Constructed a framework for logging Mandatory Access Control hooks which is got called during a period of time. + In kernel, every non-null label is got externalized into human readable string and recorded in a tail queue together with the name of hook that got called and possible flags or modes (etc. VREAD/VWRITE for mac_check_vnode_open hook). There is a thread much like audit subsystem's audit_worker logging the queue into a userspace file. The userland program use open, ioctl and close the /dev/mactest node to trigger and stop the logging. The logging file is truncated to zero every time the logging mechanism is triggered. + In userland, a bison based parsing tool is used to parse the logged file and reconstruct the record chain which will be compared with testsuite supplied configuration file to examine if expected hooks is got called and the label/flags/modes are correct. c) The testsuite mainly follows src/tools/regression/fstest, modified to adapt to test Mandatory Access Control Framework and include tests for signals Open tasks: 1. The code is quick and dirty. For example, a call to vn_open without checking its return value which is not fault tolerance. The coding style also needs modifications. 2. Although a test framework is completely constructed, the detailed test cases still need to be written, the test cases beside fstest and signal need to be add. 3. Testing of audit subsystem has not begin. 4. Other parts of Security Subsystem in FreeBSD also need concern. __________________________________________________________________ Stack trace capture in PMCTools URL: http://wiki.freebsd.org/PmcTools Contact: Joseph Koshy The kernel/hwpmc(4) bits of stack trace capture have been implemented and are available in Perforce under path '//depot/user/jkoshy/projects/pmc/...'. I'm currently enhancing pmcstat(8) to extract and summarize this information. Support by Google Inc. for this project is thankfully acknowledged. __________________________________________________________________ tarfs: A tar File System URL: http://www.googlebit.com/doku.php?id=3Dtarfs Contact: Eric Anderson Tarfs is a simple tar file system implementation for FreeBSD. The current goals are: * Support all standard read-only operations * Support large tar files (several gb's) * Use minimal memory * Allow using tar file as a root file system * Fast enough to actually use Here's the current state of things: * Can mount most tar files * Can do most operations (open,lookup,stat,readdir,etc) * Supports large tar files (tested up to 2GB) * Uses a relatively small amount of memory - proportional to number of files/dirs Open tasks: 1. No `..' directory in root of mounted tar file system 2. Locking issues regarding `..' in subdirs off root of fs 3. No block/char special device support. Needed? 4. Needs a directory hashing method 5. More testing needed. __________________________________________________________________ The FreeBSD Foundation URL: http://www.freebsdfoundation.org Contact: Deb Goodkin The FreeBSD Foundation ended Q2 raising over $116,000. We're almost half way to our goal of raising $250,000 this year! We continued our mission of supporting developer communication by helping FreeBSD developers attend BSDCan. We were also a sponsor of BSDCan and the developer summit. We are a sponsor of EuroBSDCon 2007 and are now accepting travel grant applications for this conference. Foundation board members met with representatives of companies that use or are thinking of using FreeBSD both in the bay area and Ottawa. The Foundation has negotiated a joint development agreement with Google, Inc. to sponsor FreeBSD developer Joseph Koshy to improve FreeBSD's HWPMC implementation, including adding stacktrace support, and a donation of SMP hardware for future SMP scalability work. We greatly appreciate Google's support for this project, which will facilitate performance measurement and optimization of both the FreeBSD operating system and applications running on it. To learn more about what we're doing, go to our website at http://www.FreeBSDFoundation.org/ . Our July newsletter will be published soon to update you on how we've been supporting the project and community worldwide. __________________________________________________________________ The Hungarian Documentation Project URL: http://www.freebsd.org/hu/docproj/hungarian.html URL: http://www.freebsd.org/hu/ URL: http://www.freebsd.org/doc/hu_HU.ISO8859-2/articles/linux-comparison/ Contact: G=E1bor K=F6vesd=E1n We have added one translated article since the last status report about this project. The infrastructure is ready to support localized articles and books as well, we just lack of human resource. New volunteers are highly welcome! Please see the link below and contact G=E1bor if you are interested. Open tasks: 1. Translate more articles and books. __________________________________________________________________ TrustedBSD Audit URL: http://www.TrustedBSD.org/audit.html Contact: Robert Watson Contact: Christian Peron Contact: General cleanups in preparation for 7.0. Process audit state moved to the credential to allow it to be accessed lock-free in most cases, as well as allowing it to be used in asynchronous contexts. OpenBSM 1.0a14 has been imported, which: fixes IPv6 endian issues, makes OpenBSM gcc41 warnings clean, teaches audit_submit(3) about getaudit_addr(), adds zonename tokens; other changes since the existing CVS 1.0a12 release previously imported include man page improvements, XML printing support, better audit.log.5 documentation, additional 64-bit token types, and new audit event identifiers. MAC checks have been added so that MAC policies can control use of audit system calls. Additional system call arguments are now audited. Audit now provides a security.audit sysctl node in order to determine if audit support is compiled in; boot-time console printfs have been removed. "options AUDIT" is now in the 7-CURRENT GENERIC kernel, so AUDIT support will be available out of the box in 7.0 without a kernel recompile. Manually enabling audit support in rc.conf will still be required. With FreeBSD 7.0, AUDIT will be a fully supported, rather than experimental, feature. __________________________________________________________________ TrustedBSD MAC Framework URL: http://www.TrustedBSD.org/mac.html Contact: Robert Watson Contact: Cleanup of MAC Framework API/KPI layers: mac.h is now just the user and user<->kernel API; mac_framework.h is the kernel<->MAC Framework KPI, and mac_policy.h is the MAC Framework<->MAC policy module KPI. Along similar lines, mac_label_get() and mac_label_set() accessor functions now allow policies to access label data without encoding struct label binary layout into policy modules, opening the door to more efficient layouts. struct label is now in mac_internal.h and used only inside the MAC Framework. General MAC policy cleanup, including removing no-op entry points and sysctls for some sample policies. mac_test(4) has been cleaned up significantly, and counters for all entry points added. A MAC check for UNIX domain socket connect has been added. MAC checks have been added so that MAC policies can control use of audit system calls. MAC checks that duplicate existing privileges but add no additional context have been removed (such as sysarch_ioperm, kld_unload, settime, and system_nfsd) -- checks aligned with privileges but that do provide additional context, such as additional arguments, have been kept. The Biba and LOMAC policies now implement priv(9) checks, differentiating between privileges that may compromise system integrity models, and those that don't. The essentially unused mnt_fslabel / mnt_label distinction has been eliminated by moving to a single mnt_label. No functional change to any policy. Several MAC-related interfaces have been modified to synchronize with the naming conventions present in the version of the MAC Framework adopted in Mac OS X Leopard; significant further changes are in the pipeline to complete this synchronization. While it will not be possible to reuse a policy between the two platforms without careful thinking and modification, this makes porting much easier. __________________________________________________________________ TrustedBSD priv(9) URL: http://www.TrustedBSD.org/ Contact: Robert Watson Contact: Further reduction of suser(9) consumers in order to attempt to remove the suser(9) KPI for 7.0. This includes resource limits, System V IPC, PPP, netinet port reuse, the NFS server, and netatalk. Remove unnecessary or redundant privilege checks were possible. UFS-privileges that apply to other file systems have been renamed to VFS privileges. All suser_cred() flags and priv_check_cred() flags are no longer required, as SUSER_ALLOWJAIL and SUSER_RUID use are determined entirely inside kern_jail.c and kern_priv.c and selected based on the privilege number, not a calling context flag. All privileges are now consistently allowed or not allowed in jail, and consistently use the ruid or euid. We will leave the flags field there as it will likely be used for other things in the future. Documentation in suser(9) and priv(9) has been updated. __________________________________________________________________ USB URL: http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=3D//depot/projects/ usb/src/sys/dev/usb&HIDEDEL=3DNO 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 there has been several changes to the USB stack. Here is a quick list of the most important changes: 1. FULL speed isochronous devices over HIGH speed USB Hubs are now fully supported. Due to various reasons the maximum isochronous bandwidth has been limited to 6MBit/s. This limit is tunable. 2. There is now full support for Linux USB device drivers through a Linux USB API emulation layer. 3. Various cleanups and fixes. Markus Brueffer is still working on the USB HID parser and support. Nothing has been committed yet. 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 . __________________________________________________________________ USB update Contact: Warner Losh About 18 months ago, I started to remove the compatibility macros that we had in the USB stack. These macros made it very hard to read the code and to diagnose problems. They represented a barrier to entry for people reading and understanding the stack. In addition, many of them effectively hid bugs from all but the most intensive investigations of the code. I've removed almost all of the macros in the client drivers, and all instances of the macros in the core FreeBSD USB stack. This makes the drivers more readable, and a little more robust. During this process, I fixed a lot of little bugs that people had been tripping over, and some that people hadn't reported. I've added a boatload of new vendor and product ids to the drivers from user PRs as well as from OpenBSD/NetBSD drivers. I finished up this work so that the FreeBSD USB stack would be more maintainable during the RELENG_7 period of time. I plan on MFCing most of the changes I've made into RELENG_6 after they have been shaken out in current. There was only one API changes in this work, so this is doable, and makes sharing drivers between 6.x and 7.x much easier. At this stage, it is unclear how long RELENG_6 will be around, so I'm hoping this will make USB much better in 6.3 if that's the release people choose to run. I've shied away from many of the more complicated changes to the stack. There's work being done outside of the tree by Hans Petter Selasky (hps) to make these sorts of changes. There is much in his stack that's ready to be merged, and I hope to integrate from that work useful bits that can be merged without disruption to improve the FreeBSD USB stack. I'm also looking for other FreeBSD developers that can jump in and help. Nearly all of the improvements I've done by spending a few hours a week sorting through the PRs for extremely low hanging fruit. There's plenty of room for others to be involved as well in improving FreeBSD's USB stack, as well as chances for us to import the now-useful bits from the evolving hps USB stack, hopefully reducing the diffs between it and the present FreeBSD USB stack. In addition, I'm looking for someone to do similar device ID merges from DragonFlyBSD. Finally, I've embarked on a mission to try to merge all the BSD's usbdevs files. There's no reason to have separate ones. I've started to modify usbdevs(1) to read the src/sys/dev/usb/usbdevs file and report more verbose information that way. A merged usbdevs would be larger, and take up more memory in a USBVERBOSE kernel, so to mitigate that effect, I'm making changes to usbdevs(1). Open tasks: 1. The biggest area of concern before the 7.0 release is to get the updated device lists into the manual pages. This task is too big for me to take on in addition to the work I'm doing in cleaning up. 2. We need more people that are willing to help out on the 'trivial' PRs that add IDs to the driver. In addition, we need people to periodically sync our driver lists with DragonFlyBSD, NetBSD, and OpenBSD drivers. 3. Merging the other BSD's usbdevs tables would be very helpful. 4. Writing a usbdevs parser for usbdevs(1) to use. __________________________________________________________________ Wireless Networking Contact: Sam Leffler Contact: Andrew Thompson A major update of the 802.11 wireless support was committed. Changes include advanced station mode facilities such as background scanning and roaming, and support for 802.11n devices. In addition parts of the Atheros' SuperG protocol extensions were added so that wireless clients that communicate with Atheros-based access points can operate more effectively. The changes to the infrastructure are also important because they simplify future distribution of Virtual AP (VAP) support. This work represents the effort of many people including Kip Macy, Andrew Thompson, Sepherosa Ziehau, Max Laier, and Kevin Lo. Getting these changes into the tree now ensures they will be present for the lifetime of the 7.x branch. The scanning and SuperG work were supported by Atheros. The 802.11n-related work was supported by Marvell. Open tasks: 1. Please test your wireless networking, especially during the 7.0 BETA and RC period. __________________________________________________________________ =A9 1995-2007 The FreeBSD Project. All rights reserved. --Boundary-00=_8x1kGLTmGz2Z4zJ-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 07:40:46 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 9381416A421; Tue, 10 Jul 2007 07:40:46 +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 3FC0813C45D; Tue, 10 Jul 2007 07:40:46 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A571E0.dip.t-dialin.net [84.165.113.224]) by redbull.bpaserver.net (Postfix) with ESMTP id 45C422E28B; Tue, 10 Jul 2007 09:40:41 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 0F63C5B4AB1; Tue, 10 Jul 2007 09:38:30 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l6A7cTjB091882; Tue, 10 Jul 2007 09:38:29 +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; Tue, 10 Jul 2007 09:38:29 +0200 Message-ID: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Tue, 10 Jul 2007 09:38:29 +0200 From: Alexander Leidinger To: Christopher Davis References: 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.4) / 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.823, required 8, BAYES_00 -15.00, DKIM_POLICY_SIGNSOME 0.00, RDNS_DYNAMIC 0.10, TW_II 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Tue, 10 Jul 2007 11:29:09 +0000 Cc: freebsd-hackers@FreeBSD.org, Ariff@FreeBSD.org, multimedia@FreeBSD.org Subject: Re: Audio driver template 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 Jul 2007 07:40:46 -0000 Quoting Christopher Davis (from Mon, 9 Jul 2007 =20 11:47:14 -0700): > http://people.freebsd.org/~cg/template.c > > Thought I would take a look at the audio driver template as > part of my task to modernize drivers, soc2007. I would simplify > the read and write functions to avoid using the bus tag and > handle, but I'm not sure what else to do to bring it up to date. > > How else can it be improved? Putting it into the examples directory instead of having it on the =20 people's own pages would be an improvement (the developer handbook =20 needs to be changed to point to the examples directory then). And you should clarify what kind of improvements are valid for your =20 SoC work. Somehow I doubt that adding shiny new features (like hps =20 suggested) is part of the goal for your work. I think it's more like =20 bringing existing drivers up-to-par with currently available generic =20 driver interfaces, isn't it? I also think examples for suspend/resume stuff should be added. =20 /sys/dev/sound/pci/atiixp.c has suspend and resume methods if you want =20 an example. You could also review the locking, as it changed a little bit =20 recently, I think. Apart from the atiixp driver the envy42, emu10kx and HDA drivers can =20 also serve as examples for what is the most current in the sound =20 subsystem in FreeBSD. Maybe you can gain some more hints from them (I =20 think the template is not very up-to-date compared to them). The new mixer interface is not used yet in the drivers, so we don't =20 have examples at all for them. You could ask ryanb@FreeBSD.org (or on =20 multimedia@) about it. Ariff@FreeBSD.org (or multimedia@) can maybe help if you have some =20 questions regarding the drivers in the tree (maybe Ariff will answer =20 to your initial question anyway). Bye, Alexander. --=20 I guess the Little League is even littler than we thought. =09=09-- D. Cavett 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 Tue Jul 10 08:40:48 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 77CA816A468; Tue, 10 Jul 2007 08:40:48 +0000 (UTC) (envelope-from snezhko@indorsoft.ru) Received: from indorsoft.ru (indor.net.tomline.ru [213.183.100.90]) by mx1.freebsd.org (Postfix) with ESMTP id 9612B13C45B; Tue, 10 Jul 2007 08:40:46 +0000 (UTC) (envelope-from snezhko@indorsoft.ru) Received: from SNEZHKO by indorsoft.ru (MDaemon.PRO.v7.2.2.R) with ESMTP id md50000218776.msg; Tue, 10 Jul 2007 15:40:38 +0700 From: Victor Snezhko To: Ivan Voras References: <46934301.5080302@fer.hr> Date: Tue, 10 Jul 2007 15:40:31 +0700 In-Reply-To: <46934301.5080302@fer.hr> (Ivan Voras's message of "Tue, 10 Jul 2007 10:27:45 +0200") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Processed: indor.net.tomline.ru, Tue, 10 Jul 2007 15:40:38 +0700 (not processed: spam filter disabled) X-Return-Path: snezhko@indorsoft.ru X-Mailman-Approved-At: Tue, 10 Jul 2007 11:29:09 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Debugging time 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 Jul 2007 08:40:48 -0000 Ivan Voras writes: >> For about half a year I have another weirdness with time on my >> -current box without vmware, maybe it's somehow has common origins >> with your behaviour. When I boot FreeBSD, ntpdate (which is set up to >> run via rc.conf) often reports huge time offsets: >> 10 Jul 12:04:34 ntpdate[51761]: step time server ntp.server.name offset 234456.074166 sec >> >> I have so far only noticed that the value of the the offset is roughly >> equal to the amount of time when FreeBSD isn't running (this is a >> dual-boot box with windows). The box is pretty old, 600-MHz Celeron > > Is the above number correct (i.e. ~~ 65 hours)? Yes, sometimes my FreeBSD is not running for several days - in this case ntpdate prints such numbers. It looks like kernel stores date and time values somewhere and then re-reads them. I still don't rule out some stupidity on my part - the behaviour I'm observing is very illogic. Maybe I should try installing current from a fresh snapshot when it's released. > I noticed there can be a consistent "shift" of duration equal to > your timezone when VMWare sets the RTC to the host's local time and > FreeBSD thinks it's UTC. But if the difference is not constant, it's > not it. When I just reboot FreeBSD, offset doesn't exceed one or two seconds (notably, bios takes longer to boot, about 5-10 seconds). When BSD is inactive for several hours, number is much bigger. I neglected to debug this deeply before - I assumed I have overlooked something simple, but now that you have reported another issue in the similar area, I'll try to collect full information. -- WBR, Victor V. Snezhko E-mail: snezhko@indorsoft.ru From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 12:37: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 0C59D16A468 for ; Tue, 10 Jul 2007 12:37:25 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id AFEBA13C44C for ; Tue, 10 Jul 2007 12:37:24 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 8BC31E7A3FA for ; Tue, 10 Jul 2007 12:37:22 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 5C6627D70; Tue, 10 Jul 2007 14:36:35 +0200 (CEST) Date: Tue, 10 Jul 2007 14:36:35 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20070710123634.GD1194@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <46930106.3040503@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46930106.3040503@gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: add closefrom() call 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 Jul 2007 12:37:25 -0000 On Mon, Jul 09, 2007 at 11:46:14PM -0400, Ighighi wrote: > Calling F_MAXFD everytime we close a file descriptor would be heavy > having too much fd's. > On the other hand, it wouldn't make much a difference to just start from > getdtablesize() - 1. I fully agree. That is the second version of closefrom in DragonFly -- for the purpose of libc_r BTW. Joerg From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 13:20:47 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 8C45D16A492; Tue, 10 Jul 2007 13:20:47 +0000 (UTC) (envelope-from Yuriy.Tsibizov@gfk.com) Received: from mx2.gfk.ru (mx2.gfk.ru [84.21.231.139]) by mx1.freebsd.org (Postfix) with ESMTP id 8FF8113C48C; Tue, 10 Jul 2007 13:20:46 +0000 (UTC) (envelope-from Yuriy.Tsibizov@gfk.com) Received: from ex.hhp.local by mx2.gfk.ru (MDaemon PRO v9.6.0) with ESMTP id md50000212676.msg; Tue, 10 Jul 2007 17:07:55 +0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Tue, 10 Jul 2007 17:10:47 +0400 Message-ID: <78664C02FF341B4FAC63E561846E3BCC0A145E@ex.hhp.local> In-Reply-To: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Audio driver template thread-index: AcfC51vShbTc1zVqS/ybJ4mUnhlP0gACyp3A References: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> From: "Yuriy Tsibizov" To: "Alexander Leidinger" , "Christopher Davis" X-Spam-Processed: mx2.gfk.ru, Tue, 10 Jul 2007 17:07:55 +0400 (not processed: message from valid local sender) X-MDRemoteIP: 10.0.0.30 X-Return-Path: Yuriy.Tsibizov@gfk.com X-Envelope-From: Yuriy.Tsibizov@gfk.com X-MDAV-Processed: mx2.gfk.ru, Tue, 10 Jul 2007 17:07:56 +0400 X-Mailman-Approved-At: Tue, 10 Jul 2007 13:35:28 +0000 Cc: freebsd-hackers@FreeBSD.org, multimedia@FreeBSD.org Subject: RE: Audio driver template 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 Jul 2007 13:20:47 -0000 > > http://people.freebsd.org/~cg/template.c > > > > Thought I would take a look at the audio driver template as > > part of my task to modernize drivers, soc2007. I would simplify > > the read and write functions to avoid using the bus tag and > > handle, but I'm not sure what else to do to bring it up to date. > > > > How else can it be improved? >=20 > And you should clarify what kind of improvements are valid for your =20 > SoC work. Somehow I doubt that adding shiny new features (like hps =20 > suggested) is part of the goal for your work. I think it's more like =20 > bringing existing drivers up-to-par with currently available generic =20 > driver interfaces, isn't it? >=20 > I also think examples for suspend/resume stuff should be added. =20 > /sys/dev/sound/pci/atiixp.c has suspend and resume methods if=20 > you want =20 > an example. >=20 > You could also review the locking, as it changed a little bit =20 > recently, I think. >=20 > Apart from the atiixp driver the envy42, emu10kx and HDA drivers can =20 > also serve as examples for what is the most current in the sound =20 > subsystem in FreeBSD. Maybe you can gain some more hints from=20 > them (I =20 > think the template is not very up-to-date compared to them). emu10kx is bad example, because it uses a lot of "hacks", like=20 ac97 codec emulation. Yuriy. From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 17:52:42 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 7FA6716A41F for ; Tue, 10 Jul 2007 17:52:42 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outB.internet-mail-service.net (outB.internet-mail-service.net [216.240.47.225]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF7813C459 for ; Tue, 10 Jul 2007 17:52:42 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Tue, 10 Jul 2007 10:52:42 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id B1CFE125B0D for ; Tue, 10 Jul 2007 10:52:41 -0700 (PDT) Message-ID: <4693C77E.7070806@elischer.org> Date: Tue, 10 Jul 2007 10:53:02 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.4 (Macintosh/20070604) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <46930106.3040503@gmail.com> <20070710123634.GD1194@britannica.bec.de> In-Reply-To: <20070710123634.GD1194@britannica.bec.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: add closefrom() call 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 Jul 2007 17:52:42 -0000 Joerg Sonnenberger wrote: > On Mon, Jul 09, 2007 at 11:46:14PM -0400, Ighighi wrote: >> Calling F_MAXFD everytime we close a file descriptor would be heavy >> having too much fd's. >> On the other hand, it wouldn't make much a difference to just start from >> getdtablesize() - 1. > > I fully agree. That is the second version of closefrom in DragonFly -- > for the purpose of libc_r BTW. This is silly.. All the code needed to do this is already in the kernel. It's needed at exit time. Make a syscall as a front end to it and be done with it. > > Joerg > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 21:07:58 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 5DBF316A400 for ; Tue, 10 Jul 2007 21:07:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0E913C44B for ; Tue, 10 Jul 2007 21:07:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l6AL7tWg077685; Tue, 10 Jul 2007 17:07:55 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org, John-Mark Gurney Date: Tue, 10 Jul 2007 15:13:50 -0400 User-Agent: KMail/1.9.6 References: <20070710020921.GB1221@funkthat.com> In-Reply-To: <20070710020921.GB1221@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707101513.50869.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 10 Jul 2007 17:07:55 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3626/Tue Jul 10 15:09:15 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Christopher Davis , multimedia@freebsd.org Subject: Re: Audio driver template 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 Jul 2007 21:07:58 -0000 On Monday 09 July 2007 10:09:21 pm John-Mark Gurney wrote: > Christopher Davis wrote this message on Mon, Jul 09, 2007 at 11:47 -0700: > > http://people.freebsd.org/~cg/template.c > > > > Thought I would take a look at the audio driver template as > > part of my task to modernize drivers, soc2007. I would simplify > > the read and write functions to avoid using the bus tag and > > handle, but I'm not sure what else to do to bring it up to date. > > > > How else can it be improved? > > Use bus_alloc_resources instead of using bus_alloc_resource... > Maybe use pci_enable_busmaster and friends instead of using > pci_write_config... (In the future for suspend/resume, I would hope > our pci layer would save the state, which it might not if you write > directly to the config registers.) It already saves the state, and it does so by reading all the regs during suspend, so that backdoor writes are saved and restored. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 22:30:24 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 7910E16A46B for ; Tue, 10 Jul 2007 22:30:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5644213C4AD for ; Tue, 10 Jul 2007 22:30:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id DF24446C71; Tue, 10 Jul 2007 18:30:23 -0400 (EDT) Date: Tue, 10 Jul 2007 23:30:23 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: d@delphij.net In-Reply-To: <468E16E6.6030608@delphij.net> Message-ID: <20070710232917.R69744@fledge.watson.org> References: <20070705122650.GE1302@britannica.bec.de> <468E16E6.6030608@delphij.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: add closefrom() call 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 Jul 2007 22:30:24 -0000 On Fri, 6 Jul 2007, LI Xin wrote: > To RW: I have not found a suitable audit event for this, should I create a > new event? BTW, I can add an AUE_CLOSEFROM event to OpenBSM. This may require a little work by event consumers who will now need to know about an additional source of implicit closes. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 04:27:13 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 BA22B16A400 for ; Wed, 11 Jul 2007 04:27:13 +0000 (UTC) (envelope-from loafier@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 7679F13C455 for ; Wed, 11 Jul 2007 04:27:13 +0000 (UTC) (envelope-from loafier@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so360509anc for ; Tue, 10 Jul 2007 21:27: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:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=R0+UK6J+Ewvdlfl5hwD+FWrMj9hqB0KI91DT+MSf1N4rbT2yLHbjP7fk5TfHXSMsJpeBJ3i06kL1tvNxWakykf4VZ95TzblE7wQnY1pXmFJP3YqWuIFXuXSctAZzwGrgJuDzWdmLVT92FuyFkIqe3X5zHlTRnjzaaQTGE/UK0x8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=qVgioTQIg0bKN1LrDTvp7qeO5mxNwehdVZydS6M1X7lPl2xa7N2BGSanKAjsvnXS417G/ZZOnNrIrbF2rv64mC5rr999RgsQyntcxjP0617/41PerRGPAOft5ooGbH/pJ9F7kapo+FYNlKm1K7d+CVw6pG7U+8BjExHYZF34/HU= Received: by 10.100.191.5 with SMTP id o5mr2577475anf.1184128032418; Tue, 10 Jul 2007 21:27:12 -0700 (PDT) Received: by 10.100.109.17 with HTTP; Tue, 10 Jul 2007 21:27:12 -0700 (PDT) Message-ID: Date: Tue, 10 Jul 2007 21:27:12 -0700 From: "Christopher Davis" Sender: loafier@gmail.com To: multimedia@freebsd.org In-Reply-To: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> X-Google-Sender-Auth: a684898945dd5b30 Cc: freebsd-hackers@freebsd.org Subject: Re: Audio driver template 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 Jul 2007 04:27:13 -0000 On 7/10/07, Alexander Leidinger wrote: > Quoting Christopher Davis (from Mon, 9 Jul 2007 > 11:47:14 -0700): > > > http://people.freebsd.org/~cg/template.c > > > > Thought I would take a look at the audio driver template as > > part of my task to modernize drivers, soc2007. I would simplify > > the read and write functions to avoid using the bus tag and > > handle, but I'm not sure what else to do to bring it up to date. > > > > How else can it be improved? > > Putting it into the examples directory instead of having it on the > people's own pages would be an improvement (the developer handbook > needs to be changed to point to the examples directory then). > > And you should clarify what kind of improvements are valid for your > SoC work. Somehow I doubt that adding shiny new features (like hps > suggested) is part of the goal for your work. I think it's more like > bringing existing drivers up-to-par with currently available generic > driver interfaces, isn't it? > > I also think examples for suspend/resume stuff should be added. > /sys/dev/sound/pci/atiixp.c has suspend and resume methods if you want > an example. > > You could also review the locking, as it changed a little bit > recently, I think. > > Apart from the atiixp driver the envy42, emu10kx and HDA drivers can > also serve as examples for what is the most current in the sound > subsystem in FreeBSD. Maybe you can gain some more hints from them (I > think the template is not very up-to-date compared to them). > > The new mixer interface is not used yet in the drivers, so we don't > have examples at all for them. You could ask ryanb@FreeBSD.org (or on > multimedia@) about it. > > Ariff@FreeBSD.org (or multimedia@) can maybe help if you have some > questions regarding the drivers in the tree (maybe Ariff will answer > to your initial question anyway). > > Bye, > Alexander. > > -- > I guess the Little League is even littler than we thought. > -- D. Cavett > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > Yes, my project is to modify drivers to use new interface features, like bus_alloc_resources(), which can help cut down bloat. Adding new features is probably out of scope at this point. Here's what I've done so far: http://loafier.sixbit.org/template.c - simplified read and write functions (changed to macros) - used bus_alloc_resources() -- I'm not sure if the resource id numbers are correct. - used pci_enable_busmaster() and pci_enable_io() functions -- I'm not sure if this is correct, either. - used bus_get_dma_tag() for the parent arg of bus_dma_tag_create() I'll take a look at those newer drivers to see what audio-specific changes to make... -- Christopher Davis From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 13:22:04 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 7003F16A477; Wed, 11 Jul 2007 13:22:04 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.freebsd.org (Postfix) with SMTP id 9BB1313C4CC; Wed, 11 Jul 2007 13:22:03 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 11 Jul 2007 14:22:02 +0100 (BST) Date: Wed, 11 Jul 2007 14:22:02 +0100 From: David Malone To: Ivan Voras Message-ID: <20070711132202.GA95487@walton.maths.tcd.ie> References: <20070709214216.GA72912@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Debugging times 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 Jul 2007 13:22:04 -0000 On Tue, Jul 10, 2007 at 12:29:26AM +0200, Ivan Voras wrote: > Yes, I'll test them. > > The problem is - the same kernel works when booted off a hard drive, so > unless the VMWare BIOS is very messed up (it's the first time I see such > problems) it may not help. Please, scatter debug printf's around so I > can see what's going on :) Try the patch at: http://www.maths.tcd.ie/~dwmalone/clock.patch It checks the return values of the various clock reading functions in the kernel and prints an error message if it finds that it can't set the clock OK. Some machines have a BIOS that doesn't count the day-of-week correctly, and recently FreeBSD has started treating this as an error on some platforms. (This patch won't fix anything, but might produce a more informative error message.) David. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 17:08:19 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 9731016A46C for ; Wed, 11 Jul 2007 17:08:19 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.freebsd.org (Postfix) with ESMTP id E1E0A13C455 for ; Wed, 11 Jul 2007 17:08:14 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from [161.53.72.113] (lara.cc.fer.hr [161.53.72.113]) by pinus.cc.fer.hr (8.12.2/8.12.2) with ESMTP id l6A8dr3f018321; Tue, 10 Jul 2007 10:39:55 +0200 (MEST) Message-ID: <46934301.5080302@fer.hr> Date: Tue, 10 Jul 2007 10:27:45 +0200 From: Ivan Voras User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: Victor Snezhko References: In-Reply-To: X-Enigmail-Version: 0.94.2.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3DF98B718EE8063EEEC21C16" Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Debugging time 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 Jul 2007 17:08:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3DF98B718EE8063EEEC21C16 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Victor Snezhko wrote: > Hi, Ivan, David, Hi, > For about half a year I have another weirdness with time on my > -current box without vmware, maybe it's somehow has common origins > with your behaviour. When I boot FreeBSD, ntpdate (which is set up to > run via rc.conf) often reports huge time offsets: > 10 Jul 12:04:34 ntpdate[51761]: step time server ntp.server.name offs= et 234456.074166 sec >=20 > I have so far only noticed that the value of the the offset is roughly > equal to the amount of time when FreeBSD isn't running (this is a > dual-boot box with windows). The box is pretty old, 600-MHz Celeron=20 Is the above number correct (i.e. ~~ 65 hours)? I noticed there can be a = consistent "shift" of duration equal to your timezone when VMWare sets=20 the RTC to the host's local time and FreeBSD thinks it's UTC. But if the = difference is not constant, it's not it. --------------enig3DF98B718EE8063EEEC21C16 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGk0MIldnAQVacBcgRAhjgAJ9mNV0Nyjy/iyD+88Y0W5gKUMMC3wCfeWkU 2xWQ2TGgr2TiELuHHg2158s= =81ct -----END PGP SIGNATURE----- --------------enig3DF98B718EE8063EEEC21C16-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 17:48:49 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 B4FF616A494 for ; Wed, 11 Jul 2007 17:48:49 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id A989213C4C4 for ; Wed, 11 Jul 2007 17:48:49 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 046A21A4DA5; Wed, 11 Jul 2007 10:26:01 -0700 (PDT) Date: Wed, 11 Jul 2007 10:26:00 -0700 From: Alfred Perlstein To: hackers@freebsd.org Message-ID: <20070711172600.GO45894@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: exporting subr_param values as sysctls 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 Jul 2007 17:48:49 -0000 I would like to export the various parameters from subr_param.c into sysctl, these nodes would include the names from the following tunables as well as others in these files. TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); dfldsiz = DFLDSIZ; TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz); maxdsiz = MAXDSIZ; TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz); dflssiz = DFLSSIZ; TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz); maxssiz = MAXSSIZ; TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); sgrowsiz = SGROWSIZ; TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); any objections? I don't see any obvious way to get at these values on a running system. -- - Alfred Perlstein From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 18:42:47 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 8C4C816A4F4; Wed, 11 Jul 2007 18:42:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id E573213C459; Wed, 11 Jul 2007 18:42:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l6BIgemI086193; Wed, 11 Jul 2007 14:42:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 11 Jul 2007 14:10:18 -0400 User-Agent: KMail/1.9.6 References: <20070711172600.GO45894@elvis.mu.org> In-Reply-To: <20070711172600.GO45894@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707111410.18587.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 11 Jul 2007 14:42:43 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3637/Wed Jul 11 12:27:26 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: hackers@freebsd.org, Alfred Perlstein Subject: Re: exporting subr_param values as sysctls 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 Jul 2007 18:42:47 -0000 On Wednesday 11 July 2007 01:26:00 pm Alfred Perlstein wrote: > I would like to export the various parameters from subr_param.c > into sysctl, these nodes would include the names from the following > tunables as well as others in these files. > > TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); > dfldsiz = DFLDSIZ; > TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz); > maxdsiz = MAXDSIZ; > TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz); > dflssiz = DFLSSIZ; > TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz); > maxssiz = MAXSSIZ; > TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); > sgrowsiz = SGROWSIZ; > TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); > > any objections? > > I don't see any obvious way to get at these values on a running > system. Go for it. At work we already export the ia32 variants for amd64's COMPAT_IA32 as sysctls. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 18:42: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 8C4C816A4F4; Wed, 11 Jul 2007 18:42:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id E573213C459; Wed, 11 Jul 2007 18:42:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l6BIgemI086193; Wed, 11 Jul 2007 14:42:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 11 Jul 2007 14:10:18 -0400 User-Agent: KMail/1.9.6 References: <20070711172600.GO45894@elvis.mu.org> In-Reply-To: <20070711172600.GO45894@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707111410.18587.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 11 Jul 2007 14:42:43 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3637/Wed Jul 11 12:27:26 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: hackers@freebsd.org, Alfred Perlstein Subject: Re: exporting subr_param values as sysctls 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 Jul 2007 18:42:47 -0000 On Wednesday 11 July 2007 01:26:00 pm Alfred Perlstein wrote: > I would like to export the various parameters from subr_param.c > into sysctl, these nodes would include the names from the following > tunables as well as others in these files. > > TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); > dfldsiz = DFLDSIZ; > TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz); > maxdsiz = MAXDSIZ; > TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz); > dflssiz = DFLSSIZ; > TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz); > maxssiz = MAXSSIZ; > TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); > sgrowsiz = SGROWSIZ; > TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); > > any objections? > > I don't see any obvious way to get at these values on a running > system. Go for it. At work we already export the ia32 variants for amd64's COMPAT_IA32 as sysctls. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 21:07: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 EF26F16A480; Wed, 11 Jul 2007 21:07:08 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id D6DB313C480; Wed, 11 Jul 2007 21:07:08 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.8/8.13.7) with ESMTP id l6BL78A0061859; Wed, 11 Jul 2007 14:07:08 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.13.8/8.13.4/Submit) id l6BL77Gj061858; Wed, 11 Jul 2007 14:07:07 -0700 (PDT) Date: Wed, 11 Jul 2007 14:07:07 -0700 (PDT) From: Matthew Dillon Message-Id: <200707112107.l6BL77Gj061858@apollo.backplane.com> To: Zhouyi Zhou References: <20070709105547.71827eb8.zhouzhouyi@FreeBSD.org> <20070709115637.sapzl5uq3osw4gc4@webmail.leidinger.net> <00d901c7c222$109cb310$f100a8c0@iosdf17a8152bc> Cc: Alexander Leidinger , freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: rewrite src/sys/i386/i386/in_cksum.c 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 Jul 2007 21:07:09 -0000 Here's a reference to the DragonFly code: http://www.dragonflybsd.org/cvsweb/src/sys/cpu/i386/misc/in_cksum2.s http://www.dragonflybsd.org/cvsweb/src/sys/netinet/in_cksum.c It's pretty simple. The core 1's complement checksum is now written in machine-dependant assembly and ONLY handles multiples of 32 bit words. In otherwords, no special cases. The mbuf wrapper is written in machine-independant C, calls the assembly for the bulk of the work, and handles all the edge cases. The rewrite is much cleaner and the code documentation is actually understandable. Plus only a very simple core needs to be written in assembly and the C wrapper is machine independant, instead of embedding the assembly with the C and praying the compiler doesn't blow things up. -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 21:14: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 75F3C16A46E for ; Wed, 11 Jul 2007 21:14:28 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 48E2413C45B for ; Wed, 11 Jul 2007 21:14:28 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.8/8.13.7) with ESMTP id l6BLERik061934; Wed, 11 Jul 2007 14:14:27 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.13.8/8.13.4/Submit) id l6BLERAF061933; Wed, 11 Jul 2007 14:14:27 -0700 (PDT) Date: Wed, 11 Jul 2007 14:14:27 -0700 (PDT) From: Matthew Dillon Message-Id: <200707112114.l6BLERAF061933@apollo.backplane.com> To: Julian Elischer References: <46930106.3040503@gmail.com> <20070710123634.GD1194@britannica.bec.de> <4693C77E.7070806@elischer.org> Cc: freebsd-hackers@freebsd.org Subject: Re: add closefrom() call 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 Jul 2007 21:14:28 -0000 We added it basically because doing all the junk described in previous postings in this thread in userland is a ridiculously huge eyesore that doesn't scale and doesn't make sense when 5 minutes of programming nets you a shiny new system call which does it all for you. If you are worried about optimizing it (which kinda implies a system call anyhow since you aren't doing a context switch for each descriptor), worry about optimizing the kernel implementation of the system call rather then optimizing the unoptimizable userland that eats 300ns+ per descriptor to do the close() instead of the 10ns/descriptor that it takes the kernel to do the close(). -Matt From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 21:20:12 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 294B416A477 for ; Wed, 11 Jul 2007 21:20:12 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outR.internet-mail-service.net (outR.internet-mail-service.net [216.240.47.241]) by mx1.freebsd.org (Postfix) with ESMTP id 0FC2013C4BB for ; Wed, 11 Jul 2007 21:20:12 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Wed, 11 Jul 2007 14:20:11 -0700 Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 50A54125A28; Wed, 11 Jul 2007 14:20:11 -0700 (PDT) Message-ID: <469549A0.70102@elischer.org> Date: Wed, 11 Jul 2007 14:20:32 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.4 (Macintosh/20070604) MIME-Version: 1.0 To: Matthew Dillon References: <46930106.3040503@gmail.com> <20070710123634.GD1194@britannica.bec.de> <4693C77E.7070806@elischer.org> <200707112114.l6BLERAF061933@apollo.backplane.com> In-Reply-To: <200707112114.l6BLERAF061933@apollo.backplane.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: add closefrom() call 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 Jul 2007 21:20:12 -0000 Matthew Dillon wrote: > We added it basically because doing all the junk described in > previous postings in this thread in userland is a ridiculously huge > eyesore that doesn't scale and doesn't make sense when 5 minutes of > programming nets you a shiny new system call which does it all for you. > > If you are worried about optimizing it (which kinda implies a system > call anyhow since you aren't doing a context switch for each descriptor), > worry about optimizing the kernel implementation of the system call > rather then optimizing the unoptimizable userland that eats 300ns+ per > descriptor to do the close() instead of the 10ns/descriptor that it > takes the kernel to do the close(). my thought exactly. I also add that speed IS important in this case as I have seen MANY programs that start up by closing the first 2048 descriptors "just in case" and I've seen some that do it more than once as they move through to daemon state. These programs have a slow startp due to this (not to mention it's a pain to step past it all when debugging). Julian > > -Matt From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 11 22:27: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 C2D4516A46C for ; Wed, 11 Jul 2007 22:27:56 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 7E4AA13C455 for ; Wed, 11 Jul 2007 22:27:56 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 35576E7A3FA for ; Wed, 11 Jul 2007 22:27:54 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 818027D3B; Thu, 12 Jul 2007 00:27:02 +0200 (CEST) Date: Thu, 12 Jul 2007 00:27:01 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20070711222700.GB23838@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <46930106.3040503@gmail.com> <20070710123634.GD1194@britannica.bec.de> <4693C77E.7070806@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4693C77E.7070806@elischer.org> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: add closefrom() call 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 Jul 2007 22:27:56 -0000 On Tue, Jul 10, 2007 at 10:53:02AM -0700, Julian Elischer wrote: > Joerg Sonnenberger wrote: > >On Mon, Jul 09, 2007 at 11:46:14PM -0400, Ighighi wrote: > >>Calling F_MAXFD everytime we close a file descriptor would be heavy > >>having too much fd's. > >>On the other hand, it wouldn't make much a difference to just start from > >>getdtablesize() - 1. > > > >I fully agree. That is the second version of closefrom in DragonFly -- > >for the purpose of libc_r BTW. > > This is silly.. > All the code needed to do this is already in the kernel. > It's needed at exit time. > Make a syscall as a front end to it and be done with it. As I said -- this was done only in libc_r because of the additional constraints of not closing the internal pipe. For any other use case, I full heartedly agree. Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 08:51:37 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 D73B216A421; Thu, 12 Jul 2007 08:51:37 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.freebsd.org (Postfix) with SMTP id 11F9713C44B; Thu, 12 Jul 2007 08:51:36 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 12 Jul 2007 09:51:36 +0100 (BST) Date: Thu, 12 Jul 2007 09:51:35 +0100 From: David Malone To: Ivan Voras Message-ID: <20070712085135.GA5332@walton.maths.tcd.ie> References: <20070709214216.GA72912@walton.maths.tcd.ie> <20070711132202.GA95487@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Debugging times 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 Jul 2007 08:51:37 -0000 On Thu, Jul 12, 2007 at 12:14:43AM +0200, Ivan Voras wrote: > I've got interesting results (in the bad sense of the phrase): I do get > the message "Invalid time in real time clock. Check and reset the time > immediately" (the i386 message) BUT my time gets reset to 0 (midnight > 1970.) Ah - that's interesting. Could you look for the comment in src/sys/i386/isa/clock.c that says: /* Should we set dow = -1 because some clocks don't set it correctly? */ and add a line afterwards to say: ct.dow = -1; and see if that helps? > I see your patch and it shouldn't do that. Could it be a compiler bug, > so the effects change after trivial code has been changed? I think that without the patch, the clock is initialised using a chunk of uninitialised memory on the stack, which could result in all sorts of random values being used. With the patch, things may be a little more deterministic. David. From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 18:23: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 12DC316A474; Thu, 12 Jul 2007 18:23:42 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E051013C4BB; Thu, 12 Jul 2007 18:23:41 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id AEBFE1A4D87; Thu, 12 Jul 2007 11:23:41 -0700 (PDT) Date: Thu, 12 Jul 2007 11:23:41 -0700 From: Alfred Perlstein To: Paul Saab Message-ID: <20070712182341.GG45894@elvis.mu.org> References: <20070711172600.GO45894@elvis.mu.org> <46966F79.30203@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46966F79.30203@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: Re: exporting subr_param values as sysctls 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 Jul 2007 18:23:42 -0000 * Paul Saab [070712 11:14] wrote: > Alfred Perlstein wrote: > >I would like to export the various parameters from subr_param.c > >into sysctl, these nodes would include the names from the following > >tunables as well as others in these files. > > > > TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); > > dfldsiz = DFLDSIZ; > > TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz); > > maxdsiz = MAXDSIZ; > > TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz); > > dflssiz = DFLSSIZ; > > TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz); > > maxssiz = MAXSSIZ; > > TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); > > sgrowsiz = SGROWSIZ; > > TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); > > > >any objections? > > > >I don't see any obvious way to get at these values on a running > >system. > > Do it, but you can get them via kenv.. ;) only if set from the loader, right? -- - Alfred Perlstein From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 18:32:06 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 AF0C116A469 for ; Thu, 12 Jul 2007 18:32:06 +0000 (UTC) (envelope-from ps@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9E50F13C483 for ; Thu, 12 Jul 2007 18:32:06 +0000 (UTC) (envelope-from ps@freebsd.org) Received: from fermented.desk.hq.powerset.com (fermented.desk.hq.powerset.com [208.76.47.108]) by elvis.mu.org (Postfix) with ESMTP id 56FF81A4D82; Thu, 12 Jul 2007 11:14:25 -0700 (PDT) Message-ID: <46966F79.30203@freebsd.org> Date: Thu, 12 Jul 2007 11:14:17 -0700 From: Paul Saab User-Agent: Thunderbird 2.0.0.5pre (Macintosh/20070622) MIME-Version: 1.0 To: Alfred Perlstein References: <20070711172600.GO45894@elvis.mu.org> In-Reply-To: <20070711172600.GO45894@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: exporting subr_param values as sysctls 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 Jul 2007 18:32:06 -0000 Alfred Perlstein wrote: > I would like to export the various parameters from subr_param.c > into sysctl, these nodes would include the names from the following > tunables as well as others in these files. > > TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); > dfldsiz = DFLDSIZ; > TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz); > maxdsiz = MAXDSIZ; > TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz); > dflssiz = DFLSSIZ; > TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz); > maxssiz = MAXSSIZ; > TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); > sgrowsiz = SGROWSIZ; > TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); > > any objections? > > I don't see any obvious way to get at these values on a running > system. Do it, but you can get them via kenv.. ;) From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 19:08: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 7C25F16A41F for ; Thu, 12 Jul 2007 19:08:30 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id ED68D13C489 for ; Thu, 12 Jul 2007 19:08:29 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so458540uge for ; Thu, 12 Jul 2007 12:08: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:content-transfer-encoding:content-disposition; b=El2b9Wq7ur35//mxRpHeFfA51WoOZ/ekbBeHXXWH+1o0sXXjyK8bBay9k5SWm8o/9hBPRu/tNufSW1FbSzdpVxs0Fk//9x0836tu9q9yFNSNUQQsr/AXunW/MSYh1SzV644IRWlGwFT0jSMvy68oJZJ/D6aqXQ5JD0RrjpVL5DU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=uEiWWAMiP2wM0U2CHT5cdLOUVQkkXuA9ewgwh3Cwjj8DvN589UDTwInuiGEjuL9YK2rrZmLHv1h6OJPtdXL4SNtNODTG+i1ORYGDEDTpBVfbru072ycGuwivS4LtoCyIHaqOLUkG+Pk8gqJlnO7lsgtm8hPwYWGstyli86Mmf0M= Received: by 10.82.175.17 with SMTP id x17mr975436bue.1184265685819; Thu, 12 Jul 2007 11:41:25 -0700 (PDT) Received: by 10.82.117.14 with HTTP; Thu, 12 Jul 2007 11:41:25 -0700 (PDT) Message-ID: <3e473cc60707121141x20e7088cv13ff409d71e310dd@mail.gmail.com> Date: Thu, 12 Jul 2007 20:41:25 +0200 From: "Mathieu Prevot" To: "Joseph Koshy" , freebsd-hackers@freebsd.org, "FreeBSD SoC admins" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: get active processes in python 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 Jul 2007 19:08:30 -0000 Hello, do you recommend a method to get active processes in a python script, as with "ps" or "top" in order to put the result into a list ? (python package, shell call...) Mathieu From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 19:11:02 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 CC85C16A41F for ; Thu, 12 Jul 2007 19:11:02 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB5913C43E for ; Thu, 12 Jul 2007 19:11:02 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so271914mue for ; Thu, 12 Jul 2007 12:11:02 -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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FINs2R3Z2IWLrU0EZgkyhbmbi8qBjo6V+N1uSDUpJ4HppZTzHLDKa3XpRWmvJvqLBph0ehVw0YsStmTXFgonNU6VnOlMIEh91vNP4n3wKHHu/QohmRvOaoWyziD/CO4ZXlYPvCwtw0tfY+ZA8S/NO1CeJ1so2Ns8UlGcLzDEnyM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aamXCJd4QiaF+UxvU8GG1lvnUIwRVPQCGjdZbtV2mzTAtAeaIxQieTtAKFQHf5a7nx9sWUcUv4AYJzYQ0j36l2JKmkHd/AuwmrC/QsvvRxx/m1s5DJgHpI5HGf2Ni3H8IZCT08HlRZ6Ixt+8PGaZuB5lVYHxJwCT+DWr04+vrP0= Received: by 10.82.156.12 with SMTP id d12mr964027bue.1184265810810; Thu, 12 Jul 2007 11:43:30 -0700 (PDT) Received: by 10.82.117.14 with HTTP; Thu, 12 Jul 2007 11:43:30 -0700 (PDT) Message-ID: <3e473cc60707121143n30c5069bse6cf533726c9663e@mail.gmail.com> Date: Thu, 12 Jul 2007 20:43:30 +0200 From: "Mathieu Prevot" To: "Joseph Koshy" , freebsd-hackers@freebsd.org, "FreeBSD SoC admins" In-Reply-To: <3e473cc60707121141x20e7088cv13ff409d71e310dd@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: <3e473cc60707121141x20e7088cv13ff409d71e310dd@mail.gmail.com> Cc: Subject: Re: get active processes in python 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 Jul 2007 19:11:02 -0000 2007/7/12, Mathieu Prevot : > Hello, > do you recommend a method to get active processes in a python script, > as with "ps" or "top" in order to put the result into a list ? (python > package, shell call...) > Mathieu PS: I would like to fire this regularly, eg every second From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 19:45:46 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 6C1AF16A468 for ; Thu, 12 Jul 2007 19:45:46 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 405A213C45A for ; Thu, 12 Jul 2007 19:45:46 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: by wa-out-1112.google.com with SMTP id j37so312081waf for ; Thu, 12 Jul 2007 12:45:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:message-id:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:from:sender; b=rNMio3TQj72oPGB5jjO059YESPBn6WZ+2a4zK//krI2u8C7Kd5HzJhMahejG/eDX6L1nEKyc1zA0TLU8piUiY7nmsUwNCTPMurFns8+mZ67iNSfTZe4CIn8ykJDgfjA2Qhn5ZyUaVvQUdKxId7AHBrFOVoxu0+7nVP2lijKvyD8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:message-id:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:from:sender; b=rS8oNMUvUOPB/n6xoP5h2doiPMzn8Zt04zl9Dycfhic/qicIx4B3ARxcMeqSbNqa/wwWDrG+wQd3s48xDkSO6bfsiH1mWBtZvcFLLT2GpJi9lCIYhD5VuiqiwmECPXKQKmZKvQtLNfugxbtV9C+62RVBt8Ex0YZFgHHQ0QLP/Ik= Received: by 10.115.58.1 with SMTP id l1mr871454wak.1184267795012; Thu, 12 Jul 2007 12:16:35 -0700 (PDT) Received: from moria.unixconsulting.co.in ( [219.64.103.106]) by mx.google.com with ESMTP id v35sm28804585wah.2007.07.12.12.16.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2007 12:16:34 -0700 (PDT) Date: Fri, 13 Jul 2007 00:47:21 +0000 Message-ID: <86myy16sfa.wl%koshy@moria.unixconsulting.co.in> To: "Mathieu Prevot" In-Reply-To: <3e473cc60707121143n30c5069bse6cf533726c9663e@mail.gmail.com> References: <3e473cc60707121141x20e7088cv13ff409d71e310dd@mail.gmail.com> <3e473cc60707121143n30c5069bse6cf533726c9663e@mail.gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/21.3 (amd64--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII From: Joseph Koshy Sender: Joseph Koshy Cc: Joseph Koshy , freebsd-hackers@freebsd.org Subject: Re: get active processes in python 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 Jul 2007 19:45:46 -0000 [Trimming soc-admins@ from the CC list] mp> do you recommend a method to get active processes in a python script, mp> as with "ps" or "top" in order to put the result into a list ? (python mp> package, shell call...) One option would be to wrap "kvm_getprocs(3)" and use that. mp> PS: I would like to fire this regularly, eg every second This shouldn't be a problem. Most GUI toolkits offer a way of registering a callback that will be invoked periodically. Regards, Koshy From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 13 00:01:25 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 4E4DD16A46B; Fri, 13 Jul 2007 00:01:25 +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 97A6613C448; Fri, 13 Jul 2007 00:01:24 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout2.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6D01NGo022882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Jul 2007 17:01:23 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6D01MNw000994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 12 Jul 2007 17:01:23 -0700 Message-ID: <4696C0D2.6010809@u.washington.edu> Date: Thu, 12 Jul 2007 17:01:22 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Tim Kientzle References: <468C96C0.1040603@u.washington.edu> <468C9718.1050108@u.washington.edu> <468E60E9.80507@freebsd.org> <468E6C81.4060908@u.washington.edu> <468E7192.8030105@freebsd.org> In-Reply-To: <468E7192.8030105@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.12.164633 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, __STOCK_PHRASE_7 0, __USER_AGENT 0' Cc: ports@freebsd.org, hackers@freebsd.org Subject: Re: Finding slowdowns in pkg_install (continuations of previous threads) 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 Jul 2007 00:01:25 -0000 Tim Kientzle wrote: >> -I tried ... buffering ... the +CONTENTS file parsing function, >> and the >> majority of the time it yielded good results .... > > One approach I prototyped sometime back was to use > libarchive in pkg_add as follows: > * Open the archive > * Read +CONTENTS directly into memory (it's > guaranteed to always be first in the archive) > * Parse all of +CONTENTS at once > * Continue scanning the archive, disposing > of each file as it appears in the archive. > > Based on my experience with this, I would > suggest you just read all of +CONTENTS > directly into memory at once and parse > the whole thing in a single shot. > fopen(), then fstat() to get the size, > then allocate a buffer and read the whole > thing, then fclose(). You can then > parse it all at once. > > As a bonus, your parser then becomes a nice > little bit of reusable code that reads > a block of memory and returns a structure describing > the package metadata. > > Tim Kientzle I'm not 100% sure because I'm not comparing apples (virtual disk on desktop via VMware) to apples (real disk on server), but I'm showing a 2.5-fold speedup after adding the simple parser: Virtual disk: 4.42 real 1.37 user 1.47 sys Real disk: 10.26 real 5.36 user 0.99 sys I'll run a battery of tests just to ensure whether or not that's the case. Be back with results in a few more days. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 13 05:12: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 A77B716A400 for ; Fri, 13 Jul 2007 05:12:05 +0000 (UTC) (envelope-from loafier@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 643D013C49D for ; Fri, 13 Jul 2007 05:12:05 +0000 (UTC) (envelope-from loafier@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so97408anc for ; Thu, 12 Jul 2007 22:12:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=SF9+96LqvEg+9itKEp06tKFC+SCyV16HCAR67Ma/V0mG0BYSjIudop2TAmxxMM5fIn6j1wTdy04iLmzbsZvV2tswUOpnCRV8pxaCwuDB1yqalLEloa2Ls54kHRj2WbIHWktvRzQCxBrI1bcIgy7Pf//QS0A4Oeh9Jt7H4RlTqlc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=X0L8yQ4b6VXZMZdqtG2F66MYuEd/MptyKMDJ1oCirAvuGdpzPslbP+OjCL5G9M7q8A3B+jJa3o+DXmgxuSqIDUVYSrr6TC3VLvb/Q/5fWwLuUd30YHqwb7R577ebfbs3/y9aYLQdneJFZAOuvKJKwL1GRae34uhvH8/+zeQkYak= Received: by 10.100.191.5 with SMTP id o5mr765959anf.1184303524221; Thu, 12 Jul 2007 22:12:04 -0700 (PDT) Received: by 10.100.109.17 with HTTP; Thu, 12 Jul 2007 22:12:04 -0700 (PDT) Message-ID: Date: Thu, 12 Jul 2007 22:12:04 -0700 From: "Christopher Davis" Sender: loafier@gmail.com To: "Alexander Leidinger" In-Reply-To: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> X-Google-Sender-Auth: 42e337e7d76d7bc5 Cc: freebsd-hackers@freebsd.org, Ariff@freebsd.org, multimedia@freebsd.org Subject: Re: Audio driver template 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 Jul 2007 05:12:05 -0000 On 7/10/07, Alexander Leidinger wrote: > Putting it into the examples directory instead of having it on the > people's own pages would be an improvement (the developer handbook > needs to be changed to point to the examples directory then). > > And you should clarify what kind of improvements are valid for your > SoC work. Somehow I doubt that adding shiny new features (like hps > suggested) is part of the goal for your work. I think it's more like > bringing existing drivers up-to-par with currently available generic > driver interfaces, isn't it? > > I also think examples for suspend/resume stuff should be added. > /sys/dev/sound/pci/atiixp.c has suspend and resume methods if you want > an example. > > You could also review the locking, as it changed a little bit > recently, I think. > > Apart from the atiixp driver the envy42, emu10kx and HDA drivers can > also serve as examples for what is the most current in the sound > subsystem in FreeBSD. Maybe you can gain some more hints from them (I > think the template is not very up-to-date compared to them). > > The new mixer interface is not used yet in the drivers, so we don't > have examples at all for them. You could ask ryanb@FreeBSD.org (or on > multimedia@) about it. > > Ariff@FreeBSD.org (or multimedia@) can maybe help if you have some > questions regarding the drivers in the tree (maybe Ariff will answer > to your initial question anyway). > > Bye, > Alexander. > > -- > I guess the Little League is even littler than we thought. > -- D. Cavett > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > Made another update: http://loafier.sixbit.org/template.c - removed wierd garbage characters around the initcd function - made names of read and write macros consistent w/ other functions - fixed invocation of snd_mtxcreate() to include name string I also copied in some code from the atiixp drivers's suspend/resume functions for handling the play and record channels, and noticed the use of pci_set_powerstate(). -- Christopher Davis From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 13 16:02: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 20C4D16A404; Fri, 13 Jul 2007 16:02:27 +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 ED9EA13C494; Fri, 13 Jul 2007 16:02:26 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6DG2Q96004598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Jul 2007 09:02:26 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6DG2Pb6007177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 13 Jul 2007 09:02:25 -0700 Message-ID: <4697A210.2020301@u.washington.edu> Date: Fri, 13 Jul 2007 09:02:24 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Tim Kientzle References: <468C96C0.1040603@u.washington.edu> <468C9718.1050108@u.washington.edu> <468E60E9.80507@freebsd.org> <468E6C81.4060908@u.washington.edu> <468E7192.8030105@freebsd.org> <4696C0D2.6010809@u.washington.edu> In-Reply-To: <4696C0D2.6010809@u.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.13.84333 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __USER_AGENT 0' Cc: ports@freebsd.org, hackers@freebsd.org, krion@freebsd.org Subject: Re: Finding slowdowns in pkg_install (continuations of previous threads) 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 Jul 2007 16:02:27 -0000 Garrett Cooper wrote: > Tim Kientzle wrote: >>> -I tried ... buffering ... the +CONTENTS file parsing function, >>> and the >>> majority of the time it yielded good results .... >> >> One approach I prototyped sometime back was to use >> libarchive in pkg_add as follows: >> * Open the archive >> * Read +CONTENTS directly into memory (it's >> guaranteed to always be first in the archive) >> * Parse all of +CONTENTS at once >> * Continue scanning the archive, disposing >> of each file as it appears in the archive. >> >> Based on my experience with this, I would >> suggest you just read all of +CONTENTS >> directly into memory at once and parse >> the whole thing in a single shot. >> fopen(), then fstat() to get the size, >> then allocate a buffer and read the whole >> thing, then fclose(). You can then >> parse it all at once. >> >> As a bonus, your parser then becomes a nice >> little bit of reusable code that reads >> a block of memory and returns a structure describing >> the package metadata. >> >> Tim Kientzle > I'm not 100% sure because I'm not comparing apples (virtual disk on > desktop via VMware) to apples (real disk on server), but I'm showing a > 2.5-fold speedup after adding the simple parser: > > Virtual disk: > 4.42 real 1.37 user 1.47 sys > > Real disk: > 10.26 real 5.36 user 0.99 sys > > I'll run a battery of tests just to ensure whether or not that's the > case. > > Be back with results in a few more days. > > -Garrett Hello, As promised, here are some results for my work: By modifying the parser and heuristics in plist_cmd I appear to have decreased all figures (except plist_cmd, which I will note later) from their original values to much lower values. The only drawback is that I appear to have stimulated a bug with either malloc'ing memory, printf/vargs, or transferring large amounts of data via pipes where some of my debug messages are making it into plist_cmd(..) from obtainbymatch(..), which represents the the 3-fold increase in reported plist_cmd(..) iterations. I'm going to try replacing the debug commands with standard print statements wherever possible, then replace all tar commands with libarchive APIs, and see if the problem solves itself. Notes: 1. This sample is based off x11-libs/atk. 2. It isn't the final set of results. 3. Graphs coming soon (need to simulate values in Excel on work machine and convert to screenshots later on when I have a break -- thinking around noon). I'll repost when I have them available. 4. CSV files available at: http://students.washington.edu/youshi10/posted/atk-results.tgz. From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 13 19:12:35 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 D564616A403 for ; Fri, 13 Jul 2007 19:12:35 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 54C4A13C4A3 for ; Fri, 13 Jul 2007 19:12:35 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so705029uge for ; Fri, 13 Jul 2007 12:12:34 -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=npC82We0KU86EIP+NSGtZS9VCwS9MQWXAbZ8HKSZmrxL8tMD5GcVAPzREe+O6+CuIGVCtDNtw/PmO799pCTG6M+fPJwYYjzqdQOM2QNtBO2H7IU6eovcNPxxK0vz7zGbBdmf+exy0Nc7T2qQX75fzbqz0+kPAOzvAe0fEqHumYc= 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=BiblRUljB0UYPKjanASzmZLSlSZmORtCo5UU0gJDVtSIgTjoJUY0MKXsdv/kkSowARGSqQPpWM0X3MXrCf9BuLpQtcTlTgYRufJ69FO511OV2Ik8uBtCddzl4FdENir7QMbzOdP5dpvKk/WJl6s1/8hZfwI14TVlZjbFBHpewpM= Received: by 10.82.190.2 with SMTP id n2mr2400155buf.1184353953983; Fri, 13 Jul 2007 12:12:33 -0700 (PDT) Received: by 10.82.117.14 with HTTP; Fri, 13 Jul 2007 12:12:33 -0700 (PDT) Message-ID: <3e473cc60707131212u1e3b4552v2dfc5c10cfe8e533@mail.gmail.com> Date: Fri, 13 Jul 2007 21:12:33 +0200 From: "Mathieu Prevot" To: "Joseph Koshy" In-Reply-To: <3e473cc60707131205s1a2912c3p9895832de54e6b94@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: <3e473cc60707131205s1a2912c3p9895832de54e6b94@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: python modules 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 Jul 2007 19:12:35 -0000 2007/7/13, Mathieu Prevot : > I learn that modules loaded with import fall into 4 general categories: > - code written in Python (.py) > - C or C++ extensions that have been compiled into shared libraries (or DLLs) > - Packages containing collection of modules > - Built-in modles writen in C and linked into the Python interpreter > > Why don't we use directly the libpmc library in C instead of rewritting > things in python ? I copied libpmc.so and tryed 'import libpmc'. I have: ImportError: dynamic module does not define init function (initlibpmc) Are we really far from having a libpmc module ? Mathieu From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 13 20:34:22 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 78DF016A40B for ; Fri, 13 Jul 2007 20:34:22 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.191]) by mx1.freebsd.org (Postfix) with ESMTP id E94E813C494 for ; Fri, 13 Jul 2007 20:34:21 +0000 (UTC) (envelope-from mathieu.prevot@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so642103mue for ; Fri, 13 Jul 2007 13:34:20 -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=UASJW9xefEqMS9S9iW6K/RytK0DYUhwrf+P1AtTEnlemTqietwyTFVvO63nIWrF6if4rZA2GCyPUsqwzgus/YgI1RLghFEh1m8f0QzB1gGrm4W4J9Y/Y5BERQn+SM5+JA4UdujkPZv9nHwXLOOQjCbb0cvqjS8/7S/ErwTGKWxA= 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=lhIDQOya06LJprtqWn6vfgpv/NDyt066xRQ3NkuSECK7J95nGM2EqrXdl/scrpnll3ZLimuXHyMx6L4W5qsxtKjyFhmdSnB340BG17IRzds8BPl91LFBFga4EK2cZzM2lAXqmBPFJoSxSBO2Z6if1Twc0v4NX17bBcd/OiHeVOQ= Received: by 10.82.108.9 with SMTP id g9mr2520988buc.1184358860454; Fri, 13 Jul 2007 13:34:20 -0700 (PDT) Received: by 10.82.117.14 with HTTP; Fri, 13 Jul 2007 13:34:20 -0700 (PDT) Message-ID: <3e473cc60707131334u7cf75dbckd3a2b42b1815fbf8@mail.gmail.com> Date: Fri, 13 Jul 2007 22:34:20 +0200 From: "Mathieu Prevot" To: "Mike Meyer" In-Reply-To: <20070713153502.110b1c99@bhuda.mired.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3e473cc60707131205s1a2912c3p9895832de54e6b94@mail.gmail.com> <3e473cc60707131212u1e3b4552v2dfc5c10cfe8e533@mail.gmail.com> <20070713153502.110b1c99@bhuda.mired.org> Cc: freebsd-hackers@freebsd.org, Joseph Koshy Subject: Re: python modules 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 Jul 2007 20:34:22 -0000 2007/7/13, Mike Meyer : > On Fri, 13 Jul 2007 21:12:33 +0200 "Mathieu Prevot" wrote: > > This apparently got redirected without sufficient context, so I'm > guessing. I forgot to cc to hackers. > > 2007/7/13, Mathieu Prevot : > > > I learn that modules loaded with import fall into 4 general categories: > > > - code written in Python (.py) > > > - C or C++ extensions that have been compiled into shared libraries (or DLLs) > > These are *Python extensions* written in C or C++ (among other > things), not arbitrary shared object libraries (or .so's). > > > > - Packages containing collection of modules > > > - Built-in modles writen in C and linked into the Python interpreter > > > Why don't we use directly the libpmc library in C instead of rewritting > > > things in python ? > > Are you writing in Python now and want to use libpmc? Doing that is > one approach. I'm doing this. This approach _seems_ to be the easier way. > > I copied libpmc.so and tryed 'import libpmc'. I have: > > ImportError: dynamic module does not define init function (initlibpmc) > > To be expected. The init function is part of what turns it into a > Python extension library. > > > Are we really far from having a libpmc module ? > > There are at least two other approaches to getting access to libpmc > from Python: > > 1) Write a wrapper library that is a Python extensions and translates > calls. This work is in progress in fact, but I wanted to have ASAP access to pmc(3) with a minimum of (keyboard) effort. I don't care of docstrings. > 2) Use the ctypes python module to access libpmc. ctypes has been > bundled into 2.5, so that would be my preference. Just one less > thing to install. > > This is probably more appropriate in c.l.python, but it's hard to say > without context. I didn't tryed this module, rather (a bit) the ezpyinline module, coupled to `gcc -E /usr/src/lib/libpmc/libpmc.c` (no preprocessing with the module, only compilation). The ezpyinline module work like this: ---- #!/usr/bin/python import ezpyinline #step 1 code = r""" int helloworld() { printf("hello ezpyinline! "); } """ #step 2 ezc = ezpyinline.C(code) #step 3 ezc.helloworld() ---- I'll give ctypes a chance (when I have time :) )... thanks Mathieu From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 13 20:51: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 6481516A404 for ; Fri, 13 Jul 2007 20:51:32 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 3498D13C4B6 for ; Fri, 13 Jul 2007 20:51:32 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: by wa-out-1112.google.com with SMTP id j37so743264waf for ; Fri, 13 Jul 2007 13:51:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:message-id:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:from:sender; b=qJS9WUaxbn9vaP6eXLOVhe6xY5i3G1LArcC216mEdovQVdUhgRaXyDnTZl11E5hWKA4wkL+8EOtNPwNktL/p9b05J0xAskIU3gfJerFjw2q6lUccDKTkjWNXY0pLAp3a+zAWIP8bCRGAAVDCkwbiTf7efKY6+FP5iAW+O5gV+FY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:message-id:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:from:sender; b=LS0GnEHQcY6aU7kEckbzvQezhYbv4bewyDm/ovg/VpYGlUYHX3zUlzOpmjXGBQON9WqZriLaK1OIkQMzcbebqGGfcrjK0WX2clcRjYT3Xzm0XCPfPeN4rA094Uq0wcgDHEv0BzRLKDJaWTJMpUDPqARe9Q2VNa3iz1X0J0GHwUg= Received: by 10.114.88.1 with SMTP id l1mr1998686wab.1184359891964; Fri, 13 Jul 2007 13:51:31 -0700 (PDT) Received: from moria.unixconsulting.co.in ( [219.64.103.101]) by mx.google.com with ESMTP id m31sm25658786wag.2007.07.13.13.51.12 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jul 2007 13:51:30 -0700 (PDT) Date: Sat, 14 Jul 2007 02:22:30 +0000 Message-ID: <861wfbk9ll.wl%koshy@moria.unixconsulting.co.in> To: "Mathieu Prevot" In-Reply-To: <3e473cc60707131212u1e3b4552v2dfc5c10cfe8e533@mail.gmail.com> References: <3e473cc60707131205s1a2912c3p9895832de54e6b94@mail.gmail.com> <3e473cc60707131212u1e3b4552v2dfc5c10cfe8e533@mail.gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/21.3 (amd64--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII From: Joseph Koshy Sender: Joseph Koshy Cc: Joseph Koshy , freebsd-hackers@freebsd.org Subject: Re: python modules 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 Jul 2007 20:51:32 -0000 mp> I copied libpmc.so and tryed 'import libpmc'. I have: mp> ImportError: dynamic module does not define init function (initlibpmc) mp> Are we really far from having a libpmc module ? You may want to browse the following articles in Python's documentation set: "Extending and Embedding the Python Interpreter" (tutorial) "Python/C API Reference Manual" There is an (experimental) Python wrapper for an early version of libpmc(3) here: //depot/user/jkoshy/projects/pmctools/py-libpmc/... However this code has not been kept in sync with libpmc(3). I'm waiting for libpmc to stabilize :). Regards, Koshy From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 13 20:58:03 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 06E9C16A40A for ; Fri, 13 Jul 2007 20:58:03 +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 AEC1613C428 for ; Fri, 13 Jul 2007 20:58:02 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 49873 invoked by uid 1001); 13 Jul 2007 20:55:30 -0000 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda.mired.org (tmda-ofmipd) with ESMTP; Fri, 13 Jul 2007 16:55:29 -0400 Date: Fri, 13 Jul 2007 16:55:29 -0400 To: "Mathieu Prevot" Message-ID: <20070713165529.7082898c@bhuda.mired.org> In-Reply-To: <3e473cc60707131334u7cf75dbckd3a2b42b1815fbf8@mail.gmail.com> References: <3e473cc60707131205s1a2912c3p9895832de54e6b94@mail.gmail.com> <3e473cc60707131212u1e3b4552v2dfc5c10cfe8e533@mail.gmail.com> <20070713153502.110b1c99@bhuda.mired.org> <3e473cc60707131334u7cf75dbckd3a2b42b1815fbf8@mail.gmail.com> Organization: Meyer Consulting X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; amd64-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, Joseph Koshy Subject: Re: python modules 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 Jul 2007 20:58:03 -0000 On Fri, 13 Jul 2007 22:34:20 +0200 "Mathieu Prevot" wrote: > 2007/7/13, Mike Meyer : > > On Fri, 13 Jul 2007 21:12:33 +0200 "Mathieu Prevot" wrote: > > > 2007/7/13, Mathieu Prevot : > > > > I learn that modules loaded with import fall into 4 general categories: > > > > - code written in Python (.py) > > > > - C or C++ extensions that have been compiled into shared libraries (or DLLs) > > > > These are *Python extensions* written in C or C++ (among other > > things), not arbitrary shared object libraries (or .so's). > > > > > > - Packages containing collection of modules > > > > - Built-in modles writen in C and linked into the Python interpreter > > > > Why don't we use directly the libpmc library in C instead of rewritting > > > > things in python ? > > > > Are you writing in Python now and want to use libpmc? Doing that is > > one approach. > > I'm doing this. This approach _seems_ to be the easier way. > > > > I copied libpmc.so and tryed 'import libpmc'. I have: > > > ImportError: dynamic module does not define init function (initlibpmc) > > > > To be expected. The init function is part of what turns it into a > > Python extension library. > > > > > Are we really far from having a libpmc module ? > > > > There are at least two other approaches to getting access to libpmc > > from Python: > > > > 1) Write a wrapper library that is a Python extensions and translates > > calls. > > This work is in progress in fact, but I wanted to have ASAP access to > pmc(3) with a minimum of (keyboard) effort. I don't care of > docstrings. > > > 2) Use the ctypes python module to access libpmc. ctypes has been > > bundled into 2.5, so that would be my preference. Just one less > > thing to install. > > > > This is probably more appropriate in c.l.python, but it's hard to say > > without context. > > I didn't tryed this module, rather (a bit) the ezpyinline module, > coupled to `gcc -E /usr/src/lib/libpmc/libpmc.c` (no preprocessing > with the module, only compilation). ezpyline could do the job - if you can get the dlopen magic to happen so libpmc is loaded and it's functions are available. > The ezpyinline module work like this: > > ---- > #!/usr/bin/python > import ezpyinline > > #step 1 > code = r""" > int helloworld() { > printf("hello ezpyinline! > "); > } > """ > #step 2 > ezc = ezpyinline.C(code) > > #step 3 > ezc.helloworld() > ---- > > I'll give ctypes a chance (when I have time :) )... thanks I suspect ctypes is your best bet - it was designed for doing the kind of thing: >>> from ctypes import * >>> pmc = cdll.LoadLibrary('libpmc.so') >>> pmc.pmc_init() -1 [Ok, it failed - but I'm not familiar with the library, so probably screwed something in the environment up...] Pyrex might also be of interest, but I suspect it's going to have the same issues that ezpyinline does. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 11:04: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 C496016A406; Sat, 14 Jul 2007 11:04:23 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id 9F7E913C442; Sat, 14 Jul 2007 11:04:23 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6EB4MVe004202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 14 Jul 2007 04:04:23 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6EB4Mtd026034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 14 Jul 2007 04:04:22 -0700 Message-ID: <4698ADB5.7080600@u.washington.edu> Date: Sat, 14 Jul 2007 04:04:21 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Tim Kientzle References: <468C96C0.1040603@u.washington.edu> <468C9718.1050108@u.washington.edu> <468E60E9.80507@freebsd.org> <468E6C81.4060908@u.washington.edu> <468E7192.8030105@freebsd.org> <4696C0D2.6010809@u.washington.edu> <4697A210.2020301@u.washington.edu> In-Reply-To: <4697A210.2020301@u.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.14.34733 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __USER_AGENT 0' Cc: ports@freebsd.org, hackers@freebsd.org, krion@freebsd.org Subject: Re: Finding slowdowns in pkg_install (continuations of previous threads) 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 Jul 2007 11:04:23 -0000 Garrett Cooper wrote: > Garrett Cooper wrote: >> Tim Kientzle wrote: >>>> -I tried ... buffering ... the +CONTENTS file parsing function, >>>> and the >>>> majority of the time it yielded good results .... >>> >>> One approach I prototyped sometime back was to use >>> libarchive in pkg_add as follows: >>> * Open the archive >>> * Read +CONTENTS directly into memory (it's >>> guaranteed to always be first in the archive) >>> * Parse all of +CONTENTS at once >>> * Continue scanning the archive, disposing >>> of each file as it appears in the archive. >>> >>> Based on my experience with this, I would >>> suggest you just read all of +CONTENTS >>> directly into memory at once and parse >>> the whole thing in a single shot. >>> fopen(), then fstat() to get the size, >>> then allocate a buffer and read the whole >>> thing, then fclose(). You can then >>> parse it all at once. >>> >>> As a bonus, your parser then becomes a nice >>> little bit of reusable code that reads >>> a block of memory and returns a structure describing >>> the package metadata. >>> >>> Tim Kientzle >> I'm not 100% sure because I'm not comparing apples (virtual disk on >> desktop via VMware) to apples (real disk on server), but I'm showing >> a 2.5-fold speedup after adding the simple parser: >> >> Virtual disk: >> 4.42 real 1.37 user 1.47 sys >> >> Real disk: >> 10.26 real 5.36 user 0.99 sys >> >> I'll run a battery of tests just to ensure whether or not that's the >> case. >> >> Be back with results in a few more days. >> >> -Garrett > Hello, > As promised, here are some results for my work: > > By modifying the parser and heuristics in plist_cmd I appear to > have decreased all figures (except plist_cmd, which I will note later) > from their original values to much lower values. The only drawback is > that I appear to have stimulated a bug with either malloc'ing memory, > printf/vargs, or transferring large amounts of data via pipes where > some of my debug messages are making it into plist_cmd(..) from > obtainbymatch(..), which represents the the 3-fold increase in > reported plist_cmd(..) iterations. > > I'm going to try replacing the debug commands with standard print > statements wherever possible, then replace all tar commands with > libarchive APIs, and see if the problem solves itself. > > Notes: > 1. This sample is based off x11-libs/atk. > 2. It isn't the final set of results. > 3. Graphs coming soon (need to simulate values in Excel on work > machine and convert to screenshots later on when I have a break -- > thinking around noon). I'll repost when I have them available. > 4. CSV files available at: > http://students.washington.edu/youshi10/posted/atk-results.tgz. I've posted HTML results of the interpreted spreadsheet on . I'll provide commentary tomorrow after I get some sleep. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 12:22:44 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 2778C16A404 for ; Sat, 14 Jul 2007 12:22:44 +0000 (UTC) (envelope-from pav@FreeBSD.org) Received: from raven.customer.vol.cz (raven.customer.vol.cz [195.250.144.108]) by mx1.freebsd.org (Postfix) with ESMTP id F141C13C4B2 for ; Sat, 14 Jul 2007 12:22:42 +0000 (UTC) (envelope-from pav@FreeBSD.org) Received: from [192.168.0.23] (rb5dg130.net.upc.cz [89.176.238.130]) (authenticated bits=0) by raven.customer.vol.cz (8.14.1/8.14.1) with ESMTP id l6EBtVK5050752 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 14 Jul 2007 13:55:33 +0200 (CEST) (envelope-from pav@FreeBSD.org) From: Pav Lucistnik To: Garrett Cooper In-Reply-To: <4698ADB5.7080600@u.washington.edu> References: <468C96C0.1040603@u.washington.edu> <468C9718.1050108@u.washington.edu> <468E60E9.80507@freebsd.org> <468E6C81.4060908@u.washington.edu> <468E7192.8030105@freebsd.org> <4696C0D2.6010809@u.washington.edu> <4697A210.2020301@u.washington.edu> <4698ADB5.7080600@u.washington.edu> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-zshsZM9phvoymkfoRNLP" Date: Sat, 14 Jul 2007 13:55:31 +0200 Message-Id: <1184414131.13302.4.camel@ikaros.oook.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 FreeBSD GNOME Team Port X-Spam-Score: 0.359 () AWL,BAYES_50,MIME_QP_LONG_LINE X-Scanned-By: MIMEDefang 2.61 on 195.250.144.108 X-Milter: Spamilter (Reciever: raven.customer.vol.cz; Sender-ip: 89.176.238.130; Sender-helo: [192.168.0.23]; ) Cc: ports@FreeBSD.org, hackers@FreeBSD.org, Tim Kientzle , krion@FreeBSD.org Subject: Re: Finding slowdowns in pkg_install (continuations of previous threads) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pav@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2007 12:22:44 -0000 --=-zshsZM9phvoymkfoRNLP Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Garrett Cooper p=ED=B9e v so 14. 07. 2007 v 04:04 -0700: > I've posted HTML results of the interpreted spreadsheet on=20 > . I'll provide commentary=20 > tomorrow after I get some sleep. Nothing on that URL. --=20 Pav Lucistnik A computer programmer is a device for turning requirements into undocumented features. It runs on cola, pizza and Dilbert cartoons. -- Bram Moolenaar --=-zshsZM9phvoymkfoRNLP Content-Type: application/pgp-signature; name=signature.asc Content-Description: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?= =?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?= =?ISO-8859-1?Q?_zpr=E1vy?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGmLmvntdYP8FOsoIRAsWZAKC+Htu3QnnBAxcFVPIQTWnzcgU+NQCgr65T xJSEHFngJ9jck+Eu0EKsrVY= =mxdy -----END PGP SIGNATURE----- --=-zshsZM9phvoymkfoRNLP-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 15:29: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 E3BA616A400 for ; Sat, 14 Jul 2007 15:29:17 +0000 (UTC) (envelope-from daniel@roe.ch) Received: from calvin.roe.ch (calvin.roe.ch [213.144.141.26]) by mx1.freebsd.org (Postfix) with ESMTP id A258013C474 for ; Sat, 14 Jul 2007 15:29:17 +0000 (UTC) (envelope-from daniel@roe.ch) Received: from d212-53-102-185.cust.tele2.ch ([212.53.102.185] helo=dragon.roe.ch) by calvin.roe.ch (envelope-from ) with ESMTPS (TLSv1:AES256-SHA:256) id 1I9ipd-000Hpe-35 ; Sat, 14 Jul 2007 16:42:49 +0200 Received: from roe by dragon.roe.ch (envelope-from ) with LOCAL id 1I9it4-0005Ge-00 ; Sat, 14 Jul 2007 16:46:22 +0200 Date: Sat, 14 Jul 2007 16:46:22 +0200 From: Daniel Roethlisberger To: freebsd-drivers@freebsd.org Message-ID: <20070714144622.GB17326@dragon.roe.ch> Mail-Followup-To: freebsd-drivers@freebsd.org, freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i DomainKey-Status: (calvin.roe.ch) DomainKey-Result: (calvin.roe.ch) Cc: freebsd-hackers@freebsd.org Subject: cmx driver for Omnikey CardMan 4040 completed 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 Jul 2007 15:29:18 -0000 Early this year, I have asked for feedback and reviewers of my cmx driver on -drivers and later -hackers, but got no responses. In response to a recent early tester, I have now completed the driver, fixed the remaining issues and included a manual page. The driver works fine for me on 7-current and 6.2. It is available from: http://dragon.roe.ch/~roe/cmx/cmx-7.0-6.2-20070707.tar.bz2 I have also submitted it as kern/114582 for inclusion in -current. -Dan -- Daniel Roethlisberger From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 16:27:57 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 2B4A216A402; Sat, 14 Jul 2007 16:27:57 +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 0377913C48D; Sat, 14 Jul 2007 16:27:56 +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 l6EGRsH7001864; Sat, 14 Jul 2007 09:27:54 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <4698F98A.6080908@freebsd.org> Date: Sat, 14 Jul 2007 09:27:54 -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: Garrett Cooper References: <468C96C0.1040603@u.washington.edu> <468C9718.1050108@u.washington.edu> <468E60E9.80507@freebsd.org> <468E6C81.4060908@u.washington.edu> <468E7192.8030105@freebsd.org> <4696C0D2.6010809@u.washington.edu> <4697A210.2020301@u.washington.edu> <4698ADB5.7080600@u.washington.edu> In-Reply-To: <4698ADB5.7080600@u.washington.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, hackers@freebsd.org, krion@freebsd.org Subject: Re: Finding slowdowns in pkg_install (continuations of previous threads) 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 Jul 2007 16:27:57 -0000 >> 4. CSV files available at: >> http://students.washington.edu/youshi10/posted/atk-results.tgz. > > I've posted HTML results of the interpreted spreadsheet on > . I'll provide commentary > tomorrow after I get some sleep. I think the second one should be: Unfortunately, I get "Permission Denied" here for both of those URLs. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 20:32:17 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 B1B0816A401; Sat, 14 Jul 2007 20:32:17 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6DBB813C471; Sat, 14 Jul 2007 20:32:17 +0000 (UTC) (envelope-from tim@kientzle.com) 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 l6EKKFH7002869; Sat, 14 Jul 2007 13:20:15 -0700 (PDT) (envelope-from tim@kientzle.com) Message-ID: <46992FFF.7010906@kientzle.com> Date: Sat, 14 Jul 2007 13:20:15 -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 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: rwatson@freebsd.org, cperciva@freebsd.org Subject: Tar output mode for installworld 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 Jul 2007 20:32:17 -0000 I saw this project suggestion on www.freebsd.org: and thought I'd contribute a couple of ideas and notes: This is easy to implement using a trick that I stumbled across a few years ago. The idea is to just build a description of the final archive in a nice verbose text format such as: E.g., bin/sh file /usr/obj/usr/src/bin/sh bin/sh uname root bin/sh gname wheel rescue/mkdir hardlink rescue/rescue bin/sh mode 0666 bin/rcp mode 04666 Here a "file" entry indicates where the body of a file is located, "uname", "gname", "mode", etc, specify various pieces of metadata. The key point is that this file doesn't have to get written in order. You can write single lines of this information at any point in the install process to a file: echo ${TARGETFILE} uname ${OWNER} >>${INSTALLLISTFILE} echo ${TARGETFILE} file ${SRCFILE} >> ${INSTALLLISTFILE} This should be easy to splice into the install process, just add some conditionals on whether ${INSTALLLISTFILE} is defined or not. Once you've built this file, just sort it to bring all the data for each entry together. (As a bonus, sorting will put bin before bin/sh.) From there, it's a simple exercise to write a program that reads this input and spits out a tar file using libarchive. (Start from the sample code in the archive_write manpage.) Incorporating mtree input might be a bit trickier; one option would be to modify mtree itself to spit out a condensed format like this as output. Given these details, I'm sure there are lots of people who could get 90% of this working over a weekend. There are a bunch of odd corner cases to finish up the last 10%, but I don't see anything especially tricky. The end result would be a way to build install CDs without having to run as root. Building an install tarfile could even benefit regular "installworld," since the final install could be done with a minimal toolkit (no need for awk, sed, or other complex commands, just /bin/sh, make, and tar). Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 22:39: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 E06B716A405; Sat, 14 Jul 2007 22:39:53 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id A00FD13C49D; Sat, 14 Jul 2007 22:39:53 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id E8BA8E7A3F9; Sat, 14 Jul 2007 22:39:51 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id EBF397D00; Sun, 15 Jul 2007 00:38:56 +0200 (CEST) Date: Sun, 15 Jul 2007 00:38:54 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20070714223853.GF16579@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org References: <46992FFF.7010906@kientzle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46992FFF.7010906@kientzle.com> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Subject: Re: Tar output mode for installworld 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 Jul 2007 22:39:54 -0000 On Sat, Jul 14, 2007 at 01:20:15PM -0700, Tim Kientzle wrote: > This is easy to implement using a trick that I stumbled > across a few years ago. The idea is to just build > a description of the final archive in a nice verbose > text format such as: ...which is done by NetBSD for the unprivileged release building via build.sh. Anyone interested in working on this should possibly have a look there. Joerg From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 22:39:53 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 E06B716A405; Sat, 14 Jul 2007 22:39:53 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id A00FD13C49D; Sat, 14 Jul 2007 22:39:53 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id E8BA8E7A3F9; Sat, 14 Jul 2007 22:39:51 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id EBF397D00; Sun, 15 Jul 2007 00:38:56 +0200 (CEST) Date: Sun, 15 Jul 2007 00:38:54 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20070714223853.GF16579@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org References: <46992FFF.7010906@kientzle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46992FFF.7010906@kientzle.com> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Subject: Re: Tar output mode for installworld 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 Jul 2007 22:39:54 -0000 On Sat, Jul 14, 2007 at 01:20:15PM -0700, Tim Kientzle wrote: > This is easy to implement using a trick that I stumbled > across a few years ago. The idea is to just build > a description of the final archive in a nice verbose > text format such as: ...which is done by NetBSD for the unprivileged release building via build.sh. Anyone interested in working on this should possibly have a look there. Joerg From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 14 23:13:06 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 95B7616A407; Sat, 14 Jul 2007 23:13:06 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.freebsd.org (Postfix) with ESMTP id 6F53813C4AA; Sat, 14 Jul 2007 23:13:06 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6END5Zg003988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 14 Jul 2007 16:13:06 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6END4sk032063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 14 Jul 2007 16:13:05 -0700 Message-ID: <4699587F.30703@u.washington.edu> Date: Sat, 14 Jul 2007 16:13:03 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Tim Kientzle References: <468C96C0.1040603@u.washington.edu> <468C9718.1050108@u.washington.edu> <468E60E9.80507@freebsd.org> <468E6C81.4060908@u.washington.edu> <468E7192.8030105@freebsd.org> <4696C0D2.6010809@u.washington.edu> <4697A210.2020301@u.washington.edu> <4698ADB5.7080600@u.washington.edu> <4698F98A.6080908@freebsd.org> In-Reply-To: <4698F98A.6080908@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.14.155633 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: ports@freebsd.org, hackers@freebsd.org, krion@freebsd.org Subject: Re: Finding slowdowns in pkg_install (continuations of previous threads) 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 Jul 2007 23:13:06 -0000 Tim Kientzle wrote: >>> 4. CSV files available at: >>> http://students.washington.edu/youshi10/posted/atk-results.tgz. >> >> I've posted HTML results of the interpreted spreadsheet on >> . I'll provide >> commentary tomorrow after I get some sleep. > > I think the second one should be: > > > Unfortunately, I get "Permission Denied" here for both > of those URLs. > > Tim Kientzle About files: Sorry about that -- that's what I get for staying up until 4:30 am and making email posts. I've condensed all of the files into: and fixed the permissions for the files. The following blog post has all of my commentary on the results I have: . Let me know if you have any questions or comments. Now to go off and solve that bug :). -Garrett