From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 4 12:56:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E10016A4CE for ; Sun, 4 Jul 2004 12:56:25 +0000 (GMT) Received: from mailsrv2.tranzpeer.net (mailsrv2.tranzpeer.net [202.180.66.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB79E43D31 for ; Sun, 4 Jul 2004 12:56:24 +0000 (GMT) (envelope-from idownes@slingshot.co.nz) Received: from websrv1.tranzpeer.net ([202.180.66.211] helo=Debug) by mailsrv2.tranzpeer.net with smtp (Exim 4.12) id 1Bh6Xf-0005UW-02 for freebsd-hackers@freebsd.org; Mon, 05 Jul 2004 00:56:23 +1200 To: freebsd-hackers@freebsd.org From: Date: Sun, 4 Jul 2004 12:53:39 GMT X-Posting-IP: 202.180.104.50 X-Mailer: Endymion MailMan Professional Edition v3.2.9 Message-Id: Subject: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 12:56:25 -0000 Hi all, As part of my uni honours project I need to write a basic USB driver for a device I am building. I need to talk to a Texas Instruments DSP (C5509) which has on chip USB (2.0 compliant, full speed). TI supply a library for the DSP side of the USB but I need to write a basic program to retrieve data from it, nothing fancy at all. I have full control over the software on the DSP. There is a basic generic Windows driver I could use (theyscon.de) but I don't really want to do it under Windows - instead I'd much rather do it with FreeBSD. So what I guess what I am asking is how hard would this be? (I have a reasonable knowledge of C and Java and have been using FreeBSD for a couple of years but have never written a device driver (for any OS)) Do I actually need to write a driver or can I use something already existing? Where would I get information on how to do this? So far I've been looking at the existing drivers; ugen, ufm etc., the programmers handbook and am starting to look at libusb...? Sorry for the long message. Any pointers etc. would be greatly appreciated. Thanks Ian From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 4 13:53:02 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BC4F16A4CE for ; Sun, 4 Jul 2004 13:53:02 +0000 (GMT) Received: from heaven.branda.to (218-34-144-69.cm.dynamic.apol.com.tw [218.34.144.69]) by mx1.FreeBSD.org (Postfix) with SMTP id 2E0E643D2D for ; Sun, 4 Jul 2004 13:52:57 +0000 (GMT) (envelope-from thinker@branda.to) Received: (qmail 21150 invoked from network); 4 Jul 2004 13:54:29 -0000 Received: from unknown (HELO branda.to) (192.168.200.244) by 192.168.200.1 with SMTP; 4 Jul 2004 13:54:29 -0000 Message-ID: <40E87B4D.1050203@branda.to> Date: Sun, 04 Jul 2004 21:49:01 +0000 From: "Aho K.F. Li" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: idownes@slingshot.co.nz References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 13:53:02 -0000 What kind of device do you had build? A HID? If your device is not with heaven traffic, you can consider to develop your driver at user space with ugen(4) or uhid(4) at first. And then, move it into kernel space when you need. I had wrote a drive for a touch panel device. Actually, it is a input device for XFree86. I worked it with uhid(4), all my work was finished at user space. It would be a good entry point. idownes@slingshot.co.nz wrote: >Hi all, >As part of my uni honours project I need to write a basic USB driver for a >device I am building. I need to talk to a Texas Instruments DSP (C5509) >which has on chip USB (2.0 compliant, full speed). TI supply a library >for the DSP side of the USB but I need to write a basic program to >retrieve data from it, nothing fancy at all. I have full control over the >software on the DSP. >There is a basic generic Windows driver I could use (theyscon.de) but I >don't really want to do it under Windows - instead I'd much rather do it >with FreeBSD. > >So what I guess what I am asking is how hard would this be? (I have a >reasonable knowledge of C and Java and have been using FreeBSD for a >couple of years but have never written a device driver (for any OS)) Do I >actually need to write a driver or can I use something already existing? >Where would I get information on how to do this? So far I've been looking >at the existing drivers; ugen, ufm etc., the programmers handbook and am >starting to look at libusb...? >Sorry for the long message. Any pointers etc. would be greatly >appreciated. >Thanks >Ian > > > > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 4 18:13:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C0E0516A4CE; Sun, 4 Jul 2004 18:13:49 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i64IDnVX002194; Sun, 4 Jul 2004 14:13:49 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i64IDm1f002193; Sun, 4 Jul 2004 14:13:48 -0400 (EDT) (envelope-from green) Date: Sun, 4 Jul 2004 14:13:47 -0400 From: Brian Fundakowski Feldman To: Stephen Hurd Message-ID: <20040704181347.GE997@green.homeunix.org> References: <20040624174919.46160f9e.shurd@sasktel.net> <20040628192935.GF5635@green.homeunix.org> <20040630192041.1d9c5348.shurd@sasktel.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040630192041.1d9c5348.shurd@sasktel.net> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: Locking: kern/50827 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 18:13:50 -0000 On Wed, Jun 30, 2004 at 07:20:41PM -0600, Stephen Hurd wrote: > > > Has anyone looked at this? Does anyone have any comments? > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/50827 > > > > I don't think you'll ever find anyone interested in file locking > > anymore. Since they're all advisory, anyway, you can just implement them > > at a higher level in your application. BSD and System V IPC mechanisms > > already are very good building blocks here for system-scoped locks. > > Hrm? I'm sort of confused... file locking is still the best way of doing > erm... file locking. A few points: > > 1) File locking works with any program using the file locking API. > Hand-rolled implementations will only work with other programs which use > the same hand-rolled routines. > 2) File locking works across NFS, so you aren't limited to the local > system. > 3) There's no simple way of doing per-descriptor locks using BSD and SysV > IPC... ie: locks which are automatically released when the file descriptor > used to obtain the lock is released. This also of course means programs > which core won't leave stale locks laying around. > > Essentially, implementing locks at a higher level is alway more difficult, > usually more prone to problems, and in some cases introduces more overhead > than the rest of the program. > > The only reason I can think of for implementing locks at a higher level is > for cross-platform code... Right, if you just make it cross-platform in the first place using higher- level primitives you don't have to worry what the specific kernel and operating system and file system you are using provides. It's my opinion tha there won't be other people adopting this API for file locking since it is by definition not meant to work like the standardized APIs. I don't think that there's no value in having more useful locking primitives, but they probably don't benefit much from being implemented in the kernel unless they conform to a portable API. I certainly always have my own various kernel modifications that I find useful, but aren't very standard :) -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 4 19:45:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3367D16A4CE; Sun, 4 Jul 2004 19:45:35 +0000 (GMT) Received: from moutvdomng.kundenserver.de (moutvdom.kundenserver.de [212.227.126.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C27543D3F; Sun, 4 Jul 2004 19:45:32 +0000 (GMT) (envelope-from liamfoy@sepulcrum.org) Received: from [212.227.126.224] (helo=mrvdomng.kundenserver.de) by moutvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BhCvb-0001V3-00; Sun, 04 Jul 2004 21:45:31 +0200 Received: from [81.153.214.95] (helo=liamfoy.ath.cx) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BhCvb-0003dQ-00; Sun, 04 Jul 2004 21:45:31 +0200 Date: Sun, 4 Jul 2004 20:43:53 +0100 From: "Liam J. Foy" To: acpi@freebsd.org, hackers@freebsd.org Message-Id: <20040704204353.26b4496b.liamfoy@sepulcrum.org> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: APM Patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 19:45:35 -0000 Hey guys, Since it was decided (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html) we are going to stick with apm -l producing -1 and not 255 which is stated in the handbook would one of you guys please commit: --- /usr/src/usr.sbin/apm/apm.8 Thu Jun 24 17:32:55 2004 +++ /liamfoy/apm.8 Thu Jun 24 17:32:27 2004 @@ -106,7 +106,7 @@ state respectively. .It Fl t Display the estimated remaining battery lifetime in seconds. If -it is unknown, 255 is displayed. +it is unknown, -1 is displayed. .It Fl Z Transition the system into standby mode. This mode uses less power than full power mode, but more than suspend mode. Some laptops support ---- Another patch I would like you guys to review is this. Currently apm -t will output 0 when it cannot find a valid rate or the full battery time(as the comment mentions). I think it should return -1 (unknown) to reflect an error, which is stated in the man page. It should not return 0 since we do not have 0 seconds left, we have an unknown value remaining. Either that or the man page it edited. I believe the following patch should be commited really. The patch is: --- /usr/src/sys/dev/acpica/acpi_cmbat.c Sun Jul 4 20:41:43 2004 +++ /home/liamfoy/acpi_cmbat.c Sun Jul 4 20:39:14 2004 @@ -536,7 +536,7 @@ bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100; } else { /* Couldn't find valid rate and full battery time */ - bat[i]->min = 0; + bat[i]->min = -1; } total_min += bat[i]->min; total_cap += bat[i]->cap; Thanks in advance - comments welcome, -- -Liam J. Foy http://liamfoy.kerneled.org "Love is like maths -- the idea is simple but can be quite complicated." From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 4 20:05:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9957F16A4CE; Sun, 4 Jul 2004 20:05:23 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4142243D1F; Sun, 4 Jul 2004 20:05:23 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i64K4RjG033949; Sun, 4 Jul 2004 14:04:27 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 04 Jul 2004 14:04:29 -0600 (MDT) Message-Id: <20040704.140429.37607877.imp@bsdimp.com> To: liamfoy@sepulcrum.org From: "M. Warner Losh" In-Reply-To: <20040704204353.26b4496b.liamfoy@sepulcrum.org> References: <20040704204353.26b4496b.liamfoy@sepulcrum.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: acpi@FreeBSD.ORG cc: hackers@FreeBSD.ORG Subject: Re: APM Patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 20:05:23 -0000 In message: <20040704204353.26b4496b.liamfoy@sepulcrum.org> "Liam J. Foy" writes: : Hey guys, : : Since it was decided (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html) : we are going to stick with apm -l producing -1 and not 255 which is stated in the handbook would one : of you guys please commit: : : --- /usr/src/usr.sbin/apm/apm.8 Thu Jun 24 17:32:55 2004 : +++ /liamfoy/apm.8 Thu Jun 24 17:32:27 2004 : @@ -106,7 +106,7 @@ : state respectively. : .It Fl t : Display the estimated remaining battery lifetime in seconds. If : -it is unknown, 255 is displayed. : +it is unknown, -1 is displayed. : .It Fl Z : Transition the system into standby mode. This mode uses less power than : full power mode, but more than suspend mode. Some laptops support : : ---- : : Another patch I would like you guys to review is this. Currently apm -t will output : 0 when it cannot find a valid rate or the full battery time(as the comment mentions). : I think it should return -1 (unknown) to reflect an error, which is stated in the man page. : It should not return 0 since we do not have 0 seconds left, we have an unknown value : remaining. Either that or the man page it edited. I believe the following patch should : be commited really. : : The patch is: : : --- /usr/src/sys/dev/acpica/acpi_cmbat.c Sun Jul 4 20:41:43 2004 : +++ /home/liamfoy/acpi_cmbat.c Sun Jul 4 20:39:14 2004 : @@ -536,7 +536,7 @@ : bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100; : } else { : /* Couldn't find valid rate and full battery time */ : - bat[i]->min = 0; : + bat[i]->min = -1; : } : total_min += bat[i]->min; : total_cap += bat[i]->cap; I don't like this patch, since we use ->min later for math... Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 4 22:06:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E492A16A4CE for ; Sun, 4 Jul 2004 22:06:47 +0000 (GMT) Received: from blitzen.qlo.com (blitzen.qlo.com [142.165.150.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id A85C243D39 for ; Sun, 4 Jul 2004 22:06:47 +0000 (GMT) (envelope-from shurd@sasktel.net) Received: from stephens (hssx-yktn-59-202.sasknet.sk.ca [142.165.59.202]) by mail.qlo.com (SaskTel eMessaging Service) with ESMTPA id <0I0C00806LF9U3@mail.qlo.com> for freebsd-hackers@freebsd.org; Sun, 04 Jul 2004 16:06:45 -0600 (CST) Date: Sun, 04 Jul 2004 16:06:45 -0600 From: Stephen Hurd In-reply-to: <20040704181347.GE997@green.homeunix.org> To: freebsd-hackers@freebsd.org Message-id: <20040704160645.39a0c0d8.shurd@sasktel.net> MIME-version: 1.0 X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20040624174919.46160f9e.shurd@sasktel.net> <20040628192935.GF5635@green.homeunix.org> <20040630192041.1d9c5348.shurd@sasktel.net> <20040704181347.GE997@green.homeunix.org> Subject: Re: Locking: kern/50827 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 22:06:48 -0000 > Right, if you just make it cross-platform in the first place using > higher- level primitives you don't have to worry what the specific > kernel and operating system and file system you are using provides. > It's my opinion tha there won't be other people adopting this API for > file locking since it is by definition not meant to work like the > standardized APIs. > > I don't think that there's no value in having more useful locking > primitives, but they probably don't benefit much from being implemented > in the kernel unless they conform to a portable API. I certainly always > have my own various kernel modifications that I find useful, but aren't > very standard :) This sounds a lot like "Well, there's no point in doing something better since nobody else is doing it.". strlcpy() and friends are an example of non-standard stuff that just Makes Sense(tm). From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 4 22:15:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF1BF16A4CE for ; Sun, 4 Jul 2004 22:15:03 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92E1743D2F for ; Sun, 4 Jul 2004 22:15:03 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i64MF3ds018629 for ; Sun, 4 Jul 2004 15:15:03 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i64MF3N2018628; Sun, 4 Jul 2004 15:15:03 -0700 (PDT) (envelope-from dillon) Date: Sun, 4 Jul 2004 15:15:03 -0700 (PDT) From: Matthew Dillon Message-Id: <200407042215.i64MF3N2018628@apollo.backplane.com> To: freebsd-hackers@freebsd.org Subject: USENIX2004 photos online X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 22:15:03 -0000 I took a bunch of a photos at USENIX, mainly of BSD related activities. The photos are now online at: http://apollo.backplane.com/USENIX2004/ -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 02:11:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8359016A4CE for ; Mon, 5 Jul 2004 02:11:25 +0000 (GMT) Received: from mailsrv2.tranzpeer.net (mailsrv2.tranzpeer.net [202.180.66.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24FFD43D58 for ; Mon, 5 Jul 2004 02:11:25 +0000 (GMT) (envelope-from idownes@slingshot.co.nz) Received: from websrv1.tranzpeer.net ([202.180.66.211] helo=Debug) by mailsrv2.tranzpeer.net with smtp (Exim 4.12) id 1BhIx1-00015A-02 for freebsd-hackers@freebsd.org; Mon, 05 Jul 2004 14:11:23 +1200 To: freebsd-hackers@freebsd.org From: Date: Mon, 5 Jul 2004 02:08:38 GMT X-Posting-IP: 202.180.117.207 X-Mailer: Endymion MailMan Professional Edition v3.2.9 Message-Id: Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 02:11:25 -0000 Hi, Thanks for the reply. I'm building my own device based around the DSP (see below). It's basically a data logger storing video frames. I simply need to connect to it to dump the buffer to a file and then process it from there. Just the one tranfer is needed at a time, speed and efficiency isn't any real concern. I have control over the DSP code (i.e. I'm writing it) so I will know any protocol of course :) It's not worth putting it into any class, I have no need to write to it etc. so I wouldn't make it umass. Looking at ugen and libusb I think I'll start with them. The advantage I guess with libusb is that it'll be portable. There's an example of using libusb at http://www.linuxjournal.com/article. php?sid=7466 for anyone else reading this (Avleen) Are there any FreeBSD specific resources around? Any code that I can read? thanks Ian > What kind of device do you had build? > A HID? > If your device is not with heaven traffic, you can consider to > develop your driver at user space with ugen(4) or uhid(4) at first. > And then, move it into kernel space when you need. > I had wrote a drive for a touch panel device. > Actually, it is a input device for XFree86. > I worked it with uhid(4), all my work was finished at user space. > It would be a good entry point. > > > idownes@slingshot.co.nz wrote: > > >Hi all, > >As part of my uni honours project I need to write a basic USB driver for a > >device I am building. I need to talk to a Texas Instruments DSP (C5509) > >which has on chip USB (2.0 compliant, full speed). TI supply a library > >for the DSP side of the USB but I need to write a basic program to > >retrieve data from it, nothing fancy at all. I have full control over the > >software on the DSP. > >There is a basic generic Windows driver I could use (theyscon.de) but I > >don't really want to do it under Windows - instead I'd much rather do it > >with FreeBSD. > > > >So what I guess what I am asking is how hard would this be? (I have a > >reasonable knowledge of C and Java and have been using FreeBSD for a > >couple of years but have never written a device driver (for any OS)) Do I > >actually need to write a driver or can I use something already existing? > >Where would I get information on how to do this? So far I've been looking > >at the existing drivers; ugen, ufm etc., the programmers handbook and am > >starting to look at libusb...? > >Sorry for the long message. Any pointers etc. would be greatly > >appreciated. > >Thanks > >Ian From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 02:44:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1042116A4CE for ; Mon, 5 Jul 2004 02:44:35 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CC2243D1F for ; Mon, 5 Jul 2004 02:44:34 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i652iYds020352 for ; Sun, 4 Jul 2004 19:44:34 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i652iYJm020351; Sun, 4 Jul 2004 19:44:34 -0700 (PDT) (envelope-from dillon) Date: Sun, 4 Jul 2004 19:44:34 -0700 (PDT) From: Matthew Dillon Message-Id: <200407050244.i652iYJm020351@apollo.backplane.com> To: freebsd-hackers@freebsd.org Subject: (update) Re: USENIX2004 photos online X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 02:44:35 -0000 Urk. Before anyone complains about sludgy downloads speeds... my T1 is experience some severe packet loss for large packets due to a problem with the circuit. It isn't saturated. This is going to slow down the photo site by a lot but if you stick with it you will get the shots. Sorry about that! -Matt : I took a bunch of a photos at USENIX, mainly of BSD related activities. : The photos are now online at: : : http://apollo.backplane.com/USENIX2004/ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 10:03:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E245E16A4CE; Mon, 5 Jul 2004 10:03:45 +0000 (GMT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74FB043D39; Mon, 5 Jul 2004 10:03:44 +0000 (GMT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id i65A3ggU058156; Mon, 5 Jul 2004 14:03:42 +0400 (MSD) (envelope-from is@rambler-co.ru) Date: Mon, 5 Jul 2004 14:06:42 +0400 (MSD) From: Igor Sysoev X-X-Sender: is@is.park.rambler.ru To: freebsd-hackers@freebsd.org Message-ID: <20040705140331.K723@is.park.rambler.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Jonathan Lemon Subject: panic caused by EVFILT_SIGNAL detaching in rfork()ed thread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 10:03:46 -0000 While development of my http server nginx I've got panics caused by detaching of the EVFILT_SIGNAL event. The worker process starts two worker threads created by rfork(RFPROC|RFTHREAD|RFMEM). Each thread opens kqueue and adds the EVFILT_SIGNAL event. If the main thread of the worker process exits abnormally (on 4.x) or simply exits (on 5.x) then kernel may panic: panicstr: page fault panic messages: --- Fatal trap 12: page fault while in kernel mode fault virtual address = 0x4 fault code = supervisor read, page not present instruction pointer = 0x8:0xc014bc96 stack pointer = 0x10:0xd41d4dd4 frame pointer = 0x10:0xd41d4dd4 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 396 (nginx) interrupt mask = none trap number = 12 panic: page fault [ skipped ] (kgdb) bt #0 dumpsys () at ../../kern/kern_shutdown.c:487 #1 0xc01496a3 in boot (howto=256) at ../../kern/kern_shutdown.c:316 #2 0xc0149ae1 in panic (fmt=0xc023734c "%s") at ../../kern/kern_shutdown.c:595 #3 0xc0200eb7 in trap_fatal (frame=0xd41d4d94, eva=4) at ../../i386/i386/trap.c:974 #4 0xc0200b65 in trap_pfault (frame=0xd41d4d94, usermode=0, eva=4) at ../../i386/i386/trap.c:867 #5 0xc020070b in trap (frame={tf_fs = -736296944, tf_es = -1072234480, tf_ds = -961150960, tf_edi = -736334656, tf_esi = 0, tf_ebp = -736277036, tf_isp = -736277056, tf_ebx = -736334592, tf_edx = 0, tf_ecx = -736549824, tf_eax = -736334592, tf_trapno = 12, tf_err = 0, tf_eip = -1072382826, tf_cs = 8, tf_eflags = 66055, tf_esp = -736277000, tf_ss = -1072429537}) at ../../i386/i386/trap.c:466 #6 0xc014bc96 in filt_sigdetach (kn=0xd41c6d00) at ../../kern/kern_sig.c:1741 #7 0xc014061f in kqueue_close (fp=0xc6dc1900, p=0xd4192440) at ../../kern/kern_event.c:797 #8 0xc013f277 in fdrop (fp=0xc6dc1900, p=0xd4192440) at ../../sys/file.h:218 #9 0xc013f1bf in closef (fp=0xc6dc1900, p=0xd4192440) at ../../kern/kern_descrip.c:1279 #10 0xc013edcc in fdfree (p=0xd4192440) at ../../kern/kern_descrip.c:1061 #11 0xc0141a89 in exit1 (p=0xd4192440, rv=9) at ../../kern/kern_exit.c:188 #12 0xc014b5de in sigexit (p=0xd4192440, sig=9) at ../../kern/kern_sig.c:1503 #13 0xc014b358 in postsig (sig=9) at ../../kern/kern_sig.c:1406 #14 0xc0201397 in syscall2 (frame={tf_fs = 47, tf_es = -1078001617, tf_ds = -1078001617, tf_edi = 134823956, tf_esi = 1, tf_ebp = -1077938752, tf_isp = -736276524, tf_ebx = 2, tf_edx = 12, tf_ecx = 134811400, tf_eax = 0, tf_trapno = 7, tf_err = 2, tf_eip = 672013132, tf_cs = 31, tf_eflags = 514, tf_esp = -1077938780, tf_ss = 47}) at ../../i386/i386/trap.c:197 #15 0xc01f42a5 in Xint0x80_syscall () #16 0x8055d18 in ?? () #17 0x80544b3 in ?? () #18 0x8055415 in ?? () #19 0x8054ed6 in ?? () #20 0x8049c02 in ?? () #21 0x8049976 in ?? () (kgdb) fr 6 #6 0xc014bc96 in filt_sigdetach (kn=0xd41c6d00) at ../../kern/kern_sig.c:1741 1741 SLIST_REMOVE(&p->p_klist, kn, knote, kn_selnext); (kgdb) p *(*(struct knote *)0xd41c6d00)->kn_ptr.p_proc $1 = {p_procq = {tqe_next = 0xd4191c20, tqe_prev = 0xc0279e50}, p_list = { le_next = 0x0, le_prev = 0xc0279de4}, p_cred = 0x0, p_fd = 0xc6dc2500, p_stats = 0xd41eecd0, p_limit = 0xc6c6b500, p_upages_obj = 0xd41d9c60, p_procsig = 0x0, p_flag = 24838, p_stat = 5 '\005', p_pad1 = "\000\000", p_pid = 402, p_hash = {le_next = 0x0, le_prev = 0xc6a61e48}, p_pglist = { le_next = 0x0, le_prev = 0xc6dac668}, p_pptr = 0xd4192c60, p_sibling = { le_next = 0x0, le_prev = 0xd4192cb0}, p_children = {lh_first = 0x0}, p_ithandle = {callout = 0x0}, p_oppid = 0, p_dupfd = 0, p_vmspace = 0x0, p_estcpu = 0, p_cpticks = 0, p_pctcpu = 13, p_wchan = 0x0, p_wmesg = 0xc021c35f "ttywai", p_swtime = 5, p_slptime = 0, p_realtimer = { it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {tv_sec = 0, tv_usec = 0}}, p_runtime = 180692, p_uu = 31474, p_su = 149503, p_iu = 1, p_uticks = 4, p_sticks = 19, p_iticks = 0, p_traceflag = 0, p_tracep = 0x0, p_siglist = {__bits = {0, 0, 0, 0}}, p_textvp = 0x0, p_lock = 0 '\000', p_oncpu = 0 '\000', p_lastcpu = 0 '\000', p_rqindex = 6 '\006', p_locks = 0, p_simple_locks = 0, p_stops = 0, p_stype = 0, p_step = 0 '\000', p_pfsflags = 0 '\000', p_pad3 = "\000", p_retval = {0, 672525728}, p_sigiolst = {slh_first = 0x0}, p_sigparent = 20, p_oldsigmask = {__bits = {0, 0, 0, 0}}, p_sig = 0, p_code = 0, p_klist = { slh_first = 0x0}, p_sigmask = {__bits = {0, 0, 0, 0}}, p_sigstk = { ss_sp = 0x0, ss_size = 0, ss_flags = 4}, p_priority = 50 '2', p_usrpri = 50 '2', p_nice = 0 '\000', p_comm = "top\000\000\000ty\000sion\000\000\000", p_pgrp = 0x0, p_sysent = 0xc0241900, p_rtprio = {type = 1, prio = 0}, p_prison = 0x0, p_args = 0xc6b66e20, p_addr = 0xd41ee000, p_md = {md_regs = 0xd41f0fa8}, p_xstat = 0, p_acflag = 0, p_ru = 0x0, p_nthreads = 0, p_aioinfo = 0x0, p_wakeup = 0, p_peers = 0x0, p_leader = 0xd4191f60, p_asleep = { as_priority = 0, as_timo = 0}, p_emuldata = 0x0} (kgdb) The following patch against 4.8 resolved the panics: ------------ --- src/sys/kern/kern_sig.c Wed Jul 3 18:43:27 2002 +++ src/sys/kern/kern_sig.c Mon Jul 5 10:16:56 2004 @@ -1738,7 +1738,9 @@ { struct proc *p = kn->kn_ptr.p_proc; - SLIST_REMOVE(&p->p_klist, kn, knote, kn_selnext); + if (!SLIST_EMPTY(&p->p_klist)) { + SLIST_REMOVE(&p->p_klist, kn, knote, kn_selnext); + } } /* ------------ For 5.x patch is similar (tested on 5.2.1). By the way, I found that rfork()ed thread will get EVFILT_SIGNAL events only if namely this thread added the filter to kqueue. If one thread added the filter then another thread would not get this filter events. It's probabaly caused by the implementation EVFILT_SIGNAL filter - as EVFILT_PROC it uses p->p_klist. I think it should be documented in man page. Igor Sysoev http://sysoev.ru/en/ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 10:38:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40C8E16A4CE for ; Mon, 5 Jul 2004 10:38:10 +0000 (GMT) Received: from VARK.homeunix.com (adsl-69-107-108-110.dsl.pltn13.pacbell.net [69.107.108.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0334C43D31 for ; Mon, 5 Jul 2004 10:38:10 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i65Ablao020566 for ; Mon, 5 Jul 2004 03:37:47 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i65Abl7n020565 for freebsd-hackers@FreeBSD.org; Mon, 5 Jul 2004 03:37:47 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Mon, 5 Jul 2004 03:37:47 -0700 From: David Schultz To: freebsd-hackers@FreeBSD.ORG Message-ID: <20040705103747.GA20487@VARK.homeunix.com> Mail-Followup-To: freebsd-hackers@FreeBSD.org References: <20040630011635.GF34501@empiric.dek.spc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040630011635.GF34501@empiric.dek.spc.org> Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 10:38:10 -0000 On Wed, Jun 30, 2004, Bruce M Simpson wrote: > This recently caught my eye: > http://www.samag.com/documents/s=9171/sam0406h/0406h.htm > > There are a number of good sounding suggestions in there. DTrace is pure magic. It would be well worth your time to install Solaris 10 just to try out DTrace for a day. Keep in mind, however, that it took them several man-years to develop just for sparc64 and x86, so we're not talking about a port of it any time soon... From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 12:28:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52BB416A4CE for ; Mon, 5 Jul 2004 12:28:24 +0000 (GMT) Received: from mps5.plala.or.jp (c148240.vh.plala.or.jp [210.150.148.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DA1B43D55 for ; Mon, 5 Jul 2004 12:28:23 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mps5.plala.or.jp with SMTP id <20040705122820.XEFV2494.mps5.plala.or.jp@msvc2.plala.or.jp> for ; Mon, 5 Jul 2004 21:28:20 +0900 Received: ( 15451 invoked from network); 5 Jul 2004 21:28:19 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 5 Jul 2004 21:28:18 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040705122818.WBXK19716.mpb1.plala.or.jp@trio.plala.or.jp> for ; Mon, 5 Jul 2004 21:28:18 +0900 Message-ID: <40E94AF0.5070202@trio.plala.or.jp> Date: Mon, 05 Jul 2004 21:34:56 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 12:28:24 -0000 HI Schultz and all, David Schultz wrote: > On Wed, Jun 30, 2004, Bruce M Simpson wrote: > > >> This recently caught my eye: >> http://www.samag.com/documents/s=9171/sam0406h/0406h.htm >> >> There are a number of good sounding suggestions in there. >> > > DTrace is pure magic. It would be well worth your time to install > Solaris 10 just to try out DTrace for a day. Keep in mind, > however, that it took them several man-years to develop just for > sparc64 and x86, so we're not talking about a port of it any time > soon... > > Is DTrace open source? I know presence of DTrace. But Sun's products usually aren't open source especially OS itself. Recently JS(Sun's COO and president) announced Solaris might be open source in the near future. But he often tells a lie, sorry this may be unsuitable, tells a something uncertain. Eitarou -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e$B!>(Bmail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 13:16:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95C6516A4CE for ; Mon, 5 Jul 2004 13:16:56 +0000 (GMT) Received: from mpb4.plala.or.jp (c156253.vh.plala.or.jp [210.150.156.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C20143D5D for ; Mon, 5 Jul 2004 13:16:55 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mpb4.plala.or.jp with SMTP id <20040705131654.VPDL19724.mpb4.plala.or.jp@msvc2.plala.or.jp> for ; Mon, 5 Jul 2004 22:16:54 +0900 Received: ( 19786 invoked from network); 5 Jul 2004 22:16:54 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 5 Jul 2004 22:16:53 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040705131652.WDZY19716.mpb1.plala.or.jp@trio.plala.or.jp>; Mon, 5 Jul 2004 22:16:52 +0900 Message-ID: <40E95653.6020705@trio.plala.or.jp> Date: Mon, 05 Jul 2004 22:23:31 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: David Schultz , freebsd-hackers@FreeBSD.ORG References: <20040630011635.GF34501@empiric.dek.spc.org> <20040705103747.GA20487@VARK.homeunix.com> In-Reply-To: <20040705103747.GA20487@VARK.homeunix.com> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 13:16:56 -0000 Hi, David Schultz wrote: >On Wed, Jun 30, 2004, Bruce M Simpson wrote: > > >>This recently caught my eye: >>http://www.samag.com/documents/s=9171/sam0406h/0406h.htm >> >>There are a number of good sounding suggestions in there. >> >> > >DTrace is pure magic. It would be well worth your time to install >Solaris 10 just to try out DTrace for a day. Keep in mind, >however, that it took them several man-years to develop just for >sparc64 and x86, so we're not talking about a port of it any time >soon... > > See also, http://www.sun.com/bigadmin/content/dtrace/ I haven't seen above well yet. But A article says that DTrace sounds like 30,000 lines of debug print. I have written about 50 lines of debug print in my 4.10-R kernel to chase my umass issue. If the output of it exists on a trace log file, It may be one of DTrace feature. I saw the some sort of debug print lines in the kernel source of 4.10-R. If you enable them and gather the information to a file, it may be nearly equal DTrace. But I can't warrant or guarantee you the performance. DTrace may be a kinda elegant debug mode kernel, I guess. Eitarou -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 13:32:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F235A16A4CE for ; Mon, 5 Jul 2004 13:32:07 +0000 (GMT) Received: from atlas.informatik.rwth-aachen.de (atlas.informatik.RWTH-Aachen.DE [137.226.194.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CE0443D3F for ; Mon, 5 Jul 2004 13:32:07 +0000 (GMT) (envelope-from stolz@i2.informatik.rwth-aachen.de) Received: from menelaos.informatik.rwth-aachen.de (menelaos.informatik.RWTH-Aachen.DE [137.226.194.73]) 8.11.1-0.5-michaelw-20030918) with ESMTP id i65DW5k32384; Mon, 5 Jul 2004 15:32:05 +0200 Received: (from stolz@localhost)i65DW5C8075350; Mon, 5 Jul 2004 15:32:05 +0200 (CEST) (envelope-from stolz) Date: Mon, 5 Jul 2004 15:32:03 +0200 From: Volker Stolz To: Eitarou Kamo Message-ID: <20040705133203.GA75345@i2.informatik.rwth-aachen.de> References: <20040630011635.GF34501@empiric.dek.spc.org> <20040705103747.GA20487@VARK.homeunix.com> <40E95653.6020705@trio.plala.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <40E95653.6020705@trio.plala.or.jp> X-PGP-Key: finger vs@foldr.org X-PGP-Id: 0x3FD1B6B5 User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 13:32:08 -0000 In local.freebsd-hackers, you wrote: > I haven't seen above well yet. But A article says that DTrace sounds > like 30,000 lines of debug print. No, already the first article tells you that they use a VM with byte-code for the C-like language "D". And it's not compiled into the kernel but hooked in and removed on-the-fly. Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME Neu! Ändern Sie den Anfangstag Ihrer Woche From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 13:44:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04F2216A4CE for ; Mon, 5 Jul 2004 13:44:48 +0000 (GMT) Received: from ns1.interbgc.com (mail.interbgc.com [217.9.224.3]) by mx1.FreeBSD.org (Postfix) with SMTP id ECF5B43D48 for ; Mon, 5 Jul 2004 13:44:46 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 37803 invoked from network); 5 Jul 2004 13:44:45 -0000 Received: from nike_d@cytexbg.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.1.60/v4335. spamassassin: 2.63. Clear:SA:0(-4.9/8.0):. Processed in 1.133819 secs); 05 Jul 2004 13:44:45 -0000 X-Spam-Status: No, hits=-4.9 required=8.0 Received: from 213-240-206-214.1697748.ddns.cablebg.net (HELO tormentor.totalterror.net) (213.240.206.214) by mail.interbgc.com with SMTP; 5 Jul 2004 13:44:43 -0000 Received: (qmail 6652 invoked from network); 5 Jul 2004 13:42:36 -0000 Received: from unknown (HELO phobos.totalterror.net) (10.0.0.2) by tormentor.totalterror.net with SMTP; 5 Jul 2004 13:42:36 -0000 References: <20040704204353.26b4496b.liamfoy@sepulcrum.org> <20040704.140429.37607877.imp@bsdimp.com> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Niki Denev To: =?ISO-8859-1?B?TS4=?= Warner Losh Date: Mon, 05 Jul 2004 16:45:11 +0300 Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=_mimegpg-phobos.totalterror.net-675-1089035111-0001"; micalg=pgp-sha1; protocol="application/pgp-signature" cc: liamfoy@sepulcrum.org cc: acpi@FreeBSD.ORG cc: hackers@FreeBSD.ORG Subject: Re: APM Patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 13:44:48 -0000 This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. --=_mimegpg-phobos.totalterror.net-675-1089035111-0001 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit M. Warner Losh writes: > In message: <20040704204353.26b4496b.liamfoy@sepulcrum.org> > "Liam J. Foy" writes: > : Hey guys, > : > : Since it was decided (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html) > : we are going to stick with apm -l producing -1 and not 255 which is stated in the handbook would one > : of you guys please commit: > : > : --- /usr/src/usr.sbin/apm/apm.8 Thu Jun 24 17:32:55 2004 > : +++ /liamfoy/apm.8 Thu Jun 24 17:32:27 2004 > : @@ -106,7 +106,7 @@ > : state respectively. > : .It Fl t > : Display the estimated remaining battery lifetime in seconds. If > : -it is unknown, 255 is displayed. > : +it is unknown, -1 is displayed. > : .It Fl Z > : Transition the system into standby mode. This mode uses less power than > : full power mode, but more than suspend mode. Some laptops support > : > : ---- > : > : Another patch I would like you guys to review is this. Currently apm -t will output > : 0 when it cannot find a valid rate or the full battery time(as the comment mentions). > : I think it should return -1 (unknown) to reflect an error, which is stated in the man page. > : It should not return 0 since we do not have 0 seconds left, we have an unknown value > : remaining. Either that or the man page it edited. I believe the following patch should > : be commited really. > : > : The patch is: > : > : --- /usr/src/sys/dev/acpica/acpi_cmbat.c Sun Jul 4 20:41:43 2004 > : +++ /home/liamfoy/acpi_cmbat.c Sun Jul 4 20:39:14 2004 > : @@ -536,7 +536,7 @@ > : bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100; > : } else { > : /* Couldn't find valid rate and full battery time */ > : - bat[i]->min = 0; > : + bat[i]->min = -1; > : } > : total_min += bat[i]->min; > : total_cap += bat[i]->cap; > > I don't like this patch, since we use ->min later for math... > > Warner What about this ? --- sys/dev/acpica/acpi_cmbat.c.orig Mon Jul 5 15:15:28 2004 +++ sys/dev/acpica/acpi_cmbat.c Mon Jul 5 16:37:02 2004 @@ -655,7 +655,7 @@ battinfo->state = ACPI_BATT_STAT_NOT_PRESENT; } else { battinfo->cap = sc->cap; - battinfo->min = sc->min; + battinfo->min = sc->min ? sc->min : -1; battinfo->state = sc->bst.state; } -- Regards, Niki --=_mimegpg-phobos.totalterror.net-675-1089035111-0001 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBA6VtnHNAJ/fLbfrkRAv5NAJ4jVf4HDK3FSy3NT6xedGZYntFruACaA+ly i0WD/vVjjZMqu+m3iJDUVNE= =OvnN -----END PGP SIGNATURE----- --=_mimegpg-phobos.totalterror.net-675-1089035111-0001-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 13:53:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E21E516A4CF for ; Mon, 5 Jul 2004 13:53:30 +0000 (GMT) Received: from mps2.plala.or.jp (c145240.vh.plala.or.jp [210.150.145.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97A9243D3F for ; Mon, 5 Jul 2004 13:53:29 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mps2.plala.or.jp with SMTP id <20040705135328.XPTS1281.mps2.plala.or.jp@msvc2.plala.or.jp> for ; Mon, 5 Jul 2004 22:53:28 +0900 Received: ( 17104 invoked from network); 5 Jul 2004 22:53:28 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 5 Jul 2004 22:53:26 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040705135326.WFSK19716.mpb1.plala.or.jp@trio.plala.or.jp>; Mon, 5 Jul 2004 22:53:26 +0900 Message-ID: <40E95EE5.1060907@trio.plala.or.jp> Date: Mon, 05 Jul 2004 23:00:05 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: Volker Stolz , freebsd-hackers@freebsd.org References: <20040630011635.GF34501@empiric.dek.spc.org> <20040705103747.GA20487@VARK.homeunix.com> <40E95653.6020705@trio.plala.or.jp> <20040705133203.GA75345@i2.informatik.rwth-aachen.de> In-Reply-To: <20040705133203.GA75345@i2.informatik.rwth-aachen.de> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 13:53:31 -0000 Hi Volker and all, Volker Stolz wrote: >In local.freebsd-hackers, you wrote: > > >>I haven't seen above well yet. But A article says that DTrace sounds >>like 30,000 lines of debug print. >> >> > >No, already the first article tells you that they use a VM with byte-code >for the C-like language "D". And it's not compiled into the kernel but >hooked in and removed on-the-fly. > >Volker > > I don't know langage "D" well. But my guess is that they trim the info valuable from the debug print outputs. Sorry I haven't read the articles compleately yet. Eitarou -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 14:48:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C768B16A4CF for ; Mon, 5 Jul 2004 14:48:53 +0000 (GMT) Received: from mps7.plala.or.jp (c150240.vh.plala.or.jp [210.150.150.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B8E043D58 for ; Mon, 5 Jul 2004 14:48:52 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc1.plala.or.jp ([172.23.8.209]) by mps7.plala.or.jp with SMTP id <20040705144851.LXWH18364.mps7.plala.or.jp@msvc1.plala.or.jp> for ; Mon, 5 Jul 2004 23:48:51 +0900 Received: ( 5276 invoked from network); 5 Jul 2004 23:48:51 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc1 with SMTP; 5 Jul 2004 23:48:50 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040705144850.WIFR19716.mpb1.plala.or.jp@trio.plala.or.jp> for ; Mon, 5 Jul 2004 23:48:50 +0900 Message-ID: <40E96BDE.7090102@trio.plala.or.jp> Date: Mon, 05 Jul 2004 23:55:26 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20040630011635.GF34501@empiric.dek.spc.org> <20040705103747.GA20487@VARK.homeunix.com> <40E95653.6020705@trio.plala.or.jp> <20040705133203.GA75345@i2.informatik.rwth-aachen.de> <40E95EE5.1060907@trio.plala.or.jp> In-Reply-To: <40E95EE5.1060907@trio.plala.or.jp> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 14:48:53 -0000 Hi, Eitarou Kamo wrote: > >> No, already the first article tells you that they use a VM with >> byte-code >> for the C-like language "D". And it's not compiled into the kernel but >> hooked in and removed on-the-fly. >> >> > I don't know langage "D" well. But my guess is that they trim the info > valuable from the debug print outputs. Sorry I haven't read the > articles compleately yet. > > Eitarou > Again DTrace seems to observe the resources via system analyze tool and command. But language "D" seems to be great enough to call C/C++ function or even assembler. -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 15:48:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04DF016A4D0; Mon, 5 Jul 2004 15:48:20 +0000 (GMT) Received: from moutvdomng.kundenserver.de (moutvdom.kundenserver.de [212.227.126.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7480643D1D; Mon, 5 Jul 2004 15:48:19 +0000 (GMT) (envelope-from liamfoy@sepulcrum.org) Received: from [212.227.126.224] (helo=mrvdomng.kundenserver.de) by moutvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BhVhU-0002Fd-00; Mon, 05 Jul 2004 17:48:12 +0200 Received: from [217.43.32.4] (helo=liamfoy.ath.cx) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BhVhU-0003b5-00; Mon, 05 Jul 2004 17:48:12 +0200 Date: Mon, 5 Jul 2004 16:46:32 +0100 From: "Liam J. Foy" To: Niki Denev Message-Id: <20040705164632.2228e12a.liamfoy@sepulcrum.org> In-Reply-To: References: <20040704204353.26b4496b.liamfoy@sepulcrum.org> <20040704.140429.37607877.imp@bsdimp.com> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: acpi@FreeBSD.ORG cc: hackers@FreeBSD.ORG Subject: Re: APM Patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 15:48:20 -0000 On Mon, 05 Jul 2004 16:45:11 +0300 Niki Denev wrote: > M. Warner Losh writes: > > > In message: <20040704204353.26b4496b.liamfoy@sepulcrum.org> > > "Liam J. Foy" writes: > > : Hey guys, > > : > > : Since it was decided (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html) > > : we are going to stick with apm -l producing -1 and not 255 which is stated in the handbook would one > > : of you guys please commit: > > : > > : --- /usr/src/usr.sbin/apm/apm.8 Thu Jun 24 17:32:55 2004 > > : +++ /liamfoy/apm.8 Thu Jun 24 17:32:27 2004 > > : @@ -106,7 +106,7 @@ > > : state respectively. > > : .It Fl t > > : Display the estimated remaining battery lifetime in seconds. If > > : -it is unknown, 255 is displayed. > > : +it is unknown, -1 is displayed. > > : .It Fl Z > > : Transition the system into standby mode. This mode uses less power than > > : full power mode, but more than suspend mode. Some laptops support > > : > > : ---- > > : > > : Another patch I would like you guys to review is this. Currently apm -t will output > > : 0 when it cannot find a valid rate or the full battery time(as the comment mentions). > > : I think it should return -1 (unknown) to reflect an error, which is stated in the man page. > > : It should not return 0 since we do not have 0 seconds left, we have an unknown value > > : remaining. Either that or the man page it edited. I believe the following patch should > > : be commited really. > > : > > : The patch is: > > : > > : --- /usr/src/sys/dev/acpica/acpi_cmbat.c Sun Jul 4 20:41:43 2004 > > : +++ /home/liamfoy/acpi_cmbat.c Sun Jul 4 20:39:14 2004 > > : @@ -536,7 +536,7 @@ > > : bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100; > > : } else { > > : /* Couldn't find valid rate and full battery time */ > > : - bat[i]->min = 0; > > : + bat[i]->min = -1; > > : } > > : total_min += bat[i]->min; > > : total_cap += bat[i]->cap; > > > > I don't like this patch, since we use ->min later for math... > > > > Warner > > What about this ? > > --- sys/dev/acpica/acpi_cmbat.c.orig Mon Jul 5 15:15:28 2004 > +++ sys/dev/acpica/acpi_cmbat.c Mon Jul 5 16:37:02 2004 > @@ -655,7 +655,7 @@ > battinfo->state = ACPI_BATT_STAT_NOT_PRESENT; > } else { > battinfo->cap = sc->cap; > - battinfo->min = sc->min; > + battinfo->min = sc->min ? sc->min : -1; > battinfo->state = sc->bst.state; > } > Hmm, yes. Actually looking now, this patch seem alot better. It should not affect the math. I like it. Up to the others. > > > -- > Regards, > Niki > -- -Liam J. Foy http://liamfoy.kerneled.org "Love is like maths -- the idea is simple but can be quite complicated." From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 21:27:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E20F16A4CE for ; Mon, 5 Jul 2004 21:27:09 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C04343D46 for ; Mon, 5 Jul 2004 21:27:09 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from freefall.freebsd.org (csjp@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i65LR9rp071114 for ; Mon, 5 Jul 2004 21:27:09 GMT (envelope-from csjp@freebsd.org) Received: (from csjp@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i65LR9sM071113 for hackers@FreeBSD.org; Mon, 5 Jul 2004 21:27:09 GMT (envelope-from csjp@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: csjp set sender to csjp@freebsd.org using -f Date: Mon, 5 Jul 2004 21:27:09 +0000 From: "Christian S.J. Peron" To: hackers@freebsd.org Message-ID: <20040705212709.GA70873@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [patch] attach ipfw rules to jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 21:27:09 -0000 I have written support for attaching ipfw rules to jails. I am looking for some testers/feedback. http://people.freebsd.org/~csjp/ip_fw_jail.diff NOTES: o Apply the patch o cd /usr/src && make includes o rebuild your kernel (or just the ipfw module) o rebuild the ipfw userspace utility; Syntax: ipfw add count ip from any to any jail 1 "jail" takes a numeric argument, a jail ID. For those of you who dont know, jail IDs can be retrieved using the jls(8) utility. Input would be greatly appriciated. Thanks! -- Christian S.J. Peron csjp@FreeBSD.ORG FreeBSD Committer From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 03:24:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D9FB16A4CE for ; Tue, 6 Jul 2004 03:24:56 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41BD343D3F for ; Tue, 6 Jul 2004 03:24:56 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from pooker.samsco.org (scottl@localhost [127.0.0.1]) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i663TWMQ095615 for ; Mon, 5 Jul 2004 21:29:32 -0600 (MDT) (envelope-from scottl@freebsd.org) Received: from localhost (scottl@localhost)i663TWSE095612 for ; Mon, 5 Jul 2004 21:29:32 -0600 (MDT) (envelope-from scottl@freebsd.org) X-Authentication-Warning: pooker.samsco.org: scottl owned process doing -bs Date: Mon, 5 Jul 2004 21:29:32 -0600 (MDT) From: Scott Long Sender: scottl@pooker.samsco.org To: hackers@freebsd.org Message-ID: <20040705212910.L95606@pooker.samsco.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org Subject: Call for FreeBSD status reports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 03:24:56 -0000 All, It's time again for the bi-monthly FreeBSD status reports. We're on an upward trend in numbers of reports that are submitted, and I'm hoping to get 25 this time. As always, reports are encouraged for anything that relates to FreeBSD development, documentation, independent projects, or anything else that might be interesting to the community as a whole. Reports should be one to two paragraphs in length. The template can be found at http://www.freebsd.org/news/status/report-sample.xml Submissions are due to monthly@freebsd.org by July 15. Thanks, Scott From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 05:25:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA0B316A4CE; Tue, 6 Jul 2004 05:25:41 +0000 (GMT) Received: from sev.net.ua (sev.net.ua [212.86.233.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4DF643D3F; Tue, 6 Jul 2004 05:25:40 +0000 (GMT) (envelope-from shadow@psoft.net) Received: from berloga.shadowland ([213.227.237.65]) by sev.net.ua (8.12.11/8.12.9) with ESMTP id i665Pcks057930; Tue, 6 Jul 2004 08:25:38 +0300 (EEST) (envelope-from shadow@psoft.net) Received: from berloga.shadowland (berloga.shadowland [127.0.0.1]) by berloga.shadowland (8.12.10/8.12.10) with ESMTP id i665Pc21008420; Tue, 6 Jul 2004 08:25:38 +0300 Received: (from root@localhost) by berloga.shadowland (8.12.10/8.12.10/Submit) id i665PcO3008418; Tue, 6 Jul 2004 08:25:38 +0300 From: Alex Lyashkov To: "Christian S.J. Peron" In-Reply-To: <20040705212709.GA70873@freefall.freebsd.org> References: <20040705212709.GA70873@freefall.freebsd.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: PSoft Message-Id: <1089091537.7827.5.camel@berloga.shadowland> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-1) Date: Tue, 06 Jul 2004 08:25:37 +0300 cc: hackers@freebsd.org Subject: Re: [patch] attach ipfw rules to jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 05:25:41 -0000 =F7 =F7=D4=D2, 06.07.2004, =D7 00:27, Christian S.J. Peron =D0=C9=DB=C5=D4: > I have written support for attaching ipfw rules to jails. I am=20 > looking for some testers/feedback. >=20 > http://people.freebsd.org/~csjp/ip_fw_jail.diff >=20 > NOTES: > o Apply the patch > o cd /usr/src && make includes > o rebuild your kernel (or just the ipfw module) > o rebuild the ipfw userspace utility; >=20 > Syntax: >=20 > ipfw add count ip from any to any jail 1 >=20 > "jail" takes a numeric argument, a jail ID. >=20 > For those of you who dont know, jail IDs can be retrieved using > the jls(8) utility. >=20 > Input would be greatly appriciated. > Thanks! who not port vimage project to -current ? separated network stack and firewall rules more and more faster then this... If system not have jails vimage not add=20 observable overhead to system.. --=20 Alex Lyashkov PSoft From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 05:35:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF7F116A4CE; Tue, 6 Jul 2004 05:35:07 +0000 (GMT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F36143D45; Tue, 6 Jul 2004 05:35:07 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc13) with ESMTP id <20040706053501015003f8bie>; Tue, 6 Jul 2004 05:35:06 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id WAA56799; Mon, 5 Jul 2004 22:35:00 -0700 (PDT) Date: Mon, 5 Jul 2004 22:34:58 -0700 (PDT) From: Julian Elischer To: Alex Lyashkov In-Reply-To: <1089091537.7827.5.camel@berloga.shadowland> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: hackers@freebsd.org cc: "Christian S.J. Peron" Subject: Re: [patch] attach ipfw rules to jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 05:35:08 -0000 On Tue, 6 Jul 2004, Alex Lyashkov wrote: > =F7 =F7=D4=D2, 06.07.2004, =D7 00:27, Christian S.J. Peron =D0=C9=DB=C5= =D4: > > I have written support for attaching ipfw rules to jails. I am=20 > > looking for some testers/feedback. > >=20 > > http://people.freebsd.org/~csjp/ip_fw_jail.diff > >=20 > > NOTES: > > o Apply the patch > > o cd /usr/src && make includes > > o rebuild your kernel (or just the ipfw module) > > o rebuild the ipfw userspace utility; > >=20 > > Syntax: > >=20 > > ipfw add count ip from any to any jail 1 > >=20 > > "jail" takes a numeric argument, a jail ID. > >=20 > > For those of you who dont know, jail IDs can be retrieved using > > the jls(8) utility. > >=20 > > Input would be greatly appriciated. > > Thanks! > why not port vimage project to -current ? separated network stack and > firewall rules more and more faster then this... > If system not have jails vimage not add=20 > observable overhead to system.. vimage is a good idea but it has great problems in an expandable world. (i.e. with systems that use klds a lot) It relies on all globals being moved to a structure, but the structure needs to be defined at compile time so it can not be expanded when a module is loaded to accomodate the globasl from that module. Thsi COULD be solved by adding an extra level of indirection for all globals but that is a lot of overhead, and it could be resolved using something similar to the TLS (thread local storage) technology being developed but it would still be a non trivial bit of work to make it a production quality system. Julian From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 05:47:18 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E629216A4CE; Tue, 6 Jul 2004 05:47:18 +0000 (GMT) Received: from sev.net.ua (sev.net.ua [212.86.233.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id C665C43D1D; Tue, 6 Jul 2004 05:47:16 +0000 (GMT) (envelope-from shadow@psoft.net) Received: from berloga.shadowland ([213.227.237.65]) by sev.net.ua (8.12.11/8.12.9) with ESMTP id i665lAhs058144; Tue, 6 Jul 2004 08:47:10 +0300 (EEST) (envelope-from shadow@psoft.net) Received: from berloga.shadowland (berloga.shadowland [127.0.0.1]) by berloga.shadowland (8.12.10/8.12.10) with ESMTP id i665lA21008520; Tue, 6 Jul 2004 08:47:10 +0300 Received: (from root@localhost) by berloga.shadowland (8.12.10/8.12.10/Submit) id i665l9IH008518; Tue, 6 Jul 2004 08:47:09 +0300 From: Alex Lyashkov To: Julian Elischer In-Reply-To: References: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Organization: PSoft Message-Id: <1089092829.7827.17.camel@berloga.shadowland> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-1) Date: Tue, 06 Jul 2004 08:47:09 +0300 cc: hackers@freebsd.org cc: "Christian S.J. Peron" Subject: Re: [patch] attach ipfw rules to jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 05:47:19 -0000 =F7 =F7=D4=D2, 06.07.2004, =D7 08:34, Julian Elischer =D0=C9=DB=C5=D4: > vimage is a good idea but it has great problems in an expandable world. > (i.e. with systems that use klds a lot) >=20 > It relies on all globals being moved to a structure, but > the structure needs to be defined at compile time so it can not be > expanded when a module is loaded to accomodate the globasl from that > module. Thsi COULD be solved by adding an extra level of indirection > for all globals but that is a lot of overhead, and it could be resolved > using something similar to the TLS (thread local storage) > technology being developed but it would still be a non trivial bit of > work to make it a production quality system. >=20 > Julian I do not know who work TLS (if it easy please explain it) but my view for this problem - if for this module not reserve place at global structure - use private per module storage where placed reference from global prison structure to module data. And add 2 callback`s - init/destroy prison context. Or other way - add to prison array where each modules been registered pointer to data associated with this module at this prison context.=20 I use similar way where add per vps ipsec support at FreeVPS. --=20 Alex Lyashkov PSoft From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 11:50:42 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9338D16A4CE; Tue, 6 Jul 2004 11:50:42 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 589B543D49; Tue, 6 Jul 2004 11:50:42 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 643F5530C; Tue, 6 Jul 2004 13:50:41 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 02DA45309; Tue, 6 Jul 2004 13:50:35 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id DB1A1B860; Tue, 6 Jul 2004 13:50:34 +0200 (CEST) To: Xin LI References: <20040625033718.GA1691@frontfree.net> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 06 Jul 2004 13:50:34 +0200 In-Reply-To: <20040625033718.GA1691@frontfree.net> (Xin LI's message of "Fri, 25 Jun 2004 11:37:18 +0800") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: freebsd-net@FreeBSD.org cc: hackers@FreeBSD.org Subject: Re: Preliminary sys/netinet style patch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 11:50:42 -0000 Xin LI writes: > I have a patchset to remove tailing spaces, convert leading spaces > to tabs, and removes spaces before tabs. As a rule, we never do this except in conjunction with other changes. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 20:06:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11C9516A4CE for ; Mon, 5 Jul 2004 20:06:01 +0000 (GMT) Received: from web13423.mail.yahoo.com (web13423.mail.yahoo.com [216.136.175.154]) by mx1.FreeBSD.org (Postfix) with SMTP id 0C76143D3F for ; Mon, 5 Jul 2004 20:06:01 +0000 (GMT) (envelope-from pfgshield-pedro@yahoo.com) Message-ID: <20040705200559.67439.qmail@web13423.mail.yahoo.com> Received: from [63.171.232.246] by web13423.mail.yahoo.com via HTTP; Mon, 05 Jul 2004 22:05:59 CEST Date: Mon, 5 Jul 2004 22:05:59 +0200 (CEST) From: To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 06 Jul 2004 12:09:19 +0000 Subject: closefrom (was Re: Article on Sun's DTrace) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 20:06:01 -0000 Hi; The article suggests we should learn from Solaris and implement closefrom(3C): http://www.freebsd.org/cgi/man.cgi?query=closefrom&apropos=0&sektion=0&manpath=SunOS+5.9&format=html And make sure we use it in sendmail (and Javac). cheers, Pedro. ____________________________________________________________ Yahoo! Companion - Scarica gratis la toolbar di Ricerca di Yahoo! http://companion.yahoo.it From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 20:51:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 809D516A4CE for ; Mon, 5 Jul 2004 20:51:01 +0000 (GMT) Received: from web53307.mail.yahoo.com (web53307.mail.yahoo.com [206.190.39.236]) by mx1.FreeBSD.org (Postfix) with SMTP id 2027643D31 for ; Mon, 5 Jul 2004 20:51:01 +0000 (GMT) (envelope-from non_secure@yahoo.com) Message-ID: <20040705205100.88989.qmail@web53307.mail.yahoo.com> Received: from [24.94.23.114] by web53307.mail.yahoo.com via HTTP; Mon, 05 Jul 2004 13:51:00 PDT Date: Mon, 5 Jul 2004 13:51:00 -0700 (PDT) From: Joe Schmoe To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Tue, 06 Jul 2004 12:09:19 +0000 Subject: concurrent scp transfers (and a testing methodology ?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 20:51:01 -0000 I have read several documents on the number of concurrent https sessions a FreeBSD system is capable of. However, I wonder how well this relates to how many ssh sessions (scp file transfers, specifically) that a FreeBSD server can handle. Can anyone throw out some basic numbers for this ? Assuming a 1ghz p3 and 2gigs of RAM, and assuming that everyone is transferring a totally different file. (so there is no amount of cache hits - everything comes straight off the drives) I would think the major bottleneck would be disk - you would start chugging the disks far before you used up all the CPU on a 1ghz p3 ... but what is the second bottleneck ? Is it cpu, or is it ram (or mbufs, etc.) Would it be a reasonable test to just start up scp sessions from the machine to itself and then divide the number of sessions you can acceptably create by the number 2 ? Or is this somehow a flawed test ? Any additional comments (kernel tunes, settings, war stories) are greatly appreciated. (like, does SMP help a lot here, or just a little ?) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 00:11:34 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E77C016A4CE for ; Tue, 6 Jul 2004 00:11:34 +0000 (GMT) Received: from ms008msg.fastweb.it (ms008msg.fastweb.it [213.140.2.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D2A143D53 for ; Tue, 6 Jul 2004 00:11:34 +0000 (GMT) (envelope-from thefly@acaro.org) Received: from tyler (1.10.185.81) by ms008msg.fastweb.it (7.0.028) id 40D6E1B100180B93 for freebsd-hackers@freebsd.org; Tue, 6 Jul 2004 02:11:33 +0200 Received: by tyler (Postfix, from userid 1000) id BD65B1AB494; Tue, 6 Jul 2004 02:15:11 +0200 (CEST) Date: Tue, 6 Jul 2004 02:15:11 +0200 From: thefly To: freebsd-hackers@freebsd.org Message-ID: <20040706001511.GA11077@tyler> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: VIM - Vi IMproved 6.2 (2003 Jun 1, compiled May 20 2004 09:35:32) X-OS: Debian GNU/Linux 2.6.6 i686 User-Agent: Mutt/1.5.6+20040523i X-Mailman-Approved-At: Tue, 06 Jul 2004 12:09:19 +0000 Subject: ZEROCOPY between kernel and userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 00:11:35 -0000 Hello everybody, i'm writing a netgraph module to get some stats about the network traffic. Actually i have to pass all the data gathered all in one piece, to the process which asks me for it. The client should work like this in userland: int * pointer; ioctl(dev, MY_COMMAND, pointer); after this pointer points to the right memory area. The array to pass is about 500Kb, so copying with copyout() would be too expensive, moving the array from kernel's addrespace to process's address space would be fast. The question is: what's the actual API to do that, if there's any, in freebsd 5? TIA -- Claudio "thefly" Martella thefly@acaro.org GNU/PG keyid: 0x8EA95625 From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 13:22:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0306F16A4CE for ; Tue, 6 Jul 2004 13:22:45 +0000 (GMT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 765B643D5A for ; Tue, 6 Jul 2004 13:22:44 +0000 (GMT) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id <312YZ7QC>; Tue, 6 Jul 2004 09:22:43 -0400 Message-ID: From: Don Bowman To: 'thefly' , freebsd-hackers@freebsd.org Date: Tue, 6 Jul 2004 09:22:39 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Subject: RE: ZEROCOPY between kernel and userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 13:22:45 -0000 From: thefly [mailto:thefly@acaro.org] > Hello everybody, i'm writing a netgraph module to get some stats about > the network traffic. Actually i have to pass all the data gathered all > in one piece, to the process which asks me for it. The client should > work like this in userland: > > int * pointer; > > ioctl(dev, MY_COMMAND, pointer); > > after this pointer points to the right memory area. The array > to pass is > about 500Kb, so copying with copyout() would be too expensive, moving > the array from kernel's addrespace to process's address space would be > fast. > The question is: what's the actual API to do that, if there's any, in > freebsd 5? We did a device, and 'mmap' some shared memory between the two. The user space has read-only access. From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 13:33:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66C1116A4D1 for ; Tue, 6 Jul 2004 13:33:03 +0000 (GMT) Received: from ms007msg.fastweb.it (ms007msg.fastweb.it [213.140.2.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id D248C43D5C for ; Tue, 6 Jul 2004 13:33:02 +0000 (GMT) (envelope-from thefly@acaro.org) Received: from tyler (1.10.185.81) by ms007msg.fastweb.it (7.0.028) id 40D059290024FF3A; Tue, 6 Jul 2004 15:33:00 +0200 Received: by tyler (Postfix, from userid 1000) id 527DF1AB494; Tue, 6 Jul 2004 15:36:40 +0200 (CEST) Date: Tue, 6 Jul 2004 15:36:40 +0200 From: thefly To: Don Bowman Message-ID: <20040706133640.GB5922@tyler> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: X-Editor: VIM - Vi IMproved 6.2 (2003 Jun 1, compiled May 20 2004 09:35:32) X-OS: Debian GNU/Linux 2.6.6 i686 User-Agent: Mutt/1.5.6+20040523i cc: freebsd-hackers@freebsd.org Subject: Re: ZEROCOPY between kernel and userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 13:33:03 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable could you point me pls to some code of that? To me read-only access is ok, userspace doesn't need to write anything on it, kernelspace does. But what about locking issues between userspace read access and kernelspace write access? On Tue, Jul 06, 2004 at 09:22:39AM -0400, Don Bowman wrote: > From: thefly [mailto:thefly@acaro.org] > > Hello everybody, i'm writing a netgraph module to get some stats about > > the network traffic. Actually i have to pass all the data gathered all > > in one piece, to the process which asks me for it. The client should > > work like this in userland: > >=20 > > int * pointer; > >=20 > > ioctl(dev, MY_COMMAND, pointer); > >=20 > > after this pointer points to the right memory area. The array=20 > > to pass is > > about 500Kb, so copying with copyout() would be too expensive, moving > > the array from kernel's addrespace to process's address space would be > > fast.=20 > > The question is: what's the actual API to do that, if there's any, in > > freebsd 5? >=20 > We did a device, and 'mmap' some shared memory between the two. > The user space has read-only access. >=20 >=20 >=20 --=20 Claudio "thefly" Martella thefly@acaro.org GNU/PG keyid: 0x8EA95625 --AhhlLboLdkugWU4S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFA6qroygeBqo6pViURAtdaAJ9WrJ3u5dIyalWizEudAhi5DewxnQCgr6N1 EWf16pdNTjDW0aBUvtR/FXE= =iRUV -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 14:01:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BC6716A4CE for ; Tue, 6 Jul 2004 14:01:14 +0000 (GMT) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24C0743D39 for ; Tue, 6 Jul 2004 14:01:14 +0000 (GMT) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (localhost [127.0.0.1]) by whizzo.transsys.com (Postfix) with ESMTP id 4DE6D20F83; Tue, 6 Jul 2004 10:01:13 -0400 (EDT) X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: Joe Schmoe Organization: Serendipity Scheduling & Management X-Image-URL: http://www.transsys.com/louie/images/louie-mail.jpg From: "Louis A. Mamakos" References: <20040705205100.88989.qmail@web53307.mail.yahoo.com> In-reply-to: Your message of "Mon, 05 Jul 2004 13:51:00 PDT." <20040705205100.88989.qmail@web53307.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 06 Jul 2004 10:01:13 -0400 Sender: louie@whizzo.transsys.com Message-Id: <20040706140113.4DE6D20F83@whizzo.transsys.com> cc: freebsd-hackers@freebsd.org Subject: Re: concurrent scp transfers (and a testing methodology ?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 14:01:14 -0000 > > I have read several documents on the number of > concurrent https sessions a FreeBSD system is capable > of. > > However, I wonder how well this relates to how many > ssh sessions (scp file transfers, specifically) that a > FreeBSD server can handle. Can anyone throw out some > basic numbers for this ? Assuming a 1ghz p3 and 2gigs > of RAM, and assuming that everyone is transferring a > totally different file. (so there is no amount of > cache hits - everything comes straight off the drives) > > I would think the major bottleneck would be disk - you > would start chugging the disks far before you used up > all the CPU on a 1ghz p3 ... but what is the second > bottleneck ? Is it cpu, or is it ram (or mbufs, etc.) > > Would it be a reasonable test to just start up scp > sessions from the machine to itself and then divide > the number of sessions you can acceptably create by > the number 2 ? Or is this somehow a flawed test ? > > Any additional comments (kernel tunes, settings, war > stories) are greatly appreciated. (like, does SMP help > a lot here, or just a little ?) What crypto algorithm are you using for your ssh/scp session? AES, DES, 3DES, arcfour? Any hardware assist for doing the crypto? Are you having the underlying SSH session try to compress the data? louie From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 14:22:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 346E816A4CE for ; Tue, 6 Jul 2004 14:22:46 +0000 (GMT) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 006ED43D1F for ; Tue, 6 Jul 2004 14:22:46 +0000 (GMT) (envelope-from ellard@eecs.harvard.edu) Received: by mail.eecs.harvard.edu (Postfix, from userid 465) id 6F4E754C613; Tue, 6 Jul 2004 10:22:45 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id 6CCE454C605 for ; Tue, 6 Jul 2004 10:22:45 -0400 (EDT) Date: Tue, 6 Jul 2004 10:22:45 -0400 (EDT) From: Daniel Ellard To: freebsd-hackers@freebsd.org In-Reply-To: <20040706120130.3DF9816A57D@hub.freebsd.org> Message-ID: <20040706101140.T92636@bowser.eecs.harvard.edu> References: <20040706120130.3DF9816A57D@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 14:22:46 -0000 In a nutshell, here is what DTrace is about: - It has no impact on the system when it is not used. So you can leave it in all the time, instead of having a debug kernel and a production kernel. [I don't know how they achieve the "no impact" but they claim that they really mean "no", not just "negligible".] - It allows you to analyze pretty much any aspect of the kernel that you like, and it has hooks into userland as well. So if you have strange behaviors happening due to a badly-written process, you can track down what that process is doing. They demonstrate some nice examples of this. - The D language is what you use to specify how the trace info is filtered/processed/presented to you. D is not a complete programming language. It is highly constrained (i.e. no loops, no recursion, etc) in order to make sure that every path through a D program completes in finite time (otherwise, a bug in your D program might effectively hang the kernel, which is a no-no). So, you could think of it as "a million debugging printf's magically inserted into the kernel for you" along with a tool to analyze the output, but it's really much more sophisticated than that. It looks very nice. I wish I'd had it during my forays into the FreeBSD kernel. Is it hopelessly solaris-specific? Well, I was at the presentation that Bryan Cantrill gave at USENIX, where he was asked about the possibility of porting DTrace to linux. His response was something like "well, we're really trying to encourage people to use the *best* possible operating system, so no." (Of course, one might argue that this means that a FreeBSD port is imminent, but I don't think that's what he meant.) -Dan From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 14:41:12 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED54916A4CE for ; Tue, 6 Jul 2004 14:41:12 +0000 (GMT) Received: from mail.FreeBSD.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E71943D39 for ; Tue, 6 Jul 2004 14:41:11 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 8165 invoked by uid 0); 6 Jul 2004 14:39:46 -0000 Received: from unknown (HELO beastie.frontfree.net) (218.107.145.7) by mail.FreeBSD.org.cn with AES256-SHA encrypted SMTP; 6 Jul 2004 14:39:46 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id F2C2311F35; Tue, 6 Jul 2004 22:41:03 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02119-03; Tue, 6 Jul 2004 22:41:03 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 389D711EFA; Tue, 6 Jul 2004 22:41:02 +0800 (CST) Date: Tue, 6 Jul 2004 22:41:02 +0800 From: Xin LI To: Dag-Erling Sm?rgrav Message-ID: <20040706144102.GA4034@frontfree.net> References: <20040625033718.GA1691@frontfree.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #80: Thu Jun 24 17:30:33 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: by amavisd-new at frontfree.net cc: hackers@FreeBSD.org cc: doc@FreeBSD.org Subject: About rules on style changes [Was: Re: Preliminary sys/netinet style patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 14:41:13 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Dag-Erling, (I have removed freebsd-net@ from cc list and added doc@ as the topic seemed to be more related to doc@) On Tue, Jul 06, 2004 at 01:50:34PM +0200, Dag-Erling Sm?rgrav wrote: > Xin LI writes: > > I have a patchset to remove tailing spaces, convert leading spaces > > to tabs, and removes spaces before tabs. >=20 > As a rule, we never do this except in conjunction with other changes. Hmm... Seems that I have misunderstood the committers' guide, section 10.3, which said: "Do not mix style fixes with new functionality. A style fix is any change which does not modify the functionality of the code. Mixing the changes obfuscates the functionality change when using cvs diff, which can hide any new bugs." I thought that this is not a strict discourage of style fixes. Shall we add something to clarify the rule, like this: "In order to prevent difficulties other committers will encounter when making changes or merging changes from third party, it is discouraged to do style changes when there is no functional changes over a subsystem, and please follow style(9) when committing new code, as a consistent style will ease others' work when merging your changes." Thanks. Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA6rn+OfuToMruuMARAl+tAJwMRH92KFtSIOxXvYcvV8303naXbwCePMeo PTpr1778jc1P7/93X/2ht/k= =x0kj -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 14:47:02 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58C6E16A4CE; Tue, 6 Jul 2004 14:47:02 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3BF943D55; Tue, 6 Jul 2004 14:47:01 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 8F015531C; Tue, 6 Jul 2004 16:47:00 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 0B212531B; Tue, 6 Jul 2004 16:46:53 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id DCB9DB860; Tue, 6 Jul 2004 16:46:52 +0200 (CEST) To: Xin LI References: <20040625033718.GA1691@frontfree.net> <20040706144102.GA4034@frontfree.net> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 06 Jul 2004 16:46:52 +0200 In-Reply-To: <20040706144102.GA4034@frontfree.net> (Xin LI's message of "Tue, 6 Jul 2004 22:41:02 +0800") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: hackers@FreeBSD.org cc: doc@FreeBSD.org Subject: Re: About rules on style changes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 14:47:02 -0000 Xin LI writes: > Hmm... Seems that I have misunderstood the committers' guide, section > 10.3, which said: > > "Do not mix style fixes with new functionality. A style fix is any > change which does not modify the functionality of the code. Mixing the > changes obfuscates the functionality change when using cvs diff, which > can hide any new bugs." That just means you have to do it in a separate commit. We do not generally make style changes for their own sake; instead, we commit style fixes shortly before or after a functional change. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 15:03:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9911516A4CE for ; Tue, 6 Jul 2004 15:03:36 +0000 (GMT) Received: from mail.FreeBSD.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B52CC43D49 for ; Tue, 6 Jul 2004 15:03:35 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 8640 invoked by uid 0); 6 Jul 2004 15:02:06 -0000 Received: from unknown (HELO beastie.frontfree.net) (218.107.145.7) by mail.FreeBSD.org.cn with AES256-SHA encrypted SMTP; 6 Jul 2004 15:02:06 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id 4B7A711F5A; Tue, 6 Jul 2004 23:03:28 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02426-02; Tue, 6 Jul 2004 23:03:27 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 40C9211EFA; Tue, 6 Jul 2004 23:03:27 +0800 (CST) Date: Tue, 6 Jul 2004 23:03:27 +0800 From: Xin LI To: Dag-Erling Sm?rgrav Message-ID: <20040706150327.GA3817@frontfree.net> References: <20040625033718.GA1691@frontfree.net> <20040706144102.GA4034@frontfree.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #80: Thu Jun 24 17:30:33 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: by amavisd-new at frontfree.net cc: hackers@FreeBSD.org cc: doc@FreeBSD.org Subject: Re: About rules on style changes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 15:03:36 -0000 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for the clarification :-) On Tue, Jul 06, 2004 at 04:46:52PM +0200, Dag-Erling Sm?rgrav wrote: [snip] > That just means you have to do it in a separate commit. We do not > generally make style changes for their own sake; instead, we commit > style fixes shortly before or after a functional change. Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA6r8/OfuToMruuMARAkjHAJ9xHxhmbfKYPmIGmN3BdT4phh8mkwCdGxUp 2/0owFtcgvqVCYP4XnHunoI= =BcOC -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 15:42:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67E0216A4CE for ; Tue, 6 Jul 2004 15:42:35 +0000 (GMT) Received: from north-zone.net (wh1.north-zone.net [65.110.60.200]) by mx1.FreeBSD.org (Postfix) with SMTP id D7B1843D2D for ; Tue, 6 Jul 2004 15:42:32 +0000 (GMT) (envelope-from nicobn@quebecbsd.org) Received: (qmail 53917 invoked by uid 80); 6 Jul 2004 15:44:03 -0000 Received: from 24.203.207.162 (SquirrelMail authenticated user nicobn@quebecbsd.org) by webmail.north-zone.net with HTTP; Tue, 6 Jul 2004 15:44:03 -0000 (GMT) Message-ID: <3112.24.203.207.162.1089128643.squirrel@webmail.north-zone.net> Date: Tue, 6 Jul 2004 15:44:03 -0000 (GMT) From: Nicolas =?iso-8859-1?Q?B=E9rard_Nault?= To: "Joe Schmoe" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: Re: concurrent scp transfers (and a testing methodology ?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: nicobn@quebecbsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 15:42:35 -0000 I think the "divide by two" methodology would be flawed because packets would circulate on local loopback which is must faster than Ethernet. More transferts would be possible in a long period of time because of that. Joe Schmoe said: > > I have read several documents on the number of > concurrent https sessions a FreeBSD system is capable > of. > > However, I wonder how well this relates to how many > ssh sessions (scp file transfers, specifically) that a > FreeBSD server can handle. Can anyone throw out some > basic numbers for this ? Assuming a 1ghz p3 and 2gigs > of RAM, and assuming that everyone is transferring a > totally different file. (so there is no amount of > cache hits - everything comes straight off the drives) > > I would think the major bottleneck would be disk - you > would start chugging the disks far before you used up > all the CPU on a 1ghz p3 ... but what is the second > bottleneck ? Is it cpu, or is it ram (or mbufs, etc.) > > Would it be a reasonable test to just start up scp > sessions from the machine to itself and then divide > the number of sessions you can acceptably create by > the number 2 ? Or is this somehow a flawed test ? > > Any additional comments (kernel tunes, settings, war > stories) are greatly appreciated. (like, does SMP help > a lot here, or just a little ?) > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > 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" > -- Nicolas Bérard Nault (nicobn@quebecbsd.org) http://www.quebecbsd.org http://www.xeatech.net http://staff.xeatech.net/nicobn "Je ne sais pas avec quelles armes se combattra la troisičme guerre mondiale mais je peux vous assurer que la quatričme se combattra avec des pierres et des bâtons." -- Albert Einstein. -- Nicolas Bérard Nault (nicobn@quebecbsd.org) http://www.quebecbsd.org http://www.xeatech.net http://staff.xeatech.net/nicobn "Je ne sais pas avec quelles armes se combattra la troisičme guerre mondiale mais je peux vous assurer que la quatričme se combattra avec des pierres et des bâtons." -- Albert Einstein. From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 18:53:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F55A16A4CE for ; Tue, 6 Jul 2004 18:53:08 +0000 (GMT) Received: from mail-in-07.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDC9743D41 for ; Tue, 6 Jul 2004 18:53:07 +0000 (GMT) (envelope-from mailnull@mips.inka.de) Received: from kemoauc.mips.inka.de (dsl-082-083-163-172.arcor-ip.net [82.83.163.172]) by mail-in-07.arcor-online.net (Postfix) with ESMTP id 4D74E102F12 for ; Tue, 6 Jul 2004 20:53:06 +0200 (CEST) Received: from kemoauc.mips.inka.de (localhost [127.0.0.1]) i66Ir5fa014852 for ; Tue, 6 Jul 2004 20:53:05 +0200 (CEST) (envelope-from mailnull@kemoauc.mips.inka.de) Received: (from mailnull@localhost) by kemoauc.mips.inka.de (8.12.11/8.12.11/Submit) id i66Ir5jL014851 for freebsd-hackers@freebsd.org; Tue, 6 Jul 2004 20:53:05 +0200 (CEST) (envelope-from mailnull) From: naddy@mips.inka.de (Christian Weisgerber) Date: Tue, 6 Jul 2004 18:53:04 +0000 (UTC) Message-ID: References: <20040705205100.88989.qmail@web53307.mail.yahoo.com> Originator: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-hackers@freebsd.org Subject: Re: concurrent scp transfers (and a testing methodology ?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 18:53:08 -0000 Joe Schmoe wrote: > However, I wonder how well this relates to how many > ssh sessions (scp file transfers, specifically) that a > FreeBSD server can handle. Can anyone throw out some > basic numbers for this ? Assuming a 1ghz p3 and 2gigs > of RAM, and assuming that everyone is transferring a > totally different file. In LAN environments, scp is conspicuously CPU limited. A P3/1GHz will be able to push out a file at about 6MB/s. Divide by desired number of files. Just what transfer rates did you have in mind? > I would think the major bottleneck would be disk I don't think so. If you have many concurrent transfers of different files spread out wildly over the disk, you might get the disk to thrash, but it isn't clear that it will still matter at this point. Check some "random reads" benchmarks for your vintage of disk. > (like, does SMP help a lot here, or just a little ?) A lot, as far as SMP goes. Alternatively, a lowly VIA C3 Nehemiah with its on-core AES engine should happily beat your usual high-end P4/Athlon/etc at this task. (I don't know whether FreeBSD integrates the AES engine in userland. OpenBSD does.) -- Christian "naddy" Weisgerber naddy@mips.inka.de From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 21:23:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 089C716A4CF for ; Tue, 6 Jul 2004 21:23:10 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E124F43D46 for ; Tue, 6 Jul 2004 21:23:09 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i66LMtOF024750; Tue, 6 Jul 2004 14:22:55 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i66LMtXX024749; Tue, 6 Jul 2004 14:22:55 -0700 Date: Tue, 6 Jul 2004 14:22:54 -0700 From: Brooks Davis To: thefly Message-ID: <20040706212254.GA22673@Odin.AC.HMC.Edu> References: <20040706133640.GB5922@tyler> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <20040706133640.GB5922@tyler> User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: ZEROCOPY between kernel and userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 21:23:10 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top-post, it tends to lose context.] On Tue, Jul 06, 2004 at 03:36:40PM +0200, thefly wrote: > could you point me pls to some code of that? To me read-only access is > ok, userspace doesn't need to write anything on it, kernelspace does. > But what about locking issues between userspace read access and > kernelspace write access? First, be aware that mmap is not necessicairly faster then copyout on modern CPUs. The cycles required to copy a few K of bytes aren't worth much of anything on a modern CPU compared to a page-fault. Second, if you still want to do things this way, take a look at the geom statistics mechanism. IIRC, it works by using a generation number at the top and bottom of the stats structure. The user copies the entire struct and then verified that the copies of the generation number at the top and bottom of the struct are the same. If so, it uses the copy it got. If not, it tries again. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFA6xguXY6L6fI4GtQRAn36AJ9Lc1Fux87d3YcLwDLA5rKTHMudDACgsD/s 8+QhThyeYv8WHd+iS0j/Ncg= =Ipq3 -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 06:31:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F12416A4CE for ; Wed, 7 Jul 2004 06:31:29 +0000 (GMT) Received: from mps5.plala.or.jp (c148240.vh.plala.or.jp [210.150.148.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2E0A43D1F for ; Wed, 7 Jul 2004 06:31:27 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mps5.plala.or.jp with SMTP id <20040707063126.QVZQ2494.mps5.plala.or.jp@msvc2.plala.or.jp> for ; Wed, 7 Jul 2004 15:31:26 +0900 Received: ( 18931 invoked from network); 7 Jul 2004 15:31:26 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 7 Jul 2004 15:31:25 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040707063124.XXVB19716.mpb1.plala.or.jp@trio.plala.or.jp>; Wed, 7 Jul 2004 15:31:24 +0900 Message-ID: <40EB9A46.2050409@trio.plala.or.jp> Date: Wed, 07 Jul 2004 15:37:58 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: Daniel Ellard , freebsd-hackers@freebsd.org References: <20040706120130.3DF9816A57D@hub.freebsd.org> <20040706101140.T92636@bowser.eecs.harvard.edu> In-Reply-To: <20040706101140.T92636@bowser.eecs.harvard.edu> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 06:31:29 -0000 Hi Dan, Daniel Ellard wrote: >In a nutshell, here is what DTrace is about: > >- It has no impact on the system when it is not used. So you can > leave it in all the time, instead of having a debug kernel and > a production kernel. > > [I don't know how they achieve the "no impact" but they claim > that they really mean "no", not just "negligible".] > > Thanks good comment. This is the one everyone, of course me too, wants to know. I wanted to get brief instruction. >So, you could think of it as "a million debugging printf's magically >inserted into the kernel for you" along with a tool to analyze the >output, but it's really much more sophisticated than that. > >It looks very nice. I wish I'd had it during my forays into the >FreeBSD kernel. Is it hopelessly solaris-specific? Well, I was at >the presentation that Bryan Cantrill gave at USENIX, where he was >asked about the possibility of porting DTrace to linux. His response >was something like "well, we're really trying to encourage people to >use the *best* possible operating system, so no." (Of course, one >might argue that this means that a FreeBSD port is imminent, but I >don't think that's what he meant.) > >-Dan > > > FreeBSD has good features such as jail, chroot e.t.c. which can controll process or resources in parallel. So you need not port DTrace entirely. You can implement DTrace like one from scratch. Using legacy system sometimes makes new system feature. I would rather expect new one than porting. DTrace is one of example, I think. You may be able to fork new debug process in parallel in the future. If I dare name it, It's "B(SD)Trace"? But it's up to your effort. DTrace is a pioneer work. And for the people like me who bothers to put the debug lines in kernel this must be powerful tool. Eitarou -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 06:39:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA8AD16A508 for ; Wed, 7 Jul 2004 06:39:59 +0000 (GMT) Received: from north-zone.net (wh1.north-zone.net [65.110.60.200]) by mx1.FreeBSD.org (Postfix) with SMTP id 49A5C43D45 for ; Wed, 7 Jul 2004 06:39:59 +0000 (GMT) (envelope-from nicobn@quebecbsd.org) Received: (qmail 8894 invoked by uid 80); 7 Jul 2004 06:41:34 -0000 Received: from 24.203.207.162 (SquirrelMail authenticated user nicobn@quebecbsd.org) by webmail.north-zone.net with HTTP; Wed, 7 Jul 2004 06:41:34 -0000 (GMT) Message-ID: <4533.24.203.207.162.1089182494.squirrel@webmail.north-zone.net> In-Reply-To: <40EB9A46.2050409@trio.plala.or.jp> References: <20040706120130.3DF9816A57D@hub.freebsd.org><20040706101140.T92636@bowser.eecs.harvard.edu> <40EB9A46.2050409@trio.plala.or.jp> Date: Wed, 7 Jul 2004 06:41:34 -0000 (GMT) From: Nicolas =?iso-8859-1?Q?B=E9rard_Nault?= To: "Eitarou Kamo" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: nicobn@quebecbsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 06:39:59 -0000 > FreeBSD has good features such as jail, chroot e.t.c. which can controll > process or resources in parallel. So you need not port DTrace entirely. I think the control of ressources in a jail is very limited right now. I don't know if some work in that direction is in progress but it would be a great project for the future. > You can implement DTrace like one from scratch. Using legacy system > sometimes makes new system feature. I would rather expect new one than > porting. DTrace is one of example, I think. You may be able to fork new > debug > process in parallel in the future. If I dare name it, It's "B(SD)Trace"? > But it's up to > your effort. DTrace is a pioneer work. And for the people like me who > bothers > to put the debug lines in kernel this must be powerful tool. Dtrace is (seems, at least) to be a very powerful tool. Eventual coders could/should get their inspiration out of the work of Sun engineers. But remember, the volunteers of the FreeBSD project aren't paid to do what they do. 2 years and 3 full-time engineers were needed to accomplish Dtrace so I think seeing a similar utility in the near future for FreeBSD is very hopeless. -- Nicolas Bérard Nault (nicobn@quebecbsd.org) http://www.quebecbsd.org http://www.xeatech.net http://staff.xeatech.net/nicobn "Je ne sais pas avec quelles armes se combattra la troisičme guerre mondiale mais je peux vous assurer que la quatričme se combattra avec des pierres et des bâtons." -- Albert Einstein. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 06:53:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAB4416A4D4 for ; Wed, 7 Jul 2004 06:53:01 +0000 (GMT) Received: from mps5.plala.or.jp (c148240.vh.plala.or.jp [210.150.148.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id F10D843D1F for ; Wed, 7 Jul 2004 06:53:00 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mps5.plala.or.jp with SMTP id <20040707065300.RUQE2494.mps5.plala.or.jp@msvc2.plala.or.jp> for ; Wed, 7 Jul 2004 15:53:00 +0900 Received: ( 26678 invoked from network); 7 Jul 2004 15:53:00 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 7 Jul 2004 15:52:59 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040707065258.XYFD19716.mpb1.plala.or.jp@trio.plala.or.jp>; Wed, 7 Jul 2004 15:52:58 +0900 Message-ID: <40EB9F56.8070204@trio.plala.or.jp> Date: Wed, 07 Jul 2004 15:59:34 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: nicobn@quebecbsd.org, freebsd-hackers@freebsd.org References: <20040706120130.3DF9816A57D@hub.freebsd.org><20040706101140.T92636@bowser.eecs.harvard.edu> <40EB9A46.2050409@trio.plala.or.jp> <4533.24.203.207.162.1089182494.squirrel@webmail.north-zone.net> In-Reply-To: <4533.24.203.207.162.1089182494.squirrel@webmail.north-zone.net> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 06:53:02 -0000 Hi Nicpolas, Nicolas B=E9rard Nault wrote: > >I think the control of ressources in a jail is very limited right now. I= >don't know if some work in that direction is in progress but it would be= a >great project for the future. > =20 > If you attend the prj, You can tweak as you like, I think. > > > >Dtrace is (seems, at least) to be a very powerful tool. Eventual coders >could/should get their inspiration out of the work of Sun engineers. But= >remember, the volunteers of the FreeBSD project aren't paid to do what >they do. 2 years and 3 full-time engineers were needed to accomplish >Dtrace so I think seeing a similar utility in the near future for FreeBS= D >is very hopeless. > > =20 > So what? --=20 =20 *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895=20 ************************************************************************ =20 From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 06:57:37 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA6C516A4CE for ; Wed, 7 Jul 2004 06:57:37 +0000 (GMT) Received: from north-zone.net (wh1.north-zone.net [65.110.60.200]) by mx1.FreeBSD.org (Postfix) with SMTP id 3453743D1D for ; Wed, 7 Jul 2004 06:57:37 +0000 (GMT) (envelope-from nicobn@quebecbsd.org) Received: (qmail 15995 invoked by uid 80); 7 Jul 2004 06:59:16 -0000 Received: from 24.203.207.162 (SquirrelMail authenticated user nicobn@quebecbsd.org) by webmail.north-zone.net with HTTP; Wed, 7 Jul 2004 06:59:16 -0000 (GMT) Message-ID: <4782.24.203.207.162.1089183556.squirrel@webmail.north-zone.net> In-Reply-To: <40EB9F56.8070204@trio.plala.or.jp> References: <20040706120130.3DF9816A57D@hub.freebsd.org><20040706101140.T92636@bowser.eecs.harvard.edu><40EB9A46.2050409@trio.plala.or.jp><4533.24.203.207.162.1089182494.squirrel@webmail.north-zone.net> <40EB9F56.8070204@trio.plala.or.jp> Date: Wed, 7 Jul 2004 06:59:16 -0000 (GMT) From: Nicolas =?iso-8859-1?Q?B=E9rard_Nault?= To: "Eitarou Kamo" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: nicobn@quebecbsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 06:57:37 -0000 >>Dtrace is (seems, at least) to be a very powerful tool. Eventual coders >>could/should get their inspiration out of the work of Sun engineers. But >>remember, the volunteers of the FreeBSD project aren't paid to do what >>they do. 2 years and 3 full-time engineers were needed to accomplish >>Dtrace so I think seeing a similar utility in the near future for FreeBSD >>is very hopeless. >> > So what? Don't you think this is a candidate for funding from the FreeBSD foundation ? -- Nicolas Bérard Nault (nicobn@quebecbsd.org) http://staff.xeatech.net/nicobn PGP public key: 0x64159509 From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 07:06:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E473716A4CE for ; Wed, 7 Jul 2004 07:06:11 +0000 (GMT) Received: from kozubik.com (kozubik.com [65.248.2.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4BAA43D55 for ; Wed, 7 Jul 2004 07:06:11 +0000 (GMT) (envelope-from john@kozubik.com) Received: from kozubik.com (john@localhost [IPv6:::1]) by kozubik.com (8.12.3/8.12.3) with ESMTP id i6774GBx032175 for ; Wed, 7 Jul 2004 00:04:16 -0700 (PDT) (envelope-from john@kozubik.com) Received: from localhost (john@localhost) by kozubik.com (8.12.3/8.12.3/Submit) with ESMTP id i6774FJY032172 for ; Wed, 7 Jul 2004 00:04:15 -0700 (PDT) Date: Wed, 7 Jul 2004 00:04:14 -0700 (PDT) From: John Kozubik To: freebsd-hackers@freebsd.org Message-ID: <20040706224911.F806-100000@kozubik.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: rapid file creation on snapshotted filesystems panics lockmgr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 07:06:12 -0000 (the below refers exclusively to 5.2.1-RELEASE) Rapid file creation on filesystems with as few as one snapshot on them will panic lockmgr: panic: lockmgr: locking against myself cpuid = 0; syncing disks, buffers remaining... panic: ffs_copyonwrite: recursive call cpuid = 0; uptime: 5m10s Shutting down ACPI (crash) ----- I have repeated this problem on both a laptop and a server, with both IDE and SCSI disks, and with both a GENERIC and a pared down kernel (no additions, simply subtractions). Further, disabling ACPI by adding hint.acpi.0.disabled="1" to the file /boot/loader.conf did not help in any way. All tested systems were single processor Pentium-3 systems. Here is how you can quickly recreate this problem: mksnap_ffs /mnt/mount1 /mnt/mount1/snapshot_1 cd /mnt/mount1 tar cvf /mnt/mount1/devel.tar /usr/ports/devel tar xvf devel.tar You will panic the system and (possibly) receive the above output within seconds. ----- If you do not immediately panic the system, the tar process will be blocked: procs memory page disks r b w avm fre flt re pi po fr sr da0 fd0 0 1 0 37816 29160 3 0 0 0 33 25 0 0 and will be in state "snaplk" : PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 598 root -4 0 1660K 1088K snaplk 1:00 0.00% 0.00% tar It will be impossible to kill the tar process. Further, any additional tar processes will immediately block (the counter will increment to 2 in `vmstat` output). Any attempt to `sync` will also result in a blocked `sync` process in state "snaplk". You will not be able to successfully reboot, as the system will lock when it the shutdown process attempts to sync. ----- To reproduce this error, it is necessary to create small files rapidly, as I did above by tarring and untarring the /usr/ports/devel directory. If you dd several very large files and tar them up, and then untar them in the filesystem that has been snapshotted, this panic will not occur - even though the total amount of data is much larger than what is contained in a tarball of /usr/ports/devel. I have submitted this as PR misc/68757. ----- John Kozubik - john@kozubik.com - http://www.kozubik.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 07:53:57 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4638016A4CE for ; Wed, 7 Jul 2004 07:53:57 +0000 (GMT) Received: from mpb4.plala.or.jp (c156253.vh.plala.or.jp [210.150.156.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id C218743D4C for ; Wed, 7 Jul 2004 07:53:55 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mpb4.plala.or.jp with SMTP id <20040707075354.XXCJ19724.mpb4.plala.or.jp@msvc2.plala.or.jp> for ; Wed, 7 Jul 2004 16:53:54 +0900 Received: ( 18273 invoked from network); 7 Jul 2004 16:53:54 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 7 Jul 2004 16:53:53 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040707075353.XZLG19716.mpb1.plala.or.jp@trio.plala.or.jp> for ; Wed, 7 Jul 2004 16:53:53 +0900 Message-ID: <40EBAD9E.7040904@trio.plala.or.jp> Date: Wed, 07 Jul 2004 17:00:30 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 07:53:57 -0000 Hi Nicolas, Nicolas Be'rard Nault wrote: >>> Dtrace is (seems, at least) to be a very powerful tool. Eventual coders >>> could/should get their inspiration out of the work of Sun engineers. >>> But >>> remember, the volunteers of the FreeBSD project aren't paid to do what >>> they do. 2 years and 3 full-time engineers were needed to accomplish >>> Dtrace so I think seeing a similar utility in the near future for >>> FreeBSD >>> is very hopeless. >>> >>> >> So what? >> > > Don't you think this is a candidate for funding from the FreeBSD > foundation ? > > > Do you think it is worth for that? BTW, don't you know my previous post which was not received to this list but you quoted. -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e$B!>(Bmail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 07:57:56 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62D0416A4CE for ; Wed, 7 Jul 2004 07:57:56 +0000 (GMT) Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com [129.247.16.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id A19C843D46 for ; Wed, 7 Jul 2004 07:57:55 +0000 (GMT) (envelope-from harti@freebsd.org) Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1]) i677vrj38706 for ; Wed, 7 Jul 2004 09:57:53 +0200 Received: from zeus.nt.op.dlr.de (zeus.nt.op.dlr.de [129.247.173.3]) i677vrD131414 for ; Wed, 7 Jul 2004 09:57:53 +0200 Received: from beagle.kn.op.dlr.de (opkndnwsbsd178 [129.247.173.178]) by zeus.nt.op.dlr.de (8.11.7+Sun/8.9.1) with ESMTP id i677vpV24550 for ; Wed, 7 Jul 2004 09:57:52 +0200 (MET DST) Date: Wed, 7 Jul 2004 09:57:52 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt@beagle.kn.op.dlr.de To: hackers@freebsd.org Message-ID: <20040707095457.J3232@beagle.kn.op.dlr.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: make installworld for non-root user X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 07:57:56 -0000 Hi all, is there an easy way for a non-root user to test the installworld target? I came up with make SHAREOWN=harti SHAREGRP=harti LIBOWN=harti LIBGRP=harti \ NOFSCHG=yes INFOMODE=644 INFOOWN=harti INFOGRP=harti MANOWN=harti \ MANGRP=harti BINOWN=harti BINGRP=harti DESTDIR=/t/scratch/harti/root/ \ installworld but that one breaks in libexec/pt_chown (which has a hard-coded BINOWN=root). Perhaps I can't see the obvious solution? harti From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 08:07:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2539F16A4CE; Wed, 7 Jul 2004 08:07:44 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DA9843D41; Wed, 7 Jul 2004 08:07:43 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i6787ZRv041095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Jul 2004 11:07:36 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i6787dc8066386; Wed, 7 Jul 2004 11:07:39 +0300 (EEST) (envelope-from ru) Date: Wed, 7 Jul 2004 11:07:39 +0300 From: Ruslan Ermilov To: Harti Brandt Message-ID: <20040707080739.GB66260@ip.net.ua> References: <20040707095457.J3232@beagle.kn.op.dlr.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y7xTucakfITjPcLV" Content-Disposition: inline In-Reply-To: <20040707095457.J3232@beagle.kn.op.dlr.de> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: hackers@FreeBSD.ORG Subject: Re: make installworld for non-root user X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 08:07:44 -0000 --Y7xTucakfITjPcLV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 07, 2004 at 09:57:52AM +0200, Harti Brandt wrote: >=20 > Hi all, >=20 > is there an easy way for a non-root user to test the installworld target? > I came up with >=20 > make SHAREOWN=3Dharti SHAREGRP=3Dharti LIBOWN=3Dharti LIBGRP=3Dharti \ > NOFSCHG=3Dyes INFOMODE=3D644 INFOOWN=3Dharti INFOGRP=3Dharti MANOWN=3Dhar= ti \ > MANGRP=3Dharti BINOWN=3Dharti BINGRP=3Dharti DESTDIR=3D/t/scratch/harti/r= oot/ \ > installworld >=20 > but that one breaks in libexec/pt_chown (which has a hard-coded=20 > BINOWN=3Droot). >=20 > Perhaps I can't see the obvious solution? >=20 Many bits hardcode owners/groups/modes/flags, but it's still possible to install as non-root. In fact, buildworld already does this for you -- it uses src/tools/install.sh as INSTALL to do it (see the BMAKEENV setting in Makefile.inc1). Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --Y7xTucakfITjPcLV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA669LqRfpzJluFF4RAgSXAJ48yFQORQ2p+YTPqx3g5GAKWHq9kQCcC0/J zAYAUt7dVUM0buk9o8BDp4U= =YAZQ -----END PGP SIGNATURE----- --Y7xTucakfITjPcLV-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 09:17:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F0D316A4CE; Wed, 7 Jul 2004 09:17:03 +0000 (GMT) Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com [129.247.16.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 880A843D41; Wed, 7 Jul 2004 09:17:02 +0000 (GMT) (envelope-from harti@freebsd.org) Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1]) i679H0j410136; Wed, 7 Jul 2004 11:17:01 +0200 Received: from zeus.nt.op.dlr.de (zeus.nt.op.dlr.de [129.247.173.3]) i679H0D245134; Wed, 7 Jul 2004 11:17:00 +0200 Received: from beagle.kn.op.dlr.de (opkndnwsbsd178 [129.247.173.178]) by zeus.nt.op.dlr.de (8.11.7+Sun/8.9.1) with ESMTP id i679GxV25859; Wed, 7 Jul 2004 11:16:59 +0200 (MET DST) Date: Wed, 7 Jul 2004 11:17:00 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt@beagle.kn.op.dlr.de To: Ruslan Ermilov In-Reply-To: <20040707080739.GB66260@ip.net.ua> Message-ID: <20040707110933.I3576@beagle.kn.op.dlr.de> References: <20040707095457.J3232@beagle.kn.op.dlr.de> <20040707080739.GB66260@ip.net.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: make installworld for non-root user X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 09:17:03 -0000 On Wed, 7 Jul 2004, Ruslan Ermilov wrote: RE>On Wed, Jul 07, 2004 at 09:57:52AM +0200, Harti Brandt wrote: RE>> RE>> Hi all, RE>> RE>> is there an easy way for a non-root user to test the installworld target? RE>> I came up with RE>> RE>> make SHAREOWN=harti SHAREGRP=harti LIBOWN=harti LIBGRP=harti \ RE>> NOFSCHG=yes INFOMODE=644 INFOOWN=harti INFOGRP=harti MANOWN=harti \ RE>> MANGRP=harti BINOWN=harti BINGRP=harti DESTDIR=/t/scratch/harti/root/ \ RE>> installworld RE>> RE>> but that one breaks in libexec/pt_chown (which has a hard-coded RE>> BINOWN=root). RE>> RE>> Perhaps I can't see the obvious solution? RE>> RE>Many bits hardcode owners/groups/modes/flags, but it's still RE>possible to install as non-root. In fact, buildworld already RE>does this for you -- it uses src/tools/install.sh as INSTALL RE>to do it (see the BMAKEENV setting in Makefile.inc1). So it seems that: make SHAREOWN=harti SHAREGRP=harti INSTALL="sh `pwd`/release/install.sh" \ DESTDIR="/somewhere" installworld almost works. Almost, because bsd.lib.mk contains SHLINSTALLFLAGS += -fschg That case is not handled in install.sh and should probably read SHLINSTALLFLAGS += -f schg Additionally I had to add -fschg) shift;; to install.sh, because it seems that the installworld target uses the currently installed mk files not those from src/share/mk. The SHAREOWN SHAREGRP is needed because share/zoneinfo/Makefile passes these directly to zic. This could probably be fixed by calling zic during buildworld and just install the compiled files during installworld. Thanks for your help, harti From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 09:58:12 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EBC716A4CE; Wed, 7 Jul 2004 09:58:12 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9ECE343D2D; Wed, 7 Jul 2004 09:58:11 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i679vrxC065319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Jul 2004 12:57:55 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i679vwwc067420; Wed, 7 Jul 2004 12:57:58 +0300 (EEST) (envelope-from ru) Date: Wed, 7 Jul 2004 12:57:57 +0300 From: Ruslan Ermilov To: Harti Brandt Message-ID: <20040707095757.GA67252@ip.net.ua> References: <20040707095457.J3232@beagle.kn.op.dlr.de> <20040707080739.GB66260@ip.net.ua> <20040707110933.I3576@beagle.kn.op.dlr.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20040707110933.I3576@beagle.kn.op.dlr.de> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: hackers@freebsd.org Subject: Re: make installworld for non-root user X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 09:58:12 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 07, 2004 at 11:17:00AM +0200, Harti Brandt wrote: > On Wed, 7 Jul 2004, Ruslan Ermilov wrote: >=20 > RE>On Wed, Jul 07, 2004 at 09:57:52AM +0200, Harti Brandt wrote: > RE>>=20 > RE>> Hi all, > RE>>=20 > RE>> is there an easy way for a non-root user to test the installworld ta= rget? > RE>> I came up with > RE>>=20 > RE>> make SHAREOWN=3Dharti SHAREGRP=3Dharti LIBOWN=3Dharti LIBGRP=3Dharti= \ > RE>> NOFSCHG=3Dyes INFOMODE=3D644 INFOOWN=3Dharti INFOGRP=3Dharti MANOWN= =3Dharti \ > RE>> MANGRP=3Dharti BINOWN=3Dharti BINGRP=3Dharti DESTDIR=3D/t/scratch/ha= rti/root/ \ > RE>> installworld > RE>>=20 > RE>> but that one breaks in libexec/pt_chown (which has a hard-coded=20 > RE>> BINOWN=3Droot). > RE>>=20 > RE>> Perhaps I can't see the obvious solution? > RE>>=20 > RE>Many bits hardcode owners/groups/modes/flags, but it's still > RE>possible to install as non-root. In fact, buildworld already > RE>does this for you -- it uses src/tools/install.sh as INSTALL > RE>to do it (see the BMAKEENV setting in Makefile.inc1). >=20 > So it seems that: >=20 > make SHAREOWN=3Dharti SHAREGRP=3Dharti INSTALL=3D"sh `pwd`/release/instal= l.sh" \ > DESTDIR=3D"/somewhere" installworld >=20 > almost works. Almost, because bsd.lib.mk contains >=20 > SHLINSTALLFLAGS +=3D -fschg >=20 > That case is not handled in install.sh and should probably read >=20 > SHLINSTALLFLAGS +=3D -f schg >=20 Rather I've fixed install.sh (committed): %%% Index: install.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/tools/install.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- install.sh 6 Feb 2004 11:00:13 -0000 1.6 +++ install.sh 7 Jul 2004 09:38:14 -0000 1.7 @@ -33,6 +33,7 @@ case $1 in -[bCcMpSs]) shift;; -[Bfgmo]) shift; shift;; + -[Bfgmo]*) shift;; *) break; esac done %%% > Additionally I had to add >=20 > -fschg) shift;; >=20 > to install.sh, because it seems that the installworld target uses the=20 > currently installed mk files not those from src/share/mk. >=20 Not until you call installworld with "make -fMakefile.inc1 ...". Normally, src/Makefile is used and it calls installworld with -m${.CURDIR}/share/mk. You can verify with ``make -n installworld''. > The SHAREOWN SHAREGRP is needed because share/zoneinfo/Makefile passes=20 > these directly to zic. This could probably be fixed by calling zic > during buildworld and just install the compiled files during installworld. >=20 Yes, I've been thinking of doing this for some years now. I will see if I can fix it easily, now that I have a good reason for it. ;) Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA68klqRfpzJluFF4RAvl9AJ9lw5LJUQlNZ6jUrQuoWowbvD4nAwCfQIUI ODXi4wmNrLwkpDJTfsME8Tw= =Zdeb -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 10:51:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B135C16A4CE; Wed, 7 Jul 2004 10:51:22 +0000 (GMT) Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com [129.247.16.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id C20D443D48; Wed, 7 Jul 2004 10:51:21 +0000 (GMT) (envelope-from harti@freebsd.org) Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1]) i67ApKj249796; Wed, 7 Jul 2004 12:51:20 +0200 Received: from zeus.nt.op.dlr.de (zeus.nt.op.dlr.de [129.247.173.3]) i67ApKD166244; Wed, 7 Jul 2004 12:51:20 +0200 Received: from beagle.kn.op.dlr.de (opkndnwsbsd178 [129.247.173.178]) by zeus.nt.op.dlr.de (8.11.7+Sun/8.9.1) with ESMTP id i67ApIV27360; Wed, 7 Jul 2004 12:51:19 +0200 (MET DST) Date: Wed, 7 Jul 2004 12:51:19 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt@beagle.kn.op.dlr.de To: Ruslan Ermilov In-Reply-To: <20040707095757.GA67252@ip.net.ua> Message-ID: <20040707124856.P3576@beagle.kn.op.dlr.de> References: <20040707095457.J3232@beagle.kn.op.dlr.de> <20040707080739.GB66260@ip.net.ua><20040707095757.GA67252@ip.net.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: make installworld for non-root user X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 10:51:22 -0000 On Wed, 7 Jul 2004, Ruslan Ermilov wrote: RE>On Wed, Jul 07, 2004 at 11:17:00AM +0200, Harti Brandt wrote: RE>> to install.sh, because it seems that the installworld target uses the RE>> currently installed mk files not those from src/share/mk. RE>> RE>Not until you call installworld with "make -fMakefile.inc1 ...". RE>Normally, src/Makefile is used and it calls installworld with RE>-m${.CURDIR}/share/mk. You can verify with ``make -n installworld''. So that was probably just a pilot error from me. RE>> The SHAREOWN SHAREGRP is needed because share/zoneinfo/Makefile passes RE>> these directly to zic. This could probably be fixed by calling zic RE>> during buildworld and just install the compiled files during installworld. RE>> RE>Yes, I've been thinking of doing this for some years now. I will see if RE>I can fix it easily, now that I have a good reason for it. ;) Would be nice.. I'm currently stuck to use panther to test my patches for sparc (my sparcs are still in Berlin) and I want to make sure that I don't break installworld at least. Thanks, harti From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 02:53:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 169E116A4CE for ; Wed, 7 Jul 2004 02:53:26 +0000 (GMT) Received: from smtp1.fuse.net (smtp1.fuse.net [216.68.8.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63F4643D39 for ; Wed, 7 Jul 2004 02:53:25 +0000 (GMT) (envelope-from ghormann@alumni.indiana.edu) Received: from hormann.tzo.cc ([216.68.209.41]) by smtp1.fuse.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20040707025322.KRLJ3746.smtp1.fuse.net@hormann.tzo.cc> for ; Tue, 6 Jul 2004 22:53:22 -0400 Received: from hormann.tzo.cc (localhost [127.0.0.1]) by hormann.tzo.cc (8.12.9/8.12.9) with ESMTP id i672rObZ032412 for ; Tue, 6 Jul 2004 22:53:24 -0400 (EDT) (envelope-from ghormann@alumni.indiana.edu) Received: from localhost (ghormann@localhost) by hormann.tzo.cc (8.12.9/8.12.9/Submit) with ESMTP id i672rO6T032409 for ; Tue, 6 Jul 2004 22:53:24 -0400 (EDT) X-Authentication-Warning: hormann.tzo.cc: ghormann owned process doing -bs Date: Tue, 6 Jul 2004 22:53:23 -0400 (EDT) From: Greg Hormann X-X-Sender: ghormann@hormann.tzo.cc To: hackers@freebsd.org Message-ID: <20040706225135.V32380@hormann.tzo.cc> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Wed, 07 Jul 2004 11:59:55 +0000 Subject: Controlling the Serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 02:53:26 -0000 I'm working to develop a communications program to control a piece of vendor supplied hardware. (They only provide a control program for Windows.) I think I'm close. The device uses a RS-232 -> RS-485 convert which I belive is powered by either the RTS or DTR line of the serial port. How can I force these two lines to say powered in FreeBSD inside a C program thus providing power to the converter? I only need to write to the device. Here is what I have so far. This is my first serial port programming task, so I probably have a few mistakes. Thanks, Greg. if ((device = open("/dev/cuaa0", O_RDWR | O_NOCTTY |O_NDELAY)) == -1) { printf("Error opening port"); exit(1); } tcgetattr(device, &term); /* get current port settings */ cfsetspeed(&term, B19200); term.c_iflag |= IGNPAR; /* ignore incoming parity */ term.c_iflag &= ~(IXON|IXOFF); /* turn OFF Xon/Xoff */ term.c_cflag &= ~CSIZE; /* clear previous character size */ term.c_cflag |= CS8; /* 8 data bits */ term.c_cflag &= ~(CSTOPB|PARENB|CLOCAL); /* 1 stop bit, no output parity, enable modem ctrl */ term.c_cflag |= CRTSCTS|CRTS_IFLOW; /* RTS/CTS ctrl on */ term.c_cc[VMIN]=0; /* no min characters/read */ term.c_cc[VTIME]=0; /* no read timeout */ term.c_lflag &= ~ICANON; /* noncanonical mode */ tcsetattr(device, TCSANOW, &term); From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 13:25:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEFEA16A4E7 for ; Wed, 7 Jul 2004 13:25:23 +0000 (GMT) Received: from ms008msg.fastweb.it (ms008msg.fastweb.it [213.140.2.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1772443D5D for ; Wed, 7 Jul 2004 13:25:23 +0000 (GMT) (envelope-from thefly@acaro.org) Received: from tyler (1.10.185.81) by ms008msg.fastweb.it (7.0.028) id 40D6E1B1001C0C65; Wed, 7 Jul 2004 15:25:21 +0200 Received: by tyler (Postfix, from userid 1000) id E417F1AB494; Wed, 7 Jul 2004 15:29:02 +0200 (CEST) Date: Wed, 7 Jul 2004 15:29:02 +0200 From: thefly To: Brooks Davis Message-ID: <20040707132902.GA7187@tyler> References: <20040706133640.GB5922@tyler> <20040706212254.GA22673@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040706212254.GA22673@Odin.AC.HMC.Edu> X-Editor: VIM - Vi IMproved 6.2 (2003 Jun 1, compiled May 20 2004 09:35:32) X-OS: Debian GNU/Linux 2.6.6 i686 User-Agent: Mutt/1.5.6+20040523i cc: freebsd-hackers@freebsd.org Subject: Re: ZEROCOPY between kernel and userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 13:25:24 -0000 On Tue, Jul 06, 2004 at 02:22:54PM -0700, Brooks Davis wrote: > [Please don't top-post, it tends to lose context.] > > On Tue, Jul 06, 2004 at 03:36:40PM +0200, thefly wrote: > > could you point me pls to some code of that? To me read-only access is > > ok, userspace doesn't need to write anything on it, kernelspace does. > > But what about locking issues between userspace read access and > > kernelspace write access? > > First, be aware that mmap is not necessicairly faster then copyout on > modern CPUs. The cycles required to copy a few K of bytes aren't worth > much of anything on a modern CPU compared to a page-fault. Second, if > you still want to do things this way, take a look at the geom statistics > mechanism. IIRC, it works by using a generation number at the top and > bottom of the stats structure. The user copies the entire struct and > then verified that the copies of the generation number at the top and > bottom of the struct are the same. If so, it uses the copy it got. If > not, it tries again. > > -- Brooks the array dimension is about 1MB, on a p4, i also considered the cost of a pagefaults and context switches... but i still can't give a real value to both the approaches. Anyway i'm planning to implement the mmap, passing it the array at map time, after the read he unmaps it. When he wants the new snapshot he remaps it, and has the new map. In this way at mmap time i can give the process the latest snapshot of my array. I've looked inside kern/subr_devstat.c for the mmap implementation, but still can't understand how it works. the code is: static int devstat_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct statspage *spp; if (nprot != VM_PROT_READ) return (-1); TAILQ_FOREACH(spp, &pagelist, list) { if (offset == 0) { *paddr = vtophys(spp->stat); return (0); } offset -= PAGE_SIZE; } return (-1); } Why does it get from end back for the offset? isn't it an offset from the head? And anyway there's no munmap() implementation... He just gets back the phys addr of the memory area, where's the the reference count of the sh memory? Isn't it reference counted? I guess it's done by the page faults handler... In my case i'm using contigmem(), so i got the va... is it right in my mmap() implementation just to return the va given me by contigmem() or the va + offset (but i'm not planning to mmap at a specific offset). About ng_ippact... is there any doc which says what it does NOT in russian? :) thanks everybody for the answers, and thanks in advance for the next. -- Claudio "thefly" Martella thefly@acaro.org GNU/PG keyid: 0x8EA95625 From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 16:42:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 243EA16A4CE for ; Wed, 7 Jul 2004 16:42:11 +0000 (GMT) Received: from ns1.interbgc.com (mail.interbgc.com [217.9.224.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 1CA2543D48 for ; Wed, 7 Jul 2004 16:42:10 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 67101 invoked from network); 7 Jul 2004 16:42:09 -0000 Received: from nike_d@cytexbg.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.1.60/v4335. spamassassin: 2.63. Clear:SA:0(-4.9/8.0):. Processed in 0.867573 secs); 07 Jul 2004 16:42:09 -0000 X-Spam-Status: No, hits=-4.9 required=8.0 Received: from 213-240-206-214.1697748.ddns.cablebg.net (HELO tormentor.totalterror.net) (213.240.206.214) by mail.interbgc.com with SMTP; 7 Jul 2004 16:42:07 -0000 Received: (qmail 47545 invoked from network); 7 Jul 2004 16:39:25 -0000 Received: from unknown (HELO phobos.totalterror.net) (10.0.0.2) by tormentor.totalterror.net with SMTP; 7 Jul 2004 16:39:25 -0000 References: <20040704204353.26b4496b.liamfoy@sepulcrum.org> <20040704.140429.37607877.imp@bsdimp.com> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Niki Denev To: acpi@freebsd.org, hackers@FreeBSD.ORG Date: Wed, 07 Jul 2004 19:42:35 +0300 Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=_mimegpg-phobos.totalterror.net-586-1089218555-0002"; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: APM Patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 16:42:11 -0000 This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. --=_mimegpg-phobos.totalterror.net-586-1089218555-0002 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit Niki Denev writes: > M. Warner Losh writes: > >> In message: <20040704204353.26b4496b.liamfoy@sepulcrum.org> >> "Liam J. Foy" writes: >> : Hey guys, >> : >> : Since it was decided (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html) >> : we are going to stick with apm -l producing -1 and not 255 which is stated in the handbook would one >> : of you guys please commit: >> : >> : --- /usr/src/usr.sbin/apm/apm.8 Thu Jun 24 17:32:55 2004 >> : +++ /liamfoy/apm.8 Thu Jun 24 17:32:27 2004 >> : @@ -106,7 +106,7 @@ >> : state respectively. >> : .It Fl t >> : Display the estimated remaining battery lifetime in seconds. If >> : -it is unknown, 255 is displayed. >> : +it is unknown, -1 is displayed. >> : .It Fl Z >> : Transition the system into standby mode. This mode uses less power than >> : full power mode, but more than suspend mode. Some laptops support >> : >> : ---- >> : >> : Another patch I would like you guys to review is this. Currently apm -t will output >> : 0 when it cannot find a valid rate or the full battery time(as the comment mentions). >> : I think it should return -1 (unknown) to reflect an error, which is stated in the man page. >> : It should not return 0 since we do not have 0 seconds left, we have an unknown value >> : remaining. Either that or the man page it edited. I believe the following patch should >> : be commited really. >> : >> : The patch is: >> : >> : --- /usr/src/sys/dev/acpica/acpi_cmbat.c Sun Jul 4 20:41:43 2004 >> : +++ /home/liamfoy/acpi_cmbat.c Sun Jul 4 20:39:14 2004 >> : @@ -536,7 +536,7 @@ >> : bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100; >> : } else { >> : /* Couldn't find valid rate and full battery time */ >> : - bat[i]->min = 0; >> : + bat[i]->min = -1; >> : } >> : total_min += bat[i]->min; >> : total_cap += bat[i]->cap; >> >> I don't like this patch, since we use ->min later for math... >> >> Warner > > What about this ? > > --- sys/dev/acpica/acpi_cmbat.c.orig Mon Jul 5 15:15:28 2004 > +++ sys/dev/acpica/acpi_cmbat.c Mon Jul 5 16:37:02 2004 > @@ -655,7 +655,7 @@ > battinfo->state = ACPI_BATT_STAT_NOT_PRESENT; > } else { > battinfo->cap = sc->cap; > - battinfo->min = sc->min; > + battinfo->min = sc->min ? sc->min : -1; > battinfo->state = sc->bst.state; > } > > > > -- > Regards, > Niki So, is this Ok or not? :) I'm running with this for a few days... no probs... But also the only time that this is used probably is in apm(8) ? It seems to not affect the math with ->min, by maybe it is not the cleanest solution to this cosmetic problem? :) -- Cheers, Niki --=_mimegpg-phobos.totalterror.net-586-1089218555-0002 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBA7Cf7HNAJ/fLbfrkRAsg5AKDHW+ce/8rWR51VSoIRg2egUmeh5wCcDJ7a IeY18nH/URxQv//rTmjHLG4= =ZAow -----END PGP SIGNATURE----- --=_mimegpg-phobos.totalterror.net-586-1089218555-0002-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 16:58:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DE7E16A4FA; Wed, 7 Jul 2004 16:58:06 +0000 (GMT) Received: from moutvdomng.kundenserver.de (moutvdom.kundenserver.de [212.227.126.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CC3E43D2D; Wed, 7 Jul 2004 16:58:05 +0000 (GMT) (envelope-from liamfoy@sepulcrum.org) Received: from [212.227.126.224] (helo=mrvdomng.kundenserver.de) by moutvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BiFkB-0006bX-00; Wed, 07 Jul 2004 18:58:03 +0200 Received: from [217.43.131.144] (helo=liamfoy.ath.cx) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BiFkB-0004rb-00; Wed, 07 Jul 2004 18:58:03 +0200 Date: Wed, 7 Jul 2004 17:56:22 +0100 From: "Liam J. Foy" To: Niki Denev Message-Id: <20040707175622.1d5c9e45.liamfoy@sepulcrum.org> In-Reply-To: References: <20040704204353.26b4496b.liamfoy@sepulcrum.org> <20040704.140429.37607877.imp@bsdimp.com> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: acpi@freebsd.org cc: hackers@FreeBSD.ORG Subject: Re: APM Patches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 16:58:06 -0000 On Wed, 07 Jul 2004 19:42:35 +0300 Niki Denev wrote: > Niki Denev writes: > > > M. Warner Losh writes: > > > >> In message: <20040704204353.26b4496b.liamfoy@sepulcrum.org> > >> "Liam J. Foy" writes: > >> : Hey guys, > >> : > >> : Since it was decided (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html) > >> : we are going to stick with apm -l producing -1 and not 255 which is stated in the handbook would one > >> : of you guys please commit: > >> : > >> : --- /usr/src/usr.sbin/apm/apm.8 Thu Jun 24 17:32:55 2004 > >> : +++ /liamfoy/apm.8 Thu Jun 24 17:32:27 2004 > >> : @@ -106,7 +106,7 @@ > >> : state respectively. > >> : .It Fl t > >> : Display the estimated remaining battery lifetime in seconds. If > >> : -it is unknown, 255 is displayed. > >> : +it is unknown, -1 is displayed. > >> : .It Fl Z > >> : Transition the system into standby mode. This mode uses less power than > >> : full power mode, but more than suspend mode. Some laptops support > >> : > >> : ---- > >> : > >> : Another patch I would like you guys to review is this. Currently apm -t will output > >> : 0 when it cannot find a valid rate or the full battery time(as the comment mentions). > >> : I think it should return -1 (unknown) to reflect an error, which is stated in the man page. > >> : It should not return 0 since we do not have 0 seconds left, we have an unknown value > >> : remaining. Either that or the man page it edited. I believe the following patch should > >> : be commited really. > >> : > >> : The patch is: > >> : > >> : --- /usr/src/sys/dev/acpica/acpi_cmbat.c Sun Jul 4 20:41:43 2004 > >> : +++ /home/liamfoy/acpi_cmbat.c Sun Jul 4 20:39:14 2004 > >> : @@ -536,7 +536,7 @@ > >> : bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100; > >> : } else { > >> : /* Couldn't find valid rate and full battery time */ > >> : - bat[i]->min = 0; > >> : + bat[i]->min = -1; > >> : } > >> : total_min += bat[i]->min; > >> : total_cap += bat[i]->cap; > >> > >> I don't like this patch, since we use ->min later for math... > >> > >> Warner > > > > What about this ? > > > > --- sys/dev/acpica/acpi_cmbat.c.orig Mon Jul 5 15:15:28 2004 > > +++ sys/dev/acpica/acpi_cmbat.c Mon Jul 5 16:37:02 2004 > > @@ -655,7 +655,7 @@ > > battinfo->state = ACPI_BATT_STAT_NOT_PRESENT; > > } else { > > battinfo->cap = sc->cap; > > - battinfo->min = sc->min; > > + battinfo->min = sc->min ? sc->min : -1; > > battinfo->state = sc->bst.state; > > } > > > > > > > > -- > > Regards, > > Niki > > > So, is this Ok or not? :) > I'm running with this for a few days... no probs... > But also the only time that this is used probably is in apm(8) ? > It seems to not affect the math with ->min, by maybe it is not the cleanest > solution to this cosmetic problem? I personally like this patch. It does not effect the math and is much better than returning 0 which would indicate to the user he/she has not battery life left. I believe this should be changed. Depends on what the other guys think. > :) > > -- > Cheers, > Niki > > -- -Liam J. Foy http://liamfoy.kerneled.org "Love is like maths -- the idea is simple but can be quite complicated." From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 22:51:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B816A16A4CE for ; Wed, 7 Jul 2004 22:51:31 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1701643D41 for ; Wed, 7 Jul 2004 22:51:31 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) i67MpOaI005982 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 8 Jul 2004 00:51:27 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id i67MofUi010470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Jul 2004 00:50:42 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id i67MofYp025024; Thu, 8 Jul 2004 00:50:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id i67Mof4X025023; Thu, 8 Jul 2004 00:50:41 +0200 (CEST) (envelope-from ticso) Date: Thu, 8 Jul 2004 00:50:40 +0200 From: Bernd Walter To: Greg Hormann Message-ID: <20040707225039.GV12877@cicely12.cicely.de> References: <20040706225135.V32380@hormann.tzo.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040706225135.V32380@hormann.tzo.cc> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.61 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on cicely5.cicely.de cc: hackers@freebsd.org Subject: Re: Controlling the Serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 22:51:31 -0000 On Tue, Jul 06, 2004 at 10:53:23PM -0400, Greg Hormann wrote: > > I'm working to develop a communications program to control a piece of > vendor supplied hardware. (They only provide a control program for > Windows.) I think I'm close. The device uses a RS-232 -> RS-485 convert > which I belive is powered by either the RTS or DTR line of the serial > port. How can I force these two lines to say powered in FreeBSD inside a > C program thus providing power to the converter? I only need to > write to the device. So you are doing half duplex rs485 and need to control the transmitter. Be aware that the code uses variables in a way which is generally a bad idea - I was into uC programming when I did this... static int fd; static int tciotmp; inline void txon() { ioctl(fd, TIOCMGET, &tciotmp); tciotmp &= ~TIOCM_RTS; ioctl(fd, TIOCMSET, &tciotmp); tciotmp |= TIOCM_RTS; } inline void txoff() { tcdrain(fd); // wait until all data is send ioctl(fd, TIOCMSET, &tciotmp); } The problem is timing as we need to have the transmitter disabled bevor the connected device responds to our request. There is no garanty that this is allways fast enough from userland. It can also be a good idea to clear the receive buffer after enabling the transmitter and bevor sending anything to wast stall data. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 00:55:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABD6316A4CE for ; Thu, 8 Jul 2004 00:55:25 +0000 (GMT) Received: from web53407.mail.yahoo.com (web53407.mail.yahoo.com [206.190.37.54]) by mx1.FreeBSD.org (Postfix) with SMTP id 55C4C43D48 for ; Thu, 8 Jul 2004 00:55:25 +0000 (GMT) (envelope-from prady_p@yahoo.com) Message-ID: <20040708005524.19141.qmail@web53407.mail.yahoo.com> Received: from [131.123.36.10] by web53407.mail.yahoo.com via HTTP; Wed, 07 Jul 2004 17:55:24 PDT Date: Wed, 7 Jul 2004 17:55:24 -0700 (PDT) From: pradeep reddy punnam To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: unable to copy data from the kernel to the user space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 00:55:25 -0000 hi hackers, i am new to kernel hacking , i am just trying to play with the networking code. i wrote a system call that will copy the mbuf address from the kernel to user space.. the sys call look like this 355 STD BSD { int sn_rqueue(struct mbuf *m);} and the code in the sn_rqueue syscall look like struct mbuf *x; copyout(x,uap->m;sizeof(x)); and the code in the user program look like struct mbuf *m=NULL; syscall(355,m); and when i tryed to read the ' m ' value it still stays as NULL, may be this question is trivial for u guys..but i was struck at this point... i will be very thankful if somebody can help in this... -prady --------------------------------- Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 01:23:18 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 804CA16A4CE for ; Thu, 8 Jul 2004 01:23:18 +0000 (GMT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A94E43D3F for ; Thu, 8 Jul 2004 01:23:18 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc11) with ESMTP id <2004070801231501100icsthe>; Thu, 8 Jul 2004 01:23:17 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA85425; Wed, 7 Jul 2004 18:23:14 -0700 (PDT) Date: Wed, 7 Jul 2004 18:23:12 -0700 (PDT) From: Julian Elischer To: pradeep reddy punnam In-Reply-To: <20040708005524.19141.qmail@web53407.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: unable to copy data from the kernel to the user space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 01:23:18 -0000 hmmm On Wed, 7 Jul 2004, pradeep reddy punnam wrote: > hi hackers, > > i am new to kernel hacking , i am just trying to play with the networking code. > i wrote a system call that will copy the mbuf address from the kernel to user space.. > the sys call look like this > > 355 STD BSD { int sn_rqueue(struct mbuf *m);} > > and the code in the sn_rqueue syscall look like > struct mbuf *x; > copyout(x,uap->m;sizeof(x)); sizeof(*x) > > and the code in the user program look like > struct mbuf *m=NULL; > syscall(355,m); you are calling the syscall with a NULL pointer.. of course the copyout will fail but you are not looking at teh error result.. I think you want: if you want the address of the mbuf to be sent to user space. (Why on earth?) then you need. 355 STD BSD { int sn_rqueue(struct mbuf **m);} copyout(&x, uap->m, sizeof(x)) struct mbuf *m=NULL; syscall(355,&m); > > and when i tryed to read the ' m ' value it still stays as NULL, > may be this question is trivial for u guys..but i was struck at this point... > i will be very thankful if somebody can help in this... > I'm guessing you want to look at the mbuf directly using /dev/kmem? there has to be a better way :-) > > -prady > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! > _______________________________________________ > 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 Thu Jul 8 03:09:00 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE85D16A4CE; Thu, 8 Jul 2004 03:09:00 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B753D43D31; Thu, 8 Jul 2004 03:08:59 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i6838X7q053174; Thu, 8 Jul 2004 12:38:34 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org, ticso@cicely.de Date: Thu, 8 Jul 2004 12:38:33 +0930 User-Agent: KMail/1.6.2 References: <20040706225135.V32380@hormann.tzo.cc> <20040707225039.GV12877@cicely12.cicely.de> In-Reply-To: <20040707225039.GV12877@cicely12.cicely.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200407081238.33380.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: hackers@freebsd.org cc: Greg Hormann Subject: Re: Controlling the Serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 03:09:01 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 8 Jul 2004 08:20, Bernd Walter wrote: > The problem is timing as we need to have the transmitter disabled > bevor the connected device responds to our request. > There is no garanty that this is allways fast enough from userland. > It can also be a good idea to clear the receive buffer after enabling > the transmitter and bevor sending anything to wast stall data. One way of doing this would be to write a loadable line discipline.. I have been meaning to do this but haven't got around to it yet :) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA7Lqx5ZPcIHs/zowRAuAZAJsGADco8jIA2oYt2txMeXKRlSy68ACgj7il QgWyTk/z8SKHHvALHpfXlhc=3D =3DfJ4U =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 03:09:00 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE85D16A4CE; Thu, 8 Jul 2004 03:09:00 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B753D43D31; Thu, 8 Jul 2004 03:08:59 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i6838X7q053174; Thu, 8 Jul 2004 12:38:34 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org, ticso@cicely.de Date: Thu, 8 Jul 2004 12:38:33 +0930 User-Agent: KMail/1.6.2 References: <20040706225135.V32380@hormann.tzo.cc> <20040707225039.GV12877@cicely12.cicely.de> In-Reply-To: <20040707225039.GV12877@cicely12.cicely.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200407081238.33380.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: hackers@freebsd.org cc: Greg Hormann Subject: Re: Controlling the Serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 03:09:01 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 8 Jul 2004 08:20, Bernd Walter wrote: > The problem is timing as we need to have the transmitter disabled > bevor the connected device responds to our request. > There is no garanty that this is allways fast enough from userland. > It can also be a good idea to clear the receive buffer after enabling > the transmitter and bevor sending anything to wast stall data. One way of doing this would be to write a loadable line discipline.. I have been meaning to do this but haven't got around to it yet :) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA7Lqx5ZPcIHs/zowRAuAZAJsGADco8jIA2oYt2txMeXKRlSy68ACgj7il QgWyTk/z8SKHHvALHpfXlhc=3D =3DfJ4U =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 03:48:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 041FB16A4CE for ; Thu, 8 Jul 2004 03:48:50 +0000 (GMT) Received: from VARK.homeunix.com (adsl-69-107-108-110.dsl.pltn13.pacbell.net [69.107.108.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id C405C43D31 for ; Thu, 8 Jul 2004 03:48:49 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i683mj0I059880; Wed, 7 Jul 2004 20:48:45 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i683mjSJ059879; Wed, 7 Jul 2004 20:48:45 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 7 Jul 2004 20:48:45 -0700 From: David Schultz To: Eitarou Kamo Message-ID: <20040708034845.GA59801@VARK.homeunix.com> Mail-Followup-To: Eitarou Kamo , Daniel Ellard , freebsd-hackers@FreeBSD.ORG References: <20040706120130.3DF9816A57D@hub.freebsd.org> <20040706101140.T92636@bowser.eecs.harvard.edu> <40EB9A46.2050409@trio.plala.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40EB9A46.2050409@trio.plala.or.jp> cc: freebsd-hackers@FreeBSD.ORG cc: Daniel Ellard Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 03:48:50 -0000 On Wed, Jul 07, 2004, Eitarou Kamo wrote: > FreeBSD has good features such as jail, chroot e.t.c. which can controll Solaris 10 has these features, too, but I'm not sure what that has to do with DTrace. > process or resources in parallel. So you need not port DTrace entirely. > You can implement DTrace like one from scratch. Using legacy system > sometimes makes new system feature. I would rather expect new one than > porting. DTrace is one of example, I think. You may be able to fork new > debug > process in parallel in the future. If I dare name it, It's "B(SD)Trace"? > But it's up to > your effort. DTrace is a pioneer work. And for the people like me who > bothers > to put the debug lines in kernel this must be powerful tool. The page referenced earlier in this thread pointed out that 6 staff-years went into DTrace. That's accurate, and we're not talking about part-time employees or people who don't know what they're doing. The D compiler aside, this is not a small matter of programming that can just be ported to a new OS or machine architecture in a few months. That said, there is prior work in this area, such as: http://oss.software.ibm.com/developer/opensource/linux/projects/dprobes/ But these other efforts don't come close to DTrace. From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 04:20:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 307E216A4CE for ; Thu, 8 Jul 2004 04:20:26 +0000 (GMT) Received: from mps9.plala.or.jp (c152002.vh.plala.or.jp [210.150.152.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D9E543D39 for ; Thu, 8 Jul 2004 04:20:25 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc1.plala.or.jp ([172.23.8.209]) by mps9.plala.or.jp with SMTP id <20040708042018.UFFM14773.mps9.plala.or.jp@msvc1.plala.or.jp> for ; Thu, 8 Jul 2004 13:20:18 +0900 Received: ( 19729 invoked from network); 8 Jul 2004 13:20:17 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc1 with SMTP; 8 Jul 2004 13:20:16 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040708042016.YXVW19716.mpb1.plala.or.jp@trio.plala.or.jp>; Thu, 8 Jul 2004 13:20:16 +0900 Message-ID: <40ECCD0D.7030703@trio.plala.or.jp> Date: Thu, 08 Jul 2004 13:26:53 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: David Schultz , freebsd-hackers@FreeBSD.ORG References: <20040706120130.3DF9816A57D@hub.freebsd.org> <20040706101140.T92636@bowser.eecs.harvard.edu> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> In-Reply-To: <20040708034845.GA59801@VARK.homeunix.com> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 04:20:26 -0000 Hi David, David Schultz wrote: >On Wed, Jul 07, 2004, Eitarou Kamo wrote: > > >>FreeBSD has good features such as jail, chroot e.t.c. which can controll >> >> > >Solaris 10 has these features, too, but I'm not sure what that has >to do with DTrace. > > If You use the feature with DTrace like tool, You can operate it in parallel. This is just a idea. I know Sol10 has chroot or zfs which behave like jail. What I'd like to say is that you need not insist on just DTrace you can develop original one. > > > >The page referenced earlier in this thread pointed out that 6 >staff-years went into DTrace. That's accurate, and we're not >talking about part-time employees or people who don't know what >they're doing. The D compiler aside, this is not a small matter >of programming that can just be ported to a new OS or machine >architecture in a few months. > > I think so. If you develop the DTrace like tool, you need the resources at least equivalent with DTrace team, I guess. If you do, your develop team will make any action to get a resources. >That said, there is prior work in this area, such as: >http://oss.software.ibm.com/developer/opensource/linux/projects/dprobes/ >But these other efforts don't come close to DTrace. > > > -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 04:44:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E610516A4CE for ; Thu, 8 Jul 2004 04:44:46 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F9AD43D45 for ; Thu, 8 Jul 2004 04:44:46 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i684ijw9044976; Wed, 7 Jul 2004 23:44:45 -0500 (CDT) (envelope-from dan) Date: Wed, 7 Jul 2004 23:44:45 -0500 From: Dan Nelson To: Eitarou Kamo , Daniel Ellard , freebsd-hackers@FreeBSD.ORG Message-ID: <20040708044444.GE57155@dan.emsphone.com> References: <20040706120130.3DF9816A57D@hub.freebsd.org> <20040706101140.T92636@bowser.eecs.harvard.edu> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040708034845.GA59801@VARK.homeunix.com> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 04:44:47 -0000 In the last episode (Jul 07), David Schultz said: > The page referenced earlier in this thread pointed out that 6 > staff-years went into DTrace. That's accurate, and we're not talking > about part-time employees or people who don't know what they're > doing. The D compiler aside, this is not a small matter of > programming that can just be ported to a new OS or machine > architecture in a few months. Pawel Jakub Dawidek has already written a C-like language for his Cerber project that looks like it could be used for a FreeBSD DTrace. It doesn't support associative arrays for stat collecting like D does, but it's got just about everything else. If you just wanted to track syscalls, you could almost use Cerber as-is. http://cerber.sourceforge.net/ -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 05:20:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C3DE16A4CE for ; Thu, 8 Jul 2004 05:20:14 +0000 (GMT) Received: from mps5.plala.or.jp (c148240.vh.plala.or.jp [210.150.148.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2315C43D5E for ; Thu, 8 Jul 2004 05:20:13 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc1.plala.or.jp ([172.23.8.209]) by mps5.plala.or.jp with SMTP id <20040708052012.TGYG2494.mps5.plala.or.jp@msvc1.plala.or.jp> for ; Thu, 8 Jul 2004 14:20:12 +0900 Received: ( 7019 invoked from network); 8 Jul 2004 14:20:11 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc1 with SMTP; 8 Jul 2004 14:20:10 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040708052010.YYYJ19716.mpb1.plala.or.jp@trio.plala.or.jp>; Thu, 8 Jul 2004 14:20:10 +0900 Message-ID: <40ECDB1A.6010604@trio.plala.or.jp> Date: Thu, 08 Jul 2004 14:26:50 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: Dan Nelson , freebsd-hackers@FreeBSD.ORG References: <20040706120130.3DF9816A57D@hub.freebsd.org> <20040706101140.T92636@bowser.eecs.harvard.edu> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> <20040708044444.GE57155@dan.emsphone.com> In-Reply-To: <20040708044444.GE57155@dan.emsphone.com> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 05:20:14 -0000 Hi Dan N, Dan Nelson wrote: >In the last episode (Jul 07), David Schultz said: > > > >Pawel Jakub Dawidek has already written a C-like language for his >Cerber project that looks like it could be used for a FreeBSD DTrace. >It doesn't support associative arrays for stat collecting like D does, >but it's got just about everything else. If you just wanted to track >syscalls, you could almost use Cerber as-is. > >http://cerber.sourceforge.net/ > > > Indeed, he have already made a action. Eitarou -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 07:46:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5D2616A4CE; Thu, 8 Jul 2004 07:46:35 +0000 (GMT) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FA9743D2D; Thu, 8 Jul 2004 07:46:35 +0000 (GMT) (envelope-from ellard@eecs.harvard.edu) Received: from localhost (localhost.eecs.harvard.edu [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id E65F754C6A0; Thu, 8 Jul 2004 03:46:24 -0400 (EDT) Received: from mail.eecs.harvard.edu ([127.0.0.1]) by localhost (bowser.eecs.harvard.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 79196-04; Thu, 8 Jul 2004 03:46:24 -0400 (EDT) Received: by mail.eecs.harvard.edu (Postfix, from userid 465) id BCC7254C692; Thu, 8 Jul 2004 03:46:24 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id BA5F454C690; Thu, 8 Jul 2004 03:46:24 -0400 (EDT) Date: Thu, 8 Jul 2004 03:46:24 -0400 (EDT) From: Daniel Ellard To: David Schultz In-Reply-To: <20040708034845.GA59801@VARK.homeunix.com> Message-ID: <20040708033741.E28518@bowser.eecs.harvard.edu> References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at eecs.harvard.edu cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 07:46:35 -0000 On Wed, 7 Jul 2004, David Schultz wrote: > The page referenced earlier in this thread pointed out that 6 > staff-years went into DTrace. That's accurate, and we're not > talking about part-time employees or people who don't know what > they're doing. The D compiler aside, this is not a small matter > of programming that can just be ported to a new OS or machine > architecture in a few months. I don't doubt that DTrace took a long time to do. However, in most projects the design phase consumes a lot of time, and it is often the case that unforeseen problems or changes in the feature set cost the developers a lot of time. So while it might have taken six years to write DTrace the first time, I suspect it would take a fraction of that time to re-implement. (It certainly might be longer than "a few months" and I'm not going to quibble. We won't know the precise number until someone does the port.) -Dan From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 09:13:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD09416A4CE for ; Thu, 8 Jul 2004 09:13:15 +0000 (GMT) Received: from ppsw-5.csi.cam.ac.uk (ppsw-5.csi.cam.ac.uk [131.111.8.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3212743D39 for ; Thu, 8 Jul 2004 09:13:15 +0000 (GMT) (envelope-from sos22@cantab.net) Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:46551 helo=archibold.chu.cam.ac.uk) by ppsw-5.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.155]:25) with smtp (Exim 4.34) id 1BiUxn-0007Sk-LC; Thu, 08 Jul 2004 10:13:09 +0100 Received: by archibold.chu.cam.ac.uk (sSMTP sendmail emulation); Thu, _d Jul 2004 10:14:17 +0100 Date: Thu, 8 Jul 2004 10:14:17 +0100 From: Steven Smith To: freebsd-hackers@freebsd.org Message-ID: <20040708091417.GA967@archibold.chu.cam.ac.uk> References: <20040706120130.3DF9816A57D@hub.freebsd.org> <20040706101140.T92636@bowser.eecs.harvard.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: <20040706101140.T92636@bowser.eecs.harvard.edu> X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned cc: sos22@srcf.ucam.org Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 09:13:15 -0000 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > - It has no impact on the system when it is not used. So you can > leave it in all the time, instead of having a debug kernel and > a production kernel. >=20 > [I don't know how they achieve the "no impact" but they claim > that they really mean "no", not just "negligible".] The primary mechanism seems to be modifying the kernel at run time to insert calls to the probe functions only where necessary. You have some magic provider code which crawls over the symbol table looking for functions, and then changes the prolog from push %ebp mov %esp, %ebp =2E.. or whatever into call probe_function =2E.. with probe_function then emulating the first few instructions of the annotated function before returning, to make up for having clobbered them when installing the probe. They give up on functions that don't have a frame pointer; one of the papers claimed this was less than 5% in the Solaris kernel on x86. Obviously, when the probe isn't active, you just have the normal function prolog, so the cost per-probe is zero. You still use up memory and other resources keeping all of the infrastructure loaded, though, so it isn't quite true to say that the cost is zero. It's also possible to put probes on the return instruction of the function. I'm not sure how they're actually finding that, though. There's also some dynamic linker jiggery pokery to allow kernel developers to put in explicit, static calls to probe functions in interesting places, and then have those changed into nops when the probe is not in use. These probes do have some per-probe cost, but it's very small. One of the really cool properties of the implemented system is that probes can be inserted almost anywhere, including in interrupt handlers or the middle of the scheduler. Arranging this was probably quite a large part of the design work. :) > It looks very nice. I wish I'd had it during my forays into the > FreeBSD kernel. Is it hopelessly solaris-specific? I don't know anything about the implementation, but none of the publically-documented bits that I've seen would be unimplementable under FreeBSD. It'd just be time consuming. Steven. --=20 One day, I'm going to get an Alice-bot to answer all my email for me, and see how long it takes people to notice. --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA7RBpO4S8/gLNrjcRAr6NAKCl8v8QIS9A+orx9uXqqrEULj3njwCeM6VT hTuKm2W39SxL+SWsWRmgMu0= =rhYM -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 09:20:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FFA716A4CF for ; Thu, 8 Jul 2004 09:20:29 +0000 (GMT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E75F43D53 for ; Thu, 8 Jul 2004 09:20:29 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc12) with ESMTP id <2004070809202801400jbo28e>; Thu, 8 Jul 2004 09:20:28 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id CAA90497; Thu, 8 Jul 2004 02:20:26 -0700 (PDT) Date: Thu, 8 Jul 2004 02:20:25 -0700 (PDT) From: Julian Elischer To: Steven Smith In-Reply-To: <20040708091417.GA967@archibold.chu.cam.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: sos22@srcf.ucam.org Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 09:20:29 -0000 On Thu, 8 Jul 2004, Steven Smith wrote: > It's also possible to put probes on the return instruction of the > function. I'm not sure how they're actually finding that, though. I think the return probe is done by adding a call probe that changes the return address. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 7 20:30:02 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B557A16A4CF for ; Wed, 7 Jul 2004 20:30:02 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5705C43D2F for ; Wed, 7 Jul 2004 20:30:02 +0000 (GMT) (envelope-from werner@bit-1.de) Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BiJ3J-0006gr-00 for freebsd-hackers@freebsd.org; Wed, 07 Jul 2004 22:30:01 +0200 Received: from [80.138.205.202] (helo=bit-1.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1BiJ3I-00070a-00 for freebsd-hackers@freebsd.org; Wed, 07 Jul 2004 22:30:00 +0200 Message-ID: <40EC5D41.6060605@bit-1.de> Date: Wed, 07 Jul 2004 22:29:53 +0200 From: Werner Backes User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:d67b46096368d51cdaf9286bf8ee49f5 X-Mailman-Approved-At: Thu, 08 Jul 2004 11:45:25 +0000 Subject: what's wrong with uhid ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 20:30:02 -0000 I tried to access an UHID device using FreeBSD (4.10) and I'm a bit confused. I did the same thing before with NetBSD and expected the device to behave the same under FreeBSD, because the man pages are pretty much the same. Two things I've noticed: - There is an man page for uhidev(4). uhidev claims to dispatch various report id's of a device to different uhid-devices, so if a single physical device has 4 report IDs you should end up with /dev/uhid0 .. /dev/uhid3. Both FreeBSD and NetBSD have this uhidev man pages, but FreeBSD doesn't semm to have the device. - I got only one uhid-device per physical device (or per interface, to be more correct). I don't know how to access the different report IDs if I only have one device. I have the feeling that FreeBSD has changed the behaviour of uhid when it took the code from NetBSD but didn't ajust teh man pages to reflect this changes. Or do I miss something obvious here ? TIA for some advice about this, Werner From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 09:05:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEDB716A4CF for ; Thu, 8 Jul 2004 09:05:59 +0000 (GMT) Received: from foxgw.melen.org (foxgw.dna.fi [62.236.152.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE86843D48 for ; Thu, 8 Jul 2004 09:05:57 +0000 (GMT) (envelope-from Jan.Melen@iki.fi) Received: from n51.nomadiclab.com (n51.nomadiclab.com [131.160.193.51]) (authenticated bits=0) by foxgw.melen.org (8.12.11/8.12.11) with ESMTP id i6896VP2039959 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 8 Jul 2004 12:06:32 +0300 (EEST) (envelope-from Jan.Melen@iki.fi) From: Jan Mikael Melen To: freebsd-hackers@freebsd.org Date: Thu, 8 Jul 2004 12:05:52 +0300 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200407081205.52677.Jan.Melen@iki.fi> X-Virus-Scanned: clamd / ClamAV version 0.72, clamav-milter version 0.72 on foxgw.melen.org X-Virus-Status: Clean X-Mailman-Approved-At: Thu, 08 Jul 2004 11:45:25 +0000 Subject: getaddrinfo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 09:05:59 -0000 Hi, I'm having problems with getaddrinfo call. When resolving multiple IPv6 addresses that are specified in /etc/hosts, the response from getaddrinfo call contains only the first address not the whole list. If I'll configure the corresponding addresses in to DNS I'll get all the addresses as a response. Here is an example: Resolving from /etc/hosts /etc/hosts: 1ffe::10 oneffeten 1ffe:1000:0001:10 oneffeten 1ffe:1000:0002:10 oneffeten # ./test_libc -h oneffeten -6 -a Searching for oneffeten... (using getaddrinfo) 1ffe::10 done # Resolving from DNS: DNS records: oneffeten IN AAAA 1ffe:1000:1::10 IN AAAA 1ffe:1000:2::10 IN AAAA 1ffe::10 # ./test_libc -h oneffeten.domain.com -6 -a Searching for oneffeten.domain.com... (using getaddrinfo) 1ffe:1000:1::10 1ffe:1000:2::10 1ffe::10 done # Does anyone have any good pointers what am I doing wrong or what might be causing that getaddrinfo doesn't return all known addresses of the host? Is there some limitation that host can have only one address in /etc/hosts? regards, Jan From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:18:05 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0523F16A4CE for ; Thu, 8 Jul 2004 13:18:05 +0000 (GMT) Received: from casper.imasy.or.jp (casper.imasy.or.jp [210.161.150.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C47943D6A for ; Thu, 8 Jul 2004 13:18:03 +0000 (GMT) (envelope-from ume@FreeBSD.org) Received: from cheer.mahoroba.org (IDENT:oKIpMqp+zV8ro01KRMpxSfmHZKAjfK+kUppJL+srcnVLx8Yn7Rhoi5hD5cacJb/a@cheer.mahoroba.org [IPv6:2001:200:301:0:240:c7ff:fe97:6f89]) (user=ume mech=DIGEST-MD5 bits=128)i68DHpYJ034024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Jul 2004 22:17:53 +0900 (JST) (envelope-from ume@FreeBSD.org) Received: from lyrics.mahoroba.org (IDENT:w8egO7G8KH9Ziu17JoynKy4whp/4wTyWDzweoZCx1q84JrgSHIVHZLPEJWSAoVK2@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841]) (user=ume mech=CRAM-MD5 bits=0)i68DHjjr062974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Jul 2004 22:17:45 +0900 (JST) (envelope-from ume@FreeBSD.org) Date: Thu, 08 Jul 2004 22:17:45 +0900 Message-ID: From: Hajimu UMEMOTO To: Jan Mikael Melen In-Reply-To: <200407081205.52677.Jan.Melen@iki.fi> References: <200407081205.52677.Jan.Melen@iki.fi> User-Agent: xcite1.38> Wanderlust/2.11.3 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.2-CURRENT MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.5.3 (casper.imasy.or.jp [IPv6:2001:200:300:1:220:edff:fe88:788c]); Thu, 08 Jul 2004 22:17:54 +0900 (JST) X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.5.3 (cheer.mahoroba.org [IPv6:3ffe:501:185b:8010:240:c7ff:fe97:6f89]); Thu, 08 Jul 2004 22:17:45 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on cheer.mahoroba.org cc: freebsd-hackers@freebsd.org Subject: Re: getaddrinfo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:18:05 -0000 Hi, >>>>> On Thu, 8 Jul 2004 12:05:52 +0300 >>>>> Jan Mikael Melen said: Jan.Melen> /etc/hosts: Jan.Melen> 1ffe::10 oneffeten Jan.Melen> 1ffe:1000:0001:10 oneffeten Jan.Melen> 1ffe:1000:0002:10 oneffeten It should be: 1ffe::10 oneffeten 1ffe:1000:0001::10 oneffeten 1ffe:1000:0002::10 oneffeten Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:30:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C4C216A4D5; Thu, 8 Jul 2004 13:30:24 +0000 (GMT) Received: from areandor.numenor.net (areandor.numenor.net [69.55.237.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98ED943D62; Thu, 8 Jul 2004 13:30:12 +0000 (GMT) (envelope-from lists-freebsd@silverwraith.com) Received: from [69.55.228.10] (helo=keylime.silverwraith.com) by areandor.numenor.net with esmtp (TLSv1:RC4-SHA:128) (Exim 3.36 #1) id 1BiYyZ-000KAF-00; Thu, 08 Jul 2004 06:30:11 -0700 Received: from keylime ([69.55.228.10] helo=keylime.silverwraith.com) by keylime.silverwraith.com with esmtp (Exim 4.34; FreeBSD) id 1BiUBM-00033O-Qz; Thu, 08 Jul 2004 01:23:05 -0700 Received: (from avleen@localhost)i688N469011741; Thu, 8 Jul 2004 01:23:04 -0700 (PDT) (envelope-from lists-freebsd@silverwraith.com) X-Authentication-Warning: keylime.silverwraith.com: avleen set sender to lists-freebsd@silverwraith.com using -f Date: Thu, 8 Jul 2004 01:23:04 -0700 From: Avleen Vig To: Daniel Ellard Message-ID: <20040708082304.GE5238@silverwraith.com> References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> <20040708033741.E28518@bowser.eecs.harvard.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040708033741.E28518@bowser.eecs.harvard.edu> User-Agent: Mutt/1.5.6i X-Spam-Score: -100.0 (---------------------------------------------------) X-Spam-Report: Spam detection software, running on the system "keylime.silverwraith.com", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.Ellardin most > projects the design phase consumes a lot of time, and it isset cost the > developers a lot of time. So while it might have taken six years to > write DTrace the first time, I suspect it would take a longer than "a few > months" and I'm not going to quibble. We won't know the precise > number until someone does the port.) [...] Content analysis details: (-100.0 points, 5.0 required) pts rule name description -------------------------------------------------- -100 USER_IN_WHITELIST From: address is in the user's white-list cc: freebsd-hackers@FreeBSD.ORG cc: David Schultz Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:30:24 -0000 On Thu, Jul 08, 2004 at 03:46:24AM -0400, Daniel Ellard wrote: > I don't doubt that DTrace took a long time to do. However, in most > projects the design phase consumes a lot of time, and it is often the > case that unforeseen problems or changes in the feature set cost the > developers a lot of time. So while it might have taken six years to > write DTrace the first time, I suspect it would take a fraction of > that time to re-implement. (It certainly might be longer than "a few > months" and I'm not going to quibble. We won't know the precise > number until someone does the port.) They said "6 staff-years". This means if they have 6 people working on it full time, it took 1 year to complete. If they had 60 people full time, it took just over 5 weeks (technically, i doubt that would work practically). >From speaking to a friend at sun, I do know it took a long time and a lot of effort, and was *not* a simple thing to implement. From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:30:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21B1116A4CE for ; Thu, 8 Jul 2004 13:30:24 +0000 (GMT) Received: from areandor.numenor.net (areandor.numenor.net [69.55.237.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id C657243D45 for ; Thu, 8 Jul 2004 13:30:12 +0000 (GMT) (envelope-from lists-freebsd@silverwraith.com) Received: from [69.55.228.10] (helo=keylime.silverwraith.com) by areandor.numenor.net with esmtp (TLSv1:RC4-SHA:128) (Exim 3.36 #1) id 1BiYya-000KAH-00 for freebsd-hackers@freebsd.org; Thu, 08 Jul 2004 06:30:12 -0700 Received: from keylime ([69.55.228.10] helo=keylime.silverwraith.com) by keylime.silverwraith.com with esmtp (Exim 4.34; FreeBSD) id 1BiU5x-000IYS-Ji for freebsd-hackers@freebsd.org; Thu, 08 Jul 2004 01:17:30 -0700 Received: (from avleen@localhost) by keylime.silverwraith.com (8.12.11/8.12.11/Submit) id i688HQwh071323 for freebsd-hackers@freebsd.org; Thu, 8 Jul 2004 01:17:26 -0700 (PDT) (envelope-from lists-freebsd@silverwraith.com) X-Authentication-Warning: keylime.silverwraith.com: avleen set sender to lists-freebsd@silverwraith.com using -f Date: Thu, 8 Jul 2004 01:17:26 -0700 From: Avleen Vig To: freebsd-hackers@freebsd.org Message-ID: <20040708081726.GD5238@silverwraith.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-Spam-Score: -100.0 (---------------------------------------------------) X-Spam-Report: Spam detection software, running on the system "keylime.silverwraith.com", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details. Content preview: I have a DVD drive which is recognised by FreeBSD: DMA, and Windows sets it to use UDMA mode 5 (I think), but BSD does not. I driver? I had a look in ata-dma.c but that file seems to be for controllers rather than devices. [...] Content analysis details: (-100.0 points, 5.0 required) pts rule name description -------------------------------------------------- -100 USER_IN_WHITELIST From: address is in the user's white-list Subject: Adding DMA support for a device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:30:24 -0000 I have a DVD drive which is recognised by FreeBSD: acd0: DVD-R at ata1-slave PIO4 The drive supports DMA, and Windows sets it to use UDMA mode 5 (I think), but BSD does not. I am assume because the device is not listed as supported correct driver? I had a look in ata-dma.c but that file seems to be for controllers rather than devices. Can anyone point me in the right direction for this? -- Avleen Vig Systems Administrator Personal: www.silverwraith.com EFnet: irc.mindspring.com (Earthlink user access only) From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:31:37 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35EA116A4CE for ; Thu, 8 Jul 2004 13:31:37 +0000 (GMT) Received: from areandor.numenor.net (areandor.numenor.net [69.55.237.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id E305943D68 for ; Thu, 8 Jul 2004 13:31:36 +0000 (GMT) (envelope-from lists-freebsd@silverwraith.com) Received: from [69.55.228.10] (helo=keylime.silverwraith.com) by areandor.numenor.net with esmtp (TLSv1:RC4-SHA:128) (Exim 3.36 #1) id 1BiYzo-000KCg-00 for freebsd-hackers@freebsd.org; Thu, 08 Jul 2004 06:31:28 -0700 Received: from keylime ([69.55.228.10] helo=keylime.silverwraith.com) by keylime.silverwraith.com with esmtp (Exim 4.34; FreeBSD) id 1BhBbb-0000FK-Bj; Sun, 04 Jul 2004 11:20:47 -0700 Received: (from avleen@localhost)i64IKlFf000948; Sun, 4 Jul 2004 11:20:47 -0700 (PDT) (envelope-from lists-freebsd@silverwraith.com) X-Authentication-Warning: keylime.silverwraith.com: avleen set sender to lists-freebsd@silverwraith.com using -f Date: Sun, 4 Jul 2004 11:20:47 -0700 From: Avleen Vig To: idownes@slingshot.co.nz Message-ID: <20040704182047.GD72520@silverwraith.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Spam-Score: -100.0 (---------------------------------------------------) X-Spam-Report: Spam detection software, running on the system "keylime.silverwraith.com", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jul 04, 2004 at 12:53:39PM +0000, idownes@slingshot.co.nz wrote: > So what I guess what I am asking is Java and have been using FreeBSD for a > couple of years but have never written a device driver (for any OS)) Do I > actually need to write a driver or can I use something already existing? > Where would I get information on how to do this? So far I've been looking > at the existing drivers; ugen, ufm etc., the programmers handbook and am > starting to look at libusb...? > Sorry for the long message. Any pointers etc. would be greatly > appreciated. [...] Content analysis details: (-100.0 points, 5.0 required) pts rule name description -------------------------------------------------- -100 USER_IN_WHITELIST From: address is in the user's white-list cc: freebsd-hackers@freebsd.org Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:31:37 -0000 On Sun, Jul 04, 2004 at 12:53:39PM +0000, idownes@slingshot.co.nz wrote: > So what I guess what I am asking is how hard would this be? (I have a > reasonable knowledge of C and Java and have been using FreeBSD for a > couple of years but have never written a device driver (for any OS)) Do I > actually need to write a driver or can I use something already existing? > Where would I get information on how to do this? So far I've been looking > at the existing drivers; ugen, ufm etc., the programmers handbook and am > starting to look at libusb...? > Sorry for the long message. Any pointers etc. would be greatly > appreciated. I am actually in a similar situation. I know some C, and want to write a device driver for a USB device (web cam), but I have no idea where to start. I've searched for a "beginners guide to writing device drivers" but failed miserably :-( -- Avleen Vig Systems Administrator Personal: www.silverwraith.com EFnet: irc.mindspring.com (Earthlink user access only) From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:40:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D33016A4D0 for ; Thu, 8 Jul 2004 13:40:45 +0000 (GMT) Received: from mps6.plala.or.jp (c149240.vh.plala.or.jp [210.150.149.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1EFB43D5F for ; Thu, 8 Jul 2004 13:40:43 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mps6.plala.or.jp with SMTP id <20040708134042.XQKC9776.mps6.plala.or.jp@msvc2.plala.or.jp> for ; Thu, 8 Jul 2004 22:40:42 +0900 Received: ( 25509 invoked from network); 8 Jul 2004 22:40:42 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 8 Jul 2004 22:40:41 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040708134041.ZKTV19716.mpb1.plala.or.jp@trio.plala.or.jp>; Thu, 8 Jul 2004 22:40:41 +0900 Message-ID: <40ED5066.4050704@trio.plala.or.jp> Date: Thu, 08 Jul 2004 22:47:18 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: Julian Elischer , freebsd-hackers@freebsd.org References: In-Reply-To: X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:40:45 -0000 Hi Julian, Julian Elischer wrote: >On Thu, 8 Jul 2004, Steven Smith wrote: > > > >>It's also possible to put probes on the return instruction of the >>function. I'm not sure how they're actually finding that, though. >> >> > >I think the return probe is done by adding a call probe that changes the >return address. > > > The pointer to function seems to be the key word. "return_p" is the pointer to function. In case of normal mode return _p points the dummy address or Null pointer. In case of DTrace mode return_p points the address of probe. This may be magic of the DTrace. What all the DTrace do are to know the address of probe. If DTrace get the pointer of probes "return_p"s via structure or else, lang D would get the return value of the probe from memory. -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:41:05 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60C3F16A4CE for ; Thu, 8 Jul 2004 13:41:05 +0000 (GMT) Received: from as6-1-5.kr.m.bonet.se (as6-1-5.kr.m.bonet.se [217.215.84.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F92E43D62 for ; Thu, 8 Jul 2004 13:41:04 +0000 (GMT) (envelope-from martin@gneto.com) Received: from [192.168.10.11] (euklides.gneto.com [192.168.10.11]) by as6-1-5.kr.m.bonet.se (Postfix) with ESMTP id C7A82743D7; Thu, 8 Jul 2004 15:37:32 +0200 (CEST) Message-ID: <40ED4EC5.8010003@gneto.com> Date: Thu, 08 Jul 2004 15:40:21 +0200 From: Martin Nilsson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Avleen Vig References: <20040708081726.GD5238@silverwraith.com> In-Reply-To: <20040708081726.GD5238@silverwraith.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Adding DMA support for a device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:41:05 -0000 Avleen Vig wrote: > The drive supports DMA, and Windows sets it to use UDMA mode 5 (I > think), but BSD does not. > > Can anyone point me in the right direction for this? > have you tried man ata ? The following tunables are settable from the loader: hw.ata.atapi_dma set to 1 for DMA access, 0 for PIO (default is PIO). /Martin From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:41:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7488616A4CE for ; Thu, 8 Jul 2004 13:41:47 +0000 (GMT) Received: from britannica.bec.de (wlan032106.uni-rostock.de [139.30.32.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id C39FC43D5D for ; Thu, 8 Jul 2004 13:41:45 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (localhost [127.0.0.1]) by britannica.bec.de (8.12.10/8.12.10) with ESMTP id i68Dfacb001087 for ; Thu, 8 Jul 2004 15:41:36 +0200 (CEST) (envelope-from joerg@britannica.bec.de) Received: (from joerg@localhost) by britannica.bec.de (8.12.10/8.12.10/Submit) id i68DfajV001086 for freebsd-hackers@freebsd.org; Thu, 8 Jul 2004 15:41:36 +0200 (CEST) Date: Thu, 8 Jul 2004 15:41:35 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20040708134135.GA1054@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040708081726.GD5238@silverwraith.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040708081726.GD5238@silverwraith.com> User-Agent: Mutt/1.4.1i Subject: Re: Adding DMA support for a device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:41:47 -0000 On Thu, Jul 08, 2004 at 01:17:26AM -0700, Avleen Vig wrote: > I have a DVD drive which is recognised by FreeBSD: > acd0: DVD-R at ata1-slave PIO4 > > Can anyone point me in the right direction for this? hw.ata.atapi_dma=1 in /boot/loader.conf. DMA for ATAPI is not active by default because a lot of chipsets are buggy. Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:51:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 699C416A4CE for ; Thu, 8 Jul 2004 13:51:24 +0000 (GMT) Received: from mps2.plala.or.jp (c145240.vh.plala.or.jp [210.150.145.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FD3E43D3F for ; Thu, 8 Jul 2004 13:51:23 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc1.plala.or.jp ([172.23.8.209]) by mps2.plala.or.jp with SMTP id <20040708135121.QXVY1281.mps2.plala.or.jp@msvc1.plala.or.jp> for ; Thu, 8 Jul 2004 22:51:21 +0900 Received: ( 29012 invoked from network); 8 Jul 2004 22:51:21 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc1 with SMTP; 8 Jul 2004 22:51:20 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040708135120.ZLFP19716.mpb1.plala.or.jp@trio.plala.or.jp>; Thu, 8 Jul 2004 22:51:20 +0900 Message-ID: <40ED52D2.9000601@trio.plala.or.jp> Date: Thu, 08 Jul 2004 22:57:38 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: Avleen Vig , freebsd-hackers@FreeBSD.ORG References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> <20040708033741.E28518@bowser.eecs.harvard.edu> <20040708082304.GE5238@silverwraith.com> In-Reply-To: <20040708082304.GE5238@silverwraith.com> X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:51:24 -0000 Hi, Avleen Vig wrote: > >They said "6 staff-years". This means if they have 6 people working on >it full time, it took 1 year to complete. If they had 60 people full >time, it took just over 5 weeks (technically, i doubt that would work >practically). > >>From speaking to a friend at sun, I do know it took a long time and a >lot of effort, and was *not* a simple thing to implement. > > They may say so to add value-added. But I have never run it. So I don't know what it is. They ought to finish Solaris10 itself before DTrace... Say hello to Sun guys. Eitarou -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 16:28:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 969B816A4CE; Thu, 8 Jul 2004 16:28:32 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0359A43D53; Thu, 8 Jul 2004 16:28:31 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 8CF175310; Thu, 8 Jul 2004 18:28:29 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 19871530D; Thu, 8 Jul 2004 18:28:23 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 96D9EB860; Thu, 8 Jul 2004 18:28:22 +0200 (CEST) To: Avleen Vig References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> <20040708033741.E28518@bowser.eecs.harvard.edu> <20040708082304.GE5238@silverwraith.com> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 08 Jul 2004 18:28:22 +0200 In-Reply-To: <20040708082304.GE5238@silverwraith.com> (Avleen Vig's message of "Thu, 8 Jul 2004 01:23:04 -0700") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: freebsd-hackers@FreeBSD.ORG cc: David Schultz cc: Daniel Ellard Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 16:28:32 -0000 Avleen Vig writes: > They said "6 staff-years". No, they said three engineers working full-time for two years. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 16:32:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89ED816A4CE for ; Thu, 8 Jul 2004 16:32:59 +0000 (GMT) Received: from VARK.homeunix.com (adsl-69-107-108-110.dsl.pltn13.pacbell.net [69.107.108.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47B1043D4C for ; Thu, 8 Jul 2004 16:32:59 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i68GWpMu008972; Thu, 8 Jul 2004 09:32:51 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i68GWpFh008971; Thu, 8 Jul 2004 09:32:51 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 8 Jul 2004 09:32:51 -0700 From: David Schultz To: Wilko Bulte Message-ID: <20040708163251.GA8862@VARK.homeunix.com> Mail-Followup-To: Wilko Bulte , Avleen Vig , Daniel Ellard , freebsd-hackers@FreeBSD.ORG References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> <20040708033741.E28518@bowser.eecs.harvard.edu> <20040708082304.GE5238@silverwraith.com> <20040708133951.GA67667@freebie.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040708133951.GA67667@freebie.xs4all.nl> cc: freebsd-hackers@FreeBSD.ORG cc: Daniel Ellard Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 16:32:59 -0000 On Thu, Jul 08, 2004, Wilko Bulte wrote: > On Thu, Jul 08, 2004 at 01:23:04AM -0700, Avleen Vig wrote: > > On Thu, Jul 08, 2004 at 03:46:24AM -0400, Daniel Ellard wrote: > > > I don't doubt that DTrace took a long time to do. However, in most > > > projects the design phase consumes a lot of time, and it is often the > > > case that unforeseen problems or changes in the feature set cost the > > > developers a lot of time. So while it might have taken six years to > > > write DTrace the first time, I suspect it would take a fraction of > > > that time to re-implement. (It certainly might be longer than "a few > > > months" and I'm not going to quibble. We won't know the precise > > > number until someone does the port.) > > > > They said "6 staff-years". This means if they have 6 people working on > > it full time, it took 1 year to complete. If they had 60 people full > > time, it took just over 5 weeks (technically, i doubt that would work > > practically). > > It works about as well as having 3 women deliver a baby in 3 months. ;-) See also Fred Brooks' book _The_Mythical_Man-Month_. But if you *do* happen to know 60 good programmers who are willing to work on FreeBSD full time for very little money, let me know and I'll see what I can do about that baby thing. From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 17:09:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADAC516A4CE for ; Thu, 8 Jul 2004 17:09:31 +0000 (GMT) Received: from arbornet.org (m-net.arbornet.org [209.142.209.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58DCD43D5A for ; Thu, 8 Jul 2004 17:09:31 +0000 (GMT) (envelope-from zera@m-net.arbornet.org) Received: from m-net.arbornet.org (localhost [127.0.0.1]) by arbornet.org (8.12.3p2/8.11.2) with ESMTP id i68HBIcq032131 for ; Thu, 8 Jul 2004 13:11:18 -0400 (EDT) (envelope-from zera@m-net.arbornet.org) Received: from localhost (zera@localhost)i68HBIcV032128 for ; Thu, 8 Jul 2004 13:11:18 -0400 (EDT) Date: Thu, 8 Jul 2004 13:11:18 -0400 (EDT) From: Zera Holladay To: freebsd-hackers@freebsd.org In-Reply-To: <20040704182047.GD72520@silverwraith.com> Message-ID: <20040708125852.D15330-100000@m-net.arbornet.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 17:09:31 -0000 This may go without saying, but have you read Chapter 22 of the FreeBSD Developers' Handbook? I have not read intro(4) extensively but that is probably a good starting place, if you are completely in the dark. -Zera Holladay On Sun, 4 Jul 2004, Avleen Vig wrote: > On Sun, Jul 04, 2004 at 12:53:39PM +0000, idownes@slingshot.co.nz wrote: > > So what I guess what I am asking is how hard would this be? (I have a > > reasonable knowledge of C and Java and have been using FreeBSD for a > > couple of years but have never written a device driver (for any OS)) Do I > > actually need to write a driver or can I use something already existing? > > Where would I get information on how to do this? So far I've been looking > > at the existing drivers; ugen, ufm etc., the programmers handbook and am > > starting to look at libusb...? > > Sorry for the long message. Any pointers etc. would be greatly > > appreciated. > > I am actually in a similar situation. > I know some C, and want to write a device driver for a USB device (web > cam), but I have no idea where to start. > I've searched for a "beginners guide to writing device drivers" but > failed miserably :-( > > -- > Avleen Vig > Systems Administrator > Personal: www.silverwraith.com > EFnet: irc.mindspring.com (Earthlink user access only) > _______________________________________________ > 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 Thu Jul 8 19:39:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E84AE16A4CE for ; Thu, 8 Jul 2004 19:39:27 +0000 (GMT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CABA43D3F for ; Thu, 8 Jul 2004 19:39:27 +0000 (GMT) (envelope-from ritalin@comcast.net) Received: from emachine (pcp04417136pcs.nrockv01.md.comcast.net[69.140.104.84]) by comcast.net (sccrmhc13) with SMTP id <2004070819392601600o7jlje>; Thu, 8 Jul 2004 19:39:26 +0000 Message-ID: <000b01c46522$0198c8a0$9402a8c0@emachine> From: "Rita Lin" To: "Zera Holladay" , References: <20040708125852.D15330-100000@m-net.arbornet.org> Date: Thu, 8 Jul 2004 15:30:19 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 19:39:28 -0000 I would read up some code in /dev/usb and see how others did theirs. I would also read the Dynamic Kernel Linker by Andrew Reiter http://www.daemonnews.org/200010/blueprints.html, and the white paper by zep software http://www.zepsoftware.com/whitepapers/bsd_devtree.php. That's how I wrote my first USB driver. Rita ----- Original Message ----- From: Zera Holladay To: Sent: Thursday, July 08, 2004 1:11 PM Subject: Re: where to get info to write basic usb driver for own device? > This may go without saying, but have you read Chapter 22 of the FreeBSD > Developers' Handbook? I have not read intro(4) extensively but that is > probably a good starting place, if you are completely in the dark. > > -Zera Holladay > > > > > On Sun, 4 Jul 2004, Avleen Vig wrote: > > > On Sun, Jul 04, 2004 at 12:53:39PM +0000, idownes@slingshot.co.nz wrote: > > > So what I guess what I am asking is how hard would this be? (I have a > > > reasonable knowledge of C and Java and have been using FreeBSD for a > > > couple of years but have never written a device driver (for any OS)) Do I > > > actually need to write a driver or can I use something already existing? > > > Where would I get information on how to do this? So far I've been looking > > > at the existing drivers; ugen, ufm etc., the programmers handbook and am > > > starting to look at libusb...? > > > Sorry for the long message. Any pointers etc. would be greatly > > > appreciated. > > > > I am actually in a similar situation. > > I know some C, and want to write a device driver for a USB device (web > > cam), but I have no idea where to start. > > I've searched for a "beginners guide to writing device drivers" but > > failed miserably :-( > > > > -- > > Avleen Vig > > Systems Administrator > > Personal: www.silverwraith.com > > EFnet: irc.mindspring.com (Earthlink user access only) > > _______________________________________________ > > 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" > > > > _______________________________________________ > 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 Thu Jul 8 20:32:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 799E516A4CF for ; Thu, 8 Jul 2004 20:32:51 +0000 (GMT) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFDFE43D2D for ; Thu, 8 Jul 2004 20:32:50 +0000 (GMT) (envelope-from mark@markdnet.demon.co.uk) Received: from lizacnet.demon.co.uk ([80.177.208.105] helo=[192.168.0.2]) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1BifZZ-000Cjq-0W for freebsd-hackers@freebsd.org; Thu, 08 Jul 2004 21:32:49 +0100 From: Mark Dixon To: freebsd-hackers@freebsd.org Date: Thu, 8 Jul 2004 21:35:34 +0100 User-Agent: KMail/1.6.2 References: <20040704182047.GD72520@silverwraith.com> In-Reply-To: <20040704182047.GD72520@silverwraith.com> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-03=_tAb7AKttLCkhtPS"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200407082136.10818.mark@markdnet.demon.co.uk> Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 20:32:51 -0000 --Boundary-03=_tAb7AKttLCkhtPS Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 04 Jul 2004 19:20, Avleen Vig wrote: > > I am actually in a similar situation. > I know some C, and want to write a device driver for a USB device (web > cam), but I have no idea where to start. > I've searched for a "beginners guide to writing device drivers" but > failed miserably :-( I briefly looked into this as well, and in summery, webcams are a bit of a= =20 pain. Unlike Linux folks, there's no Video4BSD (although there was some tal= k=20 of one a while back), and so there's no standard way of doing it.=20 The only proven video in API is the one used by meteora (I think) and bktr,= =20 and thats by all accounts hideous, which leaves you needing to write a lot= =20 more code than you first thought, and that was enough to put me off. A=20 standard thing to do with the video stream having extracted it from the=20 webcam which applications like gnomemeeting understand would make the job=20 much easier. =2D-=20 Mark 'If it compiles, ship it' --Boundary-03=_tAb7AKttLCkhtPS Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBA7bAtLqgJ90OcaiARApzMAJ0aGmIrcJ726T+kxD9dfmQ/XO9mpQCgsg77 gAVJUz1+ihYyy0a470h0vUI= =5pFH -----END PGP SIGNATURE----- --Boundary-03=_tAb7AKttLCkhtPS-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 21:56:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ACD516A4CE for ; Thu, 8 Jul 2004 21:56:36 +0000 (GMT) Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com [129.247.16.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F9CC43D48 for ; Thu, 8 Jul 2004 21:56:35 +0000 (GMT) (envelope-from harti@freebsd.org) Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1]) i68LuVj47442; Thu, 8 Jul 2004 23:56:31 +0200 Received: from zeus.nt.op.dlr.de (zeus.nt.op.dlr.de [129.247.173.3]) i68LuUf595020; Thu, 8 Jul 2004 23:56:30 +0200 Received: from beagle.kn.op.dlr.de (opkndnwsbsd178 [129.247.173.178]) by zeus.nt.op.dlr.de (8.11.7+Sun/8.9.1) with ESMTP id i68GhDV15763; Thu, 8 Jul 2004 18:43:13 +0200 (MET DST) Date: Thu, 8 Jul 2004 18:43:08 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt@beagle.kn.op.dlr.de To: freebsd-hackers@freebsd.org In-Reply-To: Message-ID: <20040708184200.O562@beagle.kn.op.dlr.de> References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708033741.E28518@bowser.eecs.harvard.edu> <20040708082304.GE5238@silverwraith.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 21:56:36 -0000 On Thu, 8 Jul 2004 des@des.no wrote: > Avleen Vig writes: >> They said "6 staff-years". > > No, they said three engineers working full-time for two years. So if we put all committers on this it would take us not more than two days :-) harti From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 23:40:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D698116A4CE for ; Thu, 8 Jul 2004 23:40:47 +0000 (GMT) Received: from kozubik.com (kozubik.com [65.248.2.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 441DC43D31 for ; Thu, 8 Jul 2004 23:40:47 +0000 (GMT) (envelope-from john@kozubik.com) Received: from kozubik.com (john@localhost [IPv6:::1]) by kozubik.com (8.12.3/8.12.3) with ESMTP id i68NcgBx060514 for ; Thu, 8 Jul 2004 16:38:42 -0700 (PDT) (envelope-from john@kozubik.com) Received: from localhost (john@localhost) by kozubik.com (8.12.3/8.12.3/Submit) with ESMTP id i68NcgAl060511 for ; Thu, 8 Jul 2004 16:38:42 -0700 (PDT) Date: Thu, 8 Jul 2004 16:38:42 -0700 (PDT) From: John Kozubik To: freebsd-hackers@freebsd.org In-Reply-To: <20040706224911.F806-100000@kozubik.com> Message-ID: <20040708163658.K806-100000@kozubik.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: rapid file creation on snapshotted filesystems panics lockmgr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 23:40:47 -0000 On Wed, 7 Jul 2004, John Kozubik wrote: > Rapid file creation on filesystems with as few as one snapshot on them > will panic lockmgr: > > panic: lockmgr: locking against myself > cpuid = 0; > > syncing disks, buffers remaining... panic: ffs_copyonwrite: recursive call > cpuid = 0; > uptime: 5m10s > Shutting down ACPI > > (crash) One item that must be mentioned is that this does not manifest itself on the root filesystem (/). It will manifest itself on all other filesystems, though, and since my original post I have tested and verified it on several other systems with different 5.2.1-RELEASE kernel configurations and hardware. ----- John Kozubik - john@kozubik.com - http://www.kozubik.com From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 9 00:58:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0B1116A4CE for ; Fri, 9 Jul 2004 00:58:41 +0000 (GMT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8860E43D48 for ; Fri, 9 Jul 2004 00:58:41 +0000 (GMT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id i690wetJ098585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Jul 2004 20:58:40 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id i690weYi098584 for freebsd-hackers@freebsd.org; Thu, 8 Jul 2004 20:58:40 -0400 (EDT) Date: Thu, 8 Jul 2004 20:58:40 -0400 From: Leo Bicknell To: freebsd-hackers@freebsd.org Message-ID: <20040709005840.GB98195@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> <20040708033741.E28518@bowser.eecs.harvard.edu> <20040708082304.GE5238@silverwraith.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 00:58:42 -0000 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Thu, Jul 08, 2004 at 06:28:22PM +0200, Dag-Erling S= m=F8rgrav wrote: > Avleen Vig writes: > > They said "6 staff-years". >=20 > No, they said three engineers working full-time for two years. I will also point out that many software "features" exhibit an exponentially decaying re-implementation time. The next implementation might take two people 6 months, the one after that two people 2 months, and so on. I for one, look forward to this technology. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA7e3ANh6mMG5yMTYRAoeAAJ9FL6tpkv0XOklJfIG95GqYj5ewYwCfRzVu 1/oCwswbdAjNtuo+gZJprnw= =eeLX -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 9 03:21:13 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2DC416A4CE; Fri, 9 Jul 2004 03:21:13 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1766F43D1F; Fri, 9 Jul 2004 03:21:13 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i693Hnlo091925; Thu, 8 Jul 2004 21:17:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 08 Jul 2004 21:18:02 -0600 (MDT) Message-Id: <20040708.211802.71089087.imp@bsdimp.com> To: julian@vicor.com From: "M. Warner Losh" In-Reply-To: <40EDD1DF.30801@vicor.com> References: <40EDD1DF.30801@vicor.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: [Fwd: FreeBSD 4.8 probe error message] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 03:21:13 -0000 In message: <40EDD1DF.30801@vicor.com> Julian Elischer writes: : Hi guys : I have no idea about the pci probe/allocation stuff.. : : I just put a EHCI USB-2 card into a known good machine and on boot : I see the following error message.. : : what does this indicate? : : I've seen this sort of thing being affected by settings on tha mailing lists : but I don't remember what the root cause was.. You need PnPOS=no in the BIOS to make this work. Sadly, many machines these days don't support that, so you'll have to hack the driver to allocate memory ala firewire. Or you need to upgrade to current. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 9 03:32:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F097816A4CE for ; Fri, 9 Jul 2004 03:32:38 +0000 (GMT) Received: from north-zone.net (wh1.north-zone.net [65.110.60.200]) by mx1.FreeBSD.org (Postfix) with SMTP id 44D7243D41 for ; Fri, 9 Jul 2004 03:32:38 +0000 (GMT) (envelope-from nicobn@quebecbsd.org) Received: (qmail 66204 invoked by uid 80); 9 Jul 2004 03:34:28 -0000 Received: from 69.70.227.33 (SquirrelMail authenticated user nicobn@quebecbsd.org) by webmail.north-zone.net with HTTP; Fri, 9 Jul 2004 03:34:28 -0000 (GMT) Message-ID: <4593.69.70.227.33.1089344068.squirrel@webmail.north-zone.net> In-Reply-To: <20040708163251.GA8862@VARK.homeunix.com> References: <20040706120130.3DF9816A57D@hub.freebsd.org><40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com><20040708033741.E28518@bowser.eecs.harvard.edu><20040708082304.GE5238@silverwraith.com><20040708133951.GA67667@freebie.xs4all.nl> <20040708163251.GA8862@VARK.homeunix.com> Date: Fri, 9 Jul 2004 03:34:28 -0000 (GMT) From: Nicolas =?iso-8859-1?Q?B=E9rard_Nault?= To: "David Schultz" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: nicobn@quebecbsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 03:32:39 -0000 David Schultz said: > But if you *do* happen to know 60 good programmers who are willing > to work on FreeBSD full time for very little money, let me know > and I'll see what I can do about that baby thing. Repartition of tasks would take more time than programming. I think the key to that kind of project is have a few selected, talented programmers working in a relatively small team with no time constraint. -- Nicolas Bérard Nault (nicobn@quebecbsd.org) http://staff.xeatech.net/nicobn PGP public key: 0x64159509 From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 13:39:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A4D316A4CE; Thu, 8 Jul 2004 13:39:55 +0000 (GMT) Received: from smtp-out5.xs4all.nl (smtp-out5.xs4all.nl [194.109.24.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A28F43D5F; Thu, 8 Jul 2004 13:39:54 +0000 (GMT) (envelope-from wkb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by smtp-out5.xs4all.nl (8.12.10/8.12.10) with ESMTP id i68DdpUY089546; Thu, 8 Jul 2004 15:39:52 +0200 (CEST) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.12.11/8.12.9) with ESMTP id i68DdpXs067684; Thu, 8 Jul 2004 15:39:51 +0200 (CEST) (envelope-from wkb@freebie.xs4all.nl) Received: (from wkb@localhost) by freebie.xs4all.nl (8.12.11/8.12.11/Submit) id i68Ddp5R067683; Thu, 8 Jul 2004 15:39:51 +0200 (CEST) (envelope-from wkb) Date: Thu, 8 Jul 2004 15:39:51 +0200 From: Wilko Bulte To: Avleen Vig Message-ID: <20040708133951.GA67667@freebie.xs4all.nl> References: <20040706120130.3DF9816A57D@hub.freebsd.org> <40EB9A46.2050409@trio.plala.or.jp> <20040708034845.GA59801@VARK.homeunix.com> <20040708033741.E28518@bowser.eecs.harvard.edu> <20040708082304.GE5238@silverwraith.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040708082304.GE5238@silverwraith.com> User-Agent: Mutt/1.4.1i X-OS: FreeBSD 4.10-STABLE X-PGP: finger wilko@freebsd.org X-Mailman-Approved-At: Fri, 09 Jul 2004 11:59:52 +0000 cc: freebsd-hackers@FreeBSD.ORG cc: David Schultz cc: Daniel Ellard Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 13:39:55 -0000 On Thu, Jul 08, 2004 at 01:23:04AM -0700, Avleen Vig wrote: > On Thu, Jul 08, 2004 at 03:46:24AM -0400, Daniel Ellard wrote: > > I don't doubt that DTrace took a long time to do. However, in most > > projects the design phase consumes a lot of time, and it is often the > > case that unforeseen problems or changes in the feature set cost the > > developers a lot of time. So while it might have taken six years to > > write DTrace the first time, I suspect it would take a fraction of > > that time to re-implement. (It certainly might be longer than "a few > > months" and I'm not going to quibble. We won't know the precise > > number until someone does the port.) > > They said "6 staff-years". This means if they have 6 people working on > it full time, it took 1 year to complete. If they had 60 people full > time, it took just over 5 weeks (technically, i doubt that would work > practically). It works about as well as having 3 women deliver a baby in 3 months. -- Wilko Bulte wilko@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 8 22:59:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A936B16A4CE; Thu, 8 Jul 2004 22:59:44 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7173443D39; Thu, 8 Jul 2004 22:59:44 +0000 (GMT) (envelope-from julian@vicor.com) Received: from vicor.com (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 14D327A4BE; Thu, 8 Jul 2004 15:59:44 -0700 (PDT) Message-ID: <40EDD1DF.30801@vicor.com> Date: Thu, 08 Jul 2004 15:59:43 -0700 From: Julian Elischer Organization: VICOR User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: hackers@freebsd.org, imp@freebsd.org, jhb@freebsd.org Content-Type: multipart/mixed; boundary="------------050205060502090601000508" X-Mailman-Approved-At: Fri, 09 Jul 2004 11:59:52 +0000 Subject: [Fwd: FreeBSD 4.8 probe error message] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 22:59:44 -0000 This is a multi-part message in MIME format. --------------050205060502090601000508 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi guys I have no idea about the pci probe/allocation stuff.. I just put a EHCI USB-2 card into a known good machine and on boot I see the following error message.. what does this indicate? I've seen this sort of thing being affected by settings on tha mailing lists but I don't remember what the root cause was.. Julian --------------050205060502090601000508 Content-Type: message/rfc822; name="error message" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="error message" Received: by bigwoop.vicor-nb.com (mbox julian) (with Cubic Circle's cucipop (v1.31 1998/05/13) Thu Jul 8 15:56:19 2004) X-From_: halit@vicor.com Thu Jul 8 15:18:57 2004 Return-Path: X-Original-To: julian Delivered-To: julian@vicor-nb.com Received: by mail.vicor-nb.com (Postfix, from userid 1047) id 0C7A57A460; Thu, 8 Jul 2004 15:18:57 -0700 (PDT) To: julian@vicor-nb.com Subject: error message Message-Id: <20040708221857.0C7A57A460@mail.vicor-nb.com> Date: Thu, 8 Jul 2004 15:18:57 -0700 (PDT) From: halit@vicor.com (Halit Canbazoglu) X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on bigwoop.vicor-nb.com X-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_SHORT autolearn=no version=2.63 enc2a.dev --- error message .......... ehci0: irq 9 at device 14.2 on pci0 ehci0: Could not map memory device_probe_and_attach: ehci0 attach returned 6 .......... halit .. . --------------050205060502090601000508-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 9 16:42:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 927B016A4CE for ; Fri, 9 Jul 2004 16:42:38 +0000 (GMT) Received: from mail.secureworks.net (mail.secureworks.net [209.101.212.155]) by mx1.FreeBSD.org (Postfix) with SMTP id F11DE43D5A for ; Fri, 9 Jul 2004 16:42:37 +0000 (GMT) (envelope-from mdg@secureworks.net) Received: (qmail 2065 invoked from network); 9 Jul 2004 16:42:27 -0000 Received: from unknown (HELO HOST-192-168-8-243.internal.secureworks.net) (63.239.86.253) by mail.secureworks.net with SMTP; 9 Jul 2004 16:42:27 -0000 Date: Fri, 9 Jul 2004 12:42:36 -0400 (EDT) From: Matthew George X-X-Sender: mdg@localhost To: freebsd-hackers@freebsd.org Message-ID: <20040709123123.T2363@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: SIGURG (fwd) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 16:42:38 -0000 [ no response from questions@ =\ ] I have a fairly active program that forks and uses pipes to communicate back to the parent before exiting. When I go to wait() on the child, occasionally the status is signaled - SIGURG instead of exit()ing normally. It appears the child process is doing everything it needs to be doing. What will generate this signal? Is it safe to ignore, or should I be handling it somehow? This is running on 4.10 ... As an update, I went ahead and masked the signal. When I did this, my 15 min load, usually at about 6 or so when this is running, dropped to approx 1.5 and has been there for a week now (is this expected/normal?). The application works as it should, but I'm still curious as to the origin of the signal, what condition it is indicating, and what the Right Thing (tm) to do is when one gets delivered. I haven't found any particularly enlightening documentation in my search so far ... any references would be most welcome ... -- Matthew George SecureWorks Technical Operations From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 00:11:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EF1D16A4CE for ; Sat, 10 Jul 2004 00:11:29 +0000 (GMT) Received: from ms006msg.fastweb.it (ms006msg.fastweb.it [213.140.2.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 309CB43D2D for ; Sat, 10 Jul 2004 00:11:29 +0000 (GMT) (envelope-from thefly@acaro.org) Received: from tyler (1.10.185.81) by ms006msg.fastweb.it (7.0.028) id 40D855CC0023385B for freebsd-hackers@freebsd.org; Sat, 10 Jul 2004 02:11:27 +0200 Received: by tyler (Postfix, from userid 1000) id 532431AB494; Sat, 10 Jul 2004 02:15:12 +0200 (CEST) Date: Sat, 10 Jul 2004 02:15:12 +0200 From: thefly To: freebsd-hackers@freebsd.org Message-ID: <20040710001512.GA13356@tyler> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline X-Editor: VIM - Vi IMproved 6.2 (2003 Jun 1, compiled May 20 2004 09:35:32) X-OS: Debian GNU/Linux 2.6.6 i686 User-Agent: Mutt/1.5.6+20040523i Subject: mmap() implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 00:11:29 -0000 --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everybody, i'm implementing the mmap part of my nodegraph. At the moment i'm actually stuck at a point where the process can't actually access the memory allocation: this is the mmap() function: static int ng_counter_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { if (nprot !=3D VM_PROT_READ) return (-1); =20 *paddr =3D (vm_paddr_t) (ng_counters.B_array + offset / sizeof(u_in= t32_t)); =20 return (0); } ng_couters.B_array is u_int32_t *, and the memory is allocated via : counters->B_array =3D (u_int32_t*) contigmalloc((65536*2*sizeof(u_int32_t)= )+(65536*2*sizeof(u_int16_t)), M_NG_COUNTER, M_WAITOK | M_ZERO, 0, ~0, PAGE= _SIZE, 0); I actually need 2 u_int32_t arrays and two u_int16_t arrays, and need to ex= port all of them at the same time. I don't know if i need anything like vtophys() inside of that. The app in userspace does this: array =3D (unsigned int *) mmap(0, (65536*2*sizeof(u_int32_t))+(655= 36*2*sizeof(u_int16_t)), PROT_READ, 0, fd, 0); if(array =3D=3D (void *) -1){ printf("mmap failed\n"); return -1; } for(i=3D0; i<65536; i++){ printf("array[%d]=3D%u\n", i, *(array+i)); } i'm trying to print the values of the first array, but what i get is a lot of: array[484]=3D4294967295 array[485]=3D4294967295 array[486]=3D4294967295 array[487]=3D4294967295 array[488]=3D4294967295 array[489]=3D4294967295 Thanks in advance --=20 Claudio "thefly" Martella thefly@acaro.org GNU/PG keyid: 0x8EA95625 --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFA7zUPygeBqo6pViURAsA/AKDA7Gwp0rbrZ0L1CmcneXc62OmsNACdEM+w FL8+9wPfiTP0+cUMpH9dRyI= =VrLK -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 02:52:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2BE0216A4CE; Sat, 10 Jul 2004 02:52:50 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i6A2qmQt014491; Fri, 9 Jul 2004 22:52:48 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i6A2qluu014490; Fri, 9 Jul 2004 22:52:47 -0400 (EDT) (envelope-from green) Date: Fri, 9 Jul 2004 22:52:46 -0400 From: Brian Fundakowski Feldman To: Igor Sysoev Message-ID: <20040710025246.GD1626@green.homeunix.org> References: <20040705140331.K723@is.park.rambler.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040705140331.K723@is.park.rambler.ru> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: panic caused by EVFILT_SIGNAL detaching in rfork()ed thread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 02:52:50 -0000 On Mon, Jul 05, 2004 at 02:06:42PM +0400, Igor Sysoev wrote: > While development of my http server nginx I've got panics caused by detaching > of the EVFILT_SIGNAL event. The worker process starts two worker threads > created by rfork(RFPROC|RFTHREAD|RFMEM). Each thread opens kqueue and > adds the EVFILT_SIGNAL event. If the main thread of the worker process > exits abnormally (on 4.x) or simply exits (on 5.x) then kernel may panic: Someone more up on -stable should investigate fixing all of these that can be found there. For -CURRENT, jmg is supposed to be fixing it at some point. I've been running something like this one for some time on -CURRENT with zero problems (may be a bit stale, especially if not removing the VM parts): -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 02:55:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D2AC416A4CE; Sat, 10 Jul 2004 02:55:50 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i6A2tnjc014517; Fri, 9 Jul 2004 22:55:49 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i6A2tfs2014516; Fri, 9 Jul 2004 22:55:41 -0400 (EDT) (envelope-from green) Date: Fri, 9 Jul 2004 22:55:41 -0400 From: Brian Fundakowski Feldman To: "Aho K.F. Li" Message-ID: <20040710025541.GE1626@green.homeunix.org> References: <40E87B4D.1050203@branda.to> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40E87B4D.1050203@branda.to> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org cc: idownes@slingshot.co.nz Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 02:55:51 -0000 On Sun, Jul 04, 2004 at 09:49:01PM +0000, Aho K.F. Li wrote: > What kind of device do you had build? > A HID? > If your device is not with heaven traffic, you can consider to > develop your driver at user space with ugen(4) or uhid(4) at first. > And then, move it into kernel space when you need. > I had wrote a drive for a touch panel device. > Actually, it is a input device for XFree86. > I worked it with uhid(4), all my work was finished at user space. > It would be a good entry point. I absolutely agree with this -- it's very hard to write good kernel USB drivers in FreeBSD, and if it can be done with ugen(4)/libusb, you'll safe yourself a lot of time and pain. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 02:59:49 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D973016A4CE; Sat, 10 Jul 2004 02:59:48 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i6A2xlFb014535; Fri, 9 Jul 2004 22:59:47 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i6A2xlMB014534; Fri, 9 Jul 2004 22:59:47 -0400 (EDT) (envelope-from green) Date: Fri, 9 Jul 2004 22:59:46 -0400 From: Brian Fundakowski Feldman To: Jonathan Chen Message-ID: <20040710025946.GF1626@green.homeunix.org> References: <20040701224829.A20882@porthos.spock.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040701224829.A20882@porthos.spock.org> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: bge on 64-bit pci: corrupt packets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 02:59:49 -0000 On Thu, Jul 01, 2004 at 10:48:29PM -0400, Jonathan Chen wrote: > Hi all, > > I've been experiencing a problem with using bge on 64-bit pci slots. After > looking at this for the whole day, I still have no idea what the problem > is. Perhaps one of you can help... If you suspect it to be an alignment problem, it's easy to test. Look for the bus_dma_tag_create() calls -- all of them use PAGE_SIZE (4096+) or ETHER_ALIGN (2). Did you try changing the ETHER_ALIGNS to 8? -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 03:01:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6186216A4CE; Sat, 10 Jul 2004 03:01:30 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i6A31TcM014566; Fri, 9 Jul 2004 23:01:29 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i6A31Sqr014565; Fri, 9 Jul 2004 23:01:28 -0400 (EDT) (envelope-from green) Date: Fri, 9 Jul 2004 23:01:27 -0400 From: Brian Fundakowski Feldman To: Stephen Hurd Message-ID: <20040710030127.GG1626@green.homeunix.org> References: <20040624174919.46160f9e.shurd@sasktel.net> <20040628192935.GF5635@green.homeunix.org> <20040630192041.1d9c5348.shurd@sasktel.net> <20040704181347.GE997@green.homeunix.org> <20040704160645.39a0c0d8.shurd@sasktel.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040704160645.39a0c0d8.shurd@sasktel.net> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: Locking: kern/50827 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 03:01:31 -0000 On Sun, Jul 04, 2004 at 04:06:45PM -0600, Stephen Hurd wrote: > > Right, if you just make it cross-platform in the first place using > > higher- level primitives you don't have to worry what the specific > > kernel and operating system and file system you are using provides. > > It's my opinion tha there won't be other people adopting this API for > > file locking since it is by definition not meant to work like the > > standardized APIs. > > > > I don't think that there's no value in having more useful locking > > primitives, but they probably don't benefit much from being implemented > > in the kernel unless they conform to a portable API. I certainly always > > have my own various kernel modifications that I find useful, but aren't > > very standard :) > > This sounds a lot like "Well, there's no point in doing something better > since nobody else is doing it.". strlcpy() and friends are an example of > non-standard stuff that just Makes Sense(tm). If you're trying to create a new "standard", I think -standards or -arch is the more appropriate FreeBSD list. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 09:40:17 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7CD716A4CE for ; Sat, 10 Jul 2004 09:40:17 +0000 (GMT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DB3343D31 for ; Sat, 10 Jul 2004 09:40:17 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 4D0533B926; Sat, 10 Jul 2004 11:40:16 +0200 (CEST) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) i6A9ZTvG004569; Sat, 10 Jul 2004 11:35:29 +0200 (CEST) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost)i6A9ZTdQ004568; Sat, 10 Jul 2004 11:35:29 +0200 (CEST) (envelope-from schweikh) Date: Sat, 10 Jul 2004 11:35:29 +0200 From: Jens Schweikhardt To: Matthew George Message-ID: <20040710093529.GA3520@schweikhardt.net> References: <20040709123123.T2363@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040709123123.T2363@localhost> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: SIGURG (fwd) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 09:40:18 -0000 On Fri, Jul 09, 2004 at 12:42:36PM -0400, Matthew George wrote: # # [ no response from questions@ =\ ] # # # I have a fairly active program that forks and uses pipes to communicate # back to the parent before exiting. When I go to wait() on the child, # occasionally the status is signaled - SIGURG instead of exit()ing # normally. It appears the child process is doing everything it needs to be # doing. # # What will generate this signal? If you use TCP sockets, then SIGURG is generated upon reception of datagrams with the TCP URG bit set along with the urgent offset. Urgent mode is requested by the sending side with the MSG_OOB flag, e.g. send (fd, "x", 1, MSG_OOB); # Is it safe to ignore, or should I be handling it somehow? You should understand why you are using/receiving out-of-band data instead of regular non-OOB data. Sending all data OOB in the hope it will get processed faster is a foolish thing to do, as urgent processing involves considerable overhead. The whole concept is explained in W.R.Stevens, Unix Programming, Vol 1, Networking APIs, Sockets and XTI, 2nd ed, Chapter 21. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped) From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 9 22:07:43 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AE8E16A4CF for ; Fri, 9 Jul 2004 22:07:43 +0000 (GMT) Received: from durandal.jeannot.org (durandal.jeannot.org [80.65.225.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3536443D5E for ; Fri, 9 Jul 2004 22:07:42 +0000 (GMT) (envelope-from js@jeannot.org) Received: from [127.0.0.1] (localhost [127.0.0.1])i69M7eBf001841 for ; Sat, 10 Jul 2004 00:07:41 +0200 (CEST) (envelope-from js@jeannot.org) Message-ID: <40EF172C.7020508@jeannot.org> Date: Sat, 10 Jul 2004 00:07:40 +0200 From: Jean-Sebastien Roy User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040703) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 10 Jul 2004 11:57:34 +0000 Subject: Silent errors when reading CDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 22:07:43 -0000 Hi ! (Following an advice from someone at freebsd-questions@, this is a repost of a question asked at freebsd-questions@) I'm currently using FreeBSD 4.10 on an HP D530 SFF. The system is perfectly stable except for the following problem I'm unable to understand : When I mount a cdrom (mount /cdrom), then calculate the MD5 hash of a big file on a CD (md5 /cdrom/bigfile), the results are often random: unmounting, mounting again and calculating again the MD5 often result in a different value. What disturb me the most is that absolutely no errors are reported in any log (no read errors for example). I thought the CDROM reader, a LITE-ON LTR-48327S PQS3, was the culprit, so I replaced it with a PLEXTOR DVDR PX-712A and got the exact same results (i.e. random MD5 values). I checked the RAM using memtest and got no errors. The problem does not occur for files on the harddisk. hw.ata.atapi_dma is set since both drives support it and it seems to be required for proper CD/DVD burning. The CD drive is the master on its own ATA bus. While the problem occurs on multiple CDs (mostly RW), to my surprise, I was not able to reproduce the problem by reading big files on DVDs. Could someone provide me a hint on what to check next or how to fix this problem ? Can errors on CDs generate such a behavior ? Thank you very much in advance, Regards, Jean-Sebastien From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 13:47:49 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C8D216A4CE for ; Sat, 10 Jul 2004 13:47:49 +0000 (GMT) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EE1343D1F for ; Sat, 10 Jul 2004 13:47:48 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.12.11/8.12.11) with ESMTP id i6ADlk5J042672; Sat, 10 Jul 2004 17:47:46 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Sat, 10 Jul 2004 17:47:46 +0400 (MSD) From: Dmitry Morozovsky To: Jean-Sebastien Roy In-Reply-To: <40EF172C.7020508@jeannot.org> Message-ID: <20040710174546.T85065@woozle.rinet.ru> References: <40EF172C.7020508@jeannot.org> X-NCC-RegID: ru.rinet MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Silent errors when reading CDs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 13:47:49 -0000 Hi there, On Sat, 10 Jul 2004, Jean-Sebastien Roy wrote: JR> I'm currently using FreeBSD 4.10 on an HP D530 SFF. JR> The system is perfectly stable except for the following problem JR> I'm unable to understand : JR> JR> When I mount a cdrom (mount /cdrom), then calculate the MD5 hash JR> of a big file on a CD (md5 /cdrom/bigfile), the results are often random: JR> unmounting, mounting again and calculating again the MD5 often result in JR> a different value. What disturb me the most is that absolutely no errors JR> are reported in any log (no read errors for example). JR> JR> I thought the CDROM reader, a LITE-ON LTR-48327S PQS3, was the culprit, JR> so I replaced it with a PLEXTOR DVDR PX-712A and got the exact same JR> results (i.e. random MD5 values). I checked the RAM using memtest and JR> got no errors. The problem does not occur for files on the harddisk. JR> JR> hw.ata.atapi_dma is set since both drives support it and it seems to be JR> required for proper CD/DVD burning. The CD drive is the master on its JR> own ATA bus. JR> JR> While the problem occurs on multiple CDs (mostly RW), to my surprise, I JR> was not able to reproduce the problem by reading big files on DVDs. JR> JR> Could someone provide me a hint on what to check next or how to fix this JR> problem ? Can errors on CDs generate such a behavior ? What if you copy that big file from CD to HD twice (possibly with unmounting/remounting in the middle) and check MD5s there? Testing your memory with memtest86.com's test would also be helpful to eliminate RAM issues. Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 18:58:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8FFF16A4CE for ; Sat, 10 Jul 2004 18:58:58 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id C156843D1D for ; Sat, 10 Jul 2004 18:58:58 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 9313B5C875; Sat, 10 Jul 2004 11:58:58 -0700 (PDT) Date: Sat, 10 Jul 2004 11:58:58 -0700 From: Alfred Perlstein To: hackers@freebsd.org Message-ID: <20040710185858.GN95729@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: Autofs: Need AMD users/experts. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 18:58:58 -0000 If you're an amd "power-user" I need your help. I'm getting close to completing an AutoFS implementation for FreeBSD. o) What does AutoFS offer? It allows us to create "trigger" points in the filesystem without using an NFS loopback. Because of this, we can mount "in-place" and do away with the symlink hack used by automounter/amd. This provides speed and semantic improvements. o) Why am I sending this email? What I need is someone who has vast experience with amd and possibly other autofs/automouters to talk to in order to get an idea of the finishing refinements that I need to put into this piece of code to actually make it useful. o) Anything else? If you've hacked on amd, specifically the part of amd where it handles requests from the loop-back mount, I would really like to talk to you. Lastly, please reply privately! thanks! -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684 From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 19:44:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EAC516A4CE for ; Sat, 10 Jul 2004 19:44:01 +0000 (GMT) Received: from ppsw-0.csi.cam.ac.uk (ppsw-0.csi.cam.ac.uk [131.111.8.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FA2643D39 for ; Sat, 10 Jul 2004 19:44:01 +0000 (GMT) (envelope-from sos22@cantab.net) Received: from archibold.chu.cam.ac.uk ([131.111.131.102]:50842) by ppsw-0.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.150]:25) with smtp (Exim 4.34) id 1BjNlO-00089b-NX; Sat, 10 Jul 2004 20:43:58 +0100 Received: by archibold.chu.cam.ac.uk (sSMTP sendmail emulation); Sat, _d Jul 2004 20:45:14 +0100 Date: Sat, 10 Jul 2004 20:45:14 +0100 From: Steven Smith To: freebsd-hackers@freebsd.org Message-ID: <20040710194456.GA3366@archibold.chu.cam.ac.uk> References: <20040708091417.GA967@archibold.chu.cam.ac.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline In-Reply-To: X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned cc: sos22@srcf.ucam.org Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 19:44:01 -0000 --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > It's also possible to put probes on the return instruction of the > > function. I'm not sure how they're actually finding that, though. > I think the return probe is done by adding a call probe that changes the= =20 > return address. Yeah, I thought that when I first saw it, but the probe is passed the address of the return instruction when it fires, and I can't see how you could get that if it was just invoked by modifying the return address on the call stack. Steven. --bCsyhTFzCvuiizWE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA8EdJO4S8/gLNrjcRAvpkAKDVH8gsqwNNpP2JNtnCQ9V22cU/xQCdHtWb HnzXxbqI7GP41xPKjhRdj0Y= =4Eza -----END PGP SIGNATURE----- --bCsyhTFzCvuiizWE-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 10 21:28:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9060316A4CE for ; Sat, 10 Jul 2004 21:28:23 +0000 (GMT) Received: from seven.Alameda.net (seven.alameda.net [64.81.53.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E04843D31 for ; Sat, 10 Jul 2004 21:28:23 +0000 (GMT) (envelope-from ulf@Alameda.net) Received: by seven.Alameda.net (Postfix, from userid 1000) id 52AC13A201; Sat, 10 Jul 2004 14:28:23 -0700 (PDT) Date: Sat, 10 Jul 2004 14:28:23 -0700 From: Ulf Zimmermann To: hackers@freebsd.org Message-ID: <20040710212822.GX41460@seven.alameda.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Organization: Alameda Networks, Inc. X-Operating-System: FreeBSD 4.8-RELEASE-p5 Subject: PS/2 and USB keyboard at the same time, where to start X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ulf@Alameda.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 21:28:23 -0000 Hello, everyone. I want to try myself on kernel hacking again and a thing which peaked my interest was some emails a few days ago about making the kernel use both PS/2 and USB keyboards at the same time. My questions is can anyone point me at the relevant pieces of the kernel I should study about trying myself on this? -- Regards, Ulf. --------------------------------------------------------------------- Ulf Zimmermann, 1525 Pacific Ave., Alameda, CA-94501, #: 510-865-0204 You can find my resume at: http://seven.Alameda.net/~ulf/resume.html