From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 10 03:55:30 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B252516A416 for ; Sun, 10 Dec 2006 03:55:30 +0000 (UTC) (envelope-from bsd.devil@gmail.com) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id E88CC43C9E for ; Sun, 10 Dec 2006 03:54:21 +0000 (GMT) (envelope-from bsd.devil@gmail.com) Received: by nz-out-0102.google.com with SMTP id i11so641636nzh for ; Sat, 09 Dec 2006 19:55:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=gY37wsBSAyYwZR8UJa3qQ1ItTwrjlYyYsHiyjn3UYoCIgN4MWvJo8ZhN3tGuC1vLF9dXi87JqQ1fjeM85MAB1IRSPxgyhY++olojZdcB3XqzQonbT3Oxmri7W6NImIZ/BHKCGQ9Ud2MxlIBL558P9dcaeE4QDsW8APN+OCK6P0c= Received: by 10.64.181.12 with SMTP id d12mr8466969qbf.1165722928930; Sat, 09 Dec 2006 19:55:28 -0800 (PST) Received: by 10.65.224.17 with HTTP; Sat, 9 Dec 2006 19:55:28 -0800 (PST) Message-ID: Date: Sat, 9 Dec 2006 22:55:28 -0500 From: "Vishal Patil" To: "perryh@pluto.rain.com" In-Reply-To: <457b2252.FSOx8QPMmmbOnRoI%perryh@pluto.rain.com> MIME-Version: 1.0 References: <457b2252.FSOx8QPMmmbOnRoI%perryh@pluto.rain.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2006 03:55:30 -0000 For implementing iSCSI protocol as a kernel driver. On 12/9/06, perryh@pluto.rain.com wrote: > > "Vishal Patil" wrote: > > > Could someone point me to an example that shows a SIMPLE network > > protocol implemented over TCP/IP inside the FreeBSD kernel. > > I think I could look at the NFS client driver but is there an > > example simpler than that. > > NFS normally runs over UDP, not TCP. Telnet is one of the simpler > TCP-based applications, but it is not done in the kernel (nor are > most network apps). Is there some particular reason why you need > an example that is implemented inside the kernel, vs in userland? > From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 10 05:27:25 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FD3016A40F; Sun, 10 Dec 2006 05:27:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68E6343C9F; Sun, 10 Dec 2006 05:26:16 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBA5OUw7065670; Sat, 9 Dec 2006 22:24:30 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 09 Dec 2006 22:25:26 -0700 (MST) Message-Id: <20061209.222526.-816359937.imp@bsdimp.com> To: bsd.devil@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 09 Dec 2006 22:24:30 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2006 05:27:25 -0000 In message: "Vishal Patil" writes: : Could someone point me to an example that shows a SIMPLE network protocol : implemented over TCP/IP inside the FreeBSD kernel. I think I could look at : the NFS client driver but is there an example simpler than that. Also is : there a guide explaining how to go about developing TCP/IP based network : protocols for FreeBSD. [ to implement iSCSI in the kernel ] I'm unsure which side you wish to be on. There's accept filters that you can write, but I doubt that's what you want to do. This would be good if you are implementing an iSCSI target on FreeBSD, maybe (then again, maybe not). If you want to be an iSCSI initiator (I think that's the right term), then you'll need to do things similar to what sys/nfsclient/nfs_socket.c does. I could do a quick code walkthrough, but you'd likely be better off studying the nfs code since it will give you a better understanding than I can in a few lines. In addition, because locking has changed over time, the exact version matters. Careful study will show differences in what locks are needed, if any. But in a nutshell, you call socreate to get a socket. You setup the various fields in the socket data structures. You call sosetopt to do the latter. sobind will set this host's endpoint, and soconnect will connect the socket to the remote side. You'll need to setup send and receive buffers and manage them with soreceive and sosend. there's some callbacks that also need to be established as well. And some socket layer locking that may be exposed to your code because there are so few in-kernel protocol implementations that aren't peers to TCP, UDP or IP. I hope this helps. Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 10 07:52:18 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B885616A40F for ; Sun, 10 Dec 2006 07:52:18 +0000 (UTC) (envelope-from ozkan@mersin.edu.tr) Received: from mail.mersin.edu.tr (mail.mersin.edu.tr [193.255.128.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A3AF43C9E for ; Sun, 10 Dec 2006 07:51:09 +0000 (GMT) (envelope-from ozkan@mersin.edu.tr) Received: from localhost (localhost.mersin.edu.tr [127.0.0.1]) by mail.mersin.edu.tr (Postfix) with ESMTP id 9A4DC45403 for ; Sun, 10 Dec 2006 09:59:00 +0200 (EET) X-Virus-Scanned: by amavisd-new at mersin.edu.tr Received: from mail.mersin.edu.tr ([127.0.0.1]) by localhost (mail.mersin.edu.tr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vOKhLFN+CUGu for ; Sun, 10 Dec 2006 09:58:47 +0200 (EET) Received: from [10.0.50.20] (unknown [88.247.50.50]) by mail.mersin.edu.tr (Postfix) with ESMTP id 1B8A1452BD for ; Sun, 10 Dec 2006 09:58:46 +0200 (EET) Message-ID: <457BBCC3.9040605@mersin.edu.tr> Date: Sun, 10 Dec 2006 09:52:35 +0200 From: =?ISO-8859-9?Q?=D6zkan_KIRIK?= User-Agent: Mozilla Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG References: <20061209.222526.-816359937.imp@bsdimp.com> In-Reply-To: <20061209.222526.-816359937.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-9; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2006 07:52:18 -0000 I think netgraph subsystem provides this infrastructure for implementing new protocols. according to netgraph (4) man page: The aim of *netgraph* is to supplement rather than replace the existing kernel networking infrastructure. It provides: *·* A flexible way of combining protocol and link level drivers. *·* A modular way to implement new protocols. *·* A common framework for kernel entities to inter-communicate. *·* A reasonably fast, kernel-based implementation. There are many examples and applications at this address: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ you implementation may be "ng_iscsi" :) I hope this helps, Özkan KIRIK EnderUNIX SDT @ Turkey Software Developer M. Warner Losh yazmýþ: > In message: > "Vishal Patil" writes: > : Could someone point me to an example that shows a SIMPLE network protocol > : implemented over TCP/IP inside the FreeBSD kernel. I think I could look at > : the NFS client driver but is there an example simpler than that. Also is > : there a guide explaining how to go about developing TCP/IP based network > : protocols for FreeBSD. > > [ to implement iSCSI in the kernel ] > > I'm unsure which side you wish to be on. > > There's accept filters that you can write, but I doubt that's what you > want to do. This would be good if you are implementing an iSCSI > target on FreeBSD, maybe (then again, maybe not). > > If you want to be an iSCSI initiator (I think that's the right term), > then you'll need to do things similar to what > sys/nfsclient/nfs_socket.c does. I could do a quick code walkthrough, > but you'd likely be better off studying the nfs code since it will > give you a better understanding than I can in a few lines. In > addition, because locking has changed over time, the exact version > matters. Careful study will show differences in what locks are > needed, if any. > > But in a nutshell, you call socreate to get a socket. You setup the > various fields in the socket data structures. You call sosetopt to do > the latter. sobind will set this host's endpoint, and soconnect will > connect the socket to the remote side. You'll need to setup send and > receive buffers and manage them with soreceive and sosend. there's > some callbacks that also need to be established as well. And some > socket layer locking that may be exposed to your code because there > are so few in-kernel protocol implementations that aren't peers to > TCP, UDP or IP. > > I hope this helps. > > Warner > > > _______________________________________________ > 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 Dec 10 08:25:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90E1216A416 for ; Sun, 10 Dec 2006 08:25:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outE.internet-mail-service.net (outE.internet-mail-service.net [216.240.47.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5409A43CA3 for ; Sun, 10 Dec 2006 08:24:47 +0000 (GMT) (envelope-from julian@elischer.org) Received: from shell.idiom.com (HELO idiom.com) (216.240.47.20) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Sun, 10 Dec 2006 00:11:23 -0800 Received: from [192.168.2.4] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id kBA8Pr1B065022; Sun, 10 Dec 2006 00:25:54 -0800 (PST) (envelope-from julian@elischer.org) Message-ID: <457BC490.30904@elischer.org> Date: Sun, 10 Dec 2006 00:25:52 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: =?ISO-8859-9?Q?=D6zkan_KIRIK?= References: <20061209.222526.-816359937.imp@bsdimp.com> <457BBCC3.9040605@mersin.edu.tr> In-Reply-To: <457BBCC3.9040605@mersin.edu.tr> Content-Type: text/plain; charset=ISO-8859-9; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2006 08:25:56 -0000 Özkan KIRIK wrote: > I think netgraph subsystem provides this infrastructure for implementing > new protocols. > > according to netgraph (4) man page: > > The aim of *netgraph* is to supplement rather than replace the existing > kernel networking infrastructure. It provides: > > *·* A flexible way of combining protocol and link level drivers. > *·* A modular way to implement new protocols. > *·* A common framework for kernel entities to inter-communicate. > *·* A reasonably fast, kernel-based implementation. > > There are many examples and applications at this address: > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ also look it up in the daemon news archives at: http://ezine.daemonnews.org/200003/netgraph.html a little out of date but the basic ideas are still right. > > > you implementation may be "ng_iscsi" :) I thought of this but the trick is to do with the locking.. You would need to get a transfer of control from the netgraph locking domain to the geom or scsi universe's locking domain. There are all the components needed if you consider using the ksocket netgraph node to open a TCP socket within the kernel, and you could hook that to a scsi device netgraph node almost directly if you wrote it, but the hardest part will be to create a method of crossing that locking divide. Still it's possibly worth looking at. Of course the method suggested by Warner is also very valid and may be about the same amount of work. > > I hope this helps, > > Özkan KIRIK > EnderUNIX SDT @ Turkey > Software Developer > From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 10 15:05:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0258B16A50C for ; Sun, 10 Dec 2006 15:05:54 +0000 (UTC) (envelope-from bsd.devil@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BF2F43C9E for ; Sun, 10 Dec 2006 15:04:42 +0000 (GMT) (envelope-from bsd.devil@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so716543pyh for ; Sun, 10 Dec 2006 07:05:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=AvR9H/vQZGlXhN1SVVY1yVbcXUcHIK9vepUs9zK2GmqDqBA4hUwOlQVXjA3jCzhaMb7nTiBcPfyTGVTlKKtA7/jPmlGwlQZq7jzhlVWtl5u05qc2mJumq67lkryvufhqcBPsckDjMMb+Ljxeo9lCX/A5mqR5gdbpSnaX1OsDK1E= Received: by 10.65.180.7 with SMTP id h7mr9084701qbp.1165763151975; Sun, 10 Dec 2006 07:05:51 -0800 (PST) Received: by 10.65.224.17 with HTTP; Sun, 10 Dec 2006 07:05:51 -0800 (PST) Message-ID: Date: Sun, 10 Dec 2006 10:05:51 -0500 From: "Vishal Patil" To: "Julian Elischer" In-Reply-To: <457BC490.30904@elischer.org> MIME-Version: 1.0 References: <20061209.222526.-816359937.imp@bsdimp.com> <457BBCC3.9040605@mersin.edu.tr> <457BC490.30904@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: =?ISO-8859-1?Q?=D6zkan_KIRIK?= , freebsd-hackers@freebsd.org Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2006 15:05:54 -0000 Would like to thank you all folks. These conversations are really good way of learning things...Also it is good to know different perspectives for solving the same problem.... On 12/10/06, Julian Elischer wrote: > > =D6zkan KIRIK wrote: > > I think netgraph subsystem provides this infrastructure for implementin= g > > new protocols. > > > > according to netgraph (4) man page: > > > > The aim of *netgraph* is to supplement rather than replace the > existing > > kernel networking infrastructure. It provides: > > > > *=B7* A flexible way of combining protocol and link level drive= rs. > > *=B7* A modular way to implement new protocols. > > *=B7* A common framework for kernel entities to inter-communica= te. > > *=B7* A reasonably fast, kernel-based implementation. > > > > There are many examples and applications at this address: > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ > > also look it up in the daemon news archives at: > http://ezine.daemonnews.org/200003/netgraph.html > > a little out of date but the basic ideas are still right. > > > > > > > > you implementation may be "ng_iscsi" :) > > I thought of this but the trick is to do with the locking.. > You would need to get a transfer of control from the > netgraph locking domain to the geom or scsi universe's locking domain. > > There are all the components needed if you consider using the ksocket > netgraph node to open a TCP socket within the kernel, and you could hook > that to a scsi device netgraph node almost directly if you wrote it, > but the hardest part will be to create a method of crossing that locking > divide. > > Still it's possibly worth looking at. Of course the method suggested by > Warner is also very valid and may be about the same amount of work. > > > > > > I hope this helps, > > > > =D6zkan KIRIK > > EnderUNIX SDT @ Turkey > > Software Developer > > > _______________________________________________ > 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 Mon Dec 11 00:04:48 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C27A716A47E for ; Mon, 11 Dec 2006 00:04:48 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4E2443CAC for ; Mon, 11 Dec 2006 00:03:30 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.37]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id kBB04Z0Z058778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Dec 2006 10:34:35 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 11 Dec 2006 10:34:13 +1030 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1797883.FaQRAvWiz9"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612111034.28390.doconnor@gsoft.com.au> X-Spam-Score: -2.643 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.57 on 203.31.81.10 Subject: Intel i8xx watchdog driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 00:04:48 -0000 --nextPart1797883.FaQRAvWiz9 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I saw your (2004) post about the watchdog driver for the i8xx and I was=20 wondering if you could send it to me? Thanks. =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 --nextPart1797883.FaQRAvWiz9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFfKCM5ZPcIHs/zowRAvvuAJ9D72rKM4brUdRLLg79CEDSYwV2iQCcC+Y3 QaqgAkaAw5WOOmbvBhv9aQw= =wsu0 -----END PGP SIGNATURE----- --nextPart1797883.FaQRAvWiz9-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 01:51:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 534D616A49E for ; Mon, 11 Dec 2006 01:51:01 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB8B643CA4 for ; Mon, 11 Dec 2006 01:49:43 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GtaHq-0007rE-OO for freebsd-hackers@freebsd.org; Mon, 11 Dec 2006 02:48:58 +0100 Received: from 89-172-59-50.adsl.net.t-com.hr ([89.172.59.50]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Dec 2006 02:48:58 +0100 Received: from ivoras by 89-172-59-50.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Dec 2006 02:48:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Mon, 11 Dec 2006 02:44:37 +0100 Lines: 30 Message-ID: References: <20061209.222526.-816359937.imp@bsdimp.com> <457BBCC3.9040605@mersin.edu.tr> <457BC490.30904@elischer.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0965B746F8F534864EEAA964" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 89-172-59-50.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: X-Enigmail-Version: 0.94.1.2 Sender: news Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 01:51:01 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0965B746F8F534864EEAA964 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Vishal Patil wrote: > Would like to thank you all folks. These conversations are really good = way > of learning things...Also it is good to know different perspectives for= > solving the same problem.... You could also look at how geom_gate does it (but it might be buggy). --------------enig0965B746F8F534864EEAA964 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFfLgLldnAQVacBcgRAqmKAJ9j7rVwuiJ+7kteuM7tMmA554woRwCg+YUN u1kaNIsCx8Yc/Zr6y8s79RM= =e0y3 -----END PGP SIGNATURE----- --------------enig0965B746F8F534864EEAA964-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 04:06:21 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A75A416A415 for ; Mon, 11 Dec 2006 04:06:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F08C43CA4 for ; Mon, 11 Dec 2006 04:05:07 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBB44buj082995; Sun, 10 Dec 2006 21:04:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 10 Dec 2006 21:05:33 -0700 (MST) Message-Id: <20061210.210533.-1632631349.imp@bsdimp.com> To: bsd.devil@gmail.com From: "M. Warner Losh" In-Reply-To: References: <457BBCC3.9040605@mersin.edu.tr> <457BC490.30904@elischer.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 10 Dec 2006 21:04:39 -0700 (MST) Cc: ozkan@mersin.edu.tr, freebsd-hackers@FreeBSD.ORG, julian@elischer.org Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 04:06:21 -0000 In message: "Vishal Patil" writes: : Would like to thank you all folks. These conversations are really goo= d way : of learning things...Also it is good to know different perspectives f= or : solving the same problem.... Yes. the ng_iscsi suggestion is also viable. It may be a little less work than going to the raw sockets. Careful performance measurements may be necessary, however, since there have been cases when the ng_foo implementation wasn't fast enough and going to a lower level was necessary. There have also been many cases where ng_bar was perfectly fast enough and there was no need to go to the lower leve. At the very least, the ng code will get you to layer your code well and provide a faster means of development than going to the raw socket layer. Warner : On 12/10/06, Julian Elischer wrote: : > : > =D6zkan KIRIK wrote: : > > I think netgraph subsystem provides this infrastructure for imple= menting : > > new protocols. : > > : > > according to netgraph (4) man page: : > > : > > The aim of *netgraph* is to supplement rather than replace the= : > existing : > > kernel networking infrastructure. It provides: : > > : > > *=B7* A flexible way of combining protocol and link level= drivers. : > > *=B7* A modular way to implement new protocols. : > > *=B7* A common framework for kernel entities to inter-com= municate. : > > *=B7* A reasonably fast, kernel-based implementation. : > > : > > There are many examples and applications at this address: : > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ : > : > also look it up in the daemon news archives at: : > http://ezine.daemonnews.org/200003/netgraph.html : > : > a little out of date but the basic ideas are still right. : > : > : > > : > > : > > you implementation may be "ng_iscsi" :) : > : > I thought of this but the trick is to do with the locking.. : > You would need to get a transfer of control from the : > netgraph locking domain to the geom or scsi universe's locking doma= in. : > : > There are all the components needed if you consider using the ksock= et : > netgraph node to open a TCP socket within the kernel, and you could= hook : > that to a scsi device netgraph node almost directly if you wrote it= , : > but the hardest part will be to create a method of crossing that lo= cking : > divide. : > : > Still it's possibly worth looking at. Of course the method suggeste= d by : > Warner is also very valid and may be about the same amount of work.= : > : > : > > : > > I hope this helps, : > > : > > =D6zkan KIRIK : > > EnderUNIX SDT @ Turkey : > > Software Developer : > > : > _______________________________________________ : > freebsd-hackers@freebsd.org mailing list : > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers : > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freeb= sd.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 Mon Dec 11 06:51:10 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96E9716A40F for ; Mon, 11 Dec 2006 06:51:10 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 666E543C9F for ; Mon, 11 Dec 2006 06:49:55 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout4.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kBB6p98f017164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 10 Dec 2006 22:51:09 -0800 X-Auth-Received: from [192.168.0.101] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kBB6p9Rv023118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 10 Dec 2006 22:51:09 -0800 Message-ID: <457CFFDC.8050209@u.washington.edu> Date: Sun, 10 Dec 2006 22:51:08 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (X11/20061116) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <457BBCC3.9040605@mersin.edu.tr> <457BC490.30904@elischer.org> <20061210.210533.-1632631349.imp@bsdimp.com> In-Reply-To: <20061210.210533.-1632631349.imp@bsdimp.com> X-Enigmail-Version: 0.94.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.12.10.223933 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __LINES_OF_YELLING 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 06:51:10 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 M. Warner Losh wrote: > In message: > "Vishal Patil" writes: > : Would like to thank you all folks. These conversations are really good way > : of learning things...Also it is good to know different perspectives for > : solving the same problem.... > > Yes. the ng_iscsi suggestion is also viable. It may be a little less > work than going to the raw sockets. Careful performance measurements > may be necessary, however, since there have been cases when the ng_foo > implementation wasn't fast enough and going to a lower level was > necessary. There have also been many cases where ng_bar was perfectly > fast enough and there was no need to go to the lower leve. At the > very least, the ng code will get you to layer your code well and > provide a faster means of development than going to the raw socket > layer. > > Warner > > : On 12/10/06, Julian Elischer wrote: > : > > : > Özkan KIRIK wrote: > : > > I think netgraph subsystem provides this infrastructure for implementing > : > > new protocols. > : > > > : > > according to netgraph (4) man page: > : > > > : > > The aim of *netgraph* is to supplement rather than replace the > : > existing > : > > kernel networking infrastructure. It provides: > : > > > : > > *·* A flexible way of combining protocol and link level drivers. > : > > *·* A modular way to implement new protocols. > : > > *·* A common framework for kernel entities to inter-communicate. > : > > *·* A reasonably fast, kernel-based implementation. > : > > > : > > There are many examples and applications at this address: > : > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ > : > > : > also look it up in the daemon news archives at: > : > http://ezine.daemonnews.org/200003/netgraph.html > : > > : > a little out of date but the basic ideas are still right. > : > > : > > : > > > : > > > : > > you implementation may be "ng_iscsi" :) > : > > : > I thought of this but the trick is to do with the locking.. > : > You would need to get a transfer of control from the > : > netgraph locking domain to the geom or scsi universe's locking domain. > : > > : > There are all the components needed if you consider using the ksocket > : > netgraph node to open a TCP socket within the kernel, and you could hook > : > that to a scsi device netgraph node almost directly if you wrote it, > : > but the hardest part will be to create a method of crossing that locking > : > divide. > : > > : > Still it's possibly worth looking at. Of course the method suggested by > : > Warner is also very valid and may be about the same amount of work. > : > > : > > : > > > : > > I hope this helps, > : > > > : > > Özkan KIRIK > : > > EnderUNIX SDT @ Turkey > : > > Software Developer > : > > May be better to start from scratch though, studying other protocols, given the fact that networking technology is going to be increasing in leaps and bounds it seems in the next couple years (1Gbit -> 10Gbit -> 100Gbit). Just a thought, but it seems like an ad-hoc solution may be better in the long run.. - -Garrett -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFfP/c6CkrZkzMC68RAsUWAJ0YIstzev855y9t7tmtArvlSoQO4wCfblfa SmiAvkWrVJKvIxGb3skdwOg= =Bxm3 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 14:17:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B585C16A50B; Mon, 11 Dec 2006 14:17:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2C1C440E9; Mon, 11 Dec 2006 13:59:45 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 1925046E74; Mon, 11 Dec 2006 09:00:48 -0500 (EST) Date: Mon, 11 Dec 2006 14:00:48 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Vishal Patil In-Reply-To: Message-ID: <20061211135321.F4227@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 14:17:36 -0000 On Sat, 9 Dec 2006, Vishal Patil wrote: > Could someone point me to an example that shows a SIMPLE network protocol > implemented over TCP/IP inside the FreeBSD kernel. I think I could look at > the NFS client driver but is there an example simpler than that. Also is > there a guide explaining how to go about developing TCP/IP based network > protocols for FreeBSD. Thanks Here are some consumers of sockets in the kernel: - NFS client, which creates and connects both UDP and TCP sockets, uses them for I/O, etc. - NFS server, which uses UDP and TCP sockets for I/O. Unlike the NFS client, it doesn't open the sockets in kernel, rather, it relies on a user process (nfsd) passing validated sockets into the kernel. - System V streams (dev/streams), which uses socket pairs to implement streams. Does creation and I/O. - fifofs, which implements POSIX fifos using a pair of UNIX domain sockets. Again, does creation and I/O. - portalfs, which implements the portal file system using sockets. - ng_ksocket, which provides a netgraph interface to sockets in the kernel. - netncp, which provides an NCP RPC interface over SPX/IPX for nwfs. - netsmb, which provides an SMB RPC interface over TCP/IP for smbfs. - rpclnt, which is used by the nfs4client, and is functionally similar to the NFS client RPC code for NFS2/NFS3 in nfsclient. - bootp_subr.c and krpc_subr.c, which are used by the NFS root code to set up NFS access during a diskless boot: they perform the bootp exchange to retrieve an IP address, and then the necessary RPC mount protocol to query a root file handle to set up the NFS client for the file system root. All of these examples have upsides and downsides, and vary in maturity. I'd probably start by looking at the NFS client and fifofs. One of the biggest questions you'll need to answer is what your event model is and how it will relate to any worker threads you may have. Many of the in-kernel socket consumers use socket upcalls to get direct notifications of socket events from within the network stack, allowing for fast socket draining and TCP acking. On the other hand, in the netisr/ithread context, you can't perform blocking memory allocation and disk I/O, so if that will be involved, you'll need worker threads in the style of the NFS server. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 14:23:10 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1EA1116A415 for ; Mon, 11 Dec 2006 14:23:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B665044245 for ; Mon, 11 Dec 2006 14:03:40 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id E59D646E74; Mon, 11 Dec 2006 09:04:47 -0500 (EST) Date: Mon, 11 Dec 2006 14:04:47 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20061210.210533.-1632631349.imp@bsdimp.com> Message-ID: <20061211140144.A4227@fledge.watson.org> References: <457BBCC3.9040605@mersin.edu.tr> <457BC490.30904@elischer.org> <20061210.210533.-1632631349.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: ozkan@mersin.edu.tr, freebsd-hackers@FreeBSD.ORG, julian@elischer.org, bsd.devil@gmail.com Subject: Re: Example network protocol implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 14:23:10 -0000 On Sun, 10 Dec 2006, M. Warner Losh wrote: > In message: > "Vishal Patil" writes: > : Would like to thank you all folks. These conversations are really good way > : of learning things...Also it is good to know different perspectives for > : solving the same problem.... > > Yes. the ng_iscsi suggestion is also viable. It may be a little less work > than going to the raw sockets. Careful performance measurements may be > necessary, however, since there have been cases when the ng_foo > implementation wasn't fast enough and going to a lower level was necessary. > There have also been many cases where ng_bar was perfectly fast enough and > there was no need to go to the lower leve. At the very least, the ng code > will get you to layer your code well and provide a faster means of > development than going to the raw socket layer. As someone who doesn't consume Netgraph a lot, can you tell me what benefit using Netgraph for something like iSCSI might have when compared with the kernel socket API used to implement user sockets, NFS, SMB, etc? Are there parsing/decapsulation parts of the protocol that lend themselves well to netgraphs more modular approach vs. the more traditional approach of layering RPC wrapping over the socket layer? BTW, one of the things on my todo list is a socket(9) man page, which is well overdue. I've been postponing writing it while finishing up the kernel socket API cleanup in -CURRENT. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 17:08:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7038116A407 for ; Mon, 11 Dec 2006 17:08:37 +0000 (UTC) (envelope-from ez.c0re@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB0A843CAC for ; Mon, 11 Dec 2006 17:07:18 +0000 (GMT) (envelope-from ez.c0re@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1256082uge for ; Mon, 11 Dec 2006 09:08:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=RZietMC5r/q5LbYEhupffUEgRd+DPy47TeXsoAH7mhQanD7/9/k0HXaBTcIDBDufD1GVxEfLCh/FbrL29mGFzFzXIui/+jc6P8g6NL56kazHkui0jV0NmrY+C4n42jaF8ZXJC6YRPiUoXWBQaJtydT/CyVE1gQPI84Bk6ycp33k= Received: by 10.67.97.7 with SMTP id z7mr10157930ugl.1165856914262; Mon, 11 Dec 2006 09:08:34 -0800 (PST) Received: by 10.66.237.4 with HTTP; Mon, 11 Dec 2006 09:08:34 -0800 (PST) Message-ID: <6dd8736a0612110908q2cdb99a0rf3b8da3f5e4bdfee@mail.gmail.com> Date: Mon, 11 Dec 2006 17:08:34 +0000 From: "c0re dumped" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Reading in real time from a file without pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 17:08:37 -0000 Hello everyone, I wonder if is possible to read data from a certain file without using a pipe. Let me explain: I have a process already writing messages to a logfile. I want to read all written data (without neither stop nor interfere normal log process) from another process in real time. How can I achieve it ? thanks -- No stupid signatures here. From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 17:23:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFC8B16A403 for ; Mon, 11 Dec 2006 17:23:56 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 959AA43CBB for ; Mon, 11 Dec 2006 17:22:38 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id kBBHNtES086708; Mon, 11 Dec 2006 11:23:55 -0600 (CST) (envelope-from dan) Date: Mon, 11 Dec 2006 11:23:55 -0600 From: Dan Nelson To: c0re dumped Message-ID: <20061211172354.GE69299@dan.emsphone.com> References: <6dd8736a0612110908q2cdb99a0rf3b8da3f5e4bdfee@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6dd8736a0612110908q2cdb99a0rf3b8da3f5e4bdfee@mail.gmail.com> X-OS: FreeBSD 6.2-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: Reading in real time from a file without pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 17:23:56 -0000 In the last episode (Dec 11), c0re dumped said: > I wonder if is possible to read data from a certain file without > using a pipe. > > Let me explain: > > I have a process already writing messages to a logfile. I want to > read all written data (without neither stop nor interfere normal log > process) from another process in real time. > > How can I achieve it ? Take a look at how the tail command does it. You can either stat the file periodically then read the new data if you see the timestamp or size change (portable), or use a kqueue to get notified immediately of any updates (not portable). -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 18:25:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6368516A4FD for ; Mon, 11 Dec 2006 18:25:20 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0979D44941 for ; Mon, 11 Dec 2006 17:59:05 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id kBBI06ch060792; Mon, 11 Dec 2006 12:00:06 -0600 (CST) (envelope-from dan) Date: Mon, 11 Dec 2006 12:00:06 -0600 From: Dan Nelson To: c0re dumped Message-ID: <20061211180006.GF69299@dan.emsphone.com> References: <6dd8736a0612110908q2cdb99a0rf3b8da3f5e4bdfee@mail.gmail.com> <20061211172354.GE69299@dan.emsphone.com> <6dd8736a0612110954o2136156cqc2b07bf7da054849@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6dd8736a0612110954o2136156cqc2b07bf7da054849@mail.gmail.com> X-OS: FreeBSD 6.2-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: Reading in real time from a file without pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 18:25:20 -0000 In the last episode (Dec 11), c0re dumped said: > Thanks Dan, > > But using tail I will have to use a pipe. That's just what I don't want. > > That other process what I'm referring to is a C program which I'm > working on. > > I want to use some C function that allow me to do it (if such a > function exists, of course). That's why I said "Take a look at how the tail command does it", not "Use the tail command" :) -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 03:55:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31BE216A5D0 for ; Tue, 12 Dec 2006 03:55:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2F2F43CBF for ; Tue, 12 Dec 2006 03:54:24 +0000 (GMT) (envelope-from adrian.chadd@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1640480wxc for ; Mon, 11 Dec 2006 19:55:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=CCXltcp3nesWRN74KInJsQJIq1belp8YxzITyIMR0UAGCeC2q/Fdxfoj0vxi9JmEfl85cYJIavBPxA/MoJL0dtrnMr/wGTX+jLFmqhWY+ysalcvhjOL7tZzjSKmv03nt/hWu5IElxbTzVcZGMD15Bu/u4WfUK+nvFCqKvsO5hmM= Received: by 10.90.25.7 with SMTP id 7mr7875174agy.1165895744000; Mon, 11 Dec 2006 19:55:44 -0800 (PST) Received: by 10.90.31.12 with HTTP; Mon, 11 Dec 2006 19:55:43 -0800 (PST) Message-ID: Date: Tue, 12 Dec 2006 12:55:43 +0900 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 165a20a788f5d91f Subject: pmcstat and squid X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 03:55:46 -0000 I'm trying to use pmcstat to profile userspace time used in Squid. I just can't seem to get pmcstat to report anything useful. The last thing I tried was something like: # pmcstat -O file -P instructions -t # pmcstat -R file -g # ls k7-retired-instructions kernel.gmon There doesn't seem to be a good example for process-based counting stuff with PMC. Could anyone give me a hand? Thanks! adrian -- Adrian Chadd - adrian@freebsd.org From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 04:06:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACE6616A415 for ; Tue, 12 Dec 2006 04:06:55 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6F1343CB7 for ; Tue, 12 Dec 2006 04:05:30 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so108569nfc for ; Mon, 11 Dec 2006 20:06:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FpNqO+msaEmoXPB2ka6eT/TDPyYS1/c2A9VTFGwuaulUS2TfQOBLKTLPGU1R50DTVK3kAZDpw0npjwfDFmg6jaoXZ6pjJts5K+0rUJRF4S5Tbu188/xkNre4lqD7o18OU0QpeZ08cipBp98CeQMjwIbd/is8BBFPvv7tlsiZufI= Received: by 10.78.166.7 with SMTP id o7mr1923209hue.1165896409530; Mon, 11 Dec 2006 20:06:49 -0800 (PST) Received: by 10.78.201.7 with HTTP; Mon, 11 Dec 2006 20:06:49 -0800 (PST) Message-ID: <84dead720612112006r5573a04fge2664ffe3a93f796@mail.gmail.com> Date: Tue, 12 Dec 2006 09:36:49 +0530 From: "Joseph Koshy" To: "Adrian Chadd" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: pmcstat and squid X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 04:06:55 -0000 > I'm trying to use pmcstat to profile userspace time used in > Squid. I just can't seem to get pmcstat to report anything > useful. > > The last thing I tried was something like: > > # pmcstat -O file -P instructions -t > # pmcstat -R file -g > # ls k7-retired-instructions > kernel.gmon > > There doesn't seem to be a good example for > process-based counting stuff with PMC. Could anyone > give me a hand? > > Thanks! I can think of one of two scenarios: 1) the squid process was in the kernel when the samples got taken. This could happen if the process was say in select() handling all the time. 2) There a bug in my process handling code that is being triggered (hwpmc undercounts process-mode samples), and samples are being missed. Regards, Koshy From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 04:11:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8826A16A417 for ; Tue, 12 Dec 2006 04:11:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA41F43CB9 for ; Tue, 12 Dec 2006 04:10:16 +0000 (GMT) (envelope-from adrian.chadd@gmail.com) Received: by wr-out-0506.google.com with SMTP id i28so838623wra for ; Mon, 11 Dec 2006 20:11:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=NcnI2P5EGJOCipY3SyRLYSDreWaVIpDneAyY6d7Osd8yqNm7e5+oBMehqvGzkBO1XEPDs9ITatDchyKQquwuSrERqYPXU2VL5RvjQ3EQbLTiGZY263XR1Axi9iJh2Cgg6R4/bDC+P0Z7gpS8/U7VJCocdkQa3CCNXI5aQsQRBI8= Received: by 10.90.94.2 with SMTP id r2mr7855475agb.1165896696087; Mon, 11 Dec 2006 20:11:36 -0800 (PST) Received: by 10.90.31.12 with HTTP; Mon, 11 Dec 2006 20:11:36 -0800 (PST) Message-ID: Date: Tue, 12 Dec 2006 13:11:36 +0900 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Joseph Koshy" In-Reply-To: <84dead720612112006r5573a04fge2664ffe3a93f796@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <84dead720612112006r5573a04fge2664ffe3a93f796@mail.gmail.com> X-Google-Sender-Auth: 957ed23d4d227879 Cc: freebsd-hackers@freebsd.org Subject: Re: pmcstat and squid X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 04:11:39 -0000 On 12/12/06, Joseph Koshy wrote: > > I can think of one of two scenarios: > > 1) the squid process was in the kernel when the > samples got taken. This could happen if the > process was say in select() handling all the time. > 2) There a bug in my process handling code that is > being triggered (hwpmc undercounts process-mode > samples), and samples are being missed. I can't imagine why Squid would suddenly be in kernel mode all the time. In fact, its in kernel space about 20% of the time under this workload (with another 30% spent in interrupts.) Here's the output from my latest attempt: jacinta# pmcstat -S instructions -O samples.out ^Cjacinta# ls -l total 89650 -rw-r--r-- 1 root wheel 576 Dec 12 03:52 1 -rw-r--r-- 1 root wheel 91719744 Dec 12 04:10 samples.out jacinta# pmcstat -R samples.out -g jacinta# cd k7-retired-instructions/ jacinta# ls kernel.gmon ld-elf.so.1.gmon libc.so.6.gmon jacinta# ls -l total 3116 -rw-r--r-- 1 root wheel 2704268 Dec 12 04:10 kernel.gmon -rw-r--r-- 1 root wheel 59474 Dec 12 04:10 ld-elf.so.1.gmon -rw-r--r-- 1 root wheel 372962 Dec 12 04:10 libc.so.6.gmon Squid is running but there's no profiling information for it still.. Scarily, on this Athlon 1800XP: % cumulative self self total time seconds seconds calls ms/call ms/call name 5.1 45254.00 45254.00 SHA256_Transform [1] 4.0 81184.00 35930.00 tcp_input [2] 3.8 114879.00 33695.00 tcp_output [3] 2.8 139645.00 24766.00 critical_exit [4] 2.5 162199.00 22554.00 bus_dmamap_load_mbuf_sg [5] 2.3 182415.00 20216.00 generic_bzero [6] 2.1 201156.00 18741.00 kqueue_register [7] The kernel spends quite a bit of time in SHA256_Transform; I wonder if it has to do with the sheer volume of TCP connections I'm making.. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 04:25:12 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9161416A536 for ; Tue, 12 Dec 2006 04:25:12 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F4EF43D4C for ; Tue, 12 Dec 2006 04:23:33 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1402861uge for ; Mon, 11 Dec 2006 20:24:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rE1EkkBQKtmvQpmmN5wO9xBxKMgNr0c1aSh986jCgUaVMeMN4jbAGwoL9z24M/A6AIJR/4w+4bW2hkxX98xqF9c36jRqSVSQQA4flZidWeYGh5fvpg9mL7Npe2AWFkNou3jtCFhnDkFAXeF5iNkAjT5ZPFbc0ffKvk/NyEy0Fkc= Received: by 10.78.117.10 with SMTP id p10mr2295449huc.1165897492392; Mon, 11 Dec 2006 20:24:52 -0800 (PST) Received: by 10.78.201.7 with HTTP; Mon, 11 Dec 2006 20:24:52 -0800 (PST) Message-ID: <84dead720612112024w16466c65vb656e1b8088b15c5@mail.gmail.com> Date: Tue, 12 Dec 2006 09:54:52 +0530 From: "Joseph Koshy" To: "Adrian Chadd" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <84dead720612112006r5573a04fge2664ffe3a93f796@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: pmcstat and squid X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 04:25:13 -0000 > Squid is running but there's no profiling information for it > still.. Could you run grep the output of `pmcstat -R' (no "-g") for mention of the squid processes pids. Also, try pmcstat -v -v (for a breakup of the buckets). -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 04:48:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB9AD16A403 for ; Tue, 12 Dec 2006 04:48:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id D19FB43C9E for ; Tue, 12 Dec 2006 04:46:50 +0000 (GMT) (envelope-from adrian.chadd@gmail.com) Received: by wr-out-0506.google.com with SMTP id i28so840139wra for ; Mon, 11 Dec 2006 20:48:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=efwipjtBZbH+SYHUjUu6uciUzVNOpx/4Qxxa++XMeSR8+VnQvjhiiX+xwFwq6U9UhkxwGvfSxUMeWyZiDFyZod+YeQtMaXB27mA0eZDDp3vGWtd0Mw3RXSLLS4imZGWZRZyU1ObiC10LF1PLjPYwsMNVggSQ0pjoZBf+ttYkIH8= Received: by 10.90.50.1 with SMTP id x1mr7923555agx.1165898890117; Mon, 11 Dec 2006 20:48:10 -0800 (PST) Received: by 10.90.31.12 with HTTP; Mon, 11 Dec 2006 20:48:10 -0800 (PST) Message-ID: Date: Tue, 12 Dec 2006 13:48:10 +0900 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Joseph Koshy" In-Reply-To: <84dead720612112024w16466c65vb656e1b8088b15c5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <84dead720612112006r5573a04fge2664ffe3a93f796@mail.gmail.com> <84dead720612112024w16466c65vb656e1b8088b15c5@mail.gmail.com> X-Google-Sender-Auth: 0939b33007a25e41 Cc: freebsd-hackers@freebsd.org Subject: Re: pmcstat and squid X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 04:48:12 -0000 There's plenty of squid process pid entries in the output of pmcstat -R. This was gathered with pmcstat -S instructions -O samples.out. pmcstat -R samples.out -g just generates kernel.gmon. The top of the file: initlog 0x1020003 "AMD_K7" allocate 0x101 "k7-retired-instructions" 0x20000 sample 0x101 61458 0x28210f05 u sample 0x101 61458 0x281a7a97 u sample 0x101 61458 0xc095c5d3 s sample 0x101 61458 0xc0701141 s I'm running 6.2-PRERELEASE and pmcstat doesn't have '-v'. Adrian On 12/12/06, Joseph Koshy wrote: > > Squid is running but there's no profiling information for it > > still.. > > Could you run grep the output of `pmcstat -R' (no "-g") > for mention of the squid processes pids. > > Also, try pmcstat -v -v (for a breakup of the buckets). > > -- > FreeBSD Volunteer, http://people.freebsd.org/~jkoshy > -- Adrian Chadd - adrian@freebsd.org From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 17:25:01 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECF3616A417 for ; Tue, 12 Dec 2006 17:25:01 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id E518C43CD7 for ; Tue, 12 Dec 2006 17:16:01 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Tue, 12 Dec 2006 12:17:14 -0500 id 00056414.457EE41A.00006639 Date: Tue, 12 Dec 2006 12:17:14 -0500 From: Bill Moran To: hackers@freebsd.org Message-Id: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: shmmax tops out at 2G? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 17:25:02 -0000 [I sent this to questions@ yesterday and have yet to get a response. I suspect it may be a little more technical than questions@] uname -a FreeBSD db00.lab00 6.2-BETA3 FreeBSD 6.2-BETA3 #1: Fri Dec 8 09:27:37 EST 2006 root@db00.lab00:/usr/obj/usr/src/sys/DB-2850-amd64 amd64 sysctl kern.ipc.shmmax=2200000000 kern.ipc.shmmax: 2100000000 -> -2094967296 Looks like an unsigned 32-bit int. That doesn't seem to scale as well as would be expected on 64-bit arch (or PAE for that matter). Is this a mistake, or intentional? I'm working with some big memory systems, and I sure would like to allocate more than 2G for PostgreSQL to use ... -- Bill Moran Collaborative Fusion Inc. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 16:48:13 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34BCB16A4FD for ; Tue, 12 Dec 2006 16:48:13 +0000 (UTC) (envelope-from marek@1lo.lublin.pl) Received: from core.1lo.lublin.pl (1lo.vlan327.nemes.lubman.net.pl [212.182.71.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4A9A43EB7 for ; Tue, 12 Dec 2006 16:44:56 +0000 (GMT) (envelope-from marek@1lo.lublin.pl) Received: by core.1lo.lublin.pl (Postfix, from userid 1001) id 025DCCFF83; Tue, 12 Dec 2006 17:48:53 +0100 (CET) Date: Tue, 12 Dec 2006 17:48:53 +0100 From: Marek Denis To: hackers@freebsd.org Message-ID: <20061212164853.GA56552@core.1lo.lublin.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Mailman-Approved-At: Tue, 12 Dec 2006 22:33:18 +0000 Cc: Subject: portupgrade and dependencies X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 16:48:13 -0000 Hi all, I must have ommited something, because this wasn't my first upgrade of any soft with portupgrade. But this thime, when I upgraded..let's say ettercap pkg_info -r show that it's depend is also libiconv-1.9.2_1, which is not the most actuall (1.9.2_2). So I just typed: # portupgrade -r ettercap After some time I even noticed some lines like: Cleaning libiconv 1.9.2_2, but afterall, libiconv 1.9.2_1 (and no 1.9.2._2) is still in my system, moreover it is still depend of the newest ettercap. As I always understood, "-r" option in portupgrade upgraded also out-of-dated dependencies of upgraded program. But as I can see not, so how should I keep all sets (program and it's dependencies) up to date? What exactly does -r option in portupgrade? -- greetings Marek From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 18:38:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B999E16A412 for ; Tue, 12 Dec 2006 18:38:42 +0000 (UTC) (envelope-from Sean.P.Sneed@embarq.com) Received: from outbound2-cpk-R.bigfish.com (outbound-cpk.frontbridge.com [207.46.163.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8EC843F54 for ; Tue, 12 Dec 2006 18:32:19 +0000 (GMT) (envelope-from Sean.P.Sneed@embarq.com) Received: from outbound2-cpk.bigfish.com (localhost.localdomain [127.0.0.1]) by outbound2-cpk-R.bigfish.com (Postfix) with ESMTP id 692531B3DFEC for ; Tue, 12 Dec 2006 18:33:33 +0000 (UTC) Received: from mail2-cpk-R.bigfish.com (unknown [192.168.21.3]) by outbound2-cpk.bigfish.com (Postfix) with ESMTP id 618FD1B3E07B for ; Tue, 12 Dec 2006 18:33:33 +0000 (UTC) Received: from mail2-cpk.bigfish.com (localhost.localdomain [127.0.0.1]) by mail2-cpk-R.bigfish.com (Postfix) with ESMTP id 4A405647D1E for ; Tue, 12 Dec 2006 18:33:33 +0000 (UTC) X-BigFish: V Received: by mail2-cpk (MessageSwitch) id 1165948413242619_24649; Tue, 12 Dec 2006 18:33:33 +0000 (UCT) Received: from smtpgw5.sprintspectrum.com (smtpgw5.sprintspectrum.com [207.40.188.13]) by mail2-cpk.bigfish.com (Postfix) with ESMTP id 144B6647C4B for ; Tue, 12 Dec 2006 18:33:33 +0000 (UTC) Received: from mailhost.sprintspectrum.com (smtpgw7.it.sprintspectrum.com [207.40.65.55]) by smtpgw5.sprintspectrum.com (8.12.10/8.12.8) with ESMTP id kBCIXWWp027039 for ; Tue, 12 Dec 2006 12:33:32 -0600 (CST) Received: from plswg03a.ad.sprint.com (PLSWG03A.corp.sprint.com [10.214.11.49]) by mailhost.sprintspectrum.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id kBCIXVMM021597 for ; Tue, 12 Dec 2006 12:33:32 -0600 (CST) Received: from PKDWB11C.ad.sprint.com ([144.226.16.142]) by plswg03a.ad.sprint.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 12 Dec 2006 12:33:31 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Tue, 12 Dec 2006 12:33:30 -0600 Message-ID: <84F3E28D7298614988152E6FD2B37EDA01DD689A@PKDWB11C.ad.sprint.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Keyboard issue Thread-Index: AcceHAWwsJSvxxf2TDu0rdGMr6cUDA== From: "Sneed, Sean P [EQ]" To: X-OriginalArrivalTime: 12 Dec 2006 18:33:31.0670 (UTC) FILETIME=[0648CB60:01C71E1C] X-Mailman-Approved-At: Tue, 12 Dec 2006 22:33:32 +0000 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Keyboard issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 18:38:42 -0000 All,=20 I have installed FreeBSD 6.1 on my Gateway Solo 1450 Laptop and my = keyboard doesn't work right. A example is my letter l displays "o" not = the letter "l". It will work if I hold the "fn" key down just like if I = were pressing the Caps Lock key down continously. I have researched this = a little bit. Do you have any ideas on what this. Please, let me know if = anyone can help or not. I have installed it on a desktop just fine but = it appears there is something it doesn't like about my keyboard drivers. = Thanks,=20 Sean Sneed. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:03:48 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CBB216A4CA for ; Tue, 12 Dec 2006 23:03:48 +0000 (UTC) (envelope-from newroswell@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by mx1.FreeBSD.org (Postfix) with ESMTP id 618C844D07 for ; Tue, 12 Dec 2006 22:29:24 +0000 (GMT) (envelope-from newroswell@gmail.com) Received: by wr-out-0506.google.com with SMTP id i28so1010802wra for ; Tue, 12 Dec 2006 14:30:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=cwQkY7bdK4jSX6uPwHsaeajpK9nazQ7e+0rvFafiMWtopa7bCsCbE14wwRLCIgy02yeQx9zRq+pfCWwvDxWCVu7X1lwrGuEmyWVaeKVxSnd/wd0zGmKQhNvLGfDwa33bUhD4mASw7VC/G95gpoImbBRlusdNcOqtmOnh7vYbmfU= Received: by 10.78.200.3 with SMTP id x3mr55086huf.1165962642008; Tue, 12 Dec 2006 14:30:42 -0800 (PST) Received: by 10.78.192.15 with HTTP; Tue, 12 Dec 2006 14:30:41 -0800 (PST) Message-ID: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> Date: Tue, 12 Dec 2006 14:30:41 -0800 From: "Kevin Sanders" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:03:48 -0000 I'm trying to use KASSERT in my own kernel module and I can't get it to assert even with a KASSERT(0, "test panic"). Is there something else I need to do besides add options INVARIANTS to my kernel config file. Any clues would be appreciated. Kevin From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:20:26 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80C6F16A4FF for ; Tue, 12 Dec 2006 23:20:26 +0000 (UTC) (envelope-from Dino.Michailidis@efi.com) Received: from MAIL1.efi.com (mail.efi.com [192.68.228.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FB76441B0 for ; Tue, 12 Dec 2006 22:57:45 +0000 (GMT) (envelope-from Dino.Michailidis@efi.com) Received: from fcexbh01.efi.internal ([10.3.12.12]) by MAIL1.efi.com with InterScan Messaging Security Suite; Tue, 12 Dec 2006 14:59:51 -0800 Received: from NJEXMB02.efi.internal ([10.32.12.51]) by fcexbh01.efi.internal with Microsoft SMTPSVC(6.0.3790.1830); Tue, 12 Dec 2006 14:58:37 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Tue, 12 Dec 2006 17:55:40 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: portupgrade and dependencies Thread-Index: AccePqlLTOIf08EaTRmV+N68CrHMEgAAfwtU References: <20061212164853.GA56552@core.1lo.lublin.pl> From: "Dino Michailidis" To: "Marek Denis" X-OriginalArrivalTime: 12 Dec 2006 22:58:37.0395 (UTC) FILETIME=[0ED5D230:01C71E41] Cc: hackers@freebsd.org Subject: RE: portupgrade and dependencies X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:20:26 -0000 portupgrade -r will also upgrade packages that depend on the port you = are upgrading. It seems that this is not what you want. portupgrade -R will also upgrade packages required by the port you are upgrading - I believe this *is* what you want. Be sure to use capital '-R', not lower-case '-r'. -Dino -----Original Message----- From: owner-freebsd-hackers@freebsd.org on behalf of Marek Denis Sent: Tue 12/12/2006 11:48 AM To: hackers@freebsd.org Subject: portupgrade and dependencies =20 Hi all, I must have ommited something, because this wasn't my first upgrade of any soft with portupgrade. But this thime, when I upgraded..let's say ettercap pkg_info -r show that it's depend is also libiconv-1.9.2_1, which is not the most actuall (1.9.2_2). So I just typed: # portupgrade -r ettercap After some time I even noticed some lines like: Cleaning libiconv 1.9.2_2, but afterall, libiconv 1.9.2_1 (and no 1.9.2._2) is still in my system, moreover it is still depend of the newest ettercap. As I always understood, "-r" option in portupgrade upgraded also out-of-dated dependencies of upgraded program. But as I can see not, so how should I keep all sets (program and it's dependencies) up to date? What exactly does -r option in portupgrade?=20 --=20 greetings Marek=20 _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:28:48 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F7BD16A517 for ; Tue, 12 Dec 2006 23:28:48 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from antivirus.uni-rostock.de (mailrelay1.uni-rostock.de [139.30.8.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39C5E445C7 for ; Tue, 12 Dec 2006 23:09:54 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Wed, 13 Dec 2006 00:10:52 +0100 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Clearswift SMTPRS 5.2.5) with ESMTP id for ; Wed, 13 Dec 2006 00:10:51 +0100 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Wed, 13 Dec 2006 00:10:51 +0100 X-SCL: 1 39.25% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Wed, 13 Dec 2006 00:10:42 +0100 Received: from britannica.bec.de (storm.stura.uni-rostock.de [139.30.252.72]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0JA600BN3ODUMK@mail.uni-rostock.de> for freebsd-hackers@freebsd.org; Wed, 13 Dec 2006 00:10:42 +0100 (MET) Received: by britannica.bec.de (Postfix, from userid 1000) id 5B77E12A54; Wed, 13 Dec 2006 00:10:39 +0100 (CET) Date: Wed, 13 Dec 2006 00:10:39 +0100 From: Joerg Sonnenberger In-reply-to: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> To: freebsd-hackers@freebsd.org Mail-followup-to: freebsd-hackers@freebsd.org Message-id: <20061212231039.GA4531@britannica.bec.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) References: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> X-OriginalArrivalTime: 12 Dec 2006 23:10:42.0881 (UTC) FILETIME=[BF423310:01C71E42] Subject: Re: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:28:48 -0000 On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote: > I'm trying to use KASSERT in my own kernel module and I can't get it > to assert even with a KASSERT(0, "test panic"). Is there something > else I need to do besides add options INVARIANTS to my kernel config > file. Any clues would be appreciated. Tried CFLAGS+= -DINVARIANTS in the Makefile of the module? Joerg From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:38:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C9D216A686 for ; Tue, 12 Dec 2006 23:38:20 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92777442F7 for ; Tue, 12 Dec 2006 23:26:35 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 165971A4D87; Tue, 12 Dec 2006 15:27:52 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 456AC5131D; Tue, 12 Dec 2006 18:27:51 -0500 (EST) Date: Tue, 12 Dec 2006 18:27:51 -0500 From: Kris Kennaway To: Kevin Sanders Message-ID: <20061212232750.GA22669@xor.obsecurity.org> References: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:38:20 -0000 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote: > I'm trying to use KASSERT in my own kernel module and I can't get it > to assert even with a KASSERT(0, "test panic"). Is there something > else I need to do besides add options INVARIANTS to my kernel config > file. Any clues would be appreciated. Modules built by hand do not use the kernel config file (they don't know which one to use). You can build your module along with your kernel using MODULES_OVERRIDE or equivalent, or just add -DINVARIANTS etc to your module makefile. >=20 > Kevin > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >=20 --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFfzr2Wry0BWjoQKURAjVrAJ9doC1rciA+BaunHRXaKzeLiJwMHACgrCmx rBQobq3R6p38lEUKP/RIMh4= =nDjX -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/-- From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:38:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2053F16A634 for ; Tue, 12 Dec 2006 23:38:23 +0000 (UTC) (envelope-from duane@dwpc.dwlabs.ca) Received: from smtpout.eastlink.ca (smtpout.eastlink.ca [24.222.0.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8CDF43E40 for ; Tue, 12 Dec 2006 23:27:15 +0000 (GMT) (envelope-from duane@dwpc.dwlabs.ca) Received: from ip02.eastlink.ca ([24.222.10.10]) by mta01.eastlink.ca (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0JA6003K7P9B13F1@mta01.eastlink.ca> for freebsd-hackers@freebsd.org; Tue, 12 Dec 2006 19:29:35 -0400 (AST) Received: from blk-224-199-230.eastlink.ca (HELO dwpc.dwlabs.ca) ([24.224.199.230]) by ip02.eastlink.ca with ESMTP; Tue, 12 Dec 2006 19:28:22 -0400 Received: from dwpc.dwlabs.ca (localhost [127.0.0.1]) by dwpc.dwlabs.ca (8.13.8/8.13.8) with ESMTP id kBCNQsnd090300; Tue, 12 Dec 2006 19:26:54 -0400 (AST envelope-from duane@dwpc.dwlabs.ca) Received: (from duane@localhost) by dwpc.dwlabs.ca (8.13.8/8.13.8/Submit) id kBCNQspG090299; Tue, 12 Dec 2006 19:26:54 -0400 (AST envelope-from duane) Date: Tue, 12 Dec 2006 19:26:54 -0400 From: Duane Whitty In-reply-to: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> To: Kevin Sanders Message-id: <20061212232654.GA59426@dwpc.dwlabs.ca> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAAvKfkUY4MfmdGdsb2JhbACNVQE X-IronPort-AV: i="4.09,526,1157338800"; d="scan'208"; a="11061535:sNHT2328687720" References: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:38:23 -0000 On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote: > I'm trying to use KASSERT in my own kernel module and I can't get it > to assert even with a KASSERT(0, "test panic"). Is there something > else I need to do besides add options INVARIANTS to my kernel config > file. Any clues would be appreciated. > > Kevin > _______________________________________________ > 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" According to src/sys/conf/NOTES # The INVARIANT_SUPPORT option makes us compile in support for # verifying some of the internal structures. It is a prerequisite for # 'INVARIANTS', as enabling 'INVARIANTS' will make these functions be # called. Best Regards, Duane Whitty From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:41:13 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E5D316A412 for ; Tue, 12 Dec 2006 23:41:13 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: from web34405.mail.mud.yahoo.com (web34405.mail.mud.yahoo.com [66.163.178.154]) by mx1.FreeBSD.org (Postfix) with SMTP id 3551244501 for ; Tue, 12 Dec 2006 23:32:35 +0000 (GMT) (envelope-from neelnatu@yahoo.com) Received: (qmail 86193 invoked by uid 60001); 12 Dec 2006 23:33:46 -0000 Message-ID: <20061212233346.86191.qmail@web34405.mail.mud.yahoo.com> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=6Kga5PmtXIUsq05C0Y9aQ+g8oIclWBSdHkRPF0EkMDh0hk+r7HMeXHlXi3fZZ/dipalVe4bfwXgvb/0metX1ZHAbHzNAwCkLEOwzJn02//kERGR4MgxRwQZc3WCbghNgyGxyGI5KbO1uhWsCE1iEmF3LTTr1ATXhGh6dCB5X0c4=; X-YMail-OSG: OsqRQ68VM1mpKCZD9IVRzrtbCoUU4tRo9fOH7mWK_tDbeitya1NvS0Vgl7yhwr.P6hs4718.jMa91DCROlt7n6EaSLslU3NTg0DQFGbv6dvya43OE5uXapEp300PCnJNTevKbiurJNkWJ_c- Received: from [198.95.226.224] by web34405.mail.mud.yahoo.com via HTTP; Tue, 12 Dec 2006 15:33:46 PST Date: Tue, 12 Dec 2006 15:33:46 -0800 (PST) From: Neelkanth Natu To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Neelkanth Shashikant Natu Subject: MFS_IMAGE with a DEBUG kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:41:13 -0000 Hi, Trying to stuff in an MFS_IMAGE into a debug kernel does not work in -current. kern.post.mk tries to put the MFS_IMAGE in ${KERNEL_KO} when building ${FULLKERNEL} - but ${KERNEL_KO} has not been created at that point. The error message I get is: linking kernel.debug text data bss dec hex filename 3540430 4532668 149800 8222898 7d78b2 kernel.debug strings: 'kernel': No such file rm: kernel: No such file or directory *** Error code 1 The following patch against version 1.98 of kern.post.mk fixes the problem: --- kern.post.mk.orig Tue Dec 12 13:55:38 2006 +++ kern.post.mk Tue Dec 12 15:28:15 2006 @@ -91,13 +91,13 @@ .endif ${SYSTEM_LD_TAIL} .if defined(MFS_IMAGE) - @dd if="${MFS_IMAGE}" ibs=8192 of="${KERNEL_KO}" \ - obs=`strings -at d "${KERNEL_KO}" | \ + @dd if="${MFS_IMAGE}" ibs=8192 of="${FULLKERNEL}" \ + obs=`strings -at d "${FULLKERNEL}" | \ grep "MFS Filesystem goes here" | awk '{print $$1}'` \ oseek=1 conv=notrunc 2>/dev/null && \ - strings ${KERNEL_KO} | \ + strings ${FULLKERNEL} | \ grep 'MFS Filesystem had better STOP here' > /dev/null || \ - (rm ${KERNEL_KO} && echo 'MFS image too large' && false) + (rm ${FULLKERNEL} && echo 'MFS image too large' && false) .endif .if !exists(${.OBJDIR}/.depend) best Neel ____________________________________________________________________________________ Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:52:58 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F1CF16A40F for ; Tue, 12 Dec 2006 23:52:58 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from cydem.org (S0106000103ce4c9c.vc.shawcable.net [24.87.27.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D5AB43D67 for ; Tue, 12 Dec 2006 23:51:03 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from freen0de (unknown [192.168.0.251]) by cydem.org (Postfix/FreeBSD) with ESMTP id 85B2990C54; Tue, 12 Dec 2006 15:52:25 -0800 (PST) Date: Tue, 12 Dec 2006 15:52:20 -0800 From: To: Message-ID: <20061212155220.5f870e37@freen0de> In-Reply-To: <84F3E28D7298614988152E6FD2B37EDA01DD689A@PKDWB11C.ad.sprint.com> References: <84F3E28D7298614988152E6FD2B37EDA01DD689A@PKDWB11C.ad.sprint.com> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Keyboard issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:52:58 -0000 > I have installed FreeBSD 6.1 on my Gateway Solo 1450 Laptop and my > keyboard doesn't work right. A example is my letter l displays "o" > not the letter "l". It will work if I hold the "fn" key down just > like if I were pressing the Caps Lock key down continously. I have > researched this a little bit. Do you have any ideas on what this. Perhaps it's not 'o', but '0'? Could it be that NumLock or ScrollLock are set, so part of the keyboard is acting like a numeric pad? Depends on the BIOS and layout... > Please, let me know if anyone can help or not. I have installed it on > a desktop just fine but it appears there is something it doesn't like > about my keyboard drivers. Thanks, > > Sean Sneed. [SorAlx] ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 23:38:14 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A01C16A631 for ; Tue, 12 Dec 2006 23:38:14 +0000 (UTC) (envelope-from marek@1lo.lublin.pl) Received: from core.1lo.lublin.pl (1lo.vlan327.nemes.lubman.net.pl [212.182.71.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id E955944242 for ; Tue, 12 Dec 2006 23:24:42 +0000 (GMT) (envelope-from marek@1lo.lublin.pl) Received: by core.1lo.lublin.pl (Postfix, from userid 1001) id 75F6AD0B7C; Wed, 13 Dec 2006 00:28:50 +0100 (CET) Date: Wed, 13 Dec 2006 00:28:50 +0100 From: Marek Denis To: hackers@freebsd.org Message-ID: <20061212232850.GA58576@core.1lo.lublin.pl> References: <20061212164853.GA56552@core.1lo.lublin.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-Mailman-Approved-At: Wed, 13 Dec 2006 00:21:28 +0000 Cc: Subject: Re: portupgrade and dependencies X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 23:38:14 -0000 On Tue, Dec 12, 2006 at 05:55:40PM -0500, Dino Michailidis wrote: > > portupgrade -r will also upgrade packages that depend on the port you are > upgrading. It seems that this is not what you want. > > portupgrade -R will also upgrade packages required by the port you are > upgrading - I believe this *is* what you want. > Well, I don't get it. When I type: pkg_info -R libiconv-1.9.2_1 it shows many of the packages (ettercap too) so it is required by ettercap to work properly, yes? And when I type pkg_info -r ettercap it shows libiconv as a dependant, it mean a package which is required to work ettercap properly, yes? And that I have always thought -r option with portupgrade was all right for me. -- greetings Marek [marek@staszic.eu.org] "A false sense of security is worse than insecurity" -- Steve Gibson From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 01:03:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F8A816A40F for ; Wed, 13 Dec 2006 01:03:32 +0000 (UTC) (envelope-from newroswell@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id D813243C9E for ; Wed, 13 Dec 2006 01:02:05 +0000 (GMT) (envelope-from newroswell@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so19522uge for ; Tue, 12 Dec 2006 17:03:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IunDrPv1rGNigCrVl8Zisx/g6ntERQVgYVa7IEqNZPBukNqX4Zb3ByXc3X+GSE6KVE75EoayaJS0icUQHLnSsvKlOm6rHtaAAxNUlP2TU2qJADFb00uFwZTJCG29worexDHP2EeIW3M8lcj+sPQ7vNO1+xnI8k4f0QZ1J6e9NNY= Received: by 10.78.183.15 with SMTP id g15mr132584huf.1165971809962; Tue, 12 Dec 2006 17:03:29 -0800 (PST) Received: by 10.78.192.15 with HTTP; Tue, 12 Dec 2006 17:03:24 -0800 (PST) Message-ID: <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com> Date: Tue, 12 Dec 2006 17:03:24 -0800 From: "Kevin Sanders" To: freebsd-hackers@freebsd.org In-Reply-To: <20061212231039.GA4531@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> <20061212231039.GA4531@britannica.bec.de> Subject: Re: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 01:03:32 -0000 On 12/12/06, Joerg Sonnenberger wrote: > On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote: > > I'm trying to use KASSERT in my own kernel module and I can't get it > > to assert even with a KASSERT(0, "test panic"). Is there something > > else I need to do besides add options INVARIANTS to my kernel config > > file. Any clues would be appreciated. > > Tried > CFLAGS+= -DINVARIANTS > in the Makefile of the module? Thanks all. That almost works, I'm getting a syntax error before string constant. I took the easy way and undefined and redefined KASSERT to panic when the condition is false for now. Kevin From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 08:51:04 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08B1B16A47C for ; Wed, 13 Dec 2006 08:51:04 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep19-int.chello.at (viefep16-int.chello.at [213.46.255.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7488443CBB for ; Wed, 13 Dec 2006 08:49:27 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from lizard.fafoe.narf.at ([213.47.85.26]) by viefep19-int.chello.at (InterMail vM.6.01.05.04 201-2131-123-105-20051025) with ESMTP id <20061213085054.RWFG791.viefep19-int.chello.at@lizard.fafoe.narf.at>; Wed, 13 Dec 2006 09:50:54 +0100 Received: by lizard.fafoe.narf.at (Postfix, from userid 1001) id 2DD9BBC62; Wed, 13 Dec 2006 09:50:53 +0100 (CET) Date: Wed, 13 Dec 2006 09:50:53 +0100 From: Stefan Farfeleder To: Kevin Sanders Message-ID: <20061213085052.GF915@lizard.fafoe.narf.at> Mail-Followup-To: Kevin Sanders , freebsd-hackers@freebsd.org References: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> <20061212231039.GA4531@britannica.bec.de> <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 08:51:04 -0000 On Tue, Dec 12, 2006 at 05:03:24PM -0800, Kevin Sanders wrote: > On 12/12/06, Joerg Sonnenberger wrote: > >On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote: > >> I'm trying to use KASSERT in my own kernel module and I can't get it > >> to assert even with a KASSERT(0, "test panic"). Is there something > >> else I need to do besides add options INVARIANTS to my kernel config > >> file. Any clues would be appreciated. > > > >Tried > >CFLAGS+= -DINVARIANTS > >in the Makefile of the module? > > Thanks all. That almost works, I'm getting a syntax error before > string constant. You need a pair of parentheses around the message: KASSERT(0, ("test panic")) Stefan From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 08:12:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D30816A4C9 for ; Wed, 13 Dec 2006 08:12:28 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 750DD43D31 for ; Wed, 13 Dec 2006 08:10:46 +0000 (GMT) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5D66E.dip.t-dialin.net [84.165.214.110]) by redbull.bpaserver.net (Postfix) with ESMTP id 175D32E06F; Wed, 13 Dec 2006 09:12:04 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 614715B4845; Wed, 13 Dec 2006 09:11:59 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id kBD8BwcB008931; Wed, 13 Dec 2006 09:11:58 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Wed, 13 Dec 2006 09:11:58 +0100 Message-ID: <20061213091158.2mp4nnxi8kw0cko0@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 13 Dec 2006 09:11:58 +0100 From: Alexander Leidinger To: Kevin Sanders References: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> <20061212231039.GA4531@britannica.bec.de> <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com> In-Reply-To: <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.864, required 6, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Wed, 13 Dec 2006 12:52:50 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 08:12:28 -0000 Quoting Kevin Sanders (from Tue, 12 Dec 2006 17:03:24 -0800): > On 12/12/06, Joerg Sonnenberger wrote: >> On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote: >>> I'm trying to use KASSERT in my own kernel module and I can't get it >>> to assert even with a KASSERT(0, "test panic"). Is there something >>> else I need to do besides add options INVARIANTS to my kernel config >>> file. Any clues would be appreciated. >> >> Tried >> CFLAGS+= -DINVARIANTS >> in the Makefile of the module? > > Thanks all. That almost works, I'm getting a syntax error before > string constant. I took the easy way and undefined and redefined > KASSERT to panic when the condition is false for now. Try: KASSERT(0, ("string")) Bye, Alexander. -- Hold the MAYO & pass the COSMIC AWARENESS ... http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 15:50:27 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF3B416A510 for ; Wed, 13 Dec 2006 15:50:27 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56F0543CD5 for ; Wed, 13 Dec 2006 15:48:53 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Wed, 13 Dec 2006 10:50:22 -0500 id 00056410.4580213E.0000EF57 Date: Wed, 13 Dec 2006 10:50:21 -0500 From: Bill Moran To: hackers@freebsd.org Message-Id: <20061213105021.c7d5b274.wmoran@collaborativefusion.com> In-Reply-To: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> References: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Kris Kennaway Subject: Re: shmmax tops out at 2G? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 15:50:27 -0000 In response to Bill Moran : > > [I sent this to questions@ yesterday and have yet to get a response. I > suspect it may be a little more technical than questions@] > > uname -a > FreeBSD db00.lab00 6.2-BETA3 FreeBSD 6.2-BETA3 #1: Fri Dec 8 09:27:37 EST 2006 root@db00.lab00:/usr/obj/usr/src/sys/DB-2850-amd64 amd64 > > sysctl kern.ipc.shmmax=2200000000 > kern.ipc.shmmax: 2100000000 -> -2094967296 > > Looks like an unsigned 32-bit int. That doesn't seem to scale as well as > would be expected on 64-bit arch (or PAE for that matter). > > Is this a mistake, or intentional? I'm working with some big memory > systems, and I sure would like to allocate more than 2G for PostgreSQL > to use ... Responding/following up on my own post ... Kris Kennaway wrote: > Bill's guess is probably right, so someone needs to go over the sysv > ipc code and make it 64-bit capable. OK. Looks like I've volunteered. I know little to nothing about the internals of the sysv system, so some of this may look pretty uninformed. First run through finds src/sys/sys/shm.h, which has a few obvious data structures that need updated: struct shmid_ds { struct ipc_perm shm_perm; /* operation permission structure */ int shm_segsz; /* size of segment in bytes */ pid_t shm_lpid; /* process ID of last shared memory op */ pid_t shm_cpid; /* process ID of creator */ short shm_nattch; /* number of current attaches */ time_t shm_atime; /* time of last shmat() */ time_t shm_dtime; /* time of last shmdt() */ time_t shm_ctime; /* time of last change by shmctl() */ void *shm_internal; /* sysv stupidity */ }; struct shminfo { int shmmax, /* max shared memory segment size (bytes) */ shmmin, /* min shared memory segment size (bytes) */ shmmni, /* max number of shared memory identifiers */ shmseg, /* max shared memory segments per process */ shmall; /* max amount of shared memory (pages) */ }; However, looking at some function declarations in that same file: int shmget(key_t, size_t, int); I appears as if those values should have been size_t all along. I'm _assuming_ that the return value is an identifier and not a memory address, which is what the docs seem to imply. So, my first thought is that all the int values in those structures should be changed to size_t. If I understand the use of that type correctly, it should always be the native word size on the architecture, but will that make this work for PAE as well, or should those be changed to uint64_t so they're 8 bits wide on all archs? Once I understand a little more about what the correct type is for those, I'll start looking for where they're used ... -- Bill Moran Collaborative Fusion Inc. wmoran@collaborativefusion.com Phone: 412-422-3463x4023 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 18:34:44 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BD9616A415 for ; Wed, 13 Dec 2006 18:34:44 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail24.syd.optusnet.com.au (mail24.syd.optusnet.com.au [211.29.133.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id C735143C9F for ; Wed, 13 Dec 2006 18:33:12 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c58-107-94-118.belrs4.nsw.optusnet.com.au [58.107.94.118]) by mail24.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id kBDIYWUH027078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Dec 2006 05:34:37 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id kBDIYWrC003370; Thu, 14 Dec 2006 05:34:32 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id kBDIYVUT003369; Thu, 14 Dec 2006 05:34:31 +1100 (EST) (envelope-from peter) Date: Thu, 14 Dec 2006 05:34:31 +1100 From: Peter Jeremy To: Bill Moran Message-ID: <20061213183431.GC888@turion.vk2pj.dyndns.org> References: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> <20061213105021.c7d5b274.wmoran@collaborativefusion.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline In-Reply-To: <20061213105021.c7d5b274.wmoran@collaborativefusion.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: hackers@freebsd.org, Kris Kennaway Subject: Re: shmmax tops out at 2G? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 18:34:44 -0000 --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 2006-Dec-13 10:50:21 -0500, Bill Moran wrote: >In response to Bill Moran : >> sysctl kern.ipc.shmmax=3D2200000000 >> kern.ipc.shmmax: 2100000000 -> -2094967296 >>=20 >> Looks like an unsigned 32-bit int. That doesn't seem to scale as well as >> would be expected on 64-bit arch (or PAE for that matter). >>=20 >> Is this a mistake, or intentional? I'm working with some big memory >> systems, and I sure would like to allocate more than 2G for PostgreSQL >> to use ... I thought POSIX specified 'int' but I may be mis-remembering. Tru64 uses int (and 2GB max) whilst Solaris allows 64-bit values. Logically, shm_segsz and shm{min,max} should be intptr_t, shmall is less clear but probably should be similar. >int shmget(key_t, size_t, int); > >I appears as if those values should have been size_t all along. I'm >_assuming_ that the return value is an identifier and not a memory >address, which is what the docs seem to imply. shmget() returns an "id" that uniquely refers to a shared memory segment (stupidly designed SysV IPC namespace) and shmat() takes the "id" and returns the address. >So, my first thought is that all the int values in those structures >should be changed to size_t. If I understand the use of that type >correctly, it should always be the native word size on the architecture, I believe intptr_t is more logical - an integer size that is the same size as a pointer. Unfortunately, as I mentioned above, some of this is specified in "standards" and logic is usually only present by accident in such documents. >but will that make this work for PAE as well, or should those be >changed to uint64_t so they're 8 bits wide on all archs? PAE is kernel only - userland still sees only 32 bits. (You can fit more RAM into the box, but each process is still limited to 4GB - KVM size). Don't unnecessarily use [u]int64_t as it is comparatively inefficient on 32-bit architectures. I know Oracle (at least) avoids the problem on Tru64 by using multiple SHM segments to allow SGA exceeding 2GB. --=20 Peter Jeremy --vGgW1X5XWziG23Ko Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFgEe3/opHv/APuIcRAvUTAKC3tHgy0OwHSRh6FRow+GOTaJa16wCeIpEp UyAcTb7EtlLE/NBBvfmR9Xo= =qtGY -----END PGP SIGNATURE----- --vGgW1X5XWziG23Ko-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 19:15:49 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5D4A16A403 for ; Wed, 13 Dec 2006 19:15:48 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48C4E43CB2 for ; Wed, 13 Dec 2006 19:14:10 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Wed, 13 Dec 2006 14:15:40 -0500 id 00056403.4580515C.00011375 Date: Wed, 13 Dec 2006 14:15:40 -0500 From: Bill Moran To: Peter Jeremy Message-Id: <20061213141540.6909ec4f.wmoran@collaborativefusion.com> In-Reply-To: <20061213183431.GC888@turion.vk2pj.dyndns.org> References: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> <20061213105021.c7d5b274.wmoran@collaborativefusion.com> <20061213183431.GC888@turion.vk2pj.dyndns.org> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, Kris Kennaway Subject: Re: shmmax tops out at 2G? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 19:15:49 -0000 [Kris -- are you interested in this or should I trim you from the CC?] In response to Peter Jeremy : > On Wed, 2006-Dec-13 10:50:21 -0500, Bill Moran wrote: > >In response to Bill Moran : > >> sysctl kern.ipc.shmmax=2200000000 > >> kern.ipc.shmmax: 2100000000 -> -2094967296 > >> > >> Looks like an unsigned 32-bit int. That doesn't seem to scale as well as > >> would be expected on 64-bit arch (or PAE for that matter). > >> > >> Is this a mistake, or intentional? I'm working with some big memory > >> systems, and I sure would like to allocate more than 2G for PostgreSQL > >> to use ... > > I thought POSIX specified 'int' but I may be mis-remembering. Tru64 > uses int (and 2GB max) whilst Solaris allows 64-bit values. > Logically, shm_segsz and shm{min,max} should be intptr_t, shmall is > less clear but probably should be similar. So, in your opinion: struct shmid_ds { struct ipc_perm shm_perm; /* operation permission structure */ intptr_t shm_segsz; /* size of segment in bytes */ pid_t shm_lpid; /* process ID of last shared memory op */ pid_t shm_cpid; /* process ID of creator */ short shm_nattch; /* number of current attaches */ time_t shm_atime; /* time of last shmat() */ time_t shm_dtime; /* time of last shmdt() */ time_t shm_ctime; /* time of last change by shmctl() */ void *shm_internal; /* sysv stupidity */ }; struct shminfo { intptr_t shmmax, /* max shared memory segment size (bytes) */ shmmin; /* min shared memory segment size (bytes) */ int shmmni, /* max number of shared memory identifiers */ shmseg, /* max shared memory segments per process */ shmall; /* max amount of shared memory (pages) */ }; > >int shmget(key_t, size_t, int); > > > >I appears as if those values should have been size_t all along. I'm > >_assuming_ that the return value is an identifier and not a memory > >address, which is what the docs seem to imply. > > shmget() returns an "id" that uniquely refers to a shared memory > segment (stupidly designed SysV IPC namespace) and shmat() takes > the "id" and returns the address. > > >So, my first thought is that all the int values in those structures > >should be changed to size_t. If I understand the use of that type > >correctly, it should always be the native word size on the architecture, > > I believe intptr_t is more logical - an integer size that is the > same size as a pointer. Unfortunately, as I mentioned above, some > of this is specified in "standards" and logic is usually only present > by accident in such documents. Well, I guess there are a few questions if I want to make changes that will end up back in the tree: 1) Can anyone quote the standards so we know what they expect? I got the impression that you weren't sure about the standards. 2) If the standards attempt to lock us in to the 2G limit, is FreeBSD willing to move forward, thus breaking standards compliance? > >but will that make this work for PAE as well, or should those be > >changed to uint64_t so they're 8 bits wide on all archs? > > PAE is kernel only - userland still sees only 32 bits. (You can > fit more RAM into the box, but each process is still limited to > 4GB - KVM size). Don't unnecessarily use [u]int64_t as it is > comparatively inefficient on 32-bit architectures. So intptr_t makes the most sense here, as it will Do the Right Thing on 64-bit arch, 32-bit arch, and PAE. -- Bill Moran Collaborative Fusion Inc. From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 20:18:05 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CEF7316A412; Wed, 13 Dec 2006 20:18:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C41F43EFA; Wed, 13 Dec 2006 20:11:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kBDKDLsc031289; Wed, 13 Dec 2006 15:13:21 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 13 Dec 2006 14:31:46 -0500 User-Agent: KMail/1.9.1 References: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> <20061213105021.c7d5b274.wmoran@collaborativefusion.com> <20061213183431.GC888@turion.vk2pj.dyndns.org> In-Reply-To: <20061213183431.GC888@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612131431.46838.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 13 Dec 2006 15:13:22 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2325/Wed Dec 13 12:04:05 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: hackers@freebsd.org, Bill Moran , Kris Kennaway Subject: Re: shmmax tops out at 2G? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 20:18:06 -0000 On Wednesday 13 December 2006 13:34, Peter Jeremy wrote: > On Wed, 2006-Dec-13 10:50:21 -0500, Bill Moran wrote: > >In response to Bill Moran : > >> sysctl kern.ipc.shmmax=2200000000 > >> kern.ipc.shmmax: 2100000000 -> -2094967296 > >> > >> Looks like an unsigned 32-bit int. That doesn't seem to scale as well as > >> would be expected on 64-bit arch (or PAE for that matter). > >> > >> Is this a mistake, or intentional? I'm working with some big memory > >> systems, and I sure would like to allocate more than 2G for PostgreSQL > >> to use ... > > I thought POSIX specified 'int' but I may be mis-remembering. Tru64 > uses int (and 2GB max) whilst Solaris allows 64-bit values. > Logically, shm_segsz and shm{min,max} should be intptr_t, shmall is > less clear but probably should be similar. Actually, unless you are holding a pointer, it should be size_t. size_t is also the same size as a pointer (in practice), but it's for the size of objects in memory (i.e. what sizeof() returns), so I do think size_t is more appropriate. The painful thing here will be destroying the SYSVIPC ABI on 64-bit archs. Bill, you should go talk to Robert Watson and time it with him as he wants to fix SYSVIPC to use uid_t which breaks the ABI, and if we're going to break the ABI, we should do it all at once. :) -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 20:18:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CEF7316A412; Wed, 13 Dec 2006 20:18:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C41F43EFA; Wed, 13 Dec 2006 20:11:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kBDKDLsc031289; Wed, 13 Dec 2006 15:13:21 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 13 Dec 2006 14:31:46 -0500 User-Agent: KMail/1.9.1 References: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> <20061213105021.c7d5b274.wmoran@collaborativefusion.com> <20061213183431.GC888@turion.vk2pj.dyndns.org> In-Reply-To: <20061213183431.GC888@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612131431.46838.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 13 Dec 2006 15:13:22 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2325/Wed Dec 13 12:04:05 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: hackers@freebsd.org, Bill Moran , Kris Kennaway Subject: Re: shmmax tops out at 2G? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 20:18:06 -0000 On Wednesday 13 December 2006 13:34, Peter Jeremy wrote: > On Wed, 2006-Dec-13 10:50:21 -0500, Bill Moran wrote: > >In response to Bill Moran : > >> sysctl kern.ipc.shmmax=2200000000 > >> kern.ipc.shmmax: 2100000000 -> -2094967296 > >> > >> Looks like an unsigned 32-bit int. That doesn't seem to scale as well as > >> would be expected on 64-bit arch (or PAE for that matter). > >> > >> Is this a mistake, or intentional? I'm working with some big memory > >> systems, and I sure would like to allocate more than 2G for PostgreSQL > >> to use ... > > I thought POSIX specified 'int' but I may be mis-remembering. Tru64 > uses int (and 2GB max) whilst Solaris allows 64-bit values. > Logically, shm_segsz and shm{min,max} should be intptr_t, shmall is > less clear but probably should be similar. Actually, unless you are holding a pointer, it should be size_t. size_t is also the same size as a pointer (in practice), but it's for the size of objects in memory (i.e. what sizeof() returns), so I do think size_t is more appropriate. The painful thing here will be destroying the SYSVIPC ABI on 64-bit archs. Bill, you should go talk to Robert Watson and time it with him as he wants to fix SYSVIPC to use uid_t which breaks the ABI, and if we're going to break the ABI, we should do it all at once. :) -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 03:44:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04E1916A40F for ; Thu, 14 Dec 2006 03:44:46 +0000 (UTC) (envelope-from tyler@bleepsoft.com) Received: from zeus.lunarpages.com (zeus.lunarpages.com [216.193.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id F24B343CA9 for ; Thu, 14 Dec 2006 03:43:12 +0000 (GMT) (envelope-from tyler@bleepsoft.com) Received: from cpe-24-26-238-91.satx.res.rr.com ([24.26.238.91] helo=[192.168.250.101]) by zeus.lunarpages.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.52) id 1GuhXe-0005Qa-6Q for freebsd-hackers@freebsd.org; Wed, 13 Dec 2006 19:45:54 -0800 Mime-Version: 1.0 (Apple Message framework v752.3) To: FreeBSD Hackers Message-Id: <4E23C454-9D13-443E-8D05-ABDFAAA23CF1@bleepsoft.com> From: "R. Tyler Ballance" Date: Wed, 13 Dec 2006 21:44:43 -0600 X-Mailer: Apple Mail (2.752.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - zeus.lunarpages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - bleepsoft.com X-Source: X-Source-Args: X-Source-Dir: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: natd(8) and NAT-PMP X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 03:44:46 -0000 My internal development network here uses a FreeBSD RELENG_6 machine to act as a NAT gateway for testing of NAT traversal software, am I'm certain that natd(8) supports uPnP, but does it support NAT-PMP? I don't want to have to purchase an Airport base station, as that's the only NAT box I am aware of that supports NAT-PMP to test some code for opening up the port mappings as specified by NAT-PMP's ietf draft. In the case that natd(8) does not support NAT-PMP, has anybody started work on it? Or am I "more than welcome to" start working on a set of patches to add support ;) Cheers R. Tyler Ballance: Lead Mac Developer at bleep. software contact: tyler@bleepsoft.com | jabber: tyler@jabber.geekisp.com From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 04:19:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D4F716A407 for ; Thu, 14 Dec 2006 04:19:54 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.NUXI.org (trang.nuxi.org [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id B025443C9E for ; Thu, 14 Dec 2006 04:18:20 +0000 (GMT) (envelope-from obrien@NUXI.org) Received: from dragon.NUXI.org (obrien@localhost [127.0.0.1]) by dragon.NUXI.org (8.13.8/8.13.8) with ESMTP id kBE4Jqfe009334 for ; Wed, 13 Dec 2006 20:19:52 -0800 (PST) (envelope-from obrien@dragon.NUXI.org) Received: (from obrien@localhost) by dragon.NUXI.org (8.13.8/8.13.7/Submit) id kBE4Jqvq009333 for freebsd-hackers@freebsd.org; Wed, 13 Dec 2006 20:19:52 -0800 (PST) (envelope-from obrien) Date: Wed, 13 Dec 2006 20:19:52 -0800 From: "David O'Brien" To: freebsd-hackers@freebsd.org Message-ID: <20061214041952.GA7513@dragon.NUXI.org> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 7.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 User-Agent: Mutt/1.5.11 Subject: [PATCH] "automated" make -j value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 04:19:54 -0000 With multi-socket systems becoming more prevalent, and the continued increase in cores per processors, I thought it would be nice for 'make -j' to gain some automation. Attached is a patch that makes "-j-" be the same as "-j `sysctl -n kern.smp.cpus`" and "-j=" be twice that. I've also thought that maybe just supporting "-j-" would be better - with a definition of num_core = `sysctl -n kern.smp.cpus` -j => MAX(num_core * 5 / 4, num_core + 1) the idea being one would want a few more jobs than cores, but not a whole lot more. comments? (redirected back to list) -- -- David (obrien@FreeBSD.org) Index: main.c =================================================================== RCS file: /home/ncvs/src/usr.bin/make/main.c,v retrieving revision 1.160 diff -u -p -r1.160 main.c --- main.c 17 Jul 2006 19:16:12 -0000 1.160 +++ main.c 14 Dec 2006 02:26:15 -0000 @@ -456,11 +456,20 @@ rearg: char *endptr; forceJobs = TRUE; + size_t jLlen = sizeof(jobLimit); jobLimit = strtol(optarg, &endptr, 10); - if (jobLimit <= 0 || *endptr != '\0') { - warnx("illegal number, -j argument -- %s", - optarg); - usage(); + if ((*optarg == '-' || *optarg == '=') && + *endptr != '\0') { + sysctlbyname("kern.smp.cpus", &jobLimit, &jLlen, + NULL, 0); + if (*optarg == '=') + jobLimit *= 2; + } else { + if (jobLimit <= 0 || *endptr != '\0') { + warnx("illegal number, -j argument -- %s", + optarg); + usage(); + } } MFLAGS_append("-j", optarg); break; Index: make.1 =================================================================== RCS file: /home/ncvs/src/usr.bin/make/make.1,v retrieving revision 1.99 diff -u -p -r1.99 make.1 --- make.1 29 Sep 2006 21:17:10 -0000 1.99 +++ make.1 14 Dec 2006 04:19:22 -0000 @@ -218,6 +218,14 @@ may have running at any one time. Turns compatibility mode off, unless the .Fl B flag is also specified. +The special values +.It Ar - +and +.It Ar = +causes +.It Ar max_jobs +to be set to the value returned from the kern.smp.cpus sysctl and twice +kern.smp.cpus respectively. .It Fl k Continue processing after errors are encountered, but only on those targets that do not depend on the target whose creation caused the error. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 05:07:30 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D47916A415 for ; Thu, 14 Dec 2006 05:07:30 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E33C43CA5 for ; Thu, 14 Dec 2006 05:05:54 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.37]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id kBE57OJJ013002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Dec 2006 15:37:24 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Thu, 14 Dec 2006 15:37:09 +1030 User-Agent: KMail/1.9.4 References: <200612111034.28390.doconnor@gsoft.com.au> In-Reply-To: <200612111034.28390.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1181595.MOtl4yGeGK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612141537.18021.doconnor@gsoft.com.au> X-Spam-Score: -2.864 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.57 on 203.31.81.10 Subject: Re: Intel i8xx watchdog driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 05:07:30 -0000 --nextPart1181595.MOtl4yGeGK Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 11 December 2006 10:34, Daniel O'Connor wrote: > I saw your (2004) post about the watchdog driver for the i8xx and I was > wondering if you could send it to me? Whoops, no wonder I didn't get a reply. Not to menion it's already committed :) =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 --nextPart1181595.MOtl4yGeGK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFgNwF5ZPcIHs/zowRAviDAKCNoF0vmjERBuU5Wwgl+pyM3BN/UwCfSQmI tfgyjQNBqir+mZaTI+ICNu0= =5UfQ -----END PGP SIGNATURE----- --nextPart1181595.MOtl4yGeGK-- From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 11:22:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 726B816A407 for ; Thu, 14 Dec 2006 11:22:03 +0000 (UTC) (envelope-from V.Rezkii@sam-solutions.net) Received: from c71.sam-solutions.net (c71.sam-solutions.net [217.21.35.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71ED843CA7 for ; Thu, 14 Dec 2006 11:20:22 +0000 (GMT) (envelope-from V.Rezkii@sam-solutions.net) Received: from pc636 ([192.168.117.46]) by c71.sam-solutions.net with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Dec 2006 13:21:49 +0200 To: freebsd-hackers@freebsd.org From: Uladzislau Rezki Date: Thu, 14 Dec 2006 13:21:24 +0200 Message-ID: <86odq6k9jf.fsf@sam-solutions.net> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 14 Dec 2006 11:21:49.0598 (UTC) FILETIME=[0C45C3E0:01C71F72] Subject: block device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 11:22:03 -0000 Hi !!! "ls -al /dev/" show me: crw-r----- 1 root operator 0, 86 Dec 14 11:47 ad0 crw-r----- 1 root operator 0, 87 Dec 14 11:47 ad0s1 crw-r----- 1 root operator 0, 91 Dec 14 13:47 ad0s1a crw-r----- 1 root operator 0, 92 Dec 14 13:47 ad0s1b crw-r----- 1 root operator 0, 93 Dec 14 11:47 ad0s1c ad0 is a character device. Why ad0 isn't a block device? -- Uladzislau Rezki From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 11:32:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F66E16A415 for ; Thu, 14 Dec 2006 11:32:54 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx0.rink.nu (thunderstone.rink.nu [80.112.228.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2232043C9E for ; Thu, 14 Dec 2006 11:31:18 +0000 (GMT) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx0.rink.nu (Postfix) with ESMTP id 7134717086; Thu, 14 Dec 2006 12:33:53 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx0.rink.nu ([127.0.0.1]) by localhost (thunderstone.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QfNZV3SM2+0P; Thu, 14 Dec 2006 12:33:42 +0100 (CET) Received: by mx0.rink.nu (Postfix, from userid 1000) id E69161707E; Thu, 14 Dec 2006 12:33:41 +0100 (CET) Date: Thu, 14 Dec 2006 12:33:41 +0100 From: Rink Springer To: Uladzislau Rezki Message-ID: <20061214113341.GB33052@rink.nu> References: <86odq6k9jf.fsf@sam-solutions.net> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="oLBj+sq0vYjzfsbl" Content-Disposition: inline In-Reply-To: <86odq6k9jf.fsf@sam-solutions.net> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@freebsd.org Subject: Re: block device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 11:32:54 -0000 --oLBj+sq0vYjzfsbl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Dec 14, 2006 at 01:21:24PM +0200, Uladzislau Rezki wrote: > ad0 is a character device. Why ad0 isn't a block device? FreeBSD 5 and up no longer make a distinction between character/block devices. More information on this subject can be found in "The Design and Implementation of the FreeBSD operating system" by McKusick and Neville-Neil. --=20 Rink P.W. Springer - http://rink.nu "It's you isn't it? THE BASTARD OPERATOR FROM HELL!" "In the flesh, on the phone and in your account..." - BOFH #3 --oLBj+sq0vYjzfsbl Content-Type: application/x-pkcs7-signature Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIIJawYJKoZIhvcNAQcCoIIJXDCCCVgCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC BuIwggObMIIDBKADAgECAhAiuN7bs9pg6t3I0n6G5OOTMA0GCSqGSIb3DQEBBQUAMGIxCzAJ BgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYD VQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQTAeFw0wNjExMDgwOTI2 NTNaFw0wNzExMDgwOTI2NTNaMIHSMREwDwYDVQQEEwhTcHJpbmdlcjEaMBgGA1UEKhMRUmlu ayBQZXRlciBXeWNoZXIxIzAhBgNVBAMTGlJpbmsgUGV0ZXIgV3ljaGVyIFNwcmluZ2VyMRsw GQYJKoZIhvcNAQkBFgxtYWlsQHJpbmsubnUxHzAdBgkqhkiG9w0BCQEWEHJpbmtAZnJlZWJz ZC5vcmcxIDAeBgkqhkiG9w0BCQEWEXJpbmtAaWwuZm9udHlzLm5sMRwwGgYJKoZIhvcNAQkB Fg1yaW5rQHN0YWNrLm5sMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxryGDfel YzzENX7wodkbVY1NALfaiPfNEG10YjD8ZWdK9zkN26Tc878Shbqapq0KYFD8TACGfEhKoMvo qbf0PHAS/gNYr81Arqa9FRPUfzvtDE/cMbhvI+p7ufBITyYnPJp9MUD72iT+DohRR2ISVi3i NAEgDuSbYYNxctnvXqU6O6EPy3mzoFPDoiOQwBfVtFrjxBbND9BUK2bjtUyGt4x8I/Vulzrt qLPTokva+b97DHRgbCA/aLLYIrU6QoqOFJ8GrAbro/FZLYh4m1oJk3FEHVQOKkk7xzIaFmmP QGJRL8m6nrIZFTrQ+X2wmzfLD55K/UiqbekOuMiWbY9EbwIDAQABo10wWzBLBgNVHREERDBC gQxtYWlsQHJpbmsubnWBEHJpbmtAZnJlZWJzZC5vcmeBEXJpbmtAaWwuZm9udHlzLm5sgQ1y aW5rQHN0YWNrLm5sMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEFBQADgYEAIfIcieRjePBA wjZqvOdGpyPcNDnK/ubeQSTV5Y4AHWxm1sXhQxB/XrQ3RVdz1qDnBRL1AjkEBAl8e9+am4s6 D6TaSlmJeNXn6ZPJTQecisz3M+AKiMckShM3oAeUi0ktn1yNYR+hz5aQN612XT5OZRYznJVZ kPf1DiA2RVVyz+MwggM/MIICqKADAgECAgENMA0GCSqGSIb3DQEBBQUAMIHRMQswCQYDVQQG EwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNV BAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2Vz IERpdmlzaW9uMSQwIgYDVQQDExtUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgQ0ExKzApBgkq hkiG9w0BCQEWHHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMwNzE3MDAwMDAw WhcNMTMwNzE2MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1 bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElz c3VpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUE cJ3f6f+jHuy9zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH 5/EfkTYkKhPPK9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBly YLf7AgMBAAGjgZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJo dHRwOi8vY3JsLnRoYXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNV HQ8EBAMCAQYwKQYDVR0RBCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0G CSqGSIb3DQEBBQUAA4GBAEiM0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYv wPQcUCCTcDz9reFhYsPZOhl+hLGZGwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3 h9bGCE6u9uo05RAaWzVNd+NWIXiC3CEZNd4ksdMdRv9dX2VPMYICUTCCAk0CAQEwdjBiMQsw CQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoG A1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECECK43tuz2mDq3cjS fobk45MwCQYFKw4DAhoFAKCBsTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3 DQEJBTEPFw0wNjEyMTQxMTMzNDFaMCMGCSqGSIb3DQEJBDEWBBRIcNlZoE85jpGSJ6ojOlUZ jkZXmTBSBgkqhkiG9w0BCQ8xRTBDMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDANBggq hkiG9w0DAgIBQDAHBgUrDgMCBzANBggqhkiG9w0DAgIBKDANBgkqhkiG9w0BAQEFAASCAQCF kZBkG9SxBKCGTi4ye48ZtxU+OUubWQ685LBBY5BJgCXwYV+3urj1nCEAjN4Ag4pQpt7dEccG BQionvWprMAzDHT502VGSIXs8SruDv49ewf7josRDeDgzr/nIlg30LDUpnyItMj0G+z6DUNX 8Qp3GPo6lsyiyiY+tYAMQrOOMFr1k7beosjgvwxpdePUMdb4hha+BxzRhc4AlS8IR6xklZ/i SI7SEsr06IGE8hzRInajmuzfVZK/nVSOwSwDUIBd3TdJCrbiMk/nHPHNaQ564U3LuxUjnihZ ZowMEoSUZ6/3rAohiNmvKCF0jlJVIA8oRcpsyrfDHHusAONOq+BX --oLBj+sq0vYjzfsbl-- From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 11:41:12 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B85616A415; Thu, 14 Dec 2006 11:41:12 +0000 (UTC) (envelope-from V.Rezkii@sam-solutions.net) Received: from c71.sam-solutions.net (c71.sam-solutions.net [217.21.35.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A82143D31; Thu, 14 Dec 2006 11:38:43 +0000 (GMT) (envelope-from V.Rezkii@sam-solutions.net) Received: from pc636 ([192.168.117.46]) by c71.sam-solutions.net with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Dec 2006 13:40:10 +0200 To: Rink Springer References: <86odq6k9jf.fsf@sam-solutions.net> <20061214113341.GB33052@rink.nu> From: Uladzislau Rezki Date: Thu, 14 Dec 2006 13:39:45 +0200 In-Reply-To: <20061214113341.GB33052@rink.nu> (Rink Springer's message of "Thu, 14 Dec 2006 12:33:41 +0100") Message-ID: <86k60uk8ou.fsf@sam-solutions.net> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 14 Dec 2006 11:40:10.0584 (UTC) FILETIME=[9C82E580:01C71F74] Cc: freebsd-hackers@freebsd.org Subject: Re: block device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 11:41:12 -0000 Rink Springer writes: > Hi, > > On Thu, Dec 14, 2006 at 01:21:24PM +0200, Uladzislau Rezki wrote: >> ad0 is a character device. Why ad0 isn't a block device? > > FreeBSD 5 and up no longer make a distinction between character/block > devices. More information on this subject can be found in "The Design > and Implementation of the FreeBSD operating system" by McKusick and > Neville-Neil. > > -- > Rink P.W. Springer - http://rink.nu > "It's you isn't it? THE BASTARD OPERATOR FROM HELL!" > "In the flesh, on the phone and in your account..." - BOFH #3 Many thanks ! -- Uladzislau Rezki From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 13:41:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD26D16A4D1 for ; Thu, 14 Dec 2006 13:41:01 +0000 (UTC) (envelope-from ato@amper.iem.pw.edu.pl) Received: from amper.iem.pw.edu.pl (amper.iem.pw.edu.pl [194.29.146.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E0D743EB2 for ; Thu, 14 Dec 2006 13:33:22 +0000 (GMT) (envelope-from ato@amper.iem.pw.edu.pl) Received: by amper.iem.pw.edu.pl (Postfix, from userid 700) id 415EC2679D; Thu, 14 Dec 2006 14:34:51 +0100 (CET) Date: Thu, 14 Dec 2006 14:34:51 +0100 From: Andrzej Tobola To: freebsd-hackers@freebsd.org Message-ID: <20061214133451.GA22897@amper.iem.pw.edu.pl> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20061214041952.GA7513@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061214041952.GA7513@dragon.NUXI.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Mailman-Approved-At: Thu, 14 Dec 2006 14:11:23 +0000 Subject: Re: [PATCH] "automated" make -j value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 13:41:01 -0000 Hello David, I was using hw.ncpu. Which one is better ? % sysctl -n kern.smp.cpus hw.ncpu 1 1 % ssh vol sysctl -n kern.smp.cpus hw.ncpu 2 2 % ssh vol2 sysctl -n kern.smp.cpus hw.ncpu 4 4 cheers, -a On Wed, Dec 13, 2006 at 08:19:52PM -0800, David O'Brien wrote: > With multi-socket systems becoming more prevalent, and the continued > increase in cores per processors, I thought it would be nice for > 'make -j' to gain some automation. > > Attached is a patch that makes "-j-" be the same as > "-j `sysctl -n kern.smp.cpus`" and "-j=" be twice that. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 17:30:16 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C282F16A407 for ; Thu, 14 Dec 2006 17:30:16 +0000 (UTC) (envelope-from blue@white.lv) Received: from purple.the-7.net (purple.the-7.net [64.71.156.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9383A43D73 for ; Thu, 14 Dec 2006 17:09:38 +0000 (GMT) (envelope-from blue@white.lv) Received: from seerajeane.astralblue.net (seerajeane.astralblue.net [IPv6:2001:470:1f01:3222:2e0:81ff:fe51:1e73]) by purple.the-7.net (8.13.8/8.13.8) with ESMTP id kBEH8vUT099803 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=OK); Thu, 14 Dec 2006 09:08:57 -0800 (PST) (envelope-from blue@white.lv) Received: from [IPv6:2001:470:1f01:3222:2e0:81ff:fe51:1e73] (seerajeane.astralblue.net [IPv6:2001:470:1f01:3222:2e0:81ff:fe51:1e73]) by seerajeane.astralblue.net (8.13.8/8.13.8) with ESMTP id kBEH9tje055645 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Thu, 14 Dec 2006 09:09:57 -0800 (PST) (envelope-from blue@white.lv) Message-ID: <45818563.9050508@white.lv> Date: Thu, 14 Dec 2006 09:09:55 -0800 From: "Eugene M. Kim" User-Agent: Thunderbird 1.5.0.8 (X11/20061202) MIME-Version: 1.0 To: Marek Denis References: <20061212164853.GA56552@core.1lo.lublin.pl> <20061212232850.GA58576@core.1lo.lublin.pl> In-Reply-To: <20061212232850.GA58576@core.1lo.lublin.pl> X-Spam-Status: No, score=-0.2 required=10.0 tests=AWL, HTML_MESSAGE, NO_RELAYS autolearn=disabled version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on purple.the-7.net X-Mailman-Approved-At: Thu, 14 Dec 2006 17:58:40 +0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org Subject: Re: portupgrade and dependencies X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 17:30:16 -0000 Unfortunately, the semantics of -r and -R options of pkg_info is the opposite of the semantics used by pkgtools (such as portupgrade/portinstall, pkg_glob and so on). Eugene Marek Denis wrote: > On Tue, Dec 12, 2006 at 05:55:40PM -0500, Dino Michailidis wrote: > >> portupgrade -r will also upgrade packages that depend on the port you are >> upgrading. It seems that this is not what you want. >> >> portupgrade -R will also upgrade packages required by the port you are >> upgrading - I believe this *is* what you want. >> >> > > Well, I don't get it. > When I type: > > pkg_info -R libiconv-1.9.2_1 > > it shows many of the packages (ettercap too) > so it is required by ettercap to work properly, yes? > And when I type > pkg_info -r ettercap > > it shows libiconv as a dependant, it mean a package which is required to > work ettercap properly, yes? > And that I have always thought -r option with portupgrade was all right > for me. > From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 18:55:57 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C36A916A407 for ; Thu, 14 Dec 2006 18:55:57 +0000 (UTC) (envelope-from lidl@rox.fddx.com) Received: from rox.fddx.com (rox.pix.net [71.241.230.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D60A43EB8 for ; Thu, 14 Dec 2006 18:50:43 +0000 (GMT) (envelope-from lidl@rox.fddx.com) Received: from rox.fddx.com (localhost [127.0.0.1]) by rox.fddx.com (8.13.6/8.13.5) with ESMTP id kBEIq5M2010146 for ; Thu, 14 Dec 2006 13:52:05 -0500 (EST) Received: (from lidl@localhost) by rox.fddx.com (8.13.6/8.13.5/Submit) id kBEIq5Ou010145 for freebsd-hackers@freebsd.org; Thu, 14 Dec 2006 13:52:05 -0500 (EST) Date: Thu, 14 Dec 2006 13:52:05 -0500 From: "Kurt J. Lidl" To: freebsd-hackers@freebsd.org Message-ID: <20061214185203.GA9701@pix.net> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20061214041952.GA7513@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061214041952.GA7513@dragon.NUXI.org> User-Agent: Mutt/1.5.12-2006-07-14 X-Scanned-By: milter-spiff/0.6.11 (localhost [127.0.0.1]); Thu, 14 Dec 2006 13:52:05 -0500 Received-SPF: Pass; receiver=localhost; client-ip=127.0.0.1; envelope-from= Received-SPF: Pass; receiver=localhost; client-ip=127.0.0.1; helo=rox.fddx.com X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on rox.fddx.com X-Virus-Status: Clean Subject: Re: [PATCH] "automated" make -j value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 18:55:57 -0000 On Wed, Dec 13, 2006 at 08:19:52PM -0800, David O'Brien wrote: > With multi-socket systems becoming more prevalent, and the continued > increase in cores per processors, I thought it would be nice for > 'make -j' to gain some automation. > > Attached is a patch that makes "-j-" be the same as > "-j `sysctl -n kern.smp.cpus`" and "-j=" be twice that. > > comments? (redirected back to list) I think you can do it better than this, by just support setting the concurrancy level via reading a environmental variable. Like say "NPROC", which is what CrayOS used, and also appeared in the BSD/OS pmake varient several years ago. Then you can just do this: export NPROC=`/sbin/sysctl hw.ncpu | awk '{print $3*2}'` or this: export NPROC=`/sbin/sysctl hw.ncpu | awk '{print $3}'` in your shells .rc files. (Obviously, change the sysctl node as appropriate for your OS.) I found this really useful when compiling a large tree of sources, where some of the Makefiles didn't have their dependencies written correctly, sucht that a parallel make wouldn't work properly. It's easy to turn off, just by unsetting the environmental variable. It's also easy to iterate over a set of values to figure out which one will compile a tree the fastest. (FYI -- setting 3*hw.ncpu was optimal for BSD/OS.) If you hack on make to put in automagic around -j, you should add the environmental variable support too. It's actually more useful in a lot of cases. (Mostly cause you don't have to touch any Makefile to turn it on, it just works...) -Kurt From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 19:02:57 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B42916A5AC for ; Thu, 14 Dec 2006 19:02:57 +0000 (UTC) (envelope-from mrcomputerwiz@hotmail.com) Received: from bay0-omc2-s37.bay0.hotmail.com (bay0-omc2-s37.bay0.hotmail.com [65.54.246.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53E2B43DA6 for ; Thu, 14 Dec 2006 19:01:05 +0000 (GMT) (envelope-from mrcomputerwiz@hotmail.com) Received: from hotmail.com ([65.55.132.98]) by bay0-omc2-s37.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Thu, 14 Dec 2006 11:02:42 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 14 Dec 2006 11:02:41 -0800 Message-ID: Received: from 65.55.132.123 by by127fd.bay127.hotmail.msn.com with HTTP; Thu, 14 Dec 2006 19:02:39 GMT X-Originating-IP: [69.177.106.166] X-Originating-Email: [mrcomputerwiz@hotmail.com] X-Sender: mrcomputerwiz@hotmail.com From: "Mr CW" To: freebsd-hackers@freebsd.org Date: Thu, 14 Dec 2006 19:02:39 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 14 Dec 2006 19:02:41.0526 (UTC) FILETIME=[6E1B2160:01C71FB2] Subject: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 19:02:57 -0000 Hi Guys, I have been reading the ppi man page and have searched Google but have not found an answer to my problem: I work at a business which uses cable testers that output plain text to a dot matrix printer (any old DMP will work). (Cirris cable testers) The paper trail is getting huge so I am trying to write a program that does the following: Prompts the user for the cable part number Reads data from the parallel port, which is connected to the parallel output of a Cirris tester Prompts for any notes regarding the cable Inputs the data into a database table Now, my real question is: how do I read data from the parallel port on the FreeBSD computer that is coming from the tester which is trying to 'print' to the FBSD computer's parallel port? Is there a suggested pinout for a parallel crossover calbe to accomplish this task with ppi? Is the crossover cable even required? Finally, is there a FBSD-sanctioned parallel port driver for use with Perl instead of using ppi and C? Any and all help is welcomed and apriciated. -J. Hunt _________________________________________________________________ Get free, personalized commercial-free online radio with MSN Radio powered by Pandora http://radio.msn.com/?icid=T002MSN03A07001 From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 19:49:31 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8941B16A4D1 for ; Thu, 14 Dec 2006 19:49:31 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from cydem.org (S0106000103ce4c9c.vc.shawcable.net [24.87.27.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C8E743C9E for ; Thu, 14 Dec 2006 19:47:41 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from freen0de (unknown [192.168.0.251]) by cydem.org (Postfix/FreeBSD) with ESMTP id ADE6790A9F; Thu, 14 Dec 2006 11:49:10 -0800 (PST) Date: Thu, 14 Dec 2006 11:49:06 -0800 From: To: Message-ID: <20061214114906.03ab3f6c@freen0de> In-Reply-To: References: X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mrcomputerwiz@hotmail.com Subject: Re: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 19:49:31 -0000 > Now, my real question is: how do I read data from the parallel port > on the FreeBSD computer that is coming from the tester which is > trying to 'print' to the FBSD computer's parallel port? Is there a did you try to set LPT0 mode to bi-directional in the BIOS, and then `cat /dev/lpt0`? > suggested pinout for a parallel crossover calbe to accomplish this > task with ppi? Is the crossover cable even required? as I understand it, either the 8 parallel lines can be driven on both sides to send data both ways, or the 5 control inputs (paper out, ACK, busy, etc) are used to receive data, or both. > -J. Hunt [SorAlx] ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 19:05:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AEA416A519 for ; Thu, 14 Dec 2006 19:05:28 +0000 (UTC) (envelope-from bsd@bsdhome.com) Received: from ms-smtp-02.southeast.rr.com (ms-smtp-02.southeast.rr.com [24.25.9.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7705D43D86 for ; Thu, 14 Dec 2006 19:03:40 +0000 (GMT) (envelope-from bsd@bsdhome.com) Received: from neutrino.bsdhome.com (cpe-071-070-208-236.nc.res.rr.com [71.70.208.236]) by ms-smtp-02.southeast.rr.com (8.13.6/8.13.6) with ESMTP id kBEJ5FcN013066 for ; Thu, 14 Dec 2006 14:05:15 -0500 (EST) Received: from neutrino.bsdhome.com (localhost [127.0.0.1]) by neutrino.bsdhome.com (8.13.1/8.13.1) with ESMTP id kBEJ5Eo9027309; Thu, 14 Dec 2006 14:05:14 -0500 (EST) (envelope-from bsd@neutrino.bsdhome.com) Received: (from bsd@localhost) by neutrino.bsdhome.com (8.13.1/8.13.1/Submit) id kBEJ5A4Z027306; Thu, 14 Dec 2006 14:05:10 -0500 (EST) (envelope-from bsd) Date: Thu, 14 Dec 2006 14:05:10 -0500 From: Brian Dean To: freebsd-hackers@freebsd.org Message-ID: <20061214190510.GA26590@neutrino.bsdhome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Mailman-Approved-At: Thu, 14 Dec 2006 20:18:52 +0000 Subject: Kernel hang on 6.x X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 19:05:28 -0000 Hi, We're experiencing a kernel hang on a 6.x quad processor Sun amd64 based system. We are able to reproduce it fairly reliably, but the environment to do so is not easily replicatable so I cannot provide a simple test case. However, I have been able to build a debug kernel and when the system "hangs", I can break to the debugger prompt. But once there, I'm not sure what to do to isolate where the system is hung up. I have confirmed that the hang occurs in both SMP and uniprocessor mode. Here are some system details: uname -a: FreeBSD bb02f54 6.2-BETA2 FreeBSD 6.2-BETA2 #4: Wed Dec 13 11:43:38 EST 2006 root@bb02f54:/usr/src/sys/amd64/compile/BBKERN amd64 FreeBSD 6.2-BETA2 #4: Wed Dec 13 11:43:38 EST 2006 root@bb02f54:/usr/src/sys/amd64/compile/BBKERN WARNING: WITNESS option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Dual Core AMD Opteron(tm) Processor 275 (2193.76-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x20f12 Stepping = 2 Features=0x178bfbff Features2=0x1 AMD Features=0xe2500800 AMD Features2=0x3 Cores per package: 2 real memory = 17179869184 (16384 MB) avail memory = 16518569984 (15753 MB) ACPI APIC Table: The hang appears to occur under heavy memory usage and usually seems to happen when the process size approaches the size of swap. If anyone can offer a suggestion as to what information from the db> prompt might help home in on this problem, please let me know. A simple backtrace wasn't terribly englightening, at least to me: db> bt Tracing pid 18 tid 100011 td 0xffffff03e1563980 kdb_enter() at kdb_enter+0x2f scgetc() at scgetc+0x43e sckbdevent() at sckbdevent+0x83 kbdmux_intr() at kbdmux_intr+0x4d kbdmux_kbd_intr() at kbdmux_kbd_intr+0x20 taskqueue_run() at taskqueue_run+0x135 ithread_loop() at ithread_loop+0x132 fork_exit() at fork_exit+0x87 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffffffbf50ad00, rbp = 0 --- db> db> show reg cs 0x8 ss 0x10 rax 0x26 rcx 0x10457a rdx 0x1 rbx 0 rsp 0xffffffffbf50aac0 rbp 0xffffffffbf50aad0 rsi 0xffffffff80c11000 rdi 0 r8 0xffe00 r9 0xa r10 0xffffffffbf50a9e0 r11 0xa r12 0xffffffff80957c20 main_softc r13 0xffffffff809579c0 main_console r14 0x2 r15 0 rip 0xffffffff803fd57f kdb_enter+0x2f rflags 0x286 dr0 0 dr1 0 dr2 0 dr3 0 dr4 0xffff0ff0 dr5 0x400 dr6 0xffff0ff0 dr7 0x400 kdb_enter+0x2f: nop db> Thanks! -Brian From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 21:07:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7343916A50A for ; Thu, 14 Dec 2006 21:07:37 +0000 (UTC) (envelope-from tyler@bleepsoft.com) Received: from zeus.lunarpages.com (zeus.lunarpages.com [216.193.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9F8143CA1 for ; Thu, 14 Dec 2006 21:04:54 +0000 (GMT) (envelope-from tyler@bleepsoft.com) Received: from cpe-24-26-238-91.satx.res.rr.com ([24.26.238.91] helo=[192.168.250.101]) by zeus.lunarpages.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.52) id 1Guxnq-00036f-23; Thu, 14 Dec 2006 13:07:42 -0800 In-Reply-To: <20061214190510.GA26590@neutrino.bsdhome.com> References: <20061214190510.GA26590@neutrino.bsdhome.com> Mime-Version: 1.0 (Apple Message framework v752.3) Message-Id: <552E24DE-C1D1-41B1-83D2-157F0A3E0449@bleepsoft.com> From: "R. Tyler Ballance" Date: Thu, 14 Dec 2006 15:06:29 -0600 To: Brian Dean X-Mailer: Apple Mail (2.752.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - zeus.lunarpages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - bleepsoft.com X-Source: X-Source-Args: X-Source-Dir: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel hang on 6.x X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 21:07:37 -0000 On Dec 14, 2006, at 1:05 PM, Brian Dean wrote: > Hi, > > We're experiencing a kernel hang on a 6.x quad processor Sun amd64 > based system. We are able to reproduce it fairly reliably, but the > environment to do so is not easily replicatable so I cannot provide a > simple test case. However, I have been able to build a debug kernel > and when the system "hangs", I can break to the debugger prompt. But > once there, I'm not sure what to do to isolate where the system is > hung up. I have confirmed that the hang occurs in both SMP and > uniprocessor mode. Here are some system details: I think you'll need to ship this machine to my house for further um....erm, diagnostics, yes, that's it ;) On a more serious topic, can you paste the output from: ddb> show pcpu ddb>allpcpu ddb>traceall ddb>show alllocks ddb>show lockedvnods Just curious as to whether those would show more info, because you're right, that trace is about as informative as new printer paper :) Cheers R. Tyler Ballance: Lead Mac Developer at bleep. software contact: tyler@bleepsoft.com | jabber: tyler@jabber.geekisp.com From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 21:34:49 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22A3F16A403 for ; Thu, 14 Dec 2006 21:34:49 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp7.server.rpi.edu (smtp7.server.rpi.edu [128.113.2.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DEE443CCE for ; Thu, 14 Dec 2006 21:31:37 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp7.server.rpi.edu (8.13.1/8.13.1) with ESMTP id kBELXBrc007973 for ; Thu, 14 Dec 2006 16:33:13 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20061214185203.GA9701@pix.net> References: <20061214041952.GA7513@dragon.NUXI.org> <20061214185203.GA9701@pix.net> Date: Thu, 14 Dec 2006 16:33:11 -0500 To: freebsd-hackers@FreeBSD.org From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Cc: Subject: Re: [PATCH] "automated" make -j value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 21:34:49 -0000 At 1:52 PM -0500 12/14/06, Kurt J. Lidl wrote: >On Wed, Dec 13, 2006, David O'Brien wrote: > > With multi-socket systems becoming more prevalent, and the continued >> increase in cores per processors, I thought it would be nice for >> 'make -j' to gain some automation. >> >> Attached is a patch that makes "-j-" be the same as > > "-j `sysctl -n kern.smp.cpus`" and "-j=" be twice that. > >I think you can do it better than this, by just support >setting the concurrancy level via reading a environmental >variable. Like say "NPROC", which is what CrayOS used, and >also appeared in the BSD/OS pmake varient several years ago. You could have '-j-' use the value of NPROC if that variable is set, and fall back to kern.smp.cpus if NPROC is not set. (it also seems to me this could be called "-j auto" instead of using some single-character for it). I think is not going to make much sense to have a special -j value for "twice ncpu" as we get machines with 12 or 16 CPU's. I doubt there would be many projects which could really take advantage of 32 streams even if there was no performance penalties. And for the few which do exist, the users could just set NPROC if they think that would do them any good. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 20:44:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3586A16A4B3 for ; Thu, 14 Dec 2006 20:44:42 +0000 (UTC) (envelope-from maxim.cf@googlemail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDB9744049 for ; Thu, 14 Dec 2006 20:35:14 +0000 (GMT) (envelope-from maxim.cf@googlemail.com) Received: by ug-out-1314.google.com with SMTP id o2so554387uge for ; Thu, 14 Dec 2006 12:36:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=gMfr/l5ytrVxKwXWUYelDeVLStDSsWQrjbw61tbJSpk+nsXufm1kgmLU7W53F/M0dDiMEt2ZnKSy/Q5cy5db/pBPkh1c9VRCAyKqkN47Raognwf46LbgBuvkVXx1z/4ToC6J2acWEOFfgzIgKNYBmCS4xnLiIBvldl3YPIjnenk= Received: by 10.82.179.9 with SMTP id b9mr343458buf.1166128611524; Thu, 14 Dec 2006 12:36:51 -0800 (PST) Received: by 10.82.188.10 with HTTP; Thu, 14 Dec 2006 12:36:51 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2006 20:36:51 +0000 From: "just Maxim" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 14 Dec 2006 23:06:01 +0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: VPN Agregation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 20:44:42 -0000 Hello, I have 7 ADSL connections, and one server outside with a big bandwidht. I want to bond all 7 ADSL connection into one big channel. I think it can be done using 7 VPN connections to the ourside server, and after that to bond all this seve VPN connection into one big. How can i do it with FreeBSD? Or other devices. Thanks From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 20:47:10 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F391416A509 for ; Thu, 14 Dec 2006 20:47:09 +0000 (UTC) (envelope-from mldodson@houston.rr.com) Received: from ms-smtp-04.texas.rr.com (ms-smtp-04.texas.rr.com [24.93.47.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB88143DB5 for ; Thu, 14 Dec 2006 20:36:19 +0000 (GMT) (envelope-from mldodson@houston.rr.com) Received: from localhost.houston.rr.com (cpe-24-167-77-130.houston.res.rr.com [24.167.77.130]) by ms-smtp-04.texas.rr.com (8.13.6/8.13.6) with ESMTP id kBEKbTRQ026226 for ; Thu, 14 Dec 2006 14:37:29 -0600 (CST) Received: from localhost (localhost [[UNIX: localhost]]) by localhost.houston.rr.com (8.13.8/8.13.6/Submit) id kBEKbSHp069928 for freebsd-hackers@freebsd.org; Thu, 14 Dec 2006 14:37:28 -0600 (CST) (envelope-from mldodson@houston.rr.com) X-Authentication-Warning: localhost.houston.rr.com: bdodson set sender to mldodson@houston.rr.com using -f From: "M. L. Dodson" To: freebsd-hackers@freebsd.org Date: Thu, 14 Dec 2006 14:37:28 -0600 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612141437.28724.mldodson@houston.rr.com> X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Mailman-Approved-At: Thu, 14 Dec 2006 23:06:33 +0000 Subject: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mldodson@houston.rr.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 20:47:10 -0000 On a computational chemistry list I subscribe to there is a current thread about multi-cpu systems needing to have the cpu frequencies synced (this is in a Linux context). This is evidently not just having the cpus running at nominally the same frequency but something else in addition. A posting in the thread said variations less than 0.1% were not problematic. However, the poster said it was an issue in a dual cpu, dual core system he had set up. My questions are: 1. Is this real or an urban legend? 2. If real, is this a Linuxism or is FreeBSD affected as well? 3. How do you "sync" the cpus, if it is needed? 4. anything else some one wants to expound on along this line. Bud Dodson -- M. L. Dodson Email: mldodson-at-houston-dot-rr-dot-com Phone: eight_three_two-56_three-386_one From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 00:02:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DCC816A417 for ; Fri, 15 Dec 2006 00:02:34 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outQ.internet-mail-service.net (outQ.internet-mail-service.net [216.240.47.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D2DE43EF6 for ; Thu, 14 Dec 2006 23:56:27 +0000 (GMT) (envelope-from julian@elischer.org) Received: from shell.idiom.com (HELO idiom.com) (216.240.47.20) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Thu, 14 Dec 2006 15:28:07 -0800 Received: from [10.251.18.229] (nat.ironport.com [63.251.108.100]) by idiom.com (8.12.11/8.12.11) with ESMTP id kBENhFEb014661; Thu, 14 Dec 2006 15:43:16 -0800 (PST) (envelope-from julian@elischer.org) Message-ID: <4581E185.1090803@elischer.org> Date: Thu, 14 Dec 2006 15:43:01 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: just Maxim References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: VPN Agregation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 00:02:34 -0000 just Maxim wrote: > Hello, > I have 7 ADSL connections, and one server outside with a big bandwidht. > I want to bond all 7 ADSL connection into one big channel. > I think it can be done using 7 VPN connections to the ourside server, and > after that to bond all this seve VPN connection into one big. > How can i do it with FreeBSD? Or other devices. > > > > Thanks > _______________________________________________ > 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" how do you make different VPNs go out through different DSL lines? more info is needed I guess. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 00:12:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02F9616A407 for ; Fri, 15 Dec 2006 00:12:34 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from cydem.org (S0106000103ce4c9c.vc.shawcable.net [24.87.27.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD6DD43CAB for ; Fri, 15 Dec 2006 00:03:51 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from freen0de (unknown [192.168.0.251]) by cydem.org (Postfix/FreeBSD) with ESMTP id 5D1FF90A9F; Thu, 14 Dec 2006 16:05:26 -0800 (PST) Date: Thu, 14 Dec 2006 16:05:20 -0800 From: To: Message-ID: <20061214160520.2d28ff3a@freen0de> In-Reply-To: <200612141437.28724.mldodson@houston.rr.com> References: <200612141437.28724.mldodson@houston.rr.com> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mldodson@houston.rr.com Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 00:12:34 -0000 > On a computational chemistry list I subscribe to there is a > current thread about multi-cpu systems needing to have the cpu > frequencies synced (this is in a Linux context). This is > evidently not just having the cpus running at nominally the same > frequency but something else in addition. A posting in the thread > said variations less than 0.1% were not problematic. However, the > poster said it was an issue in a dual cpu, dual core system he had > set up. > > My questions are: > 1. Is this real or an urban legend? If CPUs use the same FSB (as is the case with dual-core chip), they are already in sync. Right? For system that use multiple FSB clocks [like dual-(dualcore-CPU) systems], it might be possible to vary the clocks (as much as the manufacturer allows without hw modifications: e.g., SpeedStep, or something similar). Why someone would want to have CPUs running at precisely the same frequency is beyond my imagination. > Bud Dodson [SorAlx] ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 01:45:29 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EAA716A47B for ; Fri, 15 Dec 2006 01:45:29 +0000 (UTC) (envelope-from girishvenkatachalam@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F08744200 for ; Fri, 15 Dec 2006 01:33:52 +0000 (GMT) (envelope-from girishvenkatachalam@gmail.com) Received: by wr-out-0506.google.com with SMTP id i28so344591wra for ; Thu, 14 Dec 2006 17:35:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:reply-to:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=pwTnd1buSKZ+CI2Oii9NANtBOIbZ6V+05vYCEx9VIu5iIytCLyrFshFcKrdW7kZ3HTBQsKS/kc5xolAiBLHQ9/eAa1oMGef28mlpP5QQYAYHT8wkjFyzswjyU7Hnu22Cldm6yy3y8CdSZYwEGam0J4It47SpqzNFBHTPnQuXq3k= Received: by 10.90.49.19 with SMTP id w19mr232608agw.1166146516619; Thu, 14 Dec 2006 17:35:16 -0800 (PST) Received: from lakshmi.susmita.org ( [59.92.84.231]) by mx.google.com with ESMTP id 20sm2118110agb.2006.12.14.17.35.14; Thu, 14 Dec 2006 17:35:16 -0800 (PST) Received: by lakshmi.susmita.org (Postfix, from userid 1000) id 1325623AA11; Fri, 15 Dec 2006 07:05:09 +0530 (IST) Date: Fri, 15 Dec 2006 07:05:09 +0530 From: Girish Venkatachalam To: freebsd-hackers@freebsd.org Message-ID: <20061215013509.GA11355@lakshmi.susmita.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i Subject: Re: VPN Agregation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: girishvenkatachalam@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 01:45:29 -0000 On Thu, Dec 14, 2006 at 08:36:51PM +0000, just Maxim wrote: > Hello, > I have 7 ADSL connections, and one server outside with a big bandwidht. > I want to bond all 7 ADSL connection into one big channel. > I think it can be done using 7 VPN connections to the ourside server, and > after that to bond all this seve VPN connection into one big. > How can i do it with FreeBSD? Or other devices. I don't think VPN is the right way to go for channel bonding. You only need to use MLPPP or BGP or some such thing. It is a very simple thing to do. I have myself implemented link aggregation on wireless links by modifying only the downstream. The other side just assembled the packets properly automatically. I used a simple round robin scheme. The throughput was not constant but fairly good. I am sure it could be improved. If you want link sharing both ways, then you got to do this at both sides. Don't go the VPN way, you don't need the overhead for this. Besides it is totally unrelated to your goal. Should you have more questions feel free to ask. Best of luck! regards, Girish From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 03:08:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 453E116A407 for ; Fri, 15 Dec 2006 03:08:59 +0000 (UTC) (envelope-from simonychang@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDB1043C9F for ; Fri, 15 Dec 2006 03:07:19 +0000 (GMT) (envelope-from simonychang@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so969894nfc for ; Thu, 14 Dec 2006 19:08:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=THRPwRpekK5dyWoVGi+bwHaBXQcU7nL9FTORSlZbrqaNEFbEmWGX38z7pcziqI0PEuI61tZ95BzRzEGqIBDg0JCZWpURrP2gpxk+7z3HsWZdxU0dfQGX00hUpetGMW+FOOFdPQ29OQ6EiHwdI8Vg0QpEFsnHf+hJpmGJKspJj44= Received: by 10.82.120.14 with SMTP id s14mr42036buc.1166152137085; Thu, 14 Dec 2006 19:08:57 -0800 (PST) Received: by 10.82.115.14 with HTTP; Thu, 14 Dec 2006 19:08:57 -0800 (PST) Message-ID: <8efc42630612141908o334e0358u580363d7a41fe6b0@mail.gmail.com> Date: Thu, 14 Dec 2006 22:08:57 -0500 From: "Simon Chang" To: "just Maxim" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: VPN Agregation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 03:08:59 -0000 Maxim, VPN and channel aggregation are two completely unrelated concepts. If you want to do channel aggregation, you will also need networking equipments (routers and switches) that are intelligent enough to realize that you are treating seven physical lines as one virtual line. Otherwise, the frames and packets will not be switched/routed to the correct interfaces, and you could even end up with switching loops (and that is very bad). Once you have aggregation set up, you should then consider VPN *only* if you want the traffic between you and the server encrypted and protected against tampering, etc. I think that, in this case, not only do you need more information, you also need a clearer idea of exactly what you want to do. SC On 12/14/06, just Maxim wrote: > Hello, > I have 7 ADSL connections, and one server outside with a big bandwidht. > I want to bond all 7 ADSL connection into one big channel. > I think it can be done using 7 VPN connections to the ourside server, and > after that to bond all this seve VPN connection into one big. > How can i do it with FreeBSD? Or other devices. > > > > Thanks > _______________________________________________ > 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 Fri Dec 15 08:38:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D949C16A417 for ; Fri, 15 Dec 2006 08:38:26 +0000 (UTC) (envelope-from marc.loerner@hob.de) Received: from mailgate.hob.de (mailgate.hob.de [212.185.199.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B9C843CF5 for ; Fri, 15 Dec 2006 08:36:01 +0000 (GMT) (envelope-from marc.loerner@hob.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.hob.de (Postfix) with ESMTP id DE5EF27757 for ; Fri, 15 Dec 2006 09:37:38 +0100 (CET) Received: from mailgate.hob.de ([127.0.0.1]) by localhost (mailgate.hob.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27601-07 for ; Fri, 15 Dec 2006 09:37:38 +0100 (CET) Received: from imap.hob.de (mail2.hob.de [172.25.1.102]) by mailgate.hob.de (Postfix) with ESMTP id 4232D2778B for ; Fri, 15 Dec 2006 09:37:38 +0100 (CET) Received: from linux03.hob.de (linux03.hob.de [172.22.0.190]) by imap.hob.de (Postfix on SuSE eMail Server 2.0) with ESMTP id EEE842FC3 for ; Fri, 15 Dec 2006 09:37:37 +0100 (CET) From: Marc =?iso-8859-1?q?L=F6rner?= Organization: hob To: freebsd-hackers@freebsd.org Date: Fri, 15 Dec 2006 09:37:37 +0100 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200612150937.37737.marc.loerner@hob.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at hob.de Subject: Allocate aligned memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 08:38:26 -0000 Hello all, I want to allocate 120KB of memory thats aligned to 32KB. I already saw/found the function contigmalloc, now my question is, why following functioncall never does return with an resulting address, instead null is returned? unsigned long *p = (unsigned long*) contigmalloc(120*1024, M_DEVBUF, M_WAITOK, 0, (1<<22), 32*1024, 1024*1024); Thanks in advance, Marc P.S.: I'm already aware that contigmalloc doesn't support M_WAITOK! From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 08:45:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A58216A40F for ; Fri, 15 Dec 2006 08:45:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCCBA43CC2 for ; Fri, 15 Dec 2006 08:44:00 +0000 (GMT) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [193.217.134.54] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe05.swip.net (CommuniGate Pro SMTP 5.0.12) with ESMTPA id 257050322; Fri, 15 Dec 2006 09:45:38 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Fri, 15 Dec 2006 09:45:18 +0100 User-Agent: KMail/1.7 References: <20061214190510.GA26590@neutrino.bsdhome.com> In-Reply-To: <20061214190510.GA26590@neutrino.bsdhome.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612150945.19310.hselasky@c2i.net> Cc: Brian Dean Subject: Re: Kernel hang on 6.x X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 08:45:42 -0000 On Thursday 14 December 2006 20:05, Brian Dean wrote: > Hi, > > We're experiencing a kernel hang on a 6.x quad processor Sun amd64 > based system. We are able to reproduce it fairly reliably, but the > environment to do so is not easily replicatable so I cannot provide a > simple test case. However, I have been able to build a debug kernel > and when the system "hangs", I can break to the debugger prompt. But > once there, I'm not sure what to do to isolate where the system is > hung up. I have confirmed that the hang occurs in both SMP and > uniprocessor mode. Here are some system details: > > uname -a: > FreeBSD bb02f54 6.2-BETA2 FreeBSD 6.2-BETA2 #4: Wed Dec 13 11:43:38 EST > 2006 root@bb02f54:/usr/src/sys/amd64/compile/BBKERN amd64 > > FreeBSD 6.2-BETA2 #4: Wed Dec 13 11:43:38 EST 2006 > root@bb02f54:/usr/src/sys/amd64/compile/BBKERN > WARNING: WITNESS option enabled, expect reduced performance. > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: Dual Core AMD Opteron(tm) Processor 275 (2193.76-MHz K8-class CPU) > Origin = "AuthenticAMD" Id = 0x20f12 Stepping = 2 > > Features=0x178bfbffA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT> Features2=0x1 > AMD Features=0xe2500800 > AMD Features2=0x3 > Cores per package: 2 > real memory = 17179869184 (16384 MB) > avail memory = 16518569984 (15753 MB) > ACPI APIC Table: > > The hang appears to occur under heavy memory usage and usually seems > to happen when the process size approaches the size of swap. > > If anyone can offer a suggestion as to what information from the db> > prompt might help home in on this problem, please let me know. A > simple backtrace wasn't terribly englightening, at least to me: > Does this happen when you work on the console? Or when you switch from X11 to the console. I know that the keyboard driver is called from several places without Giant locked. In my new USB keyboard driver I have added several "if (!mtx_owned(&Giant)) return XXX;". Maybe you can try adding such to the SUN keyboard driver? Please see: http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/dev/usb/ukbd.c > db> bt > Tracing pid 18 tid 1000http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/dev/usb/ukbd.c11 td 0xffffff03e1563980 > kdb_enter() at kdb_enter+0x2f > scgetc() at scgetc+0x43e > sckbdevent() at sckbdevent+0x83 > kbdmux_intr() at kbdmux_intr+0x4d > kbdmux_kbd_intr() at kbdmux_kbd_intr+0x20 > taskqueue_run() at taskqueue_run+0x135 > ithread_loop() at ithread_loop+0x132 > fork_exit() at fork_exit+0x87 > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip = 0, rsp = 0xffffffffbf50ad00, rbp = 0 --- > db> > > db> show reg > cs 0x8 > ss 0x10 > rax 0x26 > rcx 0x10457a > rdx 0x1 > rbx 0 > rsp 0xffffffffbf50aac0 > rbp 0xffffffffbf50aad0 > rsi 0xffffffff80c11000 > rdi 0 > r8 0xffe00 > r9 0xa > r10 0xffffffffbf50a9e0 > r11 0xa > r12 0xffffffff80957c20 main_softc > r13 0xffffffff809579c0 main_console > r14 0x2 > r15 0 > rip 0xffffffff803fd57f kdb_enter+0x2f > rflags 0x286 > dr0 0 > dr1 0 > dr2 0 > dr3 0 > dr4 0xffff0ff0 > dr5 0x400 > dr6 0xffff0ff0 > dr7 0x400 > kdb_enter+0x2f: nop > db> > --HPS From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 08:51:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9ABB616A403 for ; Fri, 15 Dec 2006 08:51:20 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3135143CB2 for ; Fri, 15 Dec 2006 08:49:36 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.0.100] (c-67-188-127-3.hsd1.ca.comcast.net [67.188.127.3]) by elvis.mu.org (Postfix) with ESMTP id 37D091A4D93; Fri, 15 Dec 2006 00:51:16 -0800 (PST) Message-ID: <458261DE.2040607@FreeBSD.org> Date: Fri, 15 Dec 2006 00:50:38 -0800 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Marc_L=F6rner?= References: <200612150937.37737.marc.loerner@hob.de> In-Reply-To: <200612150937.37737.marc.loerner@hob.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: Allocate aligned memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 08:51:20 -0000 Marc Lörner wrote: > Hello all, > > I want to allocate 120KB of memory thats aligned to 32KB. > I already saw/found the function contigmalloc, now my question is, why > following functioncall never does return with an resulting address, instead > null is returned? > > unsigned long *p = (unsigned long*) > contigmalloc(120*1024, M_DEVBUF, M_WAITOK, 0, (1<<22), 32*1024, 1024*1024); Have you considered the fact that there might be no 32K-aligned 120KB chunk of memory in the range you specified? My suggestion is to make the your high limit (currently 1 << 22) MUCH higher, if possible. Also, getting rid of the 1MB boundary might help. -- Suleiman From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 09:19:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3052716A40F; Fri, 15 Dec 2006 09:19:44 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF0A643C9E; Fri, 15 Dec 2006 09:18:02 +0000 (GMT) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [193.217.134.54] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe01.swip.net (CommuniGate Pro SMTP 5.0.12) with ESMTPA id 337521687; Fri, 15 Dec 2006 10:19:41 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Fri, 15 Dec 2006 10:19:20 +0100 User-Agent: KMail/1.7 References: <200612150937.37737.marc.loerner@hob.de> <458261DE.2040607@FreeBSD.org> In-Reply-To: <458261DE.2040607@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200612151019.22622.hselasky@c2i.net> Cc: Suleiman Souhlal , Marc =?iso-8859-1?q?L=F6rner?= Subject: Re: Allocate aligned memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 09:19:44 -0000 On Friday 15 December 2006 09:50, Suleiman Souhlal wrote: > Marc L=F6rner wrote: > > Hello all, > > > > I want to allocate 120KB of memory thats aligned to 32KB. > > I already saw/found the function contigmalloc, now my question is, why > > following functioncall never does return with an resulting address, > > instead null is returned? > > > > unsigned long *p =3D (unsigned long*) > > contigmalloc(120*1024, M_DEVBUF, M_WAITOK, 0, (1<<22), 32*1024, > > 1024*1024); > > Have you considered the fact that there might be no 32K-aligned 120KB chu= nk > of memory in the range you specified? > > My suggestion is to make the your high limit (currently 1 << 22) MUCH > higher, if possible. Also, getting rid of the 1MB boundary might help. > PS: contigmalloc is on the way out. Please use "man bus_dma" instead. For a= n=20 example see: http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/dev/usb/usb_subr= =2Ec And the function "usbd_mem_alloc_sub()". =2D-HPS From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 09:37:25 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CEF516A412; Fri, 15 Dec 2006 09:37:25 +0000 (UTC) (envelope-from marc.loerner@hob.de) Received: from mailgate.hob.de (mailgate.hob.de [212.185.199.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9479843CA4; Fri, 15 Dec 2006 09:35:44 +0000 (GMT) (envelope-from marc.loerner@hob.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.hob.de (Postfix) with ESMTP id 0240C27780; Fri, 15 Dec 2006 10:37:24 +0100 (CET) Received: from mailgate.hob.de ([127.0.0.1]) by localhost (mailgate.hob.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03826-03; Fri, 15 Dec 2006 10:37:23 +0100 (CET) Received: from imap.hob.de (mail2.hob.de [172.25.1.102]) by mailgate.hob.de (Postfix) with ESMTP id C4FA327777; Fri, 15 Dec 2006 10:37:23 +0100 (CET) Received: from linux03.hob.de (linux03.hob.de [172.22.0.190]) by imap.hob.de (Postfix on SuSE eMail Server 2.0) with ESMTP id 13429323F; Fri, 15 Dec 2006 10:37:23 +0100 (CET) From: Marc =?iso-8859-1?q?L=F6rner?= Organization: hob To: freebsd-hackers@freebsd.org Date: Fri, 15 Dec 2006 10:37:22 +0100 User-Agent: KMail/1.6.2 References: <200612150937.37737.marc.loerner@hob.de> <458261DE.2040607@FreeBSD.org> <200612151019.22622.hselasky@c2i.net> In-Reply-To: <200612151019.22622.hselasky@c2i.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200612151037.22931.marc.loerner@hob.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at hob.de Cc: Suleiman Souhlal , Hans Petter Selasky Subject: Re: Allocate aligned memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 09:37:25 -0000 On Friday 15 December 2006 10:19, Hans Petter Selasky wrote: ... > > My suggestion is to make the your high limit (currently 1 << 22) MUCH > > higher, if possible. Also, getting rid of the 1MB boundary might help. > > PS: contigmalloc is on the way out. Please use "man bus_dma" instead. For > an example see: > > http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/dev/usb/usb_subr >.c > > And the function "usbd_mem_alloc_sub()". Thanks for the help, I finally got contigmalloc working! Next step is converting to bus_dmamem_alloc, but AFAICS this function still uses contigmalloc. So what are the main improvements on using these new functions? Kind regards, Marc From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 09:55:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 003B316A407 for ; Fri, 15 Dec 2006 09:55:33 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEC3F43CA5 for ; Fri, 15 Dec 2006 09:53:52 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp157-244.lns2.adl2.internode.on.net [121.44.157.244]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id kBF9tT2e088836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Dec 2006 20:25:30 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Fri, 15 Dec 2006 20:25:16 +1030 User-Agent: KMail/1.9.4 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart35339965.rcyN62s719"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612152025.17442.doconnor@gsoft.com.au> X-Spam-Score: -1.387 () AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.57 on 203.31.81.10 Cc: Mr CW Subject: Re: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 09:55:34 -0000 --nextPart35339965.rcyN62s719 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 15 December 2006 05:32, Mr CW wrote: > Now, my real question is: how do I read data from the parallel port on t= he > FreeBSD computer that is coming from the tester which is trying to 'print' > to the FBSD computer's parallel port? Is there a suggested pinout for a > parallel crossover calbe to accomplish this task with ppi? Is the > crossover cable even required? I think you would need to wire ACK to STROBE at the very least.. I kind of= =20 suspect you'd need to write a ppbus driver because lpt only returns the=20 printer status when read. > Finally, is there a FBSD-sanctioned parallel port driver for use with Perl > instead of using ppi and C? It would be pretty easy to write a wrapper to use ppi in Perl (eg SWIG) =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 --nextPart35339965.rcyN62s719 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFgnEF5ZPcIHs/zowRAvosAJ9k0KhirwHTxTmawzEBhmsG3KtGtACghxog St3CnwFZDv8MidOfZLK9fz4= =0EXd -----END PGP SIGNATURE----- --nextPart35339965.rcyN62s719-- From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 10:15:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03F8316A407; Fri, 15 Dec 2006 10:15:23 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0371143CA0; Fri, 15 Dec 2006 10:13:41 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1GvA65-0001oy-5M; Fri, 15 Dec 2006 12:15:21 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 15 Dec 2006 12:15:21 +0200 From: Danny Braniss Message-ID: Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Kernel Virtual Machine X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 10:15:23 -0000 sorry for the cross-posting, but not realy sure where this belongs. Linux just incorporated this, so I was wondering if anything along this lines is being done/concidered for FreeBSD? see: http://aplawrence.com/Linux/kvm_virtualization.html http://osdir.com/Article9554.phtml Cheers, danny PS: I think that the K in kvm is for 'Avi Kivity' From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 15:07:08 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD8F816A40F for ; Fri, 15 Dec 2006 15:07:08 +0000 (UTC) (envelope-from flz@xbsd.org) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72ACD43CBE for ; Fri, 15 Dec 2006 15:05:21 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from smtp.xbsd.org (unknown [82.233.2.192]) by smtp4-g19.free.fr (Postfix) with ESMTP id AE87F8884 for ; Fri, 15 Dec 2006 16:07:02 +0100 (CET) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id E3C751191A for ; Fri, 15 Dec 2006 16:07:01 +0100 (CET) X-Virus-Scanned: amavisd-new at xbsd.org Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zFTUZgJWSQup for ; Fri, 15 Dec 2006 16:06:55 +0100 (CET) Received: from [193.95.134.156] (mayday.esat.net [193.95.134.156]) by smtp.xbsd.org (Postfix) with ESMTP id 43C5011410 for ; Fri, 15 Dec 2006 16:06:55 +0100 (CET) Message-ID: <4582BA2A.3020402@xbsd.org> Date: Fri, 15 Dec 2006 15:07:22 +0000 From: Florent Thoumie User-Agent: Thunderbird 1.5.0.8 (X11/20061121) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigCE0DCC11A999A3D764056F9B" Cc: Subject: GCC Pre-compiled headers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 15:07:08 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCE0DCC11A999A3D764056F9B Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable I've seen that Roman asked about this few months ago but it seems nobody answered. Are there plans to support or people working on integrating gcc pre-compiled headers to buildworld/buildkernel? --=20 Florent Thoumie flz@FreeBSD.org FreeBSD Committer --------------enigCE0DCC11A999A3D764056F9B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFgrovMxEkbVFH3PQRCiUaAJ4jx13p4jMMTiH0fhhtiVP25Uh3mgCeK+9n WlGb5bRDX0uB5ei+oRvNft0= =+dxl -----END PGP SIGNATURE----- --------------enigCE0DCC11A999A3D764056F9B-- From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 16:47:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8244A16A4A0 for ; Fri, 15 Dec 2006 16:47:37 +0000 (UTC) (envelope-from thorpflyer@yahoo.com) Received: from web60917.mail.yahoo.com (web60917.mail.yahoo.com [209.73.178.245]) by mx1.FreeBSD.org (Postfix) with SMTP id AED1143CD3 for ; Fri, 15 Dec 2006 16:45:37 +0000 (GMT) (envelope-from thorpflyer@yahoo.com) Received: (qmail 60400 invoked by uid 60001); 15 Dec 2006 16:47:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gZCnh5eOTN6f/IHLRiUU04D6AEQjku82DQahmK9D4F9sulaIGfbkneIOosexSvQgSY3IwCakRKD3jF5Fs6sQVytUdT0IJH+jhO5IMa1Yok5PqvkwhZNsx5iw4J6PuYQFBjnyu0TWY6xWnePhVJXI4RtL/kJreh90M/Mc7uYP+kI= ; Message-ID: <20061215164718.60395.qmail@web60917.mail.yahoo.com> Received: from [67.166.15.143] by web60917.mail.yahoo.com via HTTP; Fri, 15 Dec 2006 08:47:18 PST Date: Fri, 15 Dec 2006 08:47:18 -0800 (PST) From: Simon Roberts To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 16:47:37 -0000 =0A----- Original Message ----=0A> On a computational chemistry list I subs= cribe to there is a=0A> current thread about multi-cpu systems needing to h= ave the cpu=0A> frequencies synced (this is in a Linux context). This is= =0A> evidently not just having the cpus running at nominally the same=0A> f= requency but something else in addition. A posting in the thread=0A> said = variations less than 0.1% were not problematic. However, the=0A> poster sa= id it was an issue in a dual cpu, dual core system he had=0A> set up.=0A> = =0A> My questions are:=0A> 1. Is this real or an urban legend?=0A=0AIf CPUs= use the same FSB (as is the case with dual-core chip), they are=0Aalready = in sync. Right? For system that use multiple FSB clocks [like=0Adual-(dualc= ore-CPU) systems], it might be possible to vary the clocks=0A(as much as th= e manufacturer allows without hw modifications: e.g.,=0ASpeedStep, or somet= hing similar).=0A=0AWhy someone would want to have CPUs running at precisel= y the same=0Afrequency is beyond my imagination.=0A=0A---------------------= -----------------------=0A=0AMy dual core system does speedstep the two CPU= s independently, it's clearly visible when running the speed monitor applet= s. I guess if only one thread is busy, only one CPU needs to work hard.=0A= =0AAs to why it would matter that they be in sync? My imagination runs to t= hese two possibilities: 1) someone is writing multi-threaded software but d= oesn't really know how to do this correctly. 2) someone is writing ultra-hi= gh performance multi-threaded software that requires two threads on the two= CPUs to be able to run in a way that doesn't risk data corruption, but nee= ds to be able to do it without slowing down to check monitors/semaphores/ot= her-threadsafety-devices. To address this, they've counted CPU cycles and a= re running a producer and consumer type scenario in such a way that the thr= eads are perfectly out of phase with one another, so as to ensure that read= s by one are not mixed in with writes by the other. I guess option 2 would = be kinda legitimate, but I suspect actually a special case of 1 anyway--mai= nly because I find it hard to believe it has a snowball's chance in hell of= working on systems that have pipelines, instruction look-ahead, etc. Might= have worked on a dual 6502 based system when you knew exactly how long an = instruction would take, and it always took that long :)=0A=0ABottom line; I= 'm inclined to the urban-legend classification.=0A=0A$0.02=0ASimon=0A=0A=0A= =0A=0A=0A__________________________________________________=0ADo You Yahoo!= ?=0ATired of spam? Yahoo! Mail has the best spam protection around =0Ahttp= ://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 17:50:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D5EF16A40F for ; Fri, 15 Dec 2006 17:50:41 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6123743CB9 for ; Fri, 15 Dec 2006 17:48:55 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so1137811nfc for ; Fri, 15 Dec 2006 09:50:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tCcEDWxPSfvtHnsdU/JLsrjBkK99FjNCjicrzKvVIlfk+HYnhBwY2/LIYra8DZIXO0mQt8FpY36v68Ecbwonci0fWJQjYmicMGqgE6ybDxaAMdkG7MLSk6kSyNGklLVTGCB+Bba1n+gruiBCHqDZc+WejGPPYupunPsqsFGFZOk= Received: by 10.49.65.19 with SMTP id s19mr2921522nfk.1166205036555; Fri, 15 Dec 2006 09:50:36 -0800 (PST) Received: by 10.78.132.9 with HTTP; Fri, 15 Dec 2006 09:50:36 -0800 (PST) Message-ID: <84dead720612150950p33c9c35erffe4adbab7227e68@mail.gmail.com> Date: Fri, 15 Dec 2006 23:20:36 +0530 From: "Joseph Koshy" To: mldodson@houston.rr.com In-Reply-To: <200612141437.28724.mldodson@houston.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200612141437.28724.mldodson@houston.rr.com> Cc: freebsd-hackers@freebsd.org Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 17:50:41 -0000 > frequency but something else in addition. A posting in the > thread said variations less than 0.1% were not problematic. > However, the poster said it was an issue in a dual cpu, dual > core system he had set up. Why would application code care about CPU frequencies? Is it trying to measure its 'performance' by subtracting two TSC readings? That won't necessarily work on modern multi-CPU systems where each CPU could be running at a different CPU speed. On FreeBSD, with hwpmc(4), you can allocate a process-mode counting pmc that counts non-sleep cycles (e.g., "p4-global-power-events,mask=running" on an Intel P4) and then use RDPMC instructions where you would have used RDTSC instructions. This is as cheap as the RDTSC technique and will work on SMP systems. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy/ From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 21:25:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B57A16A416 for ; Fri, 15 Dec 2006 21:25:01 +0000 (UTC) (envelope-from dgilbert@daveg.ca) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CAF143C9D for ; Fri, 15 Dec 2006 21:23:17 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 4F656C283; Fri, 15 Dec 2006 16:23:35 -0500 (EST) Received: by canoe.dclg.ca (Postfix, from userid 101) id 13B094AC2D; Fri, 15 Dec 2006 16:23:37 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17795.4696.998145.337454@canoe.dclg.ca> Date: Fri, 15 Dec 2006 16:23:36 -0500 To: freebsd-hackers@freebsd.org X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid Subject: Detecting buffer space with UDP. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 21:25:01 -0000 I'm using kqueue() with a EVFILT_WRITE to send udp packets over a gigabit interface (the job here is to stress test DNS servers). I'd like to send packets at wire rates, but somehow the EVFILT_WRITE is always triggered and I'm dropping a lot of packets on the floor. Is there a way (preferably with kqueue()) to wait on the bandwidth available on the card? Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================ From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 23:54:12 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9081216A415 for ; Fri, 15 Dec 2006 23:54:12 +0000 (UTC) (envelope-from mrcomputerwiz@hotmail.com) Received: from bay0-omc2-s23.bay0.hotmail.com (bay0-omc2-s23.bay0.hotmail.com [65.54.246.159]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18C7043CA6 for ; Fri, 15 Dec 2006 23:52:28 +0000 (GMT) (envelope-from mrcomputerwiz@hotmail.com) Received: from hotmail.com ([65.55.132.106]) by bay0-omc2-s23.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Fri, 15 Dec 2006 15:54:12 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 15 Dec 2006 15:54:11 -0800 Message-ID: Received: from 65.55.132.123 by by127fd.bay127.hotmail.msn.com with HTTP; Fri, 15 Dec 2006 23:54:09 GMT X-Originating-IP: [71.234.63.28] X-Originating-Email: [mrcomputerwiz@hotmail.com] X-Sender: mrcomputerwiz@hotmail.com In-Reply-To: <200612152025.17442.doconnor@gsoft.com.au> From: "Mr CW" To: freebsd-hackers@freebsd.org Date: Fri, 15 Dec 2006 23:54:09 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 15 Dec 2006 23:54:11.0749 (UTC) FILETIME=[51811D50:01C720A4] Cc: Subject: Re: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 23:54:12 -0000 Thank you for the pointers. It sounds like reading data back from the parallel port is not a common thing to do, although I thought parallel port projects might have done this. Then I realized that most PIC programmers, parallel port displays, etc. usually only receive data, not send it back to the computer... I'm still looking into this, so any other suggestions are very welcome. Thanks again, -J On Friday 15 December 2006 05:32, Mr CW wrote: > Now, my real question is: how do I read data from the parallel port on the > FreeBSD computer that is coming from the tester which is trying to 'print' > to the FBSD computer's parallel port? Is there a suggested pinout for a > parallel crossover calbe to accomplish this task with ppi? Is the > crossover cable even required? I think you would need to wire ACK to STROBE at the very least.. I kind of suspect you'd need to write a ppbus driver because lpt only returns the printer status when read. > Finally, is there a FBSD-sanctioned parallel port driver for use with Perl > instead of using ppi and C? It would be pretty easy to write a wrapper to use ppi in Perl (eg SWIG) -- 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 << attach3 >> _________________________________________________________________ WIN up to $10,000 in cash or prizes – enter the Microsoft Office Live Sweepstakes http://clk.atdmt.com/MRT/go/aub0050001581mrt/direct/01/ From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 00:37:51 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15C3316A403 for ; Sat, 16 Dec 2006 00:37:51 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from cydem.org (S0106000103ce4c9c.vc.shawcable.net [24.87.27.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E19643C9F for ; Sat, 16 Dec 2006 00:36:04 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from freen0de (unknown [192.168.0.251]) by cydem.org (Postfix/FreeBSD) with ESMTP id 3A87191ECA; Fri, 15 Dec 2006 16:37:51 -0800 (PST) Date: Fri, 15 Dec 2006 16:37:45 -0800 From: To: , Message-ID: <20061215163745.4662c824@freen0de> In-Reply-To: References: <20061214114906.03ab3f6c@freen0de> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: Re: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 00:37:51 -0000 > No, I didn't try that but I certainly will now. I wasn't sure you > could just cat the port and read the data back. I will let you know > how this works. Well, you should certainly try it, but don't count on it: Daniel says that lpt returns only printer status (BTW, this means full 5 bits, right?). What you need is to either write support for the 'byte mode' in lpt, or utilize the nibble mode if your device supports it. See `man ppbus` & friends, and `man lptcontrol`. > -J. Hunt [SorAlx] ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 00:43:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 156B916A40F for ; Sat, 16 Dec 2006 00:43:14 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1989243C9D for ; Sat, 16 Dec 2006 00:41:28 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp157-244.lns2.adl2.internode.on.net [121.44.157.244]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id kBG0h8UB036616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 16 Dec 2006 11:13:10 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: "Mr CW" Date: Sat, 16 Dec 2006 11:12:44 +1030 User-Agent: KMail/1.9.4 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart291558726.cVBET4nL85"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612161112.52611.doconnor@gsoft.com.au> X-Spam-Score: -1.42 () AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.57 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 00:43:14 -0000 --nextPart291558726.cVBET4nL85 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 16 December 2006 10:24, Mr CW wrote: > Thank you for the pointers. It sounds like reading data back from the > parallel port is not a common thing to do, although I thought parallel po= rt > projects might have done this. Then I realized that most PIC programmers, > parallel port displays, etc. usually only receive data, not send it back = to > the computer... It is pretty easy to read data in a GPIO kind of fashion - you can set the= =20 data direction (PCD) to input and then use PPIGDATA. However for what you=20 want the each byte of the data stream is marked by a STROBE pulse and AFAIK= =20 there isn't a preexisting way to handle this. > I'm still looking into this, so any other suggestions are very welcome. If it was me I'd use a microcontroller (eg AVR) to turn the parallel data i= nto=20 a serial stream and read it in to a PC's serial port. However we already ma= ke=20 PCBs and write microcontroller code at work.. Actually maybe something like this would do what you want=20 http://www.bb-elec.com/product.asp?SKU=3D232SPS2 I think then you could just plug it into the FreeBSD box and log the stuff= =20 coming from the serial port. =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 --nextPart291558726.cVBET4nL85 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFg0EM5ZPcIHs/zowRAmipAJsGnVOHhD+/Tvc97S4ueE2EJCqQ/QCfbzPW /mm0MezeSu/+RXBoxawHKqk= =5I7t -----END PGP SIGNATURE----- --nextPart291558726.cVBET4nL85-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 01:29:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32DCB16A40F for ; Sat, 16 Dec 2006 01:29:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.233]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25E9B43C9E for ; Sat, 16 Dec 2006 01:27:28 +0000 (GMT) (envelope-from adrian.chadd@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so815364wxc for ; Fri, 15 Dec 2006 17:29:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=TTsrmQvZkDAjoOlhmU5bXjxfT/uNyJ8nTRpAKQBCt5Jm2utqNPNn9tbHTvx631SrA7jEqydIPHGTu/uxyPTeHT9/dgbYGDEnwntXx0xZfNCivvqV3k0v6hOd/Qs7gD1HNklpmoqxLl+1vxqjgB2gfgIVOOPpmHuzRulod8SR+dc= Received: by 10.90.101.19 with SMTP id y19mr1555095agb.1166232552565; Fri, 15 Dec 2006 17:29:12 -0800 (PST) Received: by 10.90.31.12 with HTTP; Fri, 15 Dec 2006 17:29:12 -0800 (PST) Message-ID: Date: Sat, 16 Dec 2006 09:29:12 +0800 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "David Gilbert" In-Reply-To: <17795.4696.998145.337454@canoe.dclg.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17795.4696.998145.337454@canoe.dclg.ca> X-Google-Sender-Auth: 8fe3dddd8edfd4eb Cc: freebsd-hackers@freebsd.org Subject: Re: Detecting buffer space with UDP. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 01:29:14 -0000 Well, the FD will always be ready for write (and it can tell you how much data you -can- write as part of the message.) The standard way around it is to register w/ EV_ONESHOT and only get one event back when its ready for writing; but then you have to re-register after you've filled the TX queue. It could be wasteful of kqueue events; see how much CPU time you spend re-registering for events beforehand. I forget how to coax the write-side into reporting once per transition (EV_CLEAR maybe?) adrian On 12/16/06, David Gilbert wrote: > I'm using kqueue() with a EVFILT_WRITE to send udp packets over a > gigabit interface (the job here is to stress test DNS servers). I'd > like to send packets at wire rates, but somehow the EVFILT_WRITE is > always triggered and I'm dropping a lot of packets on the floor. > > Is there a way (preferably with kqueue()) to wait on the bandwidth > available on the card? > > Dave. > > -- > ============================================================================ > |David Gilbert, Independent Contractor. | Two things can be | > |Mail: dave@daveg.ca | equal if and only if they | > |http://daveg.ca | are precisely opposite. | > =========================================================GLO================ > _______________________________________________ > 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" > -- Adrian Chadd - adrian@freebsd.org From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 02:16:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC76316A407 for ; Sat, 16 Dec 2006 02:16:38 +0000 (UTC) (envelope-from freebsd@alaskaparadise.com) Received: from stargate.alaskaparadise.com (114-103-74-65.gci.net [65.74.103.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6E3343CAB for ; Sat, 16 Dec 2006 02:14:51 +0000 (GMT) (envelope-from freebsd@alaskaparadise.com) Received: from localhost (localhost [127.0.0.1]) by stargate.alaskaparadise.com (Postfix) with ESMTP id 7587C45B5 for ; Fri, 15 Dec 2006 17:16:35 -0900 (AKST) From: Beech Rintoul Organization: Alaska Paradise Travel To: freebsd-hackers@freebsd.org User-Agent: KMail/1.9.4 MIME-Version: 1.0 Date: Fri, 15 Dec 2006 17:16:12 -0900 Content-Type: multipart/signed; boundary="nextPart16662034.iMIhFlKigV"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612151716.32713.freebsd@alaskaparadise.com> Subject: Configure error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 02:16:38 -0000 --nextPart16662034.iMIhFlKigV Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm the port maintainer for ftp/proftpd. I'm struggling with getting an=20 upgrade out. The problem I'm having is they added a new option which requir= es=20 libiconv. Autoconf looks for iconv.h, can't find it in /usr/local/include a= nd=20 the build errors out when it can't link. I googled the problem and found th= at=20 autoconf by default doesn't look in usr/local/include even if it's in the=20 path. So, my question is what to put in the makefile or what to patch in th= e=20 sources to make autoconf pick up that header? Any help would be appreciated. Beech =2D-=20 =2D------------------------------------------------------------------------= =2D------------- Beech Rintoul - Sys. Administrator - beech@alaskaparadise.com /"\ ASCII Ribbon Campaign | Alaska Paradise Travel \ / - NO HTML/RTF in e-mail | 201 East 9Th Avenue Ste.310 X - NO Word docs in e-mail | Anchorage, AK 99501 / \ - Please visit Alaska Paradise - http://www.alaskaparadise.com =2D------------------------------------------------------------------------= =2D------------- =2D-=20 =2D------------------------------------------------------------------------= =2D------------- Beech Rintoul - Sys. Administrator - beech@alaskaparadise.com /"\ ASCII Ribbon Campaign | Alaska Paradise Travel \ / - NO HTML/RTF in e-mail | 201 East 9Th Avenue Ste.310 X - NO Word docs in e-mail | Anchorage, AK 99501 / \ - Please visit Alaska Paradise - http://www.alaskaparadise.com =2D------------------------------------------------------------------------= =2D------------- --nextPart16662034.iMIhFlKigV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFg1cAR5sEeCt9j00RAtwqAJ9Hkgo2of2qrCzCeA18AdWXDxWSAwCfX4tc AZ7w98+hKlt7x392r92CABU= =CGvE -----END PGP SIGNATURE----- --nextPart16662034.iMIhFlKigV-- From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 19:37:12 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5446816A517 for ; Fri, 15 Dec 2006 19:37:12 +0000 (UTC) (envelope-from jai.unix@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87E7743D36 for ; Fri, 15 Dec 2006 19:33:01 +0000 (GMT) (envelope-from jai.unix@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so751568wxc for ; Fri, 15 Dec 2006 11:34:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:from:to:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=L3tHGTcLYGLchE3vhXvdc+zCqGlVd9I2vhfc/9lr08MTXY/7IZyM/pb5EHg0pqs10ogKeOix+nWi/eh6i4/WnHFeu880lxMLebdy0Xy+5lL7wf73zX4t/TtuahoHug6OVXx9wdrrwU1rhbw9MiR6Si6BwEn5LDDrxsl1+e/j/pM= Received: by 10.70.40.1 with SMTP id n1mr1701597wxn.1166211281813; Fri, 15 Dec 2006 11:34:41 -0800 (PST) Received: from jai ( [203.145.128.5]) by mx.google.com with ESMTP id i36sm5006669wxd.2006.12.15.11.34.27; Fri, 15 Dec 2006 11:34:41 -0800 (PST) Message-ID: <020901c7207f$f57290d0$0200110a@jai> From: "Jai" To: References: <20061215120026.6682216A53B@hub.freebsd.org> Date: Sat, 16 Dec 2006 01:03:28 +0530 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailman-Approved-At: Sat, 16 Dec 2006 03:11:04 +0000 Subject: freebsd programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 19:37:12 -0000 Hi I am a student in Computer Science. I m moved ***** to FreeBSD from two year ago and enjoyed the power of BSD. But now I want to program it so that I customize it to get best results. I want to program it. I know shell programming, c programming. Is this knowledge is sufficient to program to FreeBSD or I need to learn more. Please guide me how can I make my desires true. Also tell me the steps by step development procedure of FreeBSD. Regards Jai From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 03:14:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EAA4916A412 for ; Sat, 16 Dec 2006 03:14:32 +0000 (UTC) (envelope-from ntarmos@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2931E43C9E for ; Sat, 16 Dec 2006 03:12:47 +0000 (GMT) (envelope-from ntarmos@ceid.upatras.gr) Received: from rhea.ceid.upatras.gr (rhea.ceid.upatras.gr [150.140.141.171]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 6DB2E5C1E12 for ; Sat, 16 Dec 2006 05:14:34 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by rhea.ceid.upatras.gr (Postfix) with ESMTP id 5A89E80005 for ; Sat, 16 Dec 2006 05:14:30 +0200 (EET) Received: from rhea.ceid.upatras.gr ([127.0.0.1]) by localhost (rhea [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08058-07 for ; Sat, 16 Dec 2006 05:14:29 +0200 (EET) Received: from ace.b020.ceid.upatras.gr (unknown [150.140.143.234]) by rhea.ceid.upatras.gr (Postfix) with ESMTP id 01BA280002 for ; Sat, 16 Dec 2006 05:14:28 +0200 (EET) Received: by ace.b020.ceid.upatras.gr (Postfix, from userid 1001) id 9225E5E; Sat, 16 Dec 2006 05:14:32 +0200 (EET) Date: Sat, 16 Dec 2006 05:14:32 +0200 From: Nikos Ntarmos To: freebsd-hackers@freebsd.org Message-ID: <20061216031432.GA17978@ace.b020.ceid.upatras.gr> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200612151716.32713.freebsd@alaskaparadise.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200612151716.32713.freebsd@alaskaparadise.com> Organization: NetCInS Lab., C.E.I.D., U. of Patras, Greece WWW-Homepage: http://ntarmos.dyndns.org/ X-PGP-Fingerprint: 9680 60A7 DE60 0298 B1F0 9B22 9BA2 7569 CF95 160A Office-Phone: +30-2610-996919 Office-Fax: +30-2610-969011 GPS-Info: 38.31N, 21.82E User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Virus-Scanned: by amavisd-new at ceid.upatras.gr Subject: Re: Configure error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 03:14:33 -0000 Hi there. On Fri, Dec 15, 2006 at 05:16:12PM -0900, Beech Rintoul wrote: > I googled the problem and found that autoconf by default doesn't look > in usr/local/include even if it's in the path. So, my question is what > to put in the makefile or what to patch in the sources to make > autoconf pick up that header? I was just bitten by the same problem while trying to make a new port. Adding: USE_AUTOTOOLS= aclocal:19 automake:19 autoheader:259 autoconf:259 LDFLAGS+= -L${LOCALBASE}/lib CFLAGS+= -I${LOCALBASE}/include CONFIGURE_ENV= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" pre-configure: @(cd ${CONFIGURE_WRKSRC} && \ ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL}) in the Makefile did the trick for me. This is without GNU_CONFIGURE=yes. Cheers. \n\n From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 03:30:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A7F516A407 for ; Sat, 16 Dec 2006 03:30:08 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id D34EA43CA0 for ; Sat, 16 Dec 2006 03:28:22 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.66.9.214] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis), id 0ML25U-1GvQFS0Dd9-0001M2; Sat, 16 Dec 2006 04:30:06 +0100 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sat, 16 Dec 2006 04:29:50 +0100 User-Agent: KMail/1.9.4 References: <20061215120026.6682216A53B@hub.freebsd.org> <020901c7207f$f57290d0$0200110a@jai> In-Reply-To: <020901c7207f$f57290d0$0200110a@jai> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1723363.g9a4PvfRYB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612160430.03580.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Jai Subject: Re: freebsd programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 03:30:08 -0000 --nextPart1723363.g9a4PvfRYB Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 15 December 2006 20:33, Jai wrote: > I am a student in Computer Science. I m moved ***** to FreeBSD from two > year ago and enjoyed the power of BSD. But now I want to program it so > that I customize it to get best results. I want to program it. I know > shell programming, c programming. Is this knowledge is sufficient to > program to FreeBSD or I need to learn more. Please guide me how can I > make my desires true. Also tell me the steps by step development > procedure of FreeBSD. You will find a lot of interesting documentaion about FreeBSD programming=20 on the FreeBSD website when you click on the "Developers" link [1] in the=20 menu on top. "The Design and Implementation of the FreeBSD Operating System" [2] is=20 also a recommended read if you want to get serious about kernel hacking. Other than that, there is always learning by doing. There is a list of=20 projects [3] that might be helpful to the community. You can look there=20 and see if you feel up to pick up something. [1] http://www.freebsd.org/projects/index.html [2] ISBN 0201702452 (eng. - many translations available) [3] http://www.freebsd.org/projects/ideas/ =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1723363.g9a4PvfRYB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFg2g7XyyEoT62BG0RAnWkAJwNvCikK+vy5NU+OybgvBchsxhNmwCbBQ8O USaC9QLaybUlj3zjOP5KQMI= =+Px4 -----END PGP SIGNATURE----- --nextPart1723363.g9a4PvfRYB-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 07:50:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08BFA16A47C for ; Sat, 16 Dec 2006 07:50:39 +0000 (UTC) (envelope-from freebsd@alaskaparadise.com) Received: from stargate.alaskaparadise.com (114-103-74-65.gci.net [65.74.103.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id B882C43CA1 for ; Sat, 16 Dec 2006 07:50:36 +0000 (GMT) (envelope-from freebsd@alaskaparadise.com) Received: from localhost (localhost [127.0.0.1]) by stargate.alaskaparadise.com (Postfix) with ESMTP id 7E7534601; Fri, 15 Dec 2006 22:50:35 -0900 (AKST) From: Beech Rintoul Organization: Alaska Paradise Travel To: freebsd-hackers@freebsd.org User-Agent: KMail/1.9.4 References: <200612151716.32713.freebsd@alaskaparadise.com> <20061216031432.GA17978@ace.b020.ceid.upatras.gr> In-Reply-To: <20061216031432.GA17978@ace.b020.ceid.upatras.gr> MIME-Version: 1.0 Date: Fri, 15 Dec 2006 22:50:14 -0900 Content-Type: multipart/signed; boundary="nextPart10603851.P74RXg2Mqq"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612152250.32896.freebsd@alaskaparadise.com> Cc: Nikos Ntarmos Subject: Re: Configure error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 07:50:39 -0000 --nextPart10603851.P74RXg2Mqq Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 15 December 2006 18:14, Nikos Ntarmos wrote: > Hi there. > > On Fri, Dec 15, 2006 at 05:16:12PM -0900, Beech Rintoul wrote: > > I googled the problem and found that autoconf by default doesn't look > > in usr/local/include even if it's in the path. So, my question is what > > to put in the makefile or what to patch in the sources to make > > autoconf pick up that header? > > I was just bitten by the same problem while trying to make a new port. > Adding: > > USE_AUTOTOOLS=3D aclocal:19 automake:19 autoheader:259 autoconf:259 > LDFLAGS+=3D -L${LOCALBASE}/lib > CFLAGS+=3D -I${LOCALBASE}/include > CONFIGURE_ENV=3D CFLAGS=3D"${CFLAGS}" LDFLAGS=3D"${LDFLAGS}" > > pre-configure: > @(cd ${CONFIGURE_WRKSRC} && \ > ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL}) > > in the Makefile did the trick for me. This is without GNU_CONFIGURE=3Dyes. Thanks, that's more than I needed but it did point me in the right directio= n.=20 I just needed to add the paths inside the option: =2Eif !defined(WITHOUT_WRAP) MODULES:=3D${MODULES}:mod_wrap2 INCLUDEDIRS:=3D${INCLUDEDIRS}:${WORKDIR}/include LIBDIRS:=3D${LIBDIRS}:${LOCALBASE}/lib =2Eendif Beech =2D-=20 =2D------------------------------------------------------------------------= =2D------------- Beech Rintoul - Sys. Administrator - beech@alaskaparadise.com /"\ ASCII Ribbon Campaign | Alaska Paradise Travel \ / - NO HTML/RTF in e-mail | 201 East 9Th Avenue Ste.310 X - NO Word docs in e-mail | Anchorage, AK 99501 / \ - Please visit Alaska Paradise - http://www.alaskaparadise.com =2D------------------------------------------------------------------------= =2D------------- =2D-=20 =2D------------------------------------------------------------------------= =2D------------- Beech Rintoul - Sys. Administrator - beech@alaskaparadise.com /"\ ASCII Ribbon Campaign | Alaska Paradise Travel \ / - NO HTML/RTF in e-mail | 201 East 9Th Avenue Ste.310 X - NO Word docs in e-mail | Anchorage, AK 99501 / \ - Please visit Alaska Paradise - http://www.alaskaparadise.com =2D------------------------------------------------------------------------= =2D------------- --nextPart10603851.P74RXg2Mqq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFg6VIR5sEeCt9j00RAme7AJ4wvNRPUqNtS3nAxtElb7nsqVqjxwCdG8IL 5rSUle0SOdHcfkgI4EMaGew= =SN40 -----END PGP SIGNATURE----- --nextPart10603851.P74RXg2Mqq-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 09:18:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A06516A403 for ; Sat, 16 Dec 2006 09:18:11 +0000 (UTC) (envelope-from Jose-Marcio.Martins@ensmp.fr) Received: from joe.j-chkmail.org (mar92-6-82-226-38-60.fbx.proxad.net [82.226.38.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6A0343CA3 for ; Sat, 16 Dec 2006 09:18:10 +0000 (GMT) (envelope-from Jose-Marcio.Martins@ensmp.fr) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by joe.j-chkmail.org (8.13.7/8.13.7) with ESMTP id kBG9I0NK004602; Sat, 16 Dec 2006 10:18:04 +0100 Message-ID: <4583B9C8.9060707@ensmp.fr> Date: Sat, 16 Dec 2006 10:18:00 +0100 From: Jose-Marcio Martins da Cruz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Beech Rintoul References: <200612151716.32713.freebsd@alaskaparadise.com> In-Reply-To: <200612151716.32713.freebsd@alaskaparadise.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at localhost.localdomain with ID 4583B9C8.000 by Joe's j-chkmail (http://j-chkmail dot ensmp dot fr)! Cc: freebsd-hackers@freebsd.org Subject: Re: Configure error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 09:18:11 -0000 Beech Rintoul wrote: > I'm the port maintainer for ftp/proftpd. I'm struggling with getting an > upgrade out. The problem I'm having is they added a new option which requires > libiconv. Autoconf looks for iconv.h, can't find it in /usr/local/include and > the build errors out when it can't link. I googled the problem and found that > autoconf by default doesn't look in usr/local/include even if it's in the > path. So, my question is what to put in the makefile or what to patch in the > sources to make autoconf pick up that header? Any help would be appreciated. Maybe ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" or env CPPFLAGS="-I/usr/local/include" \ LDFLAGS="-L/usr/local/lib" ./configure -- --------------------------------------------------------------- Jose Marcio MARTINS DA CRUZ Tel. :(33) 01.40.51.93.41 Ecole des Mines de Paris http://j-chkmail.ensmp.fr 60, bd Saint Michel http://www.ensmp.fr/~martins 75272 - PARIS CEDEX 06 mailto:Jose-Marcio.Martins@ensmp.fr From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 12:02:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6F5A16A415 for ; Sat, 16 Dec 2006 12:02:35 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9D2E43C9F for ; Sat, 16 Dec 2006 12:02:34 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id kBGC2TmX022493; Sat, 16 Dec 2006 13:02:29 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id kBGC2FVh097040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 16 Dec 2006 13:02:19 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id kBGC2FeO091644; Sat, 16 Dec 2006 13:02:15 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id kBGC2EOo091643; Sat, 16 Dec 2006 13:02:14 +0100 (CET) (envelope-from ticso) Date: Sat, 16 Dec 2006 13:02:13 +0100 From: Bernd Walter To: "Daniel O'Connor" Message-ID: <20061216120213.GI75351@cicely12.cicely.de> References: <200612161112.52611.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200612161112.52611.doconnor@gsoft.com.au> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: Mr CW , freebsd-hackers@freebsd.org Subject: Re: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 12:02:35 -0000 On Sat, Dec 16, 2006 at 11:12:44AM +1030, Daniel O'Connor wrote: > On Saturday 16 December 2006 10:24, Mr CW wrote: > > Thank you for the pointers. It sounds like reading data back from the > > parallel port is not a common thing to do, although I thought parallel port > > projects might have done this. Then I realized that most PIC programmers, > > parallel port displays, etc. usually only receive data, not send it back to > > the computer... > > It is pretty easy to read data in a GPIO kind of fashion - you can set the > data direction (PCD) to input and then use PPIGDATA. However for what you > want the each byte of the data stream is marked by a STROBE pulse and AFAIK > there isn't a preexisting way to handle this. Well - the hardware is made to write and in some fashion to read data from a printer, not to simulate one. Using it for a self defined protocol is something else. > > I'm still looking into this, so any other suggestions are very welcome. > > If it was me I'd use a microcontroller (eg AVR) to turn the parallel data into > a serial stream and read it in to a PC's serial port. However we already make > PCBs and write microcontroller code at work.. > > Actually maybe something like this would do what you want > http://www.bb-elec.com/product.asp?SKU=232SPS2 > > I think then you could just plug it into the FreeBSD box and log the stuff > coming from the serial port. I did something like this on a C64 to scan lpt data from a PC and pass it to a serial (IEC-Bus) commodore printer. Well, it's been a very long time since then, but I asume something like the FT245BM (http://www.ftdichip.com) should do. The FT245BM is a generic parallel to USB device Interface. It's handshake features on the parallel side should match the requirements to simulate a printer - maybe with some 74ls. The other side is USB device and supported by our uftdi driver. The driver handles it as an virtual RS232 port. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 12:05:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D84A816A416 for ; Sat, 16 Dec 2006 12:05:06 +0000 (UTC) (envelope-from Einschreiben@GMX-GmbH.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id ADD3C43CAE for ; Sat, 16 Dec 2006 12:05:04 +0000 (GMT) (envelope-from Einschreiben@GMX-GmbH.de) Received: (qmail 25017 invoked by uid 0); 16 Dec 2006 12:05:03 -0000 X-Y-GMX-Trusted: 3 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit From: GMX Einschreiben To: freebsd-hackers@freebsd.org X-Priority: 3 Message-Id: <20061216120504.ADD3C43CAE@mx1.FreeBSD.org> Date: Sat, 16 Dec 2006 12:05:04 +0000 (GMT) Subject: =?iso-8859-1?q?Benachrichtigung_=FCber_ein_GMX_Einschreiben_von_?= =?iso-8859-1?q?=22Andreas_Werner_Ostertag=22_=3CAndreasoschdi=40gm?= =?iso-8859-1?q?x=2Enet=3E?= X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andreas Werner Ostertag List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 12:05:06 -0000 Für Sie liegt ein GMX Einschreiben zum Abholen bereit: Von: "Andreas Werner Ostertag" An: freebsd-hackers@freebsd.org Datum: 2006-12-16 13:04:09 Betreff: Re: freebsd-hackers Digest, Vol 195, Issue 6 Verfallsdatum: 2006-12-23 23:59:59 Attachments: Andreasoschdi.vcf (495) Um das GMX Einschreiben über eine gesicherte Verbindung abzurufen und an Ihre E-Mail-Adresse weiterzuleiten, klicken Sie bitte rechtzeitig vor Ende der Bereitstellungsfrist auf nachfolgenden Link und geben Sie dort den Abruf-Code ein. Abrufcode: RAHTHJ7TJ --> https://service.gmx.net/de/cgi/g.fcgi/regmail/login?linkid=vzYECDY4rc7bn65lzDtPJqLv6wOCqD GMX Einschreiben ist eine Methode zum sicheren Versand von E-Mails im Internet. Ausführliche Informationen zu GMX Einschreiben sowie Sicherheitshinweise finden Sie hier: --> http://www.gmx.de/einschreiben Dies ist eine automatisch generierte Nachricht. Bitte antworten Sie nicht an die Absender-Adresse dieser E-Mail. From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 12:05:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 176F416A407 for ; Sat, 16 Dec 2006 12:05:08 +0000 (UTC) (envelope-from Einschreiben@GMX-GmbH.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 6978F43CAA for ; Sat, 16 Dec 2006 12:05:04 +0000 (GMT) (envelope-from Einschreiben@GMX-GmbH.de) Received: (qmail 11011 invoked by uid 0); 16 Dec 2006 12:05:02 -0000 X-Y-GMX-Trusted: 3 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit From: GMX Einschreiben To: freebsd-hackers@freebsd.org X-Priority: 3 Message-Id: <20061216120504.6978F43CAA@mx1.FreeBSD.org> Date: Sat, 16 Dec 2006 12:05:04 +0000 (GMT) Subject: =?iso-8859-1?q?Benachrichtigung_=FCber_ein_GMX_Einschreiben_von_?= =?iso-8859-1?q?=22Andreas_Werner_Ostertag=22_=3CAndreasoschdi=40gm?= =?iso-8859-1?q?x=2Enet=3E?= X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andreas Werner Ostertag List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 12:05:08 -0000 Für Sie liegt ein GMX Einschreiben zum Abholen bereit: Von: "Andreas Werner Ostertag" An: freebsd-hackers@freebsd.org Datum: 2006-12-16 13:03:58 Betreff: Re: freebsd-hackers Digest, Vol 195, Issue 6 Verfallsdatum: 2006-12-23 23:59:59 Attachments: Andreasoschdi.vcf (495) Um das GMX Einschreiben über eine gesicherte Verbindung abzurufen und an Ihre E-Mail-Adresse weiterzuleiten, klicken Sie bitte rechtzeitig vor Ende der Bereitstellungsfrist auf nachfolgenden Link und geben Sie dort den Abruf-Code ein. Abrufcode: JM3FK7ZHF --> https://service.gmx.net/de/cgi/g.fcgi/regmail/login?linkid=Jev5kSJv5NW3n1vZZHsgoEgDo1okmo GMX Einschreiben ist eine Methode zum sicheren Versand von E-Mails im Internet. Ausführliche Informationen zu GMX Einschreiben sowie Sicherheitshinweise finden Sie hier: --> http://www.gmx.de/einschreiben Dies ist eine automatisch generierte Nachricht. Bitte antworten Sie nicht an die Absender-Adresse dieser E-Mail. From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 12:05:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DEBAA16A403 for ; Sat, 16 Dec 2006 12:05:08 +0000 (UTC) (envelope-from Einschreiben@GMX-GmbH.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5872743CA0 for ; Sat, 16 Dec 2006 12:05:05 +0000 (GMT) (envelope-from Einschreiben@GMX-GmbH.de) Received: (qmail 25044 invoked by uid 0); 16 Dec 2006 12:05:03 -0000 X-Y-GMX-Trusted: 3 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit From: GMX Einschreiben To: freebsd-hackers@freebsd.org X-Priority: 3 Message-Id: <20061216120505.5872743CA0@mx1.FreeBSD.org> Date: Sat, 16 Dec 2006 12:05:05 +0000 (GMT) Subject: =?iso-8859-1?q?Benachrichtigung_=FCber_ein_GMX_Einschreiben_von_?= =?iso-8859-1?q?=22Andreas_Werner_Ostertag=22_=3CAndreasoschdi=40gm?= =?iso-8859-1?q?x=2Enet=3E?= X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andreas Werner Ostertag List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 12:05:09 -0000 Für Sie liegt ein GMX Einschreiben zum Abholen bereit: Von: "Andreas Werner Ostertag" An: freebsd-hackers@freebsd.org Datum: 2006-12-16 13:04:20 Betreff: Re: freebsd-hackers Digest, Vol 195, Issue 6 Verfallsdatum: 2006-12-23 23:59:59 Attachments: Andreasoschdi.vcf (495) Um das GMX Einschreiben über eine gesicherte Verbindung abzurufen und an Ihre E-Mail-Adresse weiterzuleiten, klicken Sie bitte rechtzeitig vor Ende der Bereitstellungsfrist auf nachfolgenden Link und geben Sie dort den Abruf-Code ein. Abrufcode: XJAAKZML2 --> https://service.gmx.net/de/cgi/g.fcgi/regmail/login?linkid=rujiuMnfB4iHYAC9TW9bNL1Pbli6Pf GMX Einschreiben ist eine Methode zum sicheren Versand von E-Mails im Internet. Ausführliche Informationen zu GMX Einschreiben sowie Sicherheitshinweise finden Sie hier: --> http://www.gmx.de/einschreiben Dies ist eine automatisch generierte Nachricht. Bitte antworten Sie nicht an die Absender-Adresse dieser E-Mail. From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 18:30:15 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D9AE16A412 for ; Sat, 16 Dec 2006 18:30:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 970DC43CA6 for ; Sat, 16 Dec 2006 18:30:14 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBGITHZP095896; Sat, 16 Dec 2006 11:29:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 16 Dec 2006 11:30:17 -0700 (MST) Message-Id: <20061216.113017.-345495563.imp@bsdimp.com> To: mldodson@houston.rr.com From: "M. Warner Losh" In-Reply-To: <200612141437.28724.mldodson@houston.rr.com> References: <200612141437.28724.mldodson@houston.rr.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 16 Dec 2006 11:29:17 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 18:30:15 -0000 In message: <200612141437.28724.mldodson@houston.rr.com> "M. L. Dodson" writes: : On a computational chemistry list I subscribe to there is a : current thread about multi-cpu systems needing to have the cpu : frequencies synced (this is in a Linux context). This is : evidently not just having the cpus running at nominally the same : frequency but something else in addition. A posting in the thread : said variations less than 0.1% were not problematic. However, the : poster said it was an issue in a dual cpu, dual core system he had : set up. : : My questions are: : 1. Is this real or an urban legend? : 2. If real, is this a Linuxism or is FreeBSD affected as well? : 3. How do you "sync" the cpus, if it is needed? : 4. anything else some one wants to expound on along this line. Linux keeps the cpu's frequencies 'synchronized' so that it can use the fast time keeping hardware (TSC). FreeBSD uses different mechanisms for its timekeeping, so doesn't need to keep them in sync at all, and doesn't even try at this point. Maybe this is what they are talking about... Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 18:37:52 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80E5716A407 for ; Sat, 16 Dec 2006 18:37:52 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2449C43CA1 for ; Sat, 16 Dec 2006 18:37:51 +0000 (GMT) (envelope-from stephen@math.missouri.edu) Received: from [10.0.0.4] (12-216-254-44.client.mchsi.com[12.216.254.44]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20061216183751m9200kmruue>; Sat, 16 Dec 2006 18:37:51 +0000 Message-ID: <45843CFE.7020006@math.missouri.edu> Date: Sat, 16 Dec 2006 12:37:50 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20061208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <200612141437.28724.mldodson@houston.rr.com> <20061216.113017.-345495563.imp@bsdimp.com> In-Reply-To: <20061216.113017.-345495563.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 18:37:52 -0000 M. Warner Losh wrote: > In message: <200612141437.28724.mldodson@houston.rr.com> > "M. L. Dodson" writes: > : On a computational chemistry list I subscribe to there is a > : current thread about multi-cpu systems needing to have the cpu > : frequencies synced (this is in a Linux context). This is > : evidently not just having the cpus running at nominally the same > : frequency but something else in addition. A posting in the thread > : said variations less than 0.1% were not problematic. However, the > : poster said it was an issue in a dual cpu, dual core system he had > : set up. > : > : My questions are: > : 1. Is this real or an urban legend? > : 2. If real, is this a Linuxism or is FreeBSD affected as well? > : 3. How do you "sync" the cpus, if it is needed? > : 4. anything else some one wants to expound on along this line. > > Linux keeps the cpu's frequencies 'synchronized' so that it can use > the fast time keeping hardware (TSC). FreeBSD uses different > mechanisms for its timekeeping, so doesn't need to keep them in sync > at all, and doesn't even try at this point. Maybe this is what they > are talking about... > > Warner One thing I have noticed with FreeBSD is that if I am running a program that multithreads and creates and destroys threads a lot (e.g. the fftw3 port), then top underreports significantly - that is on a 4 processor system it might report 60% (or even 0%) cpu usage, when it is clear from the TIME field that it is closer to 250% cpu usage. The other thing I have noticed is that when I split jobs using threads so that I can use several processors, the speed up to the program is far less than one might expect - indeed sometimes it even gets slower. Stephen From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 20:47:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FEBA16A47B for ; Sat, 16 Dec 2006 20:47:02 +0000 (UTC) (envelope-from thorpflyer@yahoo.com) Received: from web60917.mail.yahoo.com (web60917.mail.yahoo.com [209.73.178.245]) by mx1.FreeBSD.org (Postfix) with SMTP id 9290B43C9F for ; Sat, 16 Dec 2006 20:47:01 +0000 (GMT) (envelope-from thorpflyer@yahoo.com) Received: (qmail 9756 invoked by uid 60001); 16 Dec 2006 20:47:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1RHjxsmaP6CL1B0va5W1PcJS83JKyTwhDWXZ160FBFhH3TLqrJtDsYpSeQwuDfM4WMnS7pIizuanbmoPE1+IcTd/Jg3EvcPMIYOBd7lcRuYzpvrwsLjVWJCxFMU5k/5ug32o0adiEDRR4cr0xiciWmtyN2nmTiyxVDNfhG2zDRk= ; Message-ID: <20061216204701.9754.qmail@web60917.mail.yahoo.com> Received: from [67.166.15.143] by web60917.mail.yahoo.com via HTTP; Sat, 16 Dec 2006 12:47:00 PST Date: Sat, 16 Dec 2006 12:47:00 -0800 (PST) From: Simon Roberts To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 20:47:02 -0000 =0A----- Original Message ----=0AFrom: Stephen Montgomery-Smith =0A=0A...snip snip...=0A=0AThe other thing I have noticed i= s that when I split jobs using threads =0Aso that I can use several process= ors, the speed up to the program is far =0Aless than one might expect - ind= eed sometimes it even gets slower.=0A=0AStephen=0A=0A----------------------= ---------------------------------------------------------------------------= --------=0A=0AThis is probably Amdahl's law.=0A=0ASimon=0A=0A=0A=0A=0A=0A__= ________________________________________________=0ADo You Yahoo!?=0ATired o= f spam? Yahoo! Mail has the best spam protection around =0Ahttp://mail.yah= oo.com From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 20:47:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28C1016A505 for ; Sat, 16 Dec 2006 20:47:21 +0000 (UTC) (envelope-from mldodson@houston.rr.com) Received: from ms-smtp-04.texas.rr.com (ms-smtp-04.texas.rr.com [24.93.47.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FACA43CA3 for ; Sat, 16 Dec 2006 20:47:20 +0000 (GMT) (envelope-from mldodson@houston.rr.com) Received: from localhost.houston.rr.com (cpe-24-167-77-130.houston.res.rr.com [24.167.77.130]) by ms-smtp-04.texas.rr.com (8.13.6/8.13.6) with ESMTP id kBGKlHs3017215; Sat, 16 Dec 2006 14:47:17 -0600 (CST) Received: from localhost (localhost [[UNIX: localhost]]) by localhost.houston.rr.com (8.13.8/8.13.6/Submit) id kBGKlCV5083206; Sat, 16 Dec 2006 14:47:12 -0600 (CST) (envelope-from mldodson@houston.rr.com) X-Authentication-Warning: localhost.houston.rr.com: bdodson set sender to mldodson@houston.rr.com using -f From: "M. L. Dodson" To: "M. Warner Losh" Date: Sat, 16 Dec 2006 14:47:12 -0600 User-Agent: KMail/1.9.4 References: <200612141437.28724.mldodson@houston.rr.com> <20061216.113017.-345495563.imp@bsdimp.com> In-Reply-To: <20061216.113017.-345495563.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612161447.12600.mldodson@houston.rr.com> X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Mailman-Approved-At: Sat, 16 Dec 2006 22:20:18 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mldodson@houston.rr.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 20:47:21 -0000 On Saturday 16 December 2006 12:30, M. Warner Losh wrote: > In message: <200612141437.28724.mldodson@houston.rr.com> > > "M. L. Dodson" writes: > : On a computational chemistry list I subscribe to there is a > : current thread about multi-cpu systems needing to have the cpu > : frequencies synced (this is in a Linux context). This is > : evidently not just having the cpus running at nominally the same > : frequency but something else in addition. A posting in the thread > : said variations less than 0.1% were not problematic. However, the > : poster said it was an issue in a dual cpu, dual core system he had > : set up. > : > : My questions are: > : 1. Is this real or an urban legend? > : 2. If real, is this a Linuxism or is FreeBSD affected as well? > : 3. How do you "sync" the cpus, if it is needed? > : 4. anything else some one wants to expound on along this line. > > Linux keeps the cpu's frequencies 'synchronized' so that it can use > the fast time keeping hardware (TSC). FreeBSD uses different > mechanisms for its timekeeping, so doesn't need to keep them in sync > at all, and doesn't even try at this point. Maybe this is what they > are talking about... > > Warner That is very much in line with the context of the postings on the computational chemistry list I mentioned. This is the likely source of the issue for people on that list (very few use *BSD). They just assume if you are not using Solaris or Irix, then you must be using Linux of some flavor. And this means I don't have to bother with that particular piece of nonsense. Thanks to everyone who answered. Bud Dodson -- M. L. Dodson Email: mldodson-at-houston-dot-rr-dot-com Phone: eight_three_two-56_three-386_one From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 23:31:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 244CA16A415 for ; Sat, 16 Dec 2006 23:31:56 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B069143CC9 for ; Sat, 16 Dec 2006 23:31:50 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.4) with ESMTP id kBGNVnsB035507; Sat, 16 Dec 2006 15:31:50 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kBGNViQ9035504; Sat, 16 Dec 2006 15:31:44 -0800 (PST) Date: Sat, 16 Dec 2006 15:31:44 -0800 (PST) From: Matthew Dillon Message-Id: <200612162331.kBGNViQ9035504@apollo.backplane.com> To: "Joseph Koshy" References: <200612141437.28724.mldodson@houston.rr.com> <84dead720612150950p33c9c35erffe4adbab7227e68@mail.gmail.com> Cc: freebsd-hackers@freebsd.org, mldodson@houston.rr.com Subject: Re: "Syncing cpus" on a multi-cpu, dual core system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 23:31:56 -0000 The TSCs for each individual cpu core can drift relative to each other, even on multi-core chips like AMD X2s. This only effects code which uses the TSC, which isn't a whole lot. They need to be synchronized with each other (by calculating the drift and correcting for it) when using the TSC to log events, such as KTR logging might do. Since the TSC runs off the PLL, the drift rate will change based on the temperature of each core. I'm not sure whether the LAPIC timers can be depended upon to operate from the same physical clock source or not (i.e. whether they drift relative to each other or not). I haven't tested them for that. -Matt