From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 10 02:39:48 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02A4016A4CE for ; Sun, 10 Apr 2005 02:39:48 +0000 (GMT) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC3DA43D2D for ; Sun, 10 Apr 2005 02:39:47 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 0E91FD9AA; Sat, 9 Apr 2005 22:39:47 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id ED9A21A08CF; Sat, 9 Apr 2005 22:39:39 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16984.37355.901544.774861@canoe.dclg.ca> Date: Sat, 9 Apr 2005 22:39:39 -0400 To: ticso@cicely.de In-Reply-To: <20050409215700.GL96690@cicely12.cicely.de> References: <16982.46075.115518.130213@canoe.dclg.ca> <4256B5EB.9080506@savvis.net> <16982.47024.135663.645297@canoe.dclg.ca> <20050408190514.GS96690@cicely12.cicely.de> <16983.465.572693.73195@canoe.dclg.ca> <20050408233301.GW96690@cicely12.cicely.de> <16984.17307.804041.502108@canoe.dclg.ca> <20050409212327.GI96690@cicely12.cicely.de> <16984.19899.604657.135854@canoe.dclg.ca> <20050409215700.GL96690@cicely12.cicely.de> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid cc: freebsd-hackers@freebsd.org cc: David Gilbert Subject: Re: Tricky USB device. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 02:39:48 -0000 >>>>> "Bernd" == Bernd Walter writes: Bernd> Sounds simple. Tried with lower case characters? Otherwise I Bernd> would say sniff a working driver - for windows there is at Bernd> least one good freeware USB sniffer avaiable. HA! Found the problem --- thank-you everyone. Aparently, this little device expects a 0x01 as the first byte of any command. Heh. Works now. So if you need dry contact I/O ... this seems to work for FreeBSD... /* Test the Ontrack ADU208 */ /* www.ontrak.net */ #include #include #include #include #include #include int main(int argc, char *argv[]) { int bytes, fd; char *s1 = "\001MK255", *s2 = "\001MK0", *s = s1, buf[256]; if((fd = open("/dev/ugen0.1", O_RDWR)) < 0) err(1, "Cannot open device"); while(1) { bytes = write(fd, s, strlen(s)); printf("wrote %d bytes %s\n", bytes, s); sleep(1); if(s == s1) s = s2; else s = s1; } return 0; } Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can only be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================ From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 9 15:18:58 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 516AE16A4CE; Sat, 9 Apr 2005 15:18:58 +0000 (GMT) Received: from mx-out-01.forthnet.gr (mx-out.forthnet.gr [193.92.150.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF61243D39; Sat, 9 Apr 2005 15:18:54 +0000 (GMT) (envelope-from dds@aueb.gr) Received: from mx-av-01.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) j39FIrMh022348; Sat, 9 Apr 2005 18:18:53 +0300 Received: from mx-as-02.forthnet.gr (mx-as.forthnet.gr [193.92.150.226]) j39FIrFd015721; Sat, 9 Apr 2005 18:18:53 +0300 Received: from forthnet.gr (athmta03.forthnet.gr [193.92.150.22]) j39FIrdD001890; Sat, 9 Apr 2005 18:18:53 +0300 Received: from [192.168.136.16] (dds.ath.forthnet.gr [213.16.179.162]) by forthnet.gr (8.12.11/8.12.11) with ESMTP id j39FIpir004036; Sat, 9 Apr 2005 18:18:52 +0300 Message-ID: <4257F260.8030807@aueb.gr> Date: Sat, 09 Apr 2005 19:18:56 +0400 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en, el, de MIME-Version: 1.0 To: monthly@FreeBSD.ORG References: <200504080220.57899.max@love2party.net> In-Reply-To: <200504080220.57899.max@love2party.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 10 Apr 2005 12:02:11 +0000 cc: freebsd-hackers@FreeBSD.ORG cc: freebsd-current@FreeBSD.ORG Subject: Re: Call for FreeBSD status reports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2005 15:18:58 -0000 Max Laier wrote: > The new features from last time (categories and task-list) will be available, > again. As a reminder the available categories are listed bellow. Please > feel free to suggest additional entries: > > proj - Projects (non-specific) > docs - Documentation > kern - Kernel > arch - Architectures > ports - Ports > vendor - Vendor / 3rd party software > misc - Miscellaneous By comparing the categories to those of GNATS three I see missing are: bin - Userland programs www - FreeBSD web site advocacy- Spreading out the word -- Diomidis - dds@ From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 10 07:49:37 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F107B16A4CE for ; Sun, 10 Apr 2005 07:49:37 +0000 (GMT) Received: from mrx.co.zahav.net.il (mrx.wan.inter.net.il [192.117.191.51]) by mx1.FreeBSD.org (Postfix) with SMTP id F245C43D3F for ; Sun, 10 Apr 2005 07:49:35 +0000 (GMT) (envelope-from imriz@co.zahav.net.il) Received: from igfe.InetGold ([172.33.1.137]) by mrx.co.zahav.net.il (SAVSMTP 3.1.0.29) with SMTP id M2005041009522021372 for ; Sun, 10 Apr 2005 09:52:20 +0200 Received: from IGMAIL.InetGold ([172.31.100.164]) by igfe.InetGold with Microsoft SMTPSVC(6.0.3790.0); Sun, 10 Apr 2005 10:49:30 +0300 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable Date: Sun, 10 Apr 2005 10:55:41 +0300 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Freebsd 5.3-RELEASE crashing due to bge problem(?) Thread-Index: AcU9odTUlK5J/ERYTw+WrNy7PyGxbA== From: "Imri Zvik" To: X-OriginalArrivalTime: 10 Apr 2005 07:49:30.0528 (UTC) FILETIME=[D3F93200:01C53DA1] X-Mailman-Approved-At: Sun, 10 Apr 2005 12:02:11 +0000 Subject: Freebsd 5.3-RELEASE crashing due to bge problem(?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 07:49:38 -0000 Hi, One of my Dell Poweredge 1750 machines crashed. I see the following line in /var/log/messages right before the crash: Apr 10 08:45:05 dana kernel: bge0: discard frame w/o packet header I have a dump of the crash, but unfortunately, the kernel was not = compiled with debugging symbols, so this is what I do have: (kgdb) where #0 0xc064c71c in doadump () #1 0xc064cc5c in boot () #2 0xc064d50d in panic () #3 0xc0825242 in trap_fatal () #4 0xc08254eb in trap_pfault () #5 0xc08258c0 in trap () #6 0xc080d46a in calltrap () #7 0x24890018 in ?? () #8 0x00ca0010 in ?? () #9 0x01470010 in ?? () #10 0xc101fb00 in ?? () #11 0xc3474460 in ?? () #12 0xe4d62be4 in ?? () #13 0xe4d62bc4 in ?? () #14 0x00000000 in ?? () #15 0x00000000 in ?? () #16 0x00000000 in ?? () #17 0x00000000 in ?? () #18 0x0000000c in ?? () #19 0x00000000 in ?? () #20 0xc07c7134 in uma_find_refcnt () #21 0xc0640dc4 in mb_ctor_clust () #22 0xc07c5f11 in uma_zalloc_arg () #23 0xc04eef36 in bge_newbuf_std () #24 0xc04f2c4d in bge_intr () #25 0xc063366a in ithread_loop () #26 0xc0632312 in fork_exit () #27 0xc080d4cc in fork_trampoline () Here is uname -a output: FreeBSD dana.xxxx 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Wed Mar 16 = 11:55:55 IST 2005 root@dana.xxxx:/usr/src/sys/i386/compile/IGLD = i386 Doing some searching in google, made me stumble upon this: http://lists.freebsd.org/pipermail/freebsd-hackers/2004-December/009609.h= tml Could they be related? Thanks, -- Imri Zvik PGP (2.6.3ia) Public Key: http://mariska.inter.net.il/~imriz/imriz.pgp =A0 From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 10 17:11:55 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0613E16A4CE for ; Sun, 10 Apr 2005 17:11:55 +0000 (GMT) Received: from smtpout-1.priv.cc.uic.edu (smtpout-1.cc.uic.edu [128.248.155.232]) by mx1.FreeBSD.org (Postfix) with SMTP id 8154443D5C for ; Sun, 10 Apr 2005 17:11:52 +0000 (GMT) (envelope-from zholla1@uic.edu) Received: (qmail 25969 invoked from network); 10 Apr 2005 12:11:49 -0500 Received: from icarus.cc.uic.edu (128.248.155.80) by smtpout-1.cc.uic.edu with SMTP; 10 Apr 2005 12:11:49 -0500 Date: Sun, 10 Apr 2005 12:11:49 -0500 (CDT) From: Zera William Holladay X-X-Sender: zholla1@icarus.cc.uic.edu To: hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: make for bootable ISOs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 17:11:55 -0000 Hi, I'm attempting to make a bootable ISO for i386 architecture on 4.11-STABLE. I am using: %make buildworld %make buildkernel %make hierarchy DESTDIR=/... %make installworld DESTDIR=/... %make installkernel DESTDIR=/... And then modifying etc so that /dev/acd0a is the root directory. Is this the correct sequence and are these the correct targets? Since this is such a time consuming task, I figured that I would ask for help. Thank you, Zera From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 01:05:14 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CFE416A4CE; Mon, 11 Apr 2005 01:05:14 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2E5943D48; Mon, 11 Apr 2005 01:05:13 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id j3B1511D043308; Mon, 11 Apr 2005 10:35:02 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 11 Apr 2005 10:34:52 +0930 User-Agent: KMail/1.8 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1177689.6ZNJhuvqhE"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200504111034.53683.doconnor@gsoft.com.au> X-Spam-Score: -2.5 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: hackers@freebsd.org cc: Zera William Holladay Subject: Re: make for bootable ISOs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 01:05:14 -0000 --nextPart1177689.6ZNJhuvqhE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 11 Apr 2005 02:41, Zera William Holladay wrote: > Hi, I'm attempting to make a bootable ISO for i386 architecture on > 4.11-STABLE. I am using: > > %make buildworld > %make buildkernel > %make hierarchy DESTDIR=3D/... > %make installworld DESTDIR=3D/... > %make installkernel DESTDIR=3D/... > > And then modifying etc so that /dev/acd0a is the root directory. > > Is this the correct sequence and are these the correct targets? Since > this is such a time consuming task, I figured that I would ask for help. 4.x uses el-torrito 2.88Mb floppy emulation for booting.. make release builds an install CD and a live file system disk. I made a page with some tips on make release for 4.x if you're interested.. http://www.gsoft.com.au/~doconnor/FreeBSD-release-2.html =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 --nextPart1177689.6ZNJhuvqhE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCWc015ZPcIHs/zowRApWKAKCROTI8qq8QNFd5AxUSh0CvZajixgCgprpN +/6CXgpwk0Fb5bEXxOktsPA= =qfHG -----END PGP SIGNATURE----- --nextPart1177689.6ZNJhuvqhE-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 01:05:14 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CFE416A4CE; Mon, 11 Apr 2005 01:05:14 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2E5943D48; Mon, 11 Apr 2005 01:05:13 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id j3B1511D043308; Mon, 11 Apr 2005 10:35:02 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 11 Apr 2005 10:34:52 +0930 User-Agent: KMail/1.8 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1177689.6ZNJhuvqhE"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200504111034.53683.doconnor@gsoft.com.au> X-Spam-Score: -2.5 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: hackers@freebsd.org cc: Zera William Holladay Subject: Re: make for bootable ISOs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 01:05:14 -0000 --nextPart1177689.6ZNJhuvqhE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 11 Apr 2005 02:41, Zera William Holladay wrote: > Hi, I'm attempting to make a bootable ISO for i386 architecture on > 4.11-STABLE. I am using: > > %make buildworld > %make buildkernel > %make hierarchy DESTDIR=3D/... > %make installworld DESTDIR=3D/... > %make installkernel DESTDIR=3D/... > > And then modifying etc so that /dev/acd0a is the root directory. > > Is this the correct sequence and are these the correct targets? Since > this is such a time consuming task, I figured that I would ask for help. 4.x uses el-torrito 2.88Mb floppy emulation for booting.. make release builds an install CD and a live file system disk. I made a page with some tips on make release for 4.x if you're interested.. http://www.gsoft.com.au/~doconnor/FreeBSD-release-2.html =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 --nextPart1177689.6ZNJhuvqhE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCWc015ZPcIHs/zowRApWKAKCROTI8qq8QNFd5AxUSh0CvZajixgCgprpN +/6CXgpwk0Fb5bEXxOktsPA= =qfHG -----END PGP SIGNATURE----- --nextPart1177689.6ZNJhuvqhE-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 08:26:08 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8DDA16A4CE for ; Mon, 11 Apr 2005 08:26:08 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [83.167.185.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9ADF43D53 for ; Mon, 11 Apr 2005 08:26:07 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id B99086520E for ; Mon, 11 Apr 2005 09:25:48 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22924-04 for ; Mon, 11 Apr 2005 09:25:48 +0100 (BST) Received: from empiric.dek.spc.org (dhcp52.icir.org [192.150.187.52]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 38461651F4 for ; Mon, 11 Apr 2005 09:25:47 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id A3E3C6294; Mon, 11 Apr 2005 01:26:00 -0700 (PDT) Date: Mon, 11 Apr 2005 01:26:00 -0700 From: Bruce M Simpson To: freebsd-hackers@FreeBSD.org Message-ID: <20050411082600.GA735@empiric.icir.org> Mail-Followup-To: freebsd-hackers@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline Subject: A question about hot-pluggable PCI. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 08:26:08 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I have acquired a Mobility Electronics EasiDock 5000. As some of you may already know, this is a device which allows you to connect regular PCI cards to your laptop, using a device called a 'Split Bridge'. (*) Ok. Cool toy, you may be thinking. Indeed. But I want to make it work with FreeBSD. (+) I'd love to hear from anyone who has plans to implement hot-plug in a BSD, because this is the missing piece of the puzzle currently. It seems that this device is known to work with Linux, with some further hacking of support which Magma (who acquired Mobility a few years back) provide on a 'as is' basis. So I've begun hacking the pci and pcib drivers from RELENG_5_4 to support this device. So far, I've been able to probe configuration space. I see all the devices on the PCI bus inside the expansion chassis. However I cannot get drivers to attach properly, because resources have not been assigned to the cards. Normally the BIOS would do this. But because BIOSes do not normally explore beyond the CardBus bridges, none of the devices have had their I/O, memory, or interrupt registers set to non-default values; everything is the same as a pristine bus reset, even when I boot with the bridge card in a CardBus slot. In order to get this far I've had to add NEWBUS detach methods to both pci and pcib, as well as some cleanup in pci_pci.c, and some downright dirty hacks to deal with subordinate bus numbering which rely on the current behaviour of our CardBus driver. I'll post diffs if anyone else is interested; but right now it's pretty trivial stuff. Cheers, BMS [(*) It is so called because unlike a normal PCI-PCI bridge, the bridge is 'split' in two; there is a CardBus card which goes into your laptop, to which is connected a proprietary high-speed serial bus cable. At the other end is a PCI chassis which looks much like any other desktop PC, which has a jack for the proprietary connector out of the back, wired up to the other half of the 'split bridge'; this sits on a passive PCI backplane with several ordinary 33Mhz 32-bit-wide PCI slots.] [(+) Yes, I know, if OpenCores.org had a PCI IEEE 1394 cell which could just tunnel arbitrary PCI I/O and configuration transactions, we could implement this thing using $20 cards from a chain store. If only.] --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFCWjSXueUpAYYNtTsRApWWAJ44XIQmCznvFBwCxG8yOcZPtrnumgCdG36E A+lcI9BCdSfI+6cey117vCA= =BF4R -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 13:09:39 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50F0816A4CE for ; Mon, 11 Apr 2005 13:09:39 +0000 (GMT) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5566443D1D for ; Mon, 11 Apr 2005 13:09:38 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [161.53.72.113] (lara.cc.fer.hr [161.53.72.113]) by pinus.cc.fer.hr (8.12.2/8.12.2) with ESMTP id j3BDA6B2002152; Mon, 11 Apr 2005 15:10:06 +0200 (MEST) Message-ID: <425A770F.2090200@fer.hr> Date: Mon, 11 Apr 2005 15:09:35 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 1.0 (X11/20041213) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Srinivasa R Yarrakonda , hackers@freebsd.org References: <20050405015546.30911.qmail@web52507.mail.yahoo.com> In-Reply-To: <20050405015546.30911.qmail@web52507.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Probing Devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 13:09:39 -0000 Srinivasa R Yarrakonda wrote: > while)". The sysinstall menu shows up but my keyboard > doesn't work with this menu. I think it hangs. > Whats wrong..any suggestions/advice is helpful.. FWIW, the same thing happens to me sometimes when running under emulator such as vmware & qemu. Not only with the sysinstall/installation CD but with installed, live systems. I don't know what the problem is, but it usually goes away after reboot. While ranting on this, I'll add that sometimes when I boot my laptop (completly unrelated system, not the host for virtual machines), it doesn't recognize the touchpad (usually found & working as /dev/psm)... This problem also goes away on reboot. Both problems are found on 5.3-R or 5-STABLE. From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 13:28:15 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24A7516A4CE for ; Mon, 11 Apr 2005 13:28:15 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FD3343D53 for ; Mon, 11 Apr 2005 13:28:14 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j3BDVhoQ030936; Mon, 11 Apr 2005 07:31:44 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <425A7AB3.7040908@samsco.org> Date: Mon, 11 Apr 2005 07:25:07 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce M Simpson References: <20050411082600.GA735@empiric.icir.org> In-Reply-To: <20050411082600.GA735@empiric.icir.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: freebsd-hackers@freebsd.org Subject: Re: A question about hot-pluggable PCI. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 13:28:15 -0000 Bruce M Simpson wrote: > Hi, > > I have acquired a Mobility Electronics EasiDock 5000. As some of you may > already know, this is a device which allows you to connect regular PCI > cards to your laptop, using a device called a 'Split Bridge'. (*) > > Ok. Cool toy, you may be thinking. Indeed. > > But I want to make it work with FreeBSD. (+) > > I'd love to hear from anyone who has plans to implement hot-plug in > a BSD, because this is the missing piece of the puzzle currently. > > It seems that this device is known to work with Linux, with some further > hacking of support which Magma (who acquired Mobility a few years back) > provide on a 'as is' basis. > > So I've begun hacking the pci and pcib drivers from RELENG_5_4 to support > this device. So far, I've been able to probe configuration space. I see > all the devices on the PCI bus inside the expansion chassis. > > However I cannot get drivers to attach properly, because resources have > not been assigned to the cards. Normally the BIOS would do this. But > because BIOSes do not normally explore beyond the CardBus bridges, none > of the devices have had their I/O, memory, or interrupt registers set > to non-default values; everything is the same as a pristine bus reset, > even when I boot with the bridge card in a CardBus slot. > > In order to get this far I've had to add NEWBUS detach methods to both > pci and pcib, as well as some cleanup in pci_pci.c, and some downright > dirty hacks to deal with subordinate bus numbering which rely on the > current behaviour of our CardBus driver. > > I'll post diffs if anyone else is interested; but right now it's pretty > trivial stuff. Asking for 'hotplug support' is pretty generic and non-descriptive. Are you asking for device level hotplug support, where we carefully drain transactions out of a device, device driver, and whatever I/O or network or whatever layers are above it? Or are you talking about PCI hotplug support? If so, which de-facto standard? Compaq? IBM? ACPI? PCI-SIG? Something else? Scott From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 13:48:26 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 425DC16A4CE for ; Mon, 11 Apr 2005 13:48:26 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [83.167.185.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DF4B43D2F for ; Mon, 11 Apr 2005 13:48:25 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 1036865211; Mon, 11 Apr 2005 14:48:08 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25600-03-7; Mon, 11 Apr 2005 14:48:07 +0100 (BST) Received: from empiric.dek.spc.org (66-117-149-249.rdsl.lmi.net [66.117.149.249]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id D6BCA6520E; Mon, 11 Apr 2005 14:48:06 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 8D089626C; Mon, 11 Apr 2005 06:48:17 -0700 (PDT) Date: Mon, 11 Apr 2005 06:48:17 -0700 From: Bruce M Simpson To: Scott Long Message-ID: <20050411134817.GA4176@empiric.icir.org> Mail-Followup-To: Scott Long , freebsd-hackers@freebsd.org References: <20050411082600.GA735@empiric.icir.org> <425A7AB3.7040908@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <425A7AB3.7040908@samsco.org> cc: freebsd-hackers@freebsd.org Subject: Re: A question about hot-pluggable PCI. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 13:48:26 -0000 On Mon, Apr 11, 2005 at 07:25:07AM -0600, Scott Long wrote: > Asking for 'hotplug support' is pretty generic and non-descriptive. Are > you asking for device level hotplug support, where we carefully drain > transactions out of a device, device driver, and whatever I/O or network > or whatever layers are above it? Or are you talking about PCI hotplug > support? If so, which de-facto standard? Compaq? IBM? ACPI? > PCI-SIG? Something else? Sorry, I thought my original post was quite clear; in order to support my hot-pluggable PCI chassis, FreeBSD needs to grow the ability to manage PCI resources without any firmware support (other than possibly the ability to route interrupts). Since I sent that mail I looked at the requirements list for 5-STABLE and realized this is in fact on it. I think there's a fair chance that any other PCI hotplug standard is going to need the same changes I need to make my split bridge work. I looked in src/sys/dev/cardbus/cardbus_cis.c, and Linux's ACPI-based PCI hotplug driver, and realised that at the lowest level, they are all in fact pretty much doing the same thing -- that is, setting all bits in a BAR, and then figuring out the desired aperture size for each BAR, allocating the appropriate resources using rman, figuring out base addresses, etc. We currently rely on the BIOS to do this. The bit I've been discussing with Warner is how to deal with the problem of setting subordinate bus numbers, though because I can get away without doing that for the 'pcib is an immediate child of cardbus' case, I haven't done it. I had also thought of passing down a 'cold' flag, for pcibX to indicate to pciY that this is a 'cold attach' (the BIOS hasn't been anywhere near the devices behind this bridge -- it is as fresh as after a RST# assert). That's enough for me to be getting on with just now, though it would be nice to have some general architectural advice on where exactly this logic should go, because it's something cardbus is using to mop up the edge cases where device resources are not fully described in the CIS. I am undecided as to whether I should try to separate out my changes to src/sys/dev/pci/pci_pci.c into a new driver or not. BMS From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 13:08:36 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D36B816A4CE for ; Mon, 11 Apr 2005 13:08:36 +0000 (GMT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4048043D41 for ; Mon, 11 Apr 2005 13:08:36 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (localhost [127.0.0.1]) by mail.chesapeake.net (8.12.10/8.12.10) with ESMTP id j3BD8Yws080219 for ; Mon, 11 Apr 2005 09:08:35 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost)j3BD8XcZ080205 for ; Mon, 11 Apr 2005 09:08:34 -0400 (EDT) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Mon, 11 Apr 2005 09:08:33 -0400 (EDT) From: Jeff Roberson To: hackers@freebsd.org Message-ID: <20050411085956.Y28571@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Mon, 11 Apr 2005 14:35:39 +0000 Subject: JKH Task: Stack saving/tracing functionality. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 13:08:36 -0000 I have proprietary code from a previous employer of mine that implements some really useful debugging features. I'm looking for someone who is interested in cleaning it up, making it architecture indepenent, and getting it running on current. The code basically allows you to save and manipulate stack information. This would be very useful for things like lockmgr, which right now we can't really pass file:line information down to without making #ifdef mess of all of the APIs as options DEBUG_LOCKs does somewhat today. Lockmgr would have a buffer which contained the last N EIPs up the callstack, and this information could be queried and printed using a simple api. Interested parties please email me. We can discuss this and I can provide source. Thanks, Jeff From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 15:34:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7A3316A4CE for ; Mon, 11 Apr 2005 15:34:19 +0000 (GMT) Received: from smtpout-2.priv.cc.uic.edu (smtpout-2.cc.uic.edu [128.248.155.233]) by mx1.FreeBSD.org (Postfix) with SMTP id 03DB943D46 for ; Mon, 11 Apr 2005 15:34:19 +0000 (GMT) (envelope-from zholla1@uic.edu) Received: (qmail 14511 invoked from network); 11 Apr 2005 10:34:18 -0500 Received: from icarus.cc.uic.edu (128.248.155.80) by smtpout-2.cc.uic.edu with SMTP; 11 Apr 2005 10:34:18 -0500 Date: Mon, 11 Apr 2005 10:34:18 -0500 (CDT) From: Zera William Holladay X-X-Sender: zholla1@icarus.cc.uic.edu To: Daniel O'Connor In-Reply-To: <200504111034.53683.doconnor@gsoft.com.au> Message-ID: References: <200504111034.53683.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org Subject: Re: make for bootable ISOs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 15:34:19 -0000 On Mon, 11 Apr 2005, Daniel O'Connor wrote: > > 4.x uses el-torrito 2.88Mb floppy emulation for booting.. > make release builds an install CD and a live file system disk. > > I made a page with some tips on make release for 4.x if you're interested.. > http://www.gsoft.com.au/~doconnor/FreeBSD-release-2.html > Thank you, that's a very nice link. You set me on the right path. -Zera From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 15:34:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B59C916A4CF for ; Mon, 11 Apr 2005 15:34:19 +0000 (GMT) Received: from smtpout-2.priv.cc.uic.edu (smtpout-2.cc.uic.edu [128.248.155.233]) by mx1.FreeBSD.org (Postfix) with SMTP id 03F2243D54 for ; Mon, 11 Apr 2005 15:34:19 +0000 (GMT) (envelope-from zholla1@uic.edu) Received: (qmail 14511 invoked from network); 11 Apr 2005 10:34:18 -0500 Received: from icarus.cc.uic.edu (128.248.155.80) by smtpout-2.cc.uic.edu with SMTP; 11 Apr 2005 10:34:18 -0500 Date: Mon, 11 Apr 2005 10:34:18 -0500 (CDT) From: Zera William Holladay X-X-Sender: zholla1@icarus.cc.uic.edu To: Daniel O'Connor In-Reply-To: <200504111034.53683.doconnor@gsoft.com.au> Message-ID: References: <200504111034.53683.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org Subject: Re: make for bootable ISOs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 15:34:19 -0000 On Mon, 11 Apr 2005, Daniel O'Connor wrote: > > 4.x uses el-torrito 2.88Mb floppy emulation for booting.. > make release builds an install CD and a live file system disk. > > I made a page with some tips on make release for 4.x if you're interested.. > http://www.gsoft.com.au/~doconnor/FreeBSD-release-2.html > Thank you, that's a very nice link. You set me on the right path. -Zera From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 15:58:20 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0508716A4CE for ; Mon, 11 Apr 2005 15:58:20 +0000 (GMT) Received: from shabanov.park.rambler.ru (shabanov.rambler.stack.net [81.19.65.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F39043D31 for ; Mon, 11 Apr 2005 15:58:18 +0000 (GMT) (envelope-from vs@rambler-co.ru) Received: from shabanov.park.rambler.ru (localhost.park.rambler.ru [127.0.0.1])j3BG3PDw042195 for ; Mon, 11 Apr 2005 20:03:25 +0400 (MSD) (envelope-from vs@rambler-co.ru) Received: from localhost (localhost [[UNIX: localhost]]) by shabanov.park.rambler.ru (8.13.3/8.13.3/Submit) id j3BG3PWc042194 for hackers@freebsd.org; Mon, 11 Apr 2005 20:03:25 +0400 (MSD) (envelope-from vs@rambler-co.ru) X-Authentication-Warning: shabanov.park.rambler.ru: vs set sender to vs@rambler-co.ru using -f From: Vladislav Shabanov Organization: Rambler To: hackers@freebsd.org Date: Mon, 11 Apr 2005 20:03:24 +0400 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504112003.25096.vs@rambler-co.ru> Subject: do-nothing code in sysv_shm.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 15:58:20 -0000 I`ve found the following code in sysv_shm.c : ............ static void shminit() { int i; TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall); for (i = PAGE_SIZE; i > 0; i--) { shminfo.shmmax = shminfo.shmall * PAGE_SIZE; if (shminfo.shmmax >= shminfo.shmall) break; } TUNABLE_INT_FETCH("kern.ipc.shmmin", &shminfo.shmmin); ......... IMHO, loop does nothing. Possible variant: #define shmall_bits (sizeof(shminfo.shmall)*8) if (0 == (shminfo.shmall & (~ ( (1<<(shmall_bits-PAGE_SHIFT-1)) - 1)))) { /* if high PAGE_SHIFT+1 bits of shminfo.shmall is zero */ shminfo.shmmax = shminfo.shmall << PAGE_SHIFT; } else { shminfo.shmmax = __INT_MAX; } ------------------------------ previous changes in this part of code: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sysv_shm.c.diff?r1=1.78&r2=1.79&f=h http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sysv_shm.c.diff?r1=1.79&r2=1.80&f=h From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 16:05:08 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69DA316A4CF for ; Mon, 11 Apr 2005 16:05:08 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1DA843D41 for ; Mon, 11 Apr 2005 16:05:07 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id C8667AC976; Mon, 11 Apr 2005 18:05:05 +0200 (CEST) Date: Mon, 11 Apr 2005 18:05:05 +0200 From: Pawel Jakub Dawidek To: David Gilbert Message-ID: <20050411160505.GO837@darkness.comp.waw.pl> References: <16984.18159.732608.234243@canoe.dclg.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YW2MF9I5J49Ey/EG" Content-Disposition: inline In-Reply-To: <16984.18159.732608.234243@canoe.dclg.ca> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@freebsd.org Subject: Re: ggate failures. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 16:05:08 -0000 --YW2MF9I5J49Ey/EG Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 09, 2005 at 05:19:43PM -0400, David Gilbert wrote: +> I have two systems, each with 4 300 gig SATA disks. Let's call them +> m0 and m1. M1 exports it's disks with ggated ... on two private GigE +> networks. M0, on those same two GigE networks, imports them with +> ggatec. M0, then does the following: +>=20 +> Mirror Disks +> =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D +> s0 ggate0 da0s1g +> s1 ggate1 da1s1g +> s2 ggate2 da2s1g +> s3 ggate3 da3s1g +>=20 +> And then: +>=20 +> concat Disks +> =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D +> v0 s0 s1 s2 s3 +>=20 +> (so v0 is a concatination of 4 mirrors that consist of a local and +> remote disk, each) +>=20 +> Now... This all works, and we create a filesystem on v0. The problem +> arises that whenever a lot of activity occurs on v0 (untaring a copy +> of /usr is sufficient), the ggate links break down. An example +> message from the dmesg: +>=20 +> GEOM_MIRROR: Request failed (error=3D5). ggate2[WRITE(offset=3D259891840= 000, length=3D8192)] +>=20 +> Now... I don't know a lot about ggate, but this appears trivial to +> trigger. Has anyone tried similar configurations and is there any +> wisdom about ggate configurations? Set kern.geom.gate.debug to 1 and send output which is generated on failures. I've much improved ggate in perforce, but it needs some polishing still... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --YW2MF9I5J49Ey/EG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCWqAxForvXbEpPzQRAmSaAKDCLVncaD9NBnmSWtRPlKd6knNVjgCbB8Hp oyOWhkYK2dqchAG9IHmOE6k= =mJyS -----END PGP SIGNATURE----- --YW2MF9I5J49Ey/EG-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 16:07:33 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0FD616A4CE for ; Mon, 11 Apr 2005 16:07:33 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8DBA43D1D for ; Mon, 11 Apr 2005 16:07:32 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id E94DFAC976; Mon, 11 Apr 2005 18:07:29 +0200 (CEST) Date: Mon, 11 Apr 2005 18:07:29 +0200 From: Pawel Jakub Dawidek To: Jeff Roberson Message-ID: <20050411160729.GP837@darkness.comp.waw.pl> References: <20050411085956.Y28571@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G/WKQfTgLd6RqXFs" Content-Disposition: inline In-Reply-To: <20050411085956.Y28571@mail.chesapeake.net> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: hackers@freebsd.org Subject: Re: JKH Task: Stack saving/tracing functionality. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 16:07:33 -0000 --G/WKQfTgLd6RqXFs Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 11, 2005 at 09:08:33AM -0400, Jeff Roberson wrote: +> I have proprietary code from a previous employer of mine that implements +> some really useful debugging features. I'm looking for someone who is +> interested in cleaning it up, making it architecture indepenent, and +> getting it running on current. The code basically allows you to save and +> manipulate stack information. +>=20 +> This would be very useful for things like lockmgr, which right now we +> can't really pass file:line information down to without making #ifdef me= ss +> of all of the APIs as options DEBUG_LOCKs does somewhat today. Lockmgr +> would have a buffer which contained the last N EIPs up the callstack, and +> this information could be queried and printed using a simple api. +>=20 +> Interested parties please email me. We can discuss this and I can provi= de +> source. It would be probably useful for wintess, so when first order is stored, it can be stored with stack and on LOR, both backtraces can be shown. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --G/WKQfTgLd6RqXFs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCWqDBForvXbEpPzQRAlF9AJ4mTUAGH7SPG6M9Spl/Y9EKzZPOcgCg8Hn3 rdt9zAw37K5BXAK1RbHBKT8= =uDw9 -----END PGP SIGNATURE----- --G/WKQfTgLd6RqXFs-- From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 16:50:46 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63D9F16A4CE; Mon, 11 Apr 2005 16:50:46 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A99D43D1D; Mon, 11 Apr 2005 16:50:46 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.92] ([66.127.85.92]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j3BGoZms075341 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Apr 2005 09:50:38 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <425AAB22.3020905@errno.com> Date: Mon, 11 Apr 2005 09:51:46 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20050411085956.Y28571@mail.chesapeake.net> <20050411160729.GP837@darkness.comp.waw.pl> In-Reply-To: <20050411160729.GP837@darkness.comp.waw.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Jeff Roberson cc: hackers@freebsd.org Subject: Re: JKH Task: Stack saving/tracing functionality. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 16:50:46 -0000 Pawel Jakub Dawidek wrote: > On Mon, Apr 11, 2005 at 09:08:33AM -0400, Jeff Roberson wrote: > +> I have proprietary code from a previous employer of mine that implements > +> some really useful debugging features. I'm looking for someone who is > +> interested in cleaning it up, making it architecture indepenent, and > +> getting it running on current. The code basically allows you to save and > +> manipulate stack information. > +> > +> This would be very useful for things like lockmgr, which right now we > +> can't really pass file:line information down to without making #ifdef mess > +> of all of the APIs as options DEBUG_LOCKs does somewhat today. Lockmgr > +> would have a buffer which contained the last N EIPs up the callstack, and > +> this information could be queried and printed using a simple api. > +> > +> Interested parties please email me. We can discuss this and I can provide > +> source. > > It would be probably useful for wintess, so when first order is stored, > it can be stored with stack and on LOR, both backtraces can be shown. > There is a similar #ifdef mess in net80211 for refcnt debugging. Sam From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 17:24:16 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4761C16A4CE for ; Mon, 11 Apr 2005 17:24:16 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EF8343D31 for ; Mon, 11 Apr 2005 17:24:15 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j3BHL84u015220; Mon, 11 Apr 2005 11:21:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 11 Apr 2005 11:21:14 -0600 (MDT) Message-Id: <20050411.112114.36185200.imp@bsdimp.com> To: bms@spc.org From: "M. Warner Losh" In-Reply-To: <20050411134817.GA4176@empiric.icir.org> References: <20050411082600.GA735@empiric.icir.org> <425A7AB3.7040908@samsco.org> <20050411134817.GA4176@empiric.icir.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@FreeBSD.ORG cc: scottl@samsco.org Subject: Re: A question about hot-pluggable PCI. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 17:24:16 -0000 In message: <20050411134817.GA4176@empiric.icir.org> Bruce M Simpson writes: : On Mon, Apr 11, 2005 at 07:25:07AM -0600, Scott Long wrote: : > Asking for 'hotplug support' is pretty generic and non-descriptive. Are : > you asking for device level hotplug support, where we carefully drain : > transactions out of a device, device driver, and whatever I/O or network : > or whatever layers are above it? Or are you talking about PCI hotplug : > support? If so, which de-facto standard? Compaq? IBM? ACPI? : > PCI-SIG? Something else? : : Sorry, I thought my original post was quite clear; in order to support : my hot-pluggable PCI chassis, FreeBSD needs to grow the ability to manage : PCI resources without any firmware support (other than possibly the ability : to route interrupts). Since I sent that mail I looked at the requirements : list for 5-STABLE and realized this is in fact on it. The trouble is that 'Hot Plug' pci is a semi-standardized thing. That's why people are confused. :-) You want to plug in a new PCI bus, while most people consider hot-plug PCI a way to replace cards in a running system. : I looked in src/sys/dev/cardbus/cardbus_cis.c, and Linux's ACPI-based PCI : hotplug driver, and realised that at the lowest level, they are all in fact : pretty much doing the same thing -- that is, setting all bits in a BAR, and : then figuring out the desired aperture size for each BAR, allocating the : appropriate resources using rman, figuring out base addresses, etc. Yup. : We currently rely on the BIOS to do this. The bit I've been discussing with : Warner is how to deal with the problem of setting subordinate bus numbers, : though because I can get away without doing that for the 'pcib is an immediate : child of cardbus' case, I haven't done it. No we don't. We use what the BIOS provides, but will lazily allocate the BARs as necessary. We don't open the resource windows on the bridges, however. : I had also thought of passing down a 'cold' flag, for pcibX to indicate to : pciY that this is a 'cold attach' (the BIOS hasn't been anywhere near the : devices behind this bridge -- it is as fresh as after a RST# assert). I don't think that's a wise idea. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 00:20:47 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D43216A563 for ; Tue, 12 Apr 2005 00:20:46 +0000 (GMT) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB4AF43D53 for ; Tue, 12 Apr 2005 00:20:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 21675 invoked from network); 12 Apr 2005 00:20:45 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 12 Apr 2005 00:20:44 -0000 Received: from [131.106.57.68] (p178.n-lapop01.stsn.com [12.129.240.178]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j3C0KXGt016395; Mon, 11 Apr 2005 20:20:38 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Mon, 11 Apr 2005 19:33:04 -0400 User-Agent: KMail/1.8 References: <200504111034.53683.doconnor@gsoft.com.au> In-Reply-To: <200504111034.53683.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504111933.05822.jhb@FreeBSD.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: Zera William Holladay Subject: Re: make for bootable ISOs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 00:20:47 -0000 On Sunday 10 April 2005 09:04 pm, Daniel O'Connor wrote: > On Mon, 11 Apr 2005 02:41, Zera William Holladay wrote: > > Hi, I'm attempting to make a bootable ISO for i386 architecture on > > 4.11-STABLE. I am using: > > > > %make buildworld > > %make buildkernel > > %make hierarchy DESTDIR=/... > > %make installworld DESTDIR=/... > > %make installkernel DESTDIR=/... > > > > And then modifying etc so that /dev/acd0a is the root directory. > > > > Is this the correct sequence and are these the correct targets? Since > > this is such a time consuming task, I figured that I would ask for help. > > 4.x uses el-torrito 2.88Mb floppy emulation for booting.. > make release builds an install CD and a live file system disk. > > I made a page with some tips on make release for 4.x if you're interested.. > http://www.gsoft.com.au/~doconnor/FreeBSD-release-2.html It doesn't have to though, it can use cdboot which then has access to the entire CD so that you can use a larger kernel and mfsroot. 5.x and beyond use this by default and 4.x will if you set USE_CDBOOT=yes at 'make release' I think. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 08:22:36 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67FA016A4CE for ; Tue, 12 Apr 2005 08:22:36 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B55643D41 for ; Tue, 12 Apr 2005 08:22:35 +0000 (GMT) (envelope-from schpeko@gmail.com) Received: by wproxy.gmail.com with SMTP id 49so72785wri for ; Tue, 12 Apr 2005 01:22:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OTOVLIgTQfm5gCmiTdbJf9J3GqyJHQjye9hh5YCG4iXyBmhhB0GXLoPiFSbeFbjhNJryZHMUlKBf0KQ7eNaK9WABn5DGwiy7h8IUyvDbsYBrluoyfnhk3ban3jt9BusCQ7trJhTRX5tkbtPYOY5d8BlkOlY9VcEFFgifbEYW4L8= Received: by 10.54.55.25 with SMTP id d25mr494050wra; Tue, 12 Apr 2005 01:22:34 -0700 (PDT) Received: by 10.54.19.2 with HTTP; Tue, 12 Apr 2005 01:22:33 -0700 (PDT) Message-ID: <6334c6e205041201224e6dfe1d@mail.gmail.com> Date: Tue, 12 Apr 2005 10:22:33 +0200 From: Martin Zibert To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: make world /jail -> error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Martin Zibert List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 08:22:36 -0000 Greetings.. I have a box running FreeBSD 5.3-RELEASE-p5 - today i was trying to set up a jail, but i got this error: -------------------------------------------------------------- >>> stage 1.2: bootstrap tools -------------------------------------------------------------- cd /usr/src; MAKEOBJDIRPREFIX=3D/usr/obj/usr/src/i386 DESTDIR=3D=20 INSTALL=3D"sh /usr/src/tools/install.sh"=20 PATH=3D/usr/obj/usr/src/i386/legacy/usr/sbin:/usr/obj/usr/src/i386/legacy/u= sr/bin:/usr/obj/usr/src/i386/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin WORLDTMP=3D/usr/obj/usr/src/i386 MAKEFLAGS=3D"-m /usr/src/tools/build/mk DESTDIR=3D/usr/jail/happy -m /usr/src/share/mk" make -f Makefile.inc1=20 BOOTSTRAPPING=3D503001 -DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS bootstrap-tools =3D=3D=3D> games/fortune/strfile /usr/obj/usr/src/i386/usr/src/games/fortune/strfile created for /usr/src/games/fortune/strfile rm -f .depend mkdep -f .depend -a -I/usr/obj/usr/src/i386/legacy/usr/include /usr/src/games/fortune/strfile/strfile.c echo strfile: /usr/jail/happy/usr/lib/libc.a /usr/obj/usr/src/i386/legacy/usr/lib/libegacy.a >> .depend cc -O -pipe -I/usr/obj/usr/src/i386/legacy/usr/include -c /usr/src/games/fortune/strfile/strfile.c make: don't know how to make /usr/jail/happy/usr/lib/libc.a. Stop *** Error code 2 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. .. if i'm not mistaken, make.conf should have something to do with it. My make.conf looks like this: # -- use.perl generated deltas -- # # Created: Mon Feb 14 16:29:10 2005 # Setting to use base perl from ports: PERL_VER=3D5.8.5 PERL_VERSION=3D5.8.5 PERL_ARCH=3Dmach NOPERL=3Dyo NO_PERL=3Dyo NO_PERL_WRAPPER=3Dyo NO_KERBEROS=3D true CFLAGS=3D -O -pipe NOPROFILE=3D true I really don't see the problem - i've googled the net and i few people have the same problem - non of them resolved it. Any suggestions? Thanks in advance. @martin From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 08:50:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBDC216A4CE for ; Tue, 12 Apr 2005 08:50:19 +0000 (GMT) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB63443D2F for ; Tue, 12 Apr 2005 08:50:18 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received-SPF: pass (mp2.macomnet.net: domain of maxim@macomnet.ru designates 127.0.0.1 as permitted sender) receiver=mp2.macomnet.net; client_ip=127.0.0.1; envelope-from=maxim@macomnet.ru; Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.12.11/8.12.11) with ESMTP id j3C8oHYR080254; Tue, 12 Apr 2005 12:50:17 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Tue, 12 Apr 2005 12:50:17 +0400 (MSD) From: Maxim Konovalov To: Martin Zibert In-Reply-To: <6334c6e205041201224e6dfe1d@mail.gmail.com> Message-ID: <20050412124900.D80134@mp2.macomnet.net> References: <6334c6e205041201224e6dfe1d@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: make world /jail -> error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 08:50:20 -0000 On Tue, 12 Apr 2005, 10:22+0200, Martin Zibert wrote: > Greetings.. > > I have a box running FreeBSD 5.3-RELEASE-p5 - today i was trying to > set up a jail, but i got this error: IIRC it's famous http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/77610 and several others. Try a workaround there or upgrade to RELENG_5 or RELENG_5_4. -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 09:28:00 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2271716A4CE for ; Tue, 12 Apr 2005 09:28:00 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id B90CE43D53 for ; Tue, 12 Apr 2005 09:27:59 +0000 (GMT) (envelope-from schpeko@gmail.com) Received: by wproxy.gmail.com with SMTP id 49so83933wri for ; Tue, 12 Apr 2005 02:27:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OWfGE/pfFkpc3c9CZYwv7dtRmGpaH0eJR78Int2EBuwXVJpVlcmit7tU+P/b0nma32FMh87mWWp1l6U7c50SV1Z6YfWhu1DdUnL8PDV3VBXu8DKRYltDWtf4n1teRtFPpDtoayU1D7BXbIVtqqWsVnxWEA2qVNvmoJdZiFlc6CI= Received: by 10.54.19.67 with SMTP id 67mr559327wrs; Tue, 12 Apr 2005 02:27:59 -0700 (PDT) Received: by 10.54.19.2 with HTTP; Tue, 12 Apr 2005 02:27:59 -0700 (PDT) Message-ID: <6334c6e205041202274bacf9db@mail.gmail.com> Date: Tue, 12 Apr 2005 11:27:59 +0200 From: Martin Zibert To: Maxim Konovalov In-Reply-To: <20050412124900.D80134@mp2.macomnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <6334c6e205041201224e6dfe1d@mail.gmail.com> <20050412124900.D80134@mp2.macomnet.net> cc: freebsd-hackers@freebsd.org Subject: Re: make world /jail -> error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Martin Zibert List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 09:28:00 -0000 Thanks, i think that should work - running build and install world separately. You have saved me a lot of time :) Thanks again, @martin On 4/12/05, Maxim Konovalov wrote: > On Tue, 12 Apr 2005, 10:22+0200, Martin Zibert wrote: >=20 > > Greetings.. > > > > I have a box running FreeBSD 5.3-RELEASE-p5 - today i was trying to > > set up a jail, but i got this error: >=20 > IIRC it's famous http://www.freebsd.org/cgi/query-pr.cgi?pr=3Ddocs/77610 > and several others. Try a workaround there or upgrade to RELENG_5 or > RELENG_5_4. >=20 > --=20 > Maxim Konovalov > From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 11 16:41:24 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C84316A4CE; Mon, 11 Apr 2005 16:41:24 +0000 (GMT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DBE143D1F; Mon, 11 Apr 2005 16:41:23 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.2.3.R) with ESMTP id md50001313858.msg; Mon, 11 Apr 2005 17:38:15 +0100 Message-ID: <014301c53eb5$42638bf0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: , Date: Mon, 11 Apr 2005 17:01:35 +0100 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.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Spam-Processed: multiplay.co.uk, Mon, 11 Apr 2005 17:38:15 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDAV-Processed: multiplay.co.uk, Mon, 11 Apr 2005 17:38:17 +0100 X-Mailman-Approved-At: Tue, 12 Apr 2005 12:10:05 +0000 Subject: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 16:41:24 -0000 Just had a problem with a box where it looks like it ran out of swap due to a problem process, not a problem. The problem was that it seems the kernel on detecting this starts killing off seeming random processes, the first one being sshd hence making the machine inaccessible. So the question is: Does the kernel kill random processes when out of swap or does it kill any processes that require more memory when out of swap? Which leads to the question would it not be more sensible to kill off the largest process first as its more than likely that it is responsible for the problem? [quote] Apr 10 20:09:25 appledore kernel: pid 414 (sshd), uid 0, was killed: out of swap space [/quote] Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 12:23:48 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DA9B16A4CE for ; Tue, 12 Apr 2005 12:23:48 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 195D943D45 for ; Tue, 12 Apr 2005 12:23:48 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j3CCOLh3019178; Tue, 12 Apr 2005 05:24:23 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j3CCOFXL019177; Tue, 12 Apr 2005 05:24:15 -0700 (PDT) (envelope-from www) Date: Tue, 12 Apr 2005 05:24:15 -0700 (PDT) Message-Id: <200504121224.j3CCOFXL019177@marlena.vvi.at> To: killing@multiplay.co.uk From: "ALeine" cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 12:23:48 -0000 killing@multiplay.co.uk wrote: > Just had a problem with a box where it looks like it ran out of > swap due to a problem process, not a problem. The problem was that it > seems the kernel on detecting this starts killing off seeming random > processes, the first one being sshd hence making the machine inaccessible. > > So the question is: Does the kernel kill random processes when > out of swap or does it kill any processes that require more memory when > out of swap? Which leads to the question would it not be more > sensible to kill off the largest process first as its more than likely that > it is responsible for the problem? This procedure is not random, it indeed looks for the largest process and then kills it. It keeps repeating this procedure until the memory starvation problem is solved. You obviously are not running X on that machine, otherwise you would see that X would get killed before sshd. When you're out of swap, you're also out of luck if sshd is among the largest processes on your machine. Having a flag to tag processes as vital to prevent them from getting killed (or to give them lower next-to-be-killed priority so that all non-vital processes get killed first) when you run out of swap would be a useful feature, what do you guys think? ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 12:31:55 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F171716A503 for ; Tue, 12 Apr 2005 12:31:54 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7283C43D4C for ; Tue, 12 Apr 2005 12:31:54 +0000 (GMT) (envelope-from dipjyoti.saikia@gmail.com) Received: by wproxy.gmail.com with SMTP id 68so1871200wri for ; Tue, 12 Apr 2005 05:31:53 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=LEJxu6ZrAa3yRaXyaQrRuv5Ee+1zYoBNLLTrXv0zFM9v8IMTxlo+ZIUzyVubc/116DZQsat8/sCJDoufxUWr0fXsulkeRfcSDJn9hrcFc/IvdXIl1K6uN30WH0RyV4UtKaVbtWX2HNTMzpoT1SydCkzzoSnxnxW0rlqrljKOlUg= Received: by 10.54.50.33 with SMTP id x33mr3022185wrx; Tue, 12 Apr 2005 05:31:53 -0700 (PDT) Received: by 10.54.35.75 with HTTP; Tue, 12 Apr 2005 05:31:52 -0700 (PDT) Message-ID: Date: Tue, 12 Apr 2005 18:01:52 +0530 From: Dipjyoti Saikia To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: What is the best way to introduce delay in kernel ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dipjyoti Saikia List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 12:31:55 -0000 Hi , I am writing a device driver and using DELAY() to intoduce delays in my code .Are there any better ways of doing the same for FreeBSD 4.10 ? Thanks Dip From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 13:22:28 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A49EE16A4CE for ; Tue, 12 Apr 2005 13:22:28 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [83.167.185.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3724A43D48 for ; Tue, 12 Apr 2005 13:22:28 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 66E8A65213; Tue, 12 Apr 2005 14:22:09 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 36163-02-3; Tue, 12 Apr 2005 14:22:09 +0100 (BST) Received: from empiric.dek.spc.org (dhcp52.icir.org [192.150.187.52]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 8460165211; Tue, 12 Apr 2005 14:22:03 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id B2834616D; Tue, 12 Apr 2005 06:22:19 -0700 (PDT) Date: Tue, 12 Apr 2005 06:22:19 -0700 From: Bruce M Simpson To: ALeine Message-ID: <20050412132219.GB784@empiric.icir.org> Mail-Followup-To: ALeine , killing@multiplay.co.uk, freebsd-hackers@freebsd.org References: <200504121224.j3CCOFXL019177@marlena.vvi.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504121224.j3CCOFXL019177@marlena.vvi.at> cc: freebsd-hackers@freebsd.org cc: killing@multiplay.co.uk Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 13:22:28 -0000 On Tue, Apr 12, 2005 at 05:24:15AM -0700, ALeine wrote: > machine. Having a flag to tag processes as vital to prevent them from getting > killed (or to give them lower next-to-be-killed priority so that all non-vital > processes get killed first) when you run out of swap would be a useful feature, P_SYSTEM provides something like this feature, amongst others. It is used by init(8). However P_SYSTEM also says that process statistics should not be maintained, and that the signals that may be dispatched to such processes are restricted. It would be more appropriate if such processes use the mlockall(2) call for the time being. BMS From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 13:48:45 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95BF616A4CE for ; Tue, 12 Apr 2005 13:48:45 +0000 (GMT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF5D043D5C for ; Tue, 12 Apr 2005 13:48:44 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.2.3.R) with ESMTP id md50001315975.msg for ; Tue, 12 Apr 2005 14:45:11 +0100 Message-ID: <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: "ALeine" References: <200504121224.j3CCOFXL019177@marlena.vvi.at> Date: Tue, 12 Apr 2005 14:48:00 +0100 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.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Spam-Processed: multiplay.co.uk, Tue, 12 Apr 2005 14:45:11 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Tue, 12 Apr 2005 14:45:14 +0100 cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 13:48:45 -0000 Thanks for the feedback seems very strange that sshd was the first thing the kernel killed off; so unless it was actually at fault ( would be very strange ) it would have been one of the smallest not largest processes. The box has runs several 200M+ process and more 100M+ where as sshd is usually 6M. So this leads me to the questions: 1. Any know issues ssh which could make it eat memory? 2. Is there possibly a bug with the "large process detection"? N.B. It seems more likely that #2 is case as the next processes to be killed where some small perl monitoring scripts we run only after that did it kill of one of the large 200M+ processes. Regards Steve ----- Original Message ----- From: "ALeine" > > This procedure is not random, it indeed looks for the largest process and > then kills it. It keeps repeating this procedure until the memory starvation > problem is solved. You obviously are not running X on that machine, otherwise > you would see that X would get killed before sshd. When you're out of swap, > you're also out of luck if sshd is among the largest processes on your > machine. Having a flag to tag processes as vital to prevent them from getting > killed (or to give them lower next-to-be-killed priority so that all non-vital > processes get killed first) when you run out of swap would be a useful feature, > what do you guys think? ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 14:09:07 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B9AE16A4CE for ; Tue, 12 Apr 2005 14:09:07 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F9E243D45 for ; Tue, 12 Apr 2005 14:09:07 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j3CE8ktD017547; Tue, 12 Apr 2005 10:08:46 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j3CE8kfl017546; Tue, 12 Apr 2005 10:08:46 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 12 Apr 2005 10:08:46 -0400 From: David Schultz To: ALeine , killing@multiplay.co.uk, freebsd-hackers@FreeBSD.ORG Message-ID: <20050412140846.GA17282@VARK.MIT.EDU> Mail-Followup-To: ALeine , killing@multiplay.co.uk, freebsd-hackers@freebsd.org References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <20050412132219.GB784@empiric.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050412132219.GB784@empiric.icir.org> Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 14:09:07 -0000 On Tue, Apr 12, 2005, Bruce M Simpson wrote: > On Tue, Apr 12, 2005 at 05:24:15AM -0700, ALeine wrote: > > machine. Having a flag to tag processes as vital to prevent them from getting > > killed (or to give them lower next-to-be-killed priority so that all non-vital > > processes get killed first) when you run out of swap would be a useful feature, > > P_SYSTEM provides something like this feature, amongst others. It is used by > init(8). However P_SYSTEM also says that process statistics should not be > maintained, and that the signals that may be dispatched to such processes > are restricted. A madvise(NULL, 0, MADV_PROTECT) is the best way to tell the kernel not to kill your process. You must be running as root to use it. Now that disk space is cheap, it would be even nicer if we had a non-overcommit mode for swap, as most System V-derived systems do. Then at least processes would get ENOMEM instead of SIGKILL in a space shortage. I don't think this would be too hard to add, except possibly for handling OBJT_DEFAULT objects. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 14:54:06 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B46B16A4CE for ; Tue, 12 Apr 2005 14:54:06 +0000 (GMT) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id A645643D45 for ; Tue, 12 Apr 2005 14:54:04 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) (8.13.4/8.13.3) with ESMTP id j3CEs1pG017965 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 12 Apr 2005 16:54:01 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.4/8.13.3/Submit) id j3CEs1Qa017963; Tue, 12 Apr 2005 16:54:01 +0200 (CEST) Date: Tue, 12 Apr 2005 16:54:01 +0200 From: Divacky Roman To: Dipjyoti Saikia Message-ID: <20050412145401.GA17895@stud.fit.vutbr.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 cc: freebsd-hackers@freebsd.org Subject: Re: What is the best way to introduce delay in kernel ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 14:54:06 -0000 On Tue, Apr 12, 2005 at 06:01:52PM +0530, Dipjyoti Saikia wrote: > Hi , > > I am writing a device driver and using DELAY() to intoduce delays in > my code .Are there any better ways of doing the same for FreeBSD 4.10 > ? you can use [tm]sleep for this... or with another approach callouts might be usefull roman From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 15:05:30 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A81716A4CE for ; Tue, 12 Apr 2005 15:05:30 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2ED243D1D for ; Tue, 12 Apr 2005 15:05:29 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j3CF5vh3020696; Tue, 12 Apr 2005 08:06:05 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j3CF5pDg020695; Tue, 12 Apr 2005 08:05:51 -0700 (PDT) (envelope-from www) Date: Tue, 12 Apr 2005 08:05:51 -0700 (PDT) Message-Id: <200504121505.j3CF5pDg020695@marlena.vvi.at> Content-Type: multipart/mixed; boundary="----------=_1113318350-20694-0" Content-Transfer-Encoding: binary MIME-Version: 1.0 X-Mailer: MIME-tools 5.411 (Entity 5.404) From: "ALeine" To: bms@spc.org cc: freebsd-hackers@freebsd.org cc: killing@multiplay.co.uk Subject: [patch] GBDE memory allocations bugs and mlockall(2) [Was Re: kernel killing processes when out of swap] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 15:05:30 -0000 This is a multi-part message in MIME format... ------------=_1113318350-20694-0 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary bms@spc.org wrote: > It would be more appropriate if such processes use the mlockall(2) call > for the time being. Speaking of mlockall(2), almost two weeks ago when I posted here about CGD (and GBDE) memory allocation bugs I sent the attached patch for src/sbin/gbde/gbde.c to PHK, but since he never got back to me on that I would like to ask you guys to review the patch and commit it as appropriate, hopefully before the next release. The patch addresses memory allocation bugs where memory is used without checking first if allocation was successful. In one case this could lead to a segment violation with the core dump containing the sensitive info required to decrypt the GBDE volume. The patch also disables core dumping by using setrlimit(2)) and prevents paging by using mlockall(2). I have patched several similar memory allocation bugs in libgeom, so if anyone would like to see these bugs fixed let me know and I'll post that patch as well. Right now I get the feeling that due to memory overcommit in FreeBSD some people might think that these checks are not absolutely necessary since another larger process would be more likely to get killed before malloc(3) would return NULL, but I believe that one should not rely on that. ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net ------------=_1113318350-20694-0 Content-Type: text/plain; name="gbde.c.20050330.patch" Content-Disposition: inline; filename="gbde.c.20050330.patch" Content-Transfer-Encoding: 8bit --- src/sbin/gbde/gbde.c.old Wed Mar 30 14:18:37 2005 +++ src/sbin/gbde/gbde.c Wed Mar 30 15:11:15 2005 @@ -85,7 +85,10 @@ #include #include #include +#include +#include #include +#include #include #define GBDEMOD "geom_bde" @@ -145,6 +148,19 @@ exit (1); } +static void +disable_core_dumping(void) +{ + struct rlimit rl; + int error; + + rl.rlim_cur = 0; + rl.rlim_max = 0; + error = setrlimit(RLIMIT_CORE, &rl); + if (error) + err(1, "setrlimit() failed to set core size to 0"); +} + void * g_read_data(struct g_consumer *cp, off_t offset, off_t length, int *error) { @@ -355,7 +371,10 @@ u_char *sbuf; off_t offset, offset2; + /* Allocate a sectorbuffer immediately and zero it */ sbuf = malloc(gl->sectorsize); + if (sbuf == NULL) + err(1, "malloc"); memset(sbuf, 0, gl->sectorsize); offset = (gl->lsector[key] & ~(gl->sectorsize - 1)); offset2 = lseek(dfd, offset, SEEK_SET); @@ -377,7 +396,10 @@ u_char *sbuf, *q; off_t offset, offset2; + /* Allocate a sectorbuffer */ sbuf = malloc(gl->sectorsize); + if (sbuf == NULL) + err(1, "malloc"); /* * Find the byte-offset in the lock sector where we will put the lock * data structure. We can put it any random place as long as the @@ -422,9 +444,7 @@ errx(1, "No -L option and no space in sector 0 for lockfile"); } - /* Allocate a sectorbuffer and fill it with random junk */ - if (sbuf == NULL) - err(1, "malloc"); + /* Fill sectorbuffer with random junk */ random_bits(sbuf, gl->sectorsize); /* Fill random bits in the spare field */ @@ -722,12 +742,17 @@ if (argc < 3) usage("Too few arguments\n"); - if ((i = modfind("g_bde")) < 0) { - /* need to load the gbde module */ - if (kldload(GBDEMOD) < 0 || modfind("g_bde") < 0) { - usage(GBDEMOD ": Kernel module not available\n"); - } - } + if ((i = modfind("g_bde")) < 0) { + /* need to load the gbde module */ + if (kldload(GBDEMOD) < 0 || modfind("g_bde") < 0) { + usage(GBDEMOD ": Kernel module not available\n"); + } + } + + disable_core_dumping(); + if (mlockall(MCL_FUTURE)) + err(1, "mlockall() failed to lock all memory"); + doopen = 0; if (!strcmp(argv[1], "attach")) { action = ACT_ATTACH; ------------=_1113318350-20694-0-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 15:10:25 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC7C116A4D0 for ; Tue, 12 Apr 2005 15:10:25 +0000 (GMT) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E78843D45 for ; Tue, 12 Apr 2005 15:10:25 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) (8.13.4/8.13.3) with ESMTP id j3CFAMEt018942 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 12 Apr 2005 17:10:22 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.4/8.13.3/Submit) id j3CFAM0j018939; Tue, 12 Apr 2005 17:10:22 +0200 (CEST) Date: Tue, 12 Apr 2005 17:10:22 +0200 From: Divacky Roman To: Vladislav Shabanov Message-ID: <20050412151022.GB17895@stud.fit.vutbr.cz> References: <200504112003.25096.vs@rambler-co.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504112003.25096.vs@rambler-co.ru> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 cc: hackers@freebsd.org Subject: Re: do-nothing code in sysv_shm.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 15:10:25 -0000 On Mon, Apr 11, 2005 at 08:03:24PM +0400, Vladislav Shabanov wrote: > I`ve found the following code in sysv_shm.c : > > ............ > static void > shminit() > { > int i; > > TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall); > for (i = PAGE_SIZE; i > 0; i--) { > shminfo.shmmax = shminfo.shmall * PAGE_SIZE; > if (shminfo.shmmax >= shminfo.shmall) > break; > } > TUNABLE_INT_FETCH("kern.ipc.shmmin", &shminfo.shmmin); > ......... > > IMHO, loop does nothing. Possible variant: alfred perlstein commited this saying: Bring shm functions closer the the opengroup standards. he is the person you should ask why is it coded this way. imho compiler just optimizes this out leaving plain shminfo.shmmax = shminfo.shmall * PAGE_SIZE; roman From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 16:46:53 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F99A16A4CF for ; Tue, 12 Apr 2005 16:46:53 +0000 (GMT) Received: from bgo1smout1.broadpark.no (bgo1smout1.broadpark.no [217.13.4.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90FF043D54 for ; Tue, 12 Apr 2005 16:46:52 +0000 (GMT) (envelope-from des@des.no) Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) by bgo1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IEU00IL8ECPO900@bgo1smout1.broadpark.no> for freebsd-hackers@freebsd.org; Tue, 12 Apr 2005 18:41:13 +0200 (CEST) Received: from dsa.des.no ([80.203.228.37]) by bgo1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IEU00KEZEO72V70@bgo1sminn1.broadpark.no> for freebsd-hackers@freebsd.org; Tue, 12 Apr 2005 18:48:07 +0200 (CEST) Received: by dsa.des.no (Pony Express, from userid 666) id 8F56FEBE06; Tue, 12 Apr 2005 18:46:50 +0200 (CEST) Received: from xps.des.no (xps.des.no [10.0.0.12]) by dsa.des.no (Pony Express) with ESMTP id DB0D3EBE2B; Tue, 12 Apr 2005 18:46:45 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id C861A33C5A; Tue, 12 Apr 2005 18:46:45 +0200 (CEST) Date: Tue, 12 Apr 2005 18:46:45 +0200 From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) In-reply-to: <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> To: Steven Hartland Message-id: <86ll7ox7re.fsf@xps.des.no> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on dsa.des.no References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.0.2 X-Spam-Level: cc: ALeine cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 16:46:53 -0000 "Steven Hartland" writes: > Thanks for the feedback seems very strange that sshd was the first thing = the > kernel killed off; so unless it was actually at fault ( would be very str= ange ) > it would have been one of the smallest not largest processes. > The box has runs several 200M+ process and more 100M+ where > as sshd is usually 6M. > > So this leads me to the questions: > 1. Any know issues ssh which could make it eat memory? > 2. Is there possibly a bug with the "large process detection"? There is no "large process detection". The first process that tries to fault in a new page after the system runs out of swap gets killed. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 16:53:43 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C270916A4CE for ; Tue, 12 Apr 2005 16:53:43 +0000 (GMT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01FAF43D31 for ; Tue, 12 Apr 2005 16:53:43 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id E785B1F116; Tue, 12 Apr 2005 18:53:41 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id CBE9F62F7; Tue, 12 Apr 2005 18:53:41 +0200 (CEST) Date: Tue, 12 Apr 2005 18:53:41 +0200 From: Marc Olzheim To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20050412165341.GA2257@stack.nl> References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> <86ll7ox7re.fsf@xps.des.no> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <86ll7ox7re.fsf@xps.des.no> X-Operating-System: FreeBSD hammer.stack.nl 5.4-STABLE FreeBSD 5.4-STABLE X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.9i cc: ALeine cc: freebsd-hackers@freebsd.org cc: Steven Hartland Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 16:53:43 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 12, 2005 at 06:46:45PM +0200, Dag-Erling Smrgrav wrote: > There is no "large process detection". The first process that tries > to fault in a new page after the system runs out of swap gets killed. Which sucks when a process like X tries to free and realloc things when possible and tries to be system friendly, but thus increases the chance to get shot down, while programs over-allocing memory and never freeing it get to survive. It's a sad world. :-P Anyway, when at our office we were running X on low-memory systems and had to reboot often because of X being killed, rendering the text console useless, we had a patch to prevent processes with specific names being killed. I could revive this and turn this into a sysctl if anyone's interested... Marc --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCW/0VezjnobFOgrERAunQAJ9DT0HTncPpxd5xQ/iEZanxfNGDoACfeHfW v6Ixpk6l+/NAYYXBofpMgiw= =vGEy -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 17:13:36 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0314D16A4CE for ; Tue, 12 Apr 2005 17:13:36 +0000 (GMT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0633D43D41 for ; Tue, 12 Apr 2005 17:13:35 +0000 (GMT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.2.3.R) with ESMTP id md50001316504.msg for ; Tue, 12 Apr 2005 18:10:14 +0100 Message-ID: <020201c53f82$e4b54330$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: =?iso-8859-1?Q?=22Dag-Erling_Sm=F8rgrav=22?= References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> <86ll7ox7re.fsf@xps.des.no> Date: Tue, 12 Apr 2005 18:13:01 +0100 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.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Spam-Processed: multiplay.co.uk, Tue, 12 Apr 2005 18:10:14 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-MDAV-Processed: multiplay.co.uk, Tue, 12 Apr 2005 18:10:18 +0100 cc: ALeine cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 17:13:36 -0000 ----- Original Message ----- > There is no "large process detection". The first process that tries > to fault in a new page after the system runs out of swap gets killed. That makes sense. Me trying to connect to see what was going on would hence cause sshd to be killed ( not good ). It would seem that we could do with doing something to prevent this. We have had a few suggestions so far. 1. Using madvise, requires code changes per app 2. Using a sysctl to name processes which shouldn't be killed. 3. Changing how the choice of process to kill is made. I don't like the idea of having to make code changes so would vote against #1. #3 I would imagine could be quite complex and error fraught so #2 seems like the best option so far. What do others think? Go with Marc's idea? Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 18:17:31 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49F7116A4CE for ; Tue, 12 Apr 2005 18:17:31 +0000 (GMT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8146443D39 for ; Tue, 12 Apr 2005 18:17:30 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id 722DB1F133; Tue, 12 Apr 2005 20:17:29 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id 53FD76381; Tue, 12 Apr 2005 20:17:29 +0200 (CEST) Date: Tue, 12 Apr 2005 20:17:29 +0200 From: Marc Olzheim To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20050412181729.GC2257@stack.nl> References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> <86ll7ox7re.fsf@xps.des.no> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1SQmhf2mF2YjsYvc" Content-Disposition: inline In-Reply-To: <86ll7ox7re.fsf@xps.des.no> X-Operating-System: FreeBSD hammer.stack.nl 5.4-STABLE FreeBSD 5.4-STABLE X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.9i cc: ALeine cc: freebsd-hackers@freebsd.org cc: Steven Hartland Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 18:17:31 -0000 --1SQmhf2mF2YjsYvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 12, 2005 at 06:46:45PM +0200, Dag-Erling Smrgrav wrote: > There is no "large process detection". The first process that tries > to fault in a new page after the system runs out of swap gets killed. Are you suggesting that vm_pageout_pmap_collect() is no longer in use ? That has a FOREACH_PROC_IN_SYSTEM(p) ... find biggest unlocked ... kill-kill-kill... Marc --1SQmhf2mF2YjsYvc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCXBC5ezjnobFOgrERAifnAJ9fXaAu07n/fYNBTsNJX3vQTBGdxwCgsyxM Oi1Ah8wuaNkp0OasTa5pKwg= =r8+m -----END PGP SIGNATURE----- --1SQmhf2mF2YjsYvc-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 18:35:46 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E488E16A4CE for ; Tue, 12 Apr 2005 18:35:46 +0000 (GMT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B24643D3F for ; Tue, 12 Apr 2005 18:35:46 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j3CIZdnm016379; Tue, 12 Apr 2005 14:35:40 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <86ll7ox7re.fsf@xps.des.no> References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> <86ll7ox7re.fsf@xps.des.no> Date: Tue, 12 Apr 2005 14:35:39 -0500 To: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= ), Steven Hartland From: Garance A Drosihn Content-Type: text/plain; charset="iso-8859-1" ; format="flowed" Content-Transfer-Encoding: quoted-printable X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.2 cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 18:35:47 -0000 At 6:46 PM +0200 4/12/05, Dag-Erling Sm=F8rgrav wrote: >"Steven Hartland" writes: >> Thanks for the feedback seems very strange that sshd was the first thing= the >> kernel killed off; so unless it was actually=20 >>at fault ( would be very strange ) >> it would have been one of the smallest not largest processes. >> The box has runs several 200M+ process and more 100M+ where >> as sshd is usually 6M. >> >> So this leads me to the questions: >> 1. Any know issues ssh which could make it eat memory? >> 2. Is there possibly a bug with the "large process detection"? > >There is no "large process detection". The first process that tries >to fault in a new page after the system runs out of swap gets killed. =46rom time-to-time, we talk about implementing some form of SIGDANGER, similar to what AIX has. -- Garance Alistair Drosehn =3D gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 18:37:54 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F30F816A4CE for ; Tue, 12 Apr 2005 18:37:53 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3429F43D5A for ; Tue, 12 Apr 2005 18:37:52 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j3CIc0h3022761; Tue, 12 Apr 2005 11:38:04 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j3CIbqnh022760; Tue, 12 Apr 2005 11:37:52 -0700 (PDT) (envelope-from www) Date: Tue, 12 Apr 2005 11:37:52 -0700 (PDT) Message-Id: <200504121837.j3CIbqnh022760@marlena.vvi.at> To: marcolz@stack.nl From: "ALeine" cc: des@des.no cc: killing@multiplay.co.uk cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 18:37:54 -0000 marcolz@stack.nl wrote: > On Tue, Apr 12, 2005 at 06:46:45PM +0200, Dag-Erling Smrgrav > wrote: > > There is no "large process detection". The first process that > > tries to fault in a new page after the system runs out of swap > > gets killed. > > Are you suggesting that vm_pageout_pmap_collect() is no longer in > use ? > > That has a FOREACH_PROC_IN_SYSTEM(p) ... find biggest unlocked > ... > kill-kill-kill... The largest process gets killed in vm_pageout_scan() according to the latest sources: http://fxr.watson.org/fxr/source/vm/vm_pageout.c#L1168 1168 /* 1169 * If we are critically low on one of RAM or swap and low on 1170 * the other, kill the largest process. However, we avoid 1171 * doing this on the first pass in order to give ourselves a 1172 * chance to flush out dirty vnode-backed pages and to allow 1173 * active pages to be moved to the inactive queue and reclaimed. 1174 * 1175 * We keep the process bigproc locked once we find it to keep anyone 1176 * from messing with it; however, there is a possibility of 1177 * deadlock if process B is bigproc and one of it's child processes 1178 * attempts to propagate a signal to B while we are waiting for A's 1179 * lock while walking this list. To avoid this, we don't block on 1180 * the process lock but just skip a process if it is already locked. 1181 */ http://fxr.watson.org/fxr/source/vm/vm_pageout.c?v=RELENG4#L1112 1112 /* 1113 * If we are out of swap and were not able to reach our paging 1114 * target, kill the largest process. 1115 */ ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 18:42:27 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9BFF16A4CE for ; Tue, 12 Apr 2005 18:42:27 +0000 (GMT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 618D243D48 for ; Tue, 12 Apr 2005 18:42:27 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id 8C0F21F075; Tue, 12 Apr 2005 20:42:26 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id 6627E6381; Tue, 12 Apr 2005 20:42:26 +0200 (CEST) Date: Tue, 12 Apr 2005 20:42:26 +0200 From: Marc Olzheim To: ALeine Message-ID: <20050412184226.GA23021@stack.nl> References: <200504121837.j3CIbqnh022760@marlena.vvi.at> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <200504121837.j3CIbqnh022760@marlena.vvi.at> X-Operating-System: FreeBSD hammer.stack.nl 5.4-STABLE FreeBSD 5.4-STABLE X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.9i cc: marcolz@stack.nl cc: des@des.no cc: killing@multiplay.co.uk cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 18:42:27 -0000 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 12, 2005 at 11:37:52AM -0700, ALeine wrote: > > Are you suggesting that vm_pageout_pmap_collect() is no longer in > > use ? > >=20 > > That has a FOREACH_PROC_IN_SYSTEM(p) ... find biggest unlocked > > ... > > kill-kill-kill... >=20 > The largest process gets killed in vm_pageout_scan() according to the > latest sources: Erhm, my mistake I meant the same code, just copy-pasted the function name above vm_pageout_scan() by accident. :-/ My point was/is: it still seems to do big process detection / killing. The original patch preventing X to be killed was built into that same loop... Marc --ibTvN161/egqYuK8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCXBaSezjnobFOgrERAu3vAKC0rDcYW+cZYutRHuhyOB5PzH9TrgCglwxN cm50zGd7Eek5p0FgMBiTsAQ= =NLJT -----END PGP SIGNATURE----- --ibTvN161/egqYuK8-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 19:02:17 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E361E16A4CE for ; Tue, 12 Apr 2005 19:02:17 +0000 (GMT) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25C4743D1D for ; Tue, 12 Apr 2005 19:02:17 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j3CJ23In022614 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 13 Apr 2005 05:02:04 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j3CJ237l000307; Wed, 13 Apr 2005 05:02:03 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j3CJ22k4000306; Wed, 13 Apr 2005 05:02:03 +1000 (EST) (envelope-from pjeremy) Date: Wed, 13 Apr 2005 05:02:02 +1000 From: Peter Jeremy To: ALeine Message-ID: <20050412190202.GM89047@cirb503493.alcatel.com.au> References: <200504121224.j3CCOFXL019177@marlena.vvi.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504121224.j3CCOFXL019177@marlena.vvi.at> User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 19:02:18 -0000 On Tue, 2005-Apr-12 05:24:15 -0700, ALeine wrote: > Having a flag to tag processes as vital to prevent them from getting >killed (or to give them lower next-to-be-killed priority so that all non-vital >processes get killed first) when you run out of swap would be a useful feature, >what do you guys think? This has been discussed to death before - look in the archives for 'SIGDANGER' (probably pre-mailman). -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 19:05:25 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A519F16A4CE for ; Tue, 12 Apr 2005 19:05:25 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4379643D39 for ; Tue, 12 Apr 2005 19:05:25 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j3CJ5rh3023048; Tue, 12 Apr 2005 12:05:57 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j3CJ5ln3023047; Tue, 12 Apr 2005 12:05:47 -0700 (PDT) (envelope-from www) Date: Tue, 12 Apr 2005 12:05:47 -0700 (PDT) Message-Id: <200504121905.j3CJ5ln3023047@marlena.vvi.at> To: killing@multiplay.co.uk From: "ALeine" cc: des@des.no cc: freebsd-hackers@freebsd.org Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 19:05:25 -0000 killing@multiplay.co.uk wrote: > That makes sense. Me trying to connect to see what was going > on would hence cause sshd to be killed ( not good ). > It would seem that we could do with doing something to prevent > this. > We have had a few suggestions so far. > 1. Using madvise, requires code changes per app > 2. Using a sysctl to name processes which shouldn't be killed. > 3. Changing how the choice of process to kill is made. > > I don't like the idea of having to make code changes so would > vote against #1. #3 I would imagine could be quite complex > and error fraught so #2 seems like the best option so far. > > What do others think? Go with Marc's idea? I would go with #3 and add a new process flag like P_KILLLAST and then update vm_pageout_scan() to honour that flag and make sure to kill processes without that flag first before moving to processes which have that flag set. It would require minimum changes and you would only need a way to set this flag on a process. No change in existing applications would be required because they would be oblivious to this feature. IMHO this would be preferable to having something like SIGDANGER where every program has to have a special signal handler in order to benefit from this feature. ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 20:36:41 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D52516A4CE for ; Tue, 12 Apr 2005 20:36:41 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28F8C43D4C for ; Tue, 12 Apr 2005 20:36:41 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j3CKdvWQ040130 for ; Tue, 12 Apr 2005 14:39:57 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <425C309A.8020105@samsco.org> Date: Tue, 12 Apr 2005 14:33:30 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Subject: Transitions in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 20:36:41 -0000 All, I'd like to announce that I'm stepping down from the FreeBSD Core team. After several months and much thought, I've decided to re-focus on where my passions lie, which is release engineering and development. I intend to remain just as visible in the project as I was before the last election, so please don't think that I'm moving on from FreeBSD. Quite the opposite is true, in fact. The remaining Core members are doing a good job of handling the issues of the project, and as per the by-laws there will not be any action to fill my vacancy at this time. There is no conspiracy here. It's simply a recognition that I was wearing too many hats, and that some of those hats didn't fit as comfortably as others. I hope to become more productive in FreeBSD in the near future; my decision has already given me more time and energy to work on things like driver locking and ATAPICAM, and I have some very interesting projects starting in the background that I'm very excited about. Many thanks to those who supported me and my time on team. Scott From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 21:03:23 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F51016A4CE for ; Tue, 12 Apr 2005 21:03:23 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CDAA43D62 for ; Tue, 12 Apr 2005 21:03:23 +0000 (GMT) (envelope-from dipjyoti.saikia@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so1795579wra for ; Tue, 12 Apr 2005 14:03:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=s2a6BNBlnBF4Os5HQLMDkYW4kH8zI1byp6Ee4f8fU6HuuXmbnk/iaH8MhabuAfC2KZ/bNyzSPXFU3j+XVC5KSW4dSlf68Bpcte7yIE17EygYY++7UoZn+kW4wAKZ1xgo3fQYHRPDAE33/4JbuticwQ2S7Uf0Um0l/P+0QqLVrA4= Received: by 10.54.16.39 with SMTP id 39mr276550wrp; Tue, 12 Apr 2005 14:03:22 -0700 (PDT) Received: by 10.54.35.75 with HTTP; Tue, 12 Apr 2005 14:03:22 -0700 (PDT) Message-ID: Date: Wed, 13 Apr 2005 02:33:22 +0530 From: Dipjyoti Saikia To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dipjyoti Saikia List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 21:03:23 -0000 Hi, Can any one help me out with a better Implementation of MDELAY() in FreeBSD kernel 4.10 Thanks Dip From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 21:20:45 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 311D616A4CE for ; Tue, 12 Apr 2005 21:20:45 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E100C43D39 for ; Tue, 12 Apr 2005 21:20:44 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j3CLKiNi010196; Tue, 12 Apr 2005 14:20:44 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j3CLKi8W010195; Tue, 12 Apr 2005 14:20:44 -0700 Date: Tue, 12 Apr 2005 14:20:44 -0700 From: Brooks Davis To: Dipjyoti Saikia Message-ID: <20050412212044.GA9284@odin.ac.hmc.edu> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-hackers@freebsd.org Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 21:20:45 -0000 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 13, 2005 at 02:33:22AM +0530, Dipjyoti Saikia wrote: > Hi, >=20 > Can any one help me out with a better Implementation of MDELAY() in > FreeBSD kernel 4.10 Please start by defining better. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCXDurXY6L6fI4GtQRAtxzAJ98xs/dzuMKVIqlyVCaU8G32YFNUACeNDKO hm//9BL4ZttH6+fnW5y7iuE= =u6Vp -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 22:41:15 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D480716A4CF for ; Tue, 12 Apr 2005 22:41:15 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B26143D31 for ; Tue, 12 Apr 2005 22:41:15 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j3CMepbi020121; Tue, 12 Apr 2005 18:40:51 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j3CMepo3020120; Tue, 12 Apr 2005 18:40:51 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 12 Apr 2005 18:40:50 -0400 From: David Schultz To: Steven Hartland Message-ID: <20050412224050.GA20005@VARK.MIT.EDU> Mail-Followup-To: Steven Hartland , "Dag-Erling =?us-ascii:iso-8859-1?Q?Sm=F8rgrav?=" , ALeine , freebsd-hackers@FreeBSD.ORG References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> <86ll7ox7re.fsf@xps.des.no> <020201c53f82$e4b54330$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <020201c53f82$e4b54330$b3db87d4@multiplay.co.uk> cc: ALeine cc: "Dag-Erling =?us-ascii:iso-8859-1?Q?Sm=F8rgrav?=" cc: freebsd-hackers@FreeBSD.ORG Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 22:41:16 -0000 On Tue, Apr 12, 2005, Steven Hartland wrote: > ----- Original Message ----- > >There is no "large process detection". The first process that tries > >to fault in a new page after the system runs out of swap gets killed. > > That makes sense. Me trying to connect to see what was going > on would hence cause sshd to be killed ( not good ). > It would seem that we could do with doing something to prevent this. > We have had a few suggestions so far. > 1. Using madvise, requires code changes per app Using madvise doesn't require changes per app, since MADV_PROTECT is inherited across exec. You just have to write a wrapper, much in the spirit of nice(1), to execute a protected version of X. I agree that it's possible to do better, but this has already been discussed several times before, and whenever it comes up, there's always lots of noise because lots of people who don't understand deadlock chime in. If someone really wants to fix this in a reliable way, they need to go off and implement the necessary accounting in the VM system so that we don't overcommit swap. Most of the other suggestions, such as SIGDANGER, are just heuristics that might save your butt if you're lucky. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 09:31:05 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 309D516A4CE for ; Wed, 13 Apr 2005 09:31:05 +0000 (GMT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55C7C43D48 for ; Wed, 13 Apr 2005 09:31:04 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id 264671F15F; Wed, 13 Apr 2005 11:31:03 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id 07AF16132; Wed, 13 Apr 2005 11:31:02 +0200 (CEST) Date: Wed, 13 Apr 2005 11:31:02 +0200 From: Marc Olzheim To: Steven Hartland , =?us-ascii?Q?=3D=3Fus-ascii=3Aiso-8859-1=3FQ=3FSm=3DF8rgrav?= =?us-ascii?B?Pz0=?= , ALeine , freebsd-hackers@FreeBSD.ORG Message-ID: <20050413093102.GA61401@stack.nl> References: <200504121224.j3CCOFXL019177@marlena.vvi.at> <011a01c53f66$4035aa00$b3db87d4@multiplay.co.uk> <86ll7ox7re.fsf@xps.des.no> <020201c53f82$e4b54330$b3db87d4@multiplay.co.uk> <20050412224050.GA20005@VARK.MIT.EDU> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <20050412224050.GA20005@VARK.MIT.EDU> X-Operating-System: FreeBSD hammer.stack.nl 5.4-STABLE FreeBSD 5.4-STABLE X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.9i Subject: Re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 09:31:05 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 12, 2005 at 06:40:50PM -0400, David Schultz wrote: > Using madvise doesn't require changes per app, since MADV_PROTECT > is inherited across exec. You just have to write a wrapper, much > in the spirit of nice(1), to execute a protected version of X. Hmm, that's new to me, but certainly very useful and would do the trick in the case of X. The only problem seems to be that it doesn't seem to be shareable across fork() and that is isn't easily tunable after a process is started. Btw.: Why is this in madvise() and not in rfork() ? Is it because of POSIX ? Any pointers are welcome... Marc --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCXObWezjnobFOgrERAusvAJ9S6QUayqf3TAm/9FeX4SvXwQTAugCfRXXT jPVYLWODVH2NcmXX54vtF5Y= =LQwQ -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb-- From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 14:13:51 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FDE716A4CE for ; Wed, 13 Apr 2005 14:13:51 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [83.167.185.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 706E643D2F for ; Wed, 13 Apr 2005 14:13:50 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id F1292651FC; Wed, 13 Apr 2005 15:13:28 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 48299-02; Wed, 13 Apr 2005 15:13:28 +0100 (BST) Received: from empiric.dek.spc.org (dhcp52.icir.org [192.150.187.52]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 5CA09651EB; Wed, 13 Apr 2005 15:13:19 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 258A062DB; Wed, 13 Apr 2005 07:13:37 -0700 (PDT) Date: Wed, 13 Apr 2005 07:13:36 -0700 From: Bruce M Simpson To: "M. Warner Losh" Message-ID: <20050413141336.GA777@empiric.icir.org> Mail-Followup-To: "M. Warner Losh" , scottl@samsco.org, freebsd-hackers@FreeBSD.ORG References: <20050411082600.GA735@empiric.icir.org> <425A7AB3.7040908@samsco.org> <20050411134817.GA4176@empiric.icir.org> <20050411.112114.36185200.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20050411.112114.36185200.imp@bsdimp.com> cc: freebsd-hackers@FreeBSD.ORG cc: scottl@samsco.org Subject: Re: A question about hot-pluggable PCI. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 14:13:51 -0000 On Mon, Apr 11, 2005 at 11:21:14AM -0600, M. Warner Losh wrote: > No we don't. We use what the BIOS provides, but will lazily allocate > the BARs as necessary. We don't open the resource windows on the > bridges, however. This 'sorta' works now. I program a hard-coded window into the PCI bridge behind CardBus. Drivers attaching to devices behind the bridge are able to get the ranges they need, with the exception of the ATA controller inside the chassis, which I know is a special case for PCI. This of course is a hack which may not work for the !i386 case, as it relies on the HUB-PCI bridge behaviour of Intel chipsets, which is to pass all transactions across (according to some of the comments in pci_pci.c). It turns out interrupt routing is the problem. I don't think it's possible to route an interrupt across CardBus to a downstream PCI bridge in the same way as is usually done for PCI-PCI bridges. When I added the following, I found drivers attaching to devices inside the chassis were able to allocate interrupts and service them:- %%% + if (!strcmp(device_get_name(bus), "cardbus")) + intnum =3D 11; /* Hardcode the IRQ routed to my CardBus bridge */ + else intnum =3D PCIB_ROUTE_INTERRUPT(device_get_parent(bus), pcib, parent_i= ntpin + 1); %%% =2E..whereas normally the code was 'routing' IRQ 6 to INTA on the bridge. I don't see a pcib_route_interrupt method for pccbb, which is the grandpare= nt of the pcib instance I'm attaching. So I check if the devclass of the immed= iate parent is "cardbus". This suggests that the code may have been erroneously routing an interrupt =66rom 1 level up in the PCI bus hierarchy, which would explain why cbb was rejecting drivers downstream asking for IRQ 6 ("my function interrupt is IRQ 11, I have no idea what IRQ 6 is, so I'll reject the allocation"). However, it looks as though this doesn't do the right thing just yet, becau= se drivers panic on detach when calling bus_release_resource() for their IRQ. > : I had also thought of passing down a 'cold' flag, for pcibX to indicate= to > : pciY that this is a 'cold attach' (the BIOS hasn't been anywhere near t= he > : devices behind this bridge -- it is as fresh as after a RST# assert). >=20 > I don't think that's a wise idea. Currently, in pcib_attach(), after the call to pcib_attach_common(), I check to see if sc->secbus is 0. If it is, I call a new function, pcib_attach_cold(), which tries to initialize the bridge as if the BIOS had never touched it. So far this 'kinda' appears to do the right thing; the onboard OHCI control= ler gets its resources OK. I imagine some of the code from this effort could be cleaned up and pushed back into the tree to support other forms of PCI hot-plug in future. BMS From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 14:39:48 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6421516A4CE for ; Wed, 13 Apr 2005 14:39:48 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7331543D58 for ; Wed, 13 Apr 2005 14:39:47 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j3DEcfv4055146; Wed, 13 Apr 2005 08:38:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 13 Apr 2005 08:38:53 -0600 (MDT) Message-Id: <20050413.083853.121220844.imp@bsdimp.com> To: bms@spc.org From: "M. Warner Losh" In-Reply-To: <20050413141336.GA777@empiric.icir.org> References: <20050411134817.GA4176@empiric.icir.org> <20050411.112114.36185200.imp@bsdimp.com> <20050413141336.GA777@empiric.icir.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@FreeBSD.ORG cc: scottl@samsco.org Subject: Re: A question about hot-pluggable PCI. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 14:39:48 -0000 In message: <20050413141336.GA777@empiric.icir.org> Bruce M Simpson writes: : On Mon, Apr 11, 2005 at 11:21:14AM -0600, M. Warner Losh wrote: : > No we don't. We use what the BIOS provides, but will lazily allocate : > the BARs as necessary. We don't open the resource windows on the : > bridges, however. : : This 'sorta' works now. : : I program a hard-coded window into the PCI bridge behind CardBus. Drivers : attaching to devices behind the bridge are able to get the ranges they need, : with the exception of the ATA controller inside the chassis, which I know : is a special case for PCI. : : This of course is a hack which may not work for the !i386 case, as it relies : on the HUB-PCI bridge behaviour of Intel chipsets, which is to pass all : transactions across (according to some of the comments in pci_pci.c). It is possible to make this work without the reliance on the hub-pci behavior. You have to do things in a heirarchical manner, like I've been saying... : It turns out interrupt routing is the problem. I don't think it's possible : to route an interrupt across CardBus to a downstream PCI bridge in the same : way as is usually done for PCI-PCI bridges. Right. CardBus bridges have one interrupt. Period. That's all you get. Everyone gets it. : When I added the following, I found drivers attaching to devices inside the : chassis were able to allocate interrupts and service them:- : : %%% : + if (!strcmp(device_get_name(bus), "cardbus")) : + intnum = 11; /* Hardcode the IRQ routed to my CardBus bridge */ : + else : intnum = PCIB_ROUTE_INTERRUPT(device_get_parent(bus), pcib, parent_intpin + 1); : %%% : : ...whereas normally the code was 'routing' IRQ 6 to INTA on the bridge. : I don't see a pcib_route_interrupt method for pccbb, which is the grandparent : of the pcib instance I'm attaching. So I check if the devclass of the immediate : parent is "cardbus". This is way ugly. Chances are we need to add pcib_route_interrupt to pccbb to make this less gross. It is almost always a layering violation to string compare device names... If you find a bug in other parts of the driver tree, you should fix it there rather than kludge it in another part... : This suggests that the code may have been erroneously routing an interrupt : from 1 level up in the PCI bus hierarchy, which would explain why cbb was : rejecting drivers downstream asking for IRQ 6 ("my function interrupt is : IRQ 11, I have no idea what IRQ 6 is, so I'll reject the allocation"). : : However, it looks as though this doesn't do the right thing just yet, because : drivers panic on detach when calling bus_release_resource() for their IRQ. I think that you have to get pccbb to give you the right resource, rather than kludge around it. The more you kludge, the more you'll find that you get panics... :-) : > : I had also thought of passing down a 'cold' flag, for pcibX to indicate to : > : pciY that this is a 'cold attach' (the BIOS hasn't been anywhere near the : > : devices behind this bridge -- it is as fresh as after a RST# assert). : > : > I don't think that's a wise idea. : : Currently, in pcib_attach(), after the call to pcib_attach_common(), I check : to see if sc->secbus is 0. If it is, I call a new function, : pcib_attach_cold(), which tries to initialize the bridge as if the BIOS : had never touched it. That's closer to ehright thing. : I imagine some of the code from this effort could be cleaned up and pushed : back into the tree to support other forms of PCI hot-plug in future. Some of it sounds like the right thing to do, other parts sound less wise to push back in :-) Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 15:52:36 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A8DC16A4CE for ; Wed, 13 Apr 2005 15:52:36 +0000 (GMT) Received: from mxsf29.cluster1.charter.net (mxsf29.cluster1.charter.net [209.225.28.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B0A543D69 for ; Wed, 13 Apr 2005 15:52:36 +0000 (GMT) (envelope-from c0ldbyte@myrealbox.com) Received: from mxip14.cluster1.charter.net (mxip14a.cluster1.charter.net [209.225.28.144])j3DFqY6L027050 for ; Wed, 13 Apr 2005 11:52:34 -0400 Received: from 24.247.253.134.gha.mi.chartermi.net (HELO eleanor.us1.wmi.uvac.net) (24.247.253.134) by mxip14.cluster1.charter.net with ESMTP; 13 Apr 2005 11:52:32 -0400 X-Ironport-AV: i="3.92,98,1112587200"; d="scan'208"; a="220088962:sNHT13575524" Date: Wed, 13 Apr 2005 11:52:33 -0400 (EDT) From: c0ldbyte To: Scott Long In-Reply-To: <425C309A.8020105@samsco.org> Message-ID: <20050413114322.V363@eleanor.us1.wmi.uvac.net> References: <425C309A.8020105@samsco.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: hackers@freebsd.org Subject: Re: Transitions in FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 15:52:36 -0000 On Tue, 12 Apr 2005, Scott Long wrote: > All, > > I'd like to announce that I'm stepping down from the FreeBSD Core > team. After several months and much thought, I've decided to re-focus > on where my passions lie, which is release engineering and development. > I intend to remain just as visible in the project as I was before the > last election, so please don't think that I'm moving on from FreeBSD. > Quite the opposite is true, in fact. The remaining Core members are > doing a good job of handling the issues of the project, and as per > the by-laws there will not be any action to fill my vacancy at this > time. > > There is no conspiracy here. It's simply a recognition that I was > wearing too many hats, and that some of those hats didn't fit as > comfortably as others. I hope to become more productive in FreeBSD > in the near future; my decision has already given me more time and > energy to work on things like driver locking and ATAPICAM, and I > have some very interesting projects starting in the background that > I'm very excited about. > > Many thanks to those who supported me and my time on team. > > Scott Best regards Scott, Its takes someone real knowledgable to consider what they have and what they want and turn down one to work on another. Some people spend all there time trying to get noticed at what they do and take on things that they are not good at just to get there. From what I read that isnt anywhere or anything that your trying to do, which inturn in itself is a real respectfull act that more people these days should try to follow. So with that being said, I wish you the best of luck on everything your going to encounter in the future. As this bar has been set higher hopefully more people will try to follow this great example. Best of luck & wishes: --c0ldbyte -- ( When in doubt, use brute force. -- Ken Thompson 1998 ) From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 12 15:00:22 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4031C16A556 for ; Tue, 12 Apr 2005 15:00:22 +0000 (GMT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1563043D49 for ; Tue, 12 Apr 2005 15:00:22 +0000 (GMT) (envelope-from bugs@pu.net) Received: from pu.net ([24.1.141.241]) by comcast.net (rwcrmhc13) with ESMTP id <2005041215002101500gvo83e>; Tue, 12 Apr 2005 15:00:21 +0000 Received: (from bugs@localhost) by pu.net (8.13.3/8.11.6) id j3CF0JEI033780 for freebsd-hackers@freebsd.org; Tue, 12 Apr 2005 10:00:19 -0500 (CDT) (envelope-from bugs) From: Mark Hittinger Message-Id: <200504121500.j3CF0JEI033780@pu.net> To: freebsd-hackers@freebsd.org Date: Tue, 12 Apr 2005 10:00:10 -0500 (CDT) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 13 Apr 2005 16:22:14 +0000 Subject: re: kernel killing processes when out of swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 15:00:22 -0000 I've often wondered why swap doesn't have a root-only x% like the file system. Once the swap used reached 100% user processes would bomb but a root process could go ahead and use the secret x%. Another idea would be to have multiple swap files and implement a way to restrict one swap area to a specific GID (say wheel). While on the issue we could also reserve a range of process ID's for wheel group only. To always be able to log on and un-wedge a system would be most convenient. Later Mark Hittinger bugs@pu.net From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 17:25:37 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16C1F16A4CE for ; Wed, 13 Apr 2005 17:25:37 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id A05E843D54 for ; Wed, 13 Apr 2005 17:25:36 +0000 (GMT) (envelope-from mrparsons@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so205806rng for ; Wed, 13 Apr 2005 10:25:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bFq752yPDJVl4+JXY6U4ediK2ne/LU53+TzCGlhAjWieEMz3hLzJAa8sdomf3Gt/XjtTgSHbVu85XlB1/Xb0Y/gBsd4I/cJlEiUsBbaEeb6oTjhhaj/3SC4KmkG58LZAUhJphME1KOcurRJgCaS7s4aWvQTGvB+Y9iyjkT++eKw= Received: by 10.38.68.47 with SMTP id q47mr765511rna; Wed, 13 Apr 2005 10:25:12 -0700 (PDT) Received: by 10.38.86.22 with HTTP; Wed, 13 Apr 2005 10:25:11 -0700 (PDT) Message-ID: Date: Wed, 13 Apr 2005 13:25:11 -0400 From: "M. Parsons" To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "M. Parsons" List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 17:25:37 -0000 To access my dsl modem's line stats page, I have to create an arp entry and a route for it, under linux this was done as: (eth1 connected directly to dsl modem) ifconfig eth1 10.0.0.2 netmask 255.255.255.0 route add 10.0.0.1 dev eth1 arp -s 10.0.0.1 ffffffffffffffffff (not really fffff, but the MAC address of the dsl modem, NOT the nic). unfortunately, I cant seem to figure out the commands to get this to work under FreeBSD 5.3 Ifconfig is simple enough (replace eth1 with de0 in my case) Arp seems the same (except it needs colons) But the route command I have no clue. It doesnt seem to follow the same syntax as linux, and I havent figured out the correct syntax yet. Any help? Thanks, Mark From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 18:30:41 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C32716A4CE for ; Wed, 13 Apr 2005 18:30:41 +0000 (GMT) Received: from hotmail.com (bay10-f2.bay10.hotmail.com [64.4.37.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 417D943D1F for ; Wed, 13 Apr 2005 18:30:41 +0000 (GMT) (envelope-from ghanekar_rajesh@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 13 Apr 2005 11:30:41 -0700 Message-ID: Received: from 202.54.11.72 by by10fd.bay10.hotmail.msn.com with HTTP; Wed, 13 Apr 2005 18:30:40 GMT X-Originating-IP: [202.54.11.72] X-Originating-Email: [ghanekar_rajesh@hotmail.com] X-Sender: ghanekar_rajesh@hotmail.com From: "Rajesh Ghanekar" To: freebsd-hackers@freebsd.org Date: Thu, 14 Apr 2005 00:00:40 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 13 Apr 2005 18:30:41.0164 (UTC) FILETIME=[E57FA4C0:01C54056] Subject: not able to get controlling tty X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 18:30:41 -0000 Hi, I have a program which prints the name of the controlling terminal. The code snippet is as follows: int main(int argc, char **argv) { int mib[4], len; struct kinfo_proc buf; udev_t ttydev; register struct dirent *dirp; register DIR *dp; struct stat dsb; char namebuf[sizeof(PATH_DEV) + MAXNAMLEN]; mib[0] = CTL_KERN; mib[1] = KERN_PROC; mib[2] = KERN_PROC_PID; mib[3] = getpid(); len = sizeof (buf); sysctl(mib, 4, &buf, &len, NULL, 0); ttydev = buf.kp_eproc.e_tdev; printf("ttydev is %u, major = %d, minor = %d\n", ttydev, major(ttydev), minor(ttydev)); if (!(dp = opendir(PATH_DEV))) return 1; strlcpy(namebuf, PATH_DEV, sizeof(PATH_DEV)); while ((dirp = readdir(dp))) { memset(namebuf + sizeof(PATH_DEV) - 1, '\0', MAXNAMLEN - sizeof(PATH_DEV) + 1); memcpy(namebuf + sizeof(PATH_DEV) - 1, dirp->d_name, dirp->d_namlen + 1); if (stat(namebuf, &dsb) || (dsb.st_rdev != ttydev)) continue; printf("OK found\n"); break; } } The value returned by buf.kp_eproc.e_tdev doesn't seems to be right. #/tmp/abc ttydev is 30479, major = 119, minor = 15 Device name is /dev/log # /tmp/abc ttydev is 30577, major = 119, minor = 113 Device name is /dev/log ttydev keeps on changing every time I run same program on same terminal. Is there any way to get terminal device (udev_t) from struct kinfo_proc? - Rajesh _________________________________________________________________ Marriages at Bharatmatriony.com http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Relationships that last forever From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 18:58:23 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3F5E16A4CE for ; Wed, 13 Apr 2005 18:58:22 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id A291843D5E for ; Wed, 13 Apr 2005 18:58:22 +0000 (GMT) (envelope-from slawek.zak@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so420679nzo for ; Wed, 13 Apr 2005 11:58:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EOX8rEjxs0x1GIGmc5wlYpp1LbXVnpS2DBJDeenefsjmO8cyBFp62SJP0p9ibOD5avJ8dAn2tkJbkrzfIC/Hw1yTdqj6kDLzqxmt+KFBCSeA+0K2ZJh9JOW3EGUQ4j/ynpNWdt19MmGN6SqEfLSFgeZc85hGORG2UkPZTcy2C44= Received: by 10.36.82.19 with SMTP id f19mr58651nzb; Wed, 13 Apr 2005 11:58:22 -0700 (PDT) Received: by 10.36.88.17 with HTTP; Wed, 13 Apr 2005 11:58:22 -0700 (PDT) Message-ID: <787bbe1c050413115849ddb7ce@mail.gmail.com> Date: Wed, 13 Apr 2005 20:58:22 +0200 From: =?ISO-8859-2?Q?S=B3awek_=AFak?= To: freebsd-hackers@freebsd.org In-Reply-To: <787bbe1c0504130928208c6057@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: base64 Content-Disposition: inline References: <787bbe1c0504130928208c6057@mail.gmail.com> Subject: Performance trouble on AMD64 webserver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: =?ISO-8859-2?Q?S=B3awek_=AFak?= List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 18:58:23 -0000 SGksCgpJJ3ZlIGFuIDIgcHJvY2Vzc29yIE9wdGVyb24gc2VydmVyIChTdW4gdjIweikgd2l0aCA0 R0Igb2YgUkFNLiBJdCBydW5zCkZyZWVCU0QgNS40LVBSRVJFTEVBU0UuIEV2ZXJ5dGhpbmcgaXMg cm9zZXMgZm9yIDEtMiBtaW51dGVzIGFmdGVyCnN0YXJ0aW5nIEFwYWNoZS4gVGhlbiB0aGUgc2Vy dmVyIGZyZWV6ZXMgZm9yIDEwLTIwIHNlY29uZHMgdGhlbgpyZXN1bWVzIG5vcm1hbCBvcGVyYXRp b24gYW5kIGNob2tlcyBldmVyeSBjb3VwbGUgb2YgbWludXRlcy4gSSB0cmllZAp3aXRoIDUxMiBh bmQgMTAyNCBodHRwZCBwcm9jZXNzZXMgcnVubmluZy4gSXQgaXMgYSBmYWlybHkgZHluYW1pYwp3 ZWJwYWdlLiBBcGFjaGUgaXMgY291cGxlZCB3aXRoIG1vZF9waHAuIEVhY2ggcHJvY2VzcyB0YWtl cyAxOC0xOU1CIG9mCnJlc2lkZW50IG1lbW9yeS4KCkkgd2FzIHR1bmluZyB0aGUgbWFjaGluZSBh ZnRlciBnZXR0aW5nIHRoZSBuZWZhcmlvdXMgImNvbGxlY3RuZyBQVgplbnRyaWVzIC4uLiIgbWVz c2FnZS4gSSB0cmllZCB0byBpbmNyZWFzZSBQTUFQX1NIUEdQRVJQUk9DIGFuZCBhbGwuIEl0CmRv ZXNuJ3QgbWFrZSB0aGUgcGVyZm9ybWFuY2UgYmV0dGVyLgoKU25hcHNob3Qgb2Ygdm1zdGF0IC16 IGdpdmVzOgouLi4KUFYgRU5UUlk6ICAgICAgICAgNDgsICA0MzEyODcyLCAxNjExNDQwLCA2MTYz ODQsICA4NjU3MTUxCgpUaGUgZnJlZSB2YWx1ZSBkZWNyZWFzZXMgdG8gc29tZXRoaW5nIGNsb3Nl IHRvIDAgdGhlbiB0aGUgbWFjaGluZQpjaG9rZXMgdG8gZ2V0IGJhY2sgdXAgdG8gc29tZSBsYXJn ZSB2YWx1ZS4KCk15IGxvYWRlci5jb25mOgoKYWNjZl9kYXRhX2xvYWQ9IllFUyIKYWNjZl9odHRw X2xvYWQ9IllFUyIKCmtlcm4uaXBjLm5tYmNsdXN0ZXJzPSIxMzEwNzIiCmtlcm4ubWF4dXNlcnM9 IjEwMjQiCgpUaGUgc3lzY3RsLmNvbmY6CgprZXJuLmlwYy5zb21heGNvbm49MTAyNAoKVGhlIGN1 c3RvbWl6ZWQgcGFydCBvZiBrZXJuZWwgY29uZmlnOgoKb3B0aW9ucyAgICAgICAgIFZNX0JDQUNI RV9TSVpFX01BWD0iKDUwMCoxMDI0KjEwMjQpIgpvcHRpb25zICAgICAgICAgTUFYRFNJWj0iKDEw MDAqMTAyNCoxMDI0KSIKb3B0aW9ucyAgICAgICAgIE1BWFNTSVo9IigxMDAwKjEwMjQqMTAyNCki Cm9wdGlvbnMgICAgICAgICBERkxEU0laPSIoMTAwMCoxMDI0KjEwMjQpIgoKb3B0aW9ucyAgICAg ICAgIFBNQVBfU0hQR1BFUlBST0M9NDA5NgpvcHRpb25zICAgICAgICAgUE1BUF9TSFBHUEVSUFJP Qz0xNjM4NAoKb3B0aW9ucyAgICAgICAgIFNITUFMTD0xMzEwNzIKb3B0aW9ucyAgICAgICAgIFNI TU1BWFBHUz0xMzEwNzIKCkkndmUgYWxzbyByZW1vdmVkIGxvdHMgb2YgU0NTSSBoYXJkd2FyZSwg V2lmaSBhbmQgVVNCIHBhcnRzIHdoaWNoIEkKZG9uJ3QgbmVlZCBmcm9tIHRoZSBHRU5FUklDIGNv bmZpZy4KCkFueSBJZGVhcyBob3cgdG8gbWFrZSBpdCB3b3JrPwoKVGhhbmtzLCAvUwotLQpTs2F3 ZWsgr2FrIC8gVU5JWCBTeXN0ZW1zIEFkbWluaXN0cmF0b3IK From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 20:12:22 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92F4916A4CE for ; Wed, 13 Apr 2005 20:12:22 +0000 (GMT) Received: from BASE.OTEL.net (BASE.OTEL.net [212.36.8.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id F16AC43D48 for ; Wed, 13 Apr 2005 20:12:21 +0000 (GMT) (envelope-from tbyte@OTEL.net) Received: from dragon.otel.net ([212.36.8.135]) by BASE.OTEL.net with esmtp (Exim 4.30; FreeBSD) id 1DLoDk-0003Fv-K8; Wed, 13 Apr 2005 23:12:20 +0300 Message-ID: <425D7D24.6020308@OTEL.net> Date: Wed, 13 Apr 2005 23:12:20 +0300 From: Iasen Kostov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050321 X-Accept-Language: bg, en-us, en MIME-Version: 1.0 To: "M. Parsons" 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: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 20:12:22 -0000 M. Parsons wrote: >To access my dsl modem's line stats page, I have to create an arp >entry and a route for it, under linux this was done as: (eth1 >connected directly to dsl modem) > >ifconfig eth1 10.0.0.2 netmask 255.255.255.0 >route add 10.0.0.1 dev eth1 > > route add -net 10.0.0.1/32 -iface de0 -cloning But 'ifconfig de0 10.0.0.2 netmask 255.255.255.0' (or ifconfig de0 10.0.0.2/24) should set a 10.0.0.0/24 route via de0 why would you want to set it again ? >arp -s 10.0.0.1 ffffffffffffffffff (not really fffff, but the MAC >address of the dsl modem, NOT the nic). > >unfortunately, I cant seem to figure out the commands to get this to >work under FreeBSD 5.3 > >Ifconfig is simple enough (replace eth1 with de0 in my case) > >Arp seems the same (except it needs colons) > >But the route command I have no clue. It doesnt seem to follow the >same syntax as linux, and I havent figured out the correct syntax yet. > >Any help? > >Thanks, > >Mark >_______________________________________________ >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 Wed Apr 13 20:39:05 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2D2416A4CE for ; Wed, 13 Apr 2005 20:39:05 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0245543D41 for ; Wed, 13 Apr 2005 20:39:05 +0000 (GMT) (envelope-from mrparsons@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so248060rng for ; Wed, 13 Apr 2005 13:39:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RXQo6e3mJHDwtnNSb4GV87X4jV6MGxQnz67fBayRWktBDf+xIiTf+usgGTLkDpReQp7dqNy1/2gBUSQ1aiEQa1zzv/FSnEv1Ngb3QIs2H/ny/dh0wNMOjrXB+3Q0/ifHVkaCAiicF0PkMD7SdR2JrBlhh1uQnY3qZzGUjE8XNF4= Received: by 10.38.125.64 with SMTP id x64mr114264rnc; Wed, 13 Apr 2005 13:39:01 -0700 (PDT) Received: by 10.38.86.22 with HTTP; Wed, 13 Apr 2005 13:38:59 -0700 (PDT) Message-ID: Date: Wed, 13 Apr 2005 16:38:59 -0400 From: "M. Parsons" To: freebsd-hackers@freebsd.org In-Reply-To: <425D7D24.6020308@OTEL.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <425D7D24.6020308@OTEL.net> Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "M. Parsons" List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 20:39:05 -0000 On 4/13/05, Iasen Kostov wrote: > M. Parsons wrote: >=20 > >To access my dsl modem's line stats page, I have to create an arp > >entry and a route for it, under linux this was done as: (eth1 > >connected directly to dsl modem) > > > >ifconfig eth1 10.0.0.2 netmask 255.255.255.0 > >route add 10.0.0.1 dev eth1 > > > > > route add -net 10.0.0.1/32 -iface de0 -cloning >=20 > But 'ifconfig de0 10.0.0.2 netmask 255.255.255.0' (or ifconfig de0 > 10.0.0.2/24) should set a 10.0.0.0/24 route via de0 why would you want > to set it again ? >=20 > >arp -s 10.0.0.1 ffffffffffffffffff (not really fffff, but the MAC > >address of the dsl modem, NOT the nic). > > > >unfortunately, I cant seem to figure out the commands to get this to > >work under FreeBSD 5.3 > > > >Ifconfig is simple enough (replace eth1 with de0 in my case) > > > >Arp seems the same (except it needs colons) > > > >But the route command I have no clue. It doesnt seem to follow the > >same syntax as linux, and I havent figured out the correct syntax yet. > > > >Any help? > > > >Thanks, > > > >Mark Honestly I have no clue why its not working, it should be simple, but it isnt.. Here is what the arp cache shows and the routing table (and its ed0, not de0, my mistake in original message). arp: (after doing the arp -s command) modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] this looks right doesnt it? route: default mydslgateway UGS 0 8173 tun0 10/24 link#1 UC 0 0 ed0 modem 00:0b:23:2a:b0:c4 UHLS 0 4 ed0 =3D> 10.0.0.1/32 link#1 UCS 0 0 ed0 no idea here? 3 for ed0? is that right? note, ed0 is also creating the tun0 device (pppoe), but that was never a problem in linux. Im just confused. :( Its not a big deal, as its only my dsl line stats, but still confused why it aint working For the record, http://www.broadbandreports.com/faq/9693 is the page on how you access the line stats, and the MAC part is required for my modem. Thanks for all the help Mark From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 20:48:54 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8E5D16A4CE for ; Wed, 13 Apr 2005 20:48:54 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8500643D49 for ; Wed, 13 Apr 2005 20:48:54 +0000 (GMT) (envelope-from opensource.enthousiat@gmail.com) Received: by zproxy.gmail.com with SMTP id 16so129080nzp for ; Wed, 13 Apr 2005 13:48:53 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=E/sIEZ1vgL0tVei3ZCJwd7uxAt8A6y0K0zLSsoxseL5nZgbmF6W/5bX9KvyZehW+JJVFIiJgxjk6yiTQYmHEYCaI8D81t5+sTnYRbMrTMHE9Y3weyQghwhsxyIIn3jgIGdagSAZCxMJHIbMF93pjENvV9xG0bABKjy8EmoXbKwI= Received: by 10.36.82.19 with SMTP id f19mr66402nzb; Wed, 13 Apr 2005 13:48:53 -0700 (PDT) Received: by 10.36.109.8 with HTTP; Wed, 13 Apr 2005 13:48:53 -0700 (PDT) Message-ID: <37e13166050413134839311008@mail.gmail.com> Date: Wed, 13 Apr 2005 16:48:53 -0400 From: Aziz KEZZOU To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: clear/set/test_bit header ?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Aziz KEZZOU List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 20:48:55 -0000 Hi hackers, I am trying to port a software from Linux to FreeBSD (5.3). But, I can't find the equivalent header in FreeBSD of in Linux ? Here are the prototypes of the functions I am using: int clear_bit(int offset, int * flag); int set_bit(int offset, int * flag); int test_bit(int offset, int * flag); Any hints? Also if you know about a website which does this header-mapping (Linux<->FreeBSD), I am interested to know about it ;-) Thanks, -aziz From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 20:57:50 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE73F16A4CE for ; Wed, 13 Apr 2005 20:57:50 +0000 (GMT) Received: from BASE.OTEL.net (BASE.OTEL.net [212.36.8.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9661F43D2D for ; Wed, 13 Apr 2005 20:57:50 +0000 (GMT) (envelope-from tbyte@OTEL.net) Received: from dragon.otel.net ([212.36.8.135]) by BASE.OTEL.net with esmtp (Exim 4.30; FreeBSD) id 1DLovl-0003SM-LY; Wed, 13 Apr 2005 23:57:49 +0300 Message-ID: <425D87CD.2020504@OTEL.net> Date: Wed, 13 Apr 2005 23:57:49 +0300 From: Iasen Kostov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050321 X-Accept-Language: bg, en-us, en MIME-Version: 1.0 To: "M. Parsons" References: <425D7D24.6020308@OTEL.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 20:57:51 -0000 M. Parsons wrote: > > > >Honestly I have no clue why its not working, it should be simple, but >it isnt.. Here is what the arp cache shows and the routing table (and >its ed0, not de0, my mistake in original message). > >arp: (after doing the arp -s command) > >modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] > > > Why do you set mac address static at all ? From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 21:33:27 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62E9C16A4CE for ; Wed, 13 Apr 2005 21:33:27 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id B295343D5D for ; Wed, 13 Apr 2005 21:33:26 +0000 (GMT) (envelope-from mrparsons@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so258647rng for ; Wed, 13 Apr 2005 14:33:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Dgkj/UytIClJ79OAzQ28EnBi4B+xCL3jK4KOUZmyuJEmZWQoSOzhIhQfxkC1IcdcxeRaKYcWn8Vg42iuxE1mXYpYVRV6VMIo3QoAPAjMjDMuNv/vqZj/wrVub/8cDeLFWeQ5Q0EpIRABnKGFMNuddx0snHZGG5xE+2z98IJTUuA= Received: by 10.38.86.53 with SMTP id j53mr1059634rnb; Wed, 13 Apr 2005 14:33:24 -0700 (PDT) Received: by 10.38.86.22 with HTTP; Wed, 13 Apr 2005 14:33:24 -0700 (PDT) Message-ID: Date: Wed, 13 Apr 2005 17:33:24 -0400 From: "M. Parsons" To: freebsd-hackers@freebsd.org In-Reply-To: <425D87CD.2020504@OTEL.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <425D87CD.2020504@OTEL.net> Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "M. Parsons" List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 21:33:27 -0000 On 4/13/05, Iasen Kostov wrote: > M. Parsons wrote: >=20 > > > > > > > >Honestly I have no clue why its not working, it should be simple, but > >it isnt.. Here is what the arp cache shows and the routing table (and > >its ed0, not de0, my mistake in original message). > > > >arp: (after doing the arp -s command) > > > >modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] > > > > > > > Why do you set mac address static at all ? >=20 >=20 Huh? I dont understand what youre saying. The only command I typed was arp -s 10.0.0.1 00:0b:23:2a:b0:c4 , which creates the arp address I should want. (my modems mac address is 00:0b:etc) The only thing I can possibly seeing as being screwed up, is seeing as I have a default gateway, when I do a "telnet 10.0.0.1" its using my internet gateway instead of the ed0 device. Which is why I thought I needed a route command to force a 10.0.0.1 connection to go through ed0. (linux needed the route command...) Oh well, Ive probably confused you, and myself as well. :-) Mark From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 22:03:56 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC2C516A4CE for ; Wed, 13 Apr 2005 22:03:56 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C3C743D2D for ; Wed, 13 Apr 2005 22:03:56 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j3DM3uHZ051055; Wed, 13 Apr 2005 17:03:56 -0500 (CDT) (envelope-from dan) Date: Wed, 13 Apr 2005 17:03:55 -0500 From: Dan Nelson To: Aziz KEZZOU Message-ID: <20050413220355.GF4842@dan.emsphone.com> References: <37e13166050413134839311008@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37e13166050413134839311008@mail.gmail.com> X-OS: FreeBSD 5.4-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-hackers@freebsd.org Subject: Re: clear/set/test_bit header ?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 22:03:57 -0000 In the last episode (Apr 13), Aziz KEZZOU said: > Hi hackers, > I am trying to port a software from Linux to FreeBSD (5.3). But, I > can't find the equivalent header in FreeBSD of in Linux > ? > > Here are the prototypes of the functions I am using: > int clear_bit(int offset, int * flag); > int set_bit(int offset, int * flag); > int test_bit(int offset, int * flag); > > Any hints? Try the macros in ; see the bitstring manpage for usage. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 23:22:10 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8724116A4CE; Wed, 13 Apr 2005 23:22:10 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FEA443D39; Wed, 13 Apr 2005 23:22:07 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [10.0.0.20] ([151.196.164.10]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j3DNPBaZ048017; Wed, 13 Apr 2005 17:25:11 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <425DA8D3.3020505@samsco.org> Date: Wed, 13 Apr 2005 17:18:43 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org, current@freebsd.org References: <20050413061639.GK84649@wantadilla.lemis.com> In-Reply-To: <20050413061639.GK84649@wantadilla.lemis.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.9 required=3.8 tests=PLING_QUERY autolearn=no version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Subject: Help Wanted! [Re: Does anybody use gdb for kernel debugging any more?] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 23:22:10 -0000 [Resending to get wider coverage] All, While there are ways to work around some of the problems that Greg describes, the simple fact is that kernel debugging has gone downhill quite badly in the past year. Much of this decay appears to be due to the rush to get GDB 6.x imported in time for FreeBSD 5.3. I thank Marcel profusely for working on this, but more work is needed. I'm looking for volunteers to spend a few evenings digging into GDB, KDB, and DDB and working out as many issues as possible. Greg's email should serve as a good starting point for these tasks. Thanks, Scott Greg 'groggy' Lehey wrote: > In the last 10 months, I've had continual problems trying to use gdb > for kernel debugging. I'm currently revising my notes for the BSDCan > tutorial, and I can't work out how to get it to work any more. Since > about June of last year I've discovered: > > - I can no longer get a dump out of ddb with the 'panic' command. I > need to 'call doadump' > > - 'panic' doesn't only not do a dump, it doesn't reset the system > either. I need to press 'reset'. > > - The invocation to do kernel debugging with gdb keeps changing. A > year ago, it was simple: 'gdb -k kernel dump'. Now the -k command > is gone, and on what I believe to be a valid kernel dump, kgdb gives > me: > > # kgdb kernel.debug /var/crash/vmcore.1 > kgdb: cannot read PTD > > - It's possible that the dump isn't valid after all, of course. But I > can't debug the local system via /dev/mem either: > > # kgdb kernel.debug /dev/mem > [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"] > > (kgdb) bt > #0 0x00000000 in ?? () > > - Firewire debugging no longer works if you haven't compiled firewire > into the kernel. Given the bugs I've seen above, I can't be > bothered to try building a kernel with firewire, since I don't have > much expectation that it will work either way. > > So what gives? Has the gdb interface withered away due to lack of > love? Do *you* use it? If so, how do you address the issues above? > > Greg > -- > See complete headers for address and phone numbers. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 13 23:38:55 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3C1F16A4CE for ; Wed, 13 Apr 2005 23:38:55 +0000 (GMT) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5480843D54 for ; Wed, 13 Apr 2005 23:38:55 +0000 (GMT) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.13.3/8.13.1) with ESMTP id j3DNctr4072516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Apr 2005 16:38:55 -0700 (PDT) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.13.3/8.13.3/Submit) id j3DNctL8072515; Wed, 13 Apr 2005 16:38:55 -0700 (PDT) (envelope-from steve) Message-Id: <200504132338.j3DNctL8072515@wattres.watt.com> X-Newsgroups: local.freebsd-hackers In-Reply-To: References: <425D87CD.2020504@OTEL.net> Organization: Watt Consultants From: steve@Watt.COM (Steve Watt) Date: Wed, 13 Apr 2005 16:38:55 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: mrparsons@gmail.com X-Archived: 1113435535.107883441@wattres.Watt.COM X-Virus-Scanned: ClamAV 0.83/827/Wed Apr 13 14:02:27 2005 on wattres.Watt.COM X-Virus-Status: Clean cc: freebsd-hackers@freebsd.org Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 23:38:55 -0000 In article you write: >On 4/13/05, Iasen Kostov wrote: >> M. Parsons wrote: >> > >> >Honestly I have no clue why its not working, it should be simple, but >> >it isnt.. Here is what the arp cache shows and the routing table (and >> >its ed0, not de0, my mistake in original message). >> > >> >arp: (after doing the arp -s command) >> > >> >modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] >> > >> Why do you set mac address static at all ? > >Huh? I dont understand what youre saying. He's wondering why ARP doesn't just work. >The only command I typed was arp -s 10.0.0.1 00:0b:23:2a:b0:c4 , which >creates the arp address I should want. (my modems mac address is >00:0b:etc) > >The only thing I can possibly seeing as being screwed up, is seeing as >I have a default gateway, when I do a "telnet 10.0.0.1" its using my >internet gateway instead of the ed0 device. Which is why I thought I >needed a route command to force a 10.0.0.1 connection to go through >ed0. (linux needed the route command...) > >Oh well, Ive probably confused you, and myself as well. :-) I think you're trying to over-complexify the problem. All you really need to do is: # ifconfig ed0 alias 10.0.0.2/24 # telnet 10.0.0.1 No silly route commands, no forcing of ARP. Just add the IP address to the interface and do your connect. My guess is that the same is true in Linux, but I don't know the exact syntax there. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9" Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices... From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 00:28:09 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AD5916A4CE for ; Thu, 14 Apr 2005 00:28:09 +0000 (GMT) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DD8143D41 for ; Thu, 14 Apr 2005 00:28:08 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id E14EB1704A for ; Wed, 13 Apr 2005 21:28:06 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 88951-02 for ; Wed, 13 Apr 2005 21:28:03 -0300 (BRT) Received: from [10.0.8.17] (nat.int.gov.br [200.20.196.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id 718F517017 for ; Wed, 13 Apr 2005 21:28:03 -0300 (BRT) Message-ID: <425DB913.1080302@jonny.eng.br> Date: Wed, 13 Apr 2005 21:28:03 -0300 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050315) MIME-Version: 1.0 To: hackers@freebsd.org X-Enigmail-Version: 0.90.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at coe.ufrj.br Subject: SATA NCQ by software? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 00:28:09 -0000 Hi, To use the advantages of SATA NCQ, do I have to use a specific controller, or is this only a software matter? From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 00:31:22 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4AD916A4CE for ; Thu, 14 Apr 2005 00:31:22 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0965F43D1D for ; Thu, 14 Apr 2005 00:31:22 +0000 (GMT) (envelope-from mrparsons@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so283068rng for ; Wed, 13 Apr 2005 17:31:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AXskn47MLFv1wQ2nrBirwWcvS5fCnunHL9bWBTFDX6v6+nna5aCPkj82c1KA6ZmFFmv5w2FlJ4VcFK0Al8CNF7260vzAOB+HvI9hxD0wLy/4SysLdAZzB1lymXZGvGVE0bk+uoF1AssQIt0Z4JoSTdIhNdw++hjiGRF3aMg0uug= Received: by 10.38.125.64 with SMTP id x64mr258071rnc; Wed, 13 Apr 2005 17:30:29 -0700 (PDT) Received: by 10.38.86.22 with HTTP; Wed, 13 Apr 2005 17:30:28 -0700 (PDT) Message-ID: Date: Wed, 13 Apr 2005 20:30:28 -0400 From: "M. Parsons" To: freebsd-hackers@freebsd.org In-Reply-To: <200504132338.j3DNctL8072515@wattres.watt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <425D87CD.2020504@OTEL.net> <200504132338.j3DNctL8072515@wattres.watt.com> Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "M. Parsons" List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 00:31:22 -0000 On 4/13/05, Steve Watt wrote: > In article you write: > >On 4/13/05, Iasen Kostov wrote: > >> M. Parsons wrote: > >> > > >> >Honestly I have no clue why its not working, it should be simple, but > >> >it isnt.. Here is what the arp cache shows and the routing table (and > >> >its ed0, not de0, my mistake in original message). > >> > > >> >arp: (after doing the arp -s command) > >> > > >> >modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] > >> > > >> Why do you set mac address static at all ? > > > >Huh? I dont understand what youre saying. >=20 > He's wondering why ARP doesn't just work. >=20 > >The only command I typed was arp -s 10.0.0.1 00:0b:23:2a:b0:c4 , which > >creates the arp address I should want. (my modems mac address is > >00:0b:etc) > > > >The only thing I can possibly seeing as being screwed up, is seeing as > >I have a default gateway, when I do a "telnet 10.0.0.1" its using my > >internet gateway instead of the ed0 device. Which is why I thought I > >needed a route command to force a 10.0.0.1 connection to go through > >ed0. (linux needed the route command...) > > > >Oh well, Ive probably confused you, and myself as well. :-) >=20 > I think you're trying to over-complexify the problem. All > you really need to do is: >=20 > # ifconfig ed0 alias 10.0.0.2/24 > # telnet 10.0.0.1 >=20 > No silly route commands, no forcing of ARP. Just add the IP > address to the interface and do your connect. My guess is > that the same is true in Linux, but I don't know the exact > syntax there. >=20 Because that just doesnt work, like ive mentioned above, I have to force a different MAC address into the ARP table. http://www.dslreports.com/faq/9693 is what im trying to accomplish. su-2.05b# ifconfig ed0 alias 10.0.0.2/24 su-2.05b# telnet 10.0.0.1 Trying 10.0.0.1... ^C su-2.05b# arp -s 10.0.0.1 00:0b:23:2a:b0:c4 su-2.05b# telnet 10.0.0.1 Trying 10.0.0.1... ^C oh well, I thank all you guys for trying to help, its just not working, and Im not going to waste any more of your guys time on it. Great to see helpful people in the mailing list, so Im going to stick around. :-) And for the record, the linux commands are: (and these commands work, as Ive used it for months in this setup): ifconfig eth1 10.0.0.2 netmask 255.255.255.0 route add 10.0.0.1 dev eth1 arp -s 10.0.0.1 000b232ab0c4 Mark From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 00:49:28 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F73716A4CE for ; Thu, 14 Apr 2005 00:49:28 +0000 (GMT) Received: from duchess.speedfactory.net (duchess.speedfactory.net [66.23.201.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 98F0943D45 for ; Thu, 14 Apr 2005 00:49:27 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 21739 invoked by uid 89); 14 Apr 2005 00:49:26 -0000 Received: from duchess.speedfactory.net (66.23.201.84) by duchess.speedfactory.net with SMTP; 14 Apr 2005 00:49:26 -0000 Received: (qmail 21720 invoked by uid 89); 14 Apr 2005 00:49:25 -0000 Received: from unknown (HELO palm.tree.com) (66.23.216.49) by duchess.speedfactory.net with SMTP; 14 Apr 2005 00:49:25 -0000 Received: from [127.0.0.1] (localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j3E0nOw6087312; Wed, 13 Apr 2005 20:49:24 -0400 (EDT) (envelope-from ups@tree.com) From: Stephan Uphoff To: "M. Parsons" In-Reply-To: References: Content-Type: text/plain Message-Id: <1113439764.7457.55947.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 13 Apr 2005 20:49:24 -0400 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 00:49:28 -0000 On Wed, 2005-04-13 at 16:38, M. Parsons wrote: > On 4/13/05, Iasen Kostov wrote: > > M. Parsons wrote: > > > > >To access my dsl modem's line stats page, I have to create an arp > > >entry and a route for it, under linux this was done as: (eth1 > > >connected directly to dsl modem) > > > > > >ifconfig eth1 10.0.0.2 netmask 255.255.255.0 > > >route add 10.0.0.1 dev eth1 > > > > > > > > route add -net 10.0.0.1/32 -iface de0 -cloning > > > > But 'ifconfig de0 10.0.0.2 netmask 255.255.255.0' (or ifconfig de0 > > 10.0.0.2/24) should set a 10.0.0.0/24 route via de0 why would you want > > to set it again ? > > > > >arp -s 10.0.0.1 ffffffffffffffffff (not really fffff, but the MAC > > >address of the dsl modem, NOT the nic). > > > > > >unfortunately, I cant seem to figure out the commands to get this to > > >work under FreeBSD 5.3 > > > > > >Ifconfig is simple enough (replace eth1 with de0 in my case) > > > > > >Arp seems the same (except it needs colons) > > > > > >But the route command I have no clue. It doesnt seem to follow the > > >same syntax as linux, and I havent figured out the correct syntax yet. > > > > > >Any help? > > > > > >Thanks, > > > > > >Mark > > > Honestly I have no clue why its not working, it should be simple, but > it isnt.. Here is what the arp cache shows and the routing table (and > its ed0, not de0, my mistake in original message). > > arp: (after doing the arp -s command) > > modem (10.0.0.1) at 00:0b:23:2a:b0:c4 on ed0 permanent [ethernet] > > this looks right doesnt it? > > route: > > default mydslgateway UGS 0 8173 tun0 > 10/24 link#1 UC 0 0 ed0 > modem 00:0b:23:2a:b0:c4 UHLS 0 4 ed0 => > 10.0.0.1/32 link#1 UCS 0 0 ed0 > > no idea here? 3 for ed0? is that right? > > note, ed0 is also creating the tun0 device (pppoe), but that was never > a problem in linux. I was under the impression (but would need to check to make sure) that all incoming packets are diverted to ng_pppoe when it is hooked into the Ethernet interface. This would explain your problems. Can you try this without the interface being used for PPPOE? > > Im just confused. :( > > Its not a big deal, as its only my dsl line stats, but still confused > why it aint working > > For the record, http://www.broadbandreports.com/faq/9693 is the page > on how you access the line stats, and the MAC part is required for my > modem. > > Thanks for all the help > > Mark > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 06:48:35 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 589EE16A4CE for ; Thu, 14 Apr 2005 06:48:35 +0000 (GMT) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CC1943D41 for ; Thu, 14 Apr 2005 06:48:34 +0000 (GMT) (envelope-from sos@DeepCore.dk) Received: from [194.192.25.143] (laptop.deepcore.dk [194.192.25.143]) by spider.deepcore.dk (8.13.3/8.13.3) with ESMTP id j3E6mVbU075298; Thu, 14 Apr 2005 08:48:31 +0200 (CEST) (envelope-from sos@DeepCore.dk) Message-ID: <425E11DA.9040006@DeepCore.dk> Date: Thu, 14 Apr 2005 08:46:50 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Mozilla Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= References: <425DB913.1080302@jonny.eng.br> In-Reply-To: <425DB913.1080302@jonny.eng.br> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-mail-scanned: by DeepCore Virus & Spam killer v1.12 cc: hackers@freebsd.org Subject: Re: SATA NCQ by software? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 06:48:35 -0000 Jo=E3o Carlos Mendes Lu=EDs wrote: > Hi, >=20 > To use the advantages of SATA NCQ, do I have to use a specific > controller, or is this only a software matter? Both actually, and a disk that supports it as well. I'm working on getting the ATA driver to handle NCQ (and the older TCQ=20 for that matter). --=20 -S=F8ren From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 09:23:05 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37CBC16A4CE for ; Thu, 14 Apr 2005 09:23:05 +0000 (GMT) Received: from Neo-Vortex.net (203-217-87-46.dyn.iinet.net.au [203.217.87.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DC1A43D5E for ; Thu, 14 Apr 2005 09:23:04 +0000 (GMT) (envelope-from root@Neo-Vortex.net) Received: from localhost.Neo-Vortex.got-root.cc (Neo-Vortex@localhost.Neo-Vortex.got-root.cc [127.0.0.1]) by Neo-Vortex.net (8.13.1/8.12.10) with ESMTP id j3E9MxL2062640; Thu, 14 Apr 2005 19:23:00 +1000 (EST) (envelope-from root@Neo-Vortex.net) Date: Thu, 14 Apr 2005 19:22:59 +1000 (EST) From: Neo-Vortex To: Stephan Uphoff In-Reply-To: <1113439764.7457.55947.camel@palm> Message-ID: <20050414192002.I61191@Neo-Vortex.net> References: <1113439764.7457.55947.camel@palm> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Thu, 14 Apr 2005 12:28:39 +0000 cc: freebsd-hackers@freebsd.org cc: "M. Parsons" Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 09:23:05 -0000 On Wed, 2005-04-13 at 16:38, M. Parsons wrote: > I was under the impression (but would need to check to make sure) that > all incoming packets are diverted to ng_pppoe when it is hooked into the > Ethernet interface. > > This would explain your problems. > > Can you try this without the interface being used for PPPOE? I have a single interface for PPPoE using netgraph and it connects to the modem, and other computers fine > > For the record, http://www.broadbandreports.com/faq/9693 is the page > > on how you access the line stats, and the MAC part is required for my > > modem. The only reason i could think of as to why it is required, is if its ip address isn't 10.0.0.1 as you think it is and for some strange reason it accepts ip packets as its own if the ethernet header points to its MAC address... try setting it to DHCP and see if you get an ip... else look up the manufacturer for the default ip and try a factory reset From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 14:49:18 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B871C16A4CE for ; Thu, 14 Apr 2005 14:49:18 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 469DA43D53 for ; Thu, 14 Apr 2005 14:49:18 +0000 (GMT) (envelope-from mrparsons@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so407826rng for ; Thu, 14 Apr 2005 07:49:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=t08XCBexyGfUqZSwvFPXFHftByep6APNJ3Y9WtYHsf9hiQMsQI/vIV+943pBGJi3LZaBdfoT7ubynyTtrzmiEMHIRueFNyfWIoGIpSonJIZwMCmQ1GR3lGCDrwl4I9tcBQ57kKfjIM6HQ2zoYlPlvDqSm6N2h46igoZ58j7mlR4= Received: by 10.38.12.48 with SMTP id 48mr1197382rnl; Thu, 14 Apr 2005 07:49:17 -0700 (PDT) Received: by 10.38.86.22 with HTTP; Thu, 14 Apr 2005 07:49:17 -0700 (PDT) Message-ID: Date: Thu, 14 Apr 2005 10:49:17 -0400 From: "M. Parsons" To: freebsd-hackers@freebsd.org In-Reply-To: <20050414192002.I61191@Neo-Vortex.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1113439764.7457.55947.camel@palm> <20050414192002.I61191@Neo-Vortex.net> Subject: Re: Route/arp help? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "M. Parsons" List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 14:49:18 -0000 On 4/14/05, Neo-Vortex wrote: >=20 > On Wed, 2005-04-13 at 16:38, M. Parsons wrote: >=20 > > I was under the impression (but would need to check to make sure) that > > all incoming packets are diverted to ng_pppoe when it is hooked into th= e > > Ethernet interface. > > > > This would explain your problems. > > > > Can you try this without the interface being used for PPPOE? >=20 > I have a single interface for PPPoE using netgraph and it connects to the > modem, and other computers fine >=20 > > > For the record, http://www.broadbandreports.com/faq/9693 is the page > > > on how you access the line stats, and the MAC part is required for my > > > modem. >=20 > The only reason i could think of as to why it is required, is if its ip > address isn't 10.0.0.1 as you think it is and for some strange reason it > accepts ip packets as its own if the ethernet header points to its MAC > address... try setting it to DHCP and see if you get an ip... else look u= p > the manufacturer for the default ip and try a factory reset >=20 I think things are going overboard here, Im just going to give up. I have tried it with pppoe being down, still couldnt connect to the modem. I was told on another msg board that if I did: ifconfig ed0 10.0.0.2 netmask 255.255.255.0 route add -host 10.0.0.1 -interface ed0 arp -s 10.0.0.1 00:0b:23:2a:b0:c4 would be the equivalent of the 3 linux commands, but alas, those 3 dont work either. Again, thanks to all that have tried, again, its just line stats, so I can live without them. Mark From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 15:50:13 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C88916A4CE for ; Thu, 14 Apr 2005 15:50:13 +0000 (GMT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id A710A43D5D for ; Thu, 14 Apr 2005 15:50:12 +0000 (GMT) (envelope-from mhersant@comcast.net) Received: from [192.168.2.102] (c-24-22-136-36.hsd1.wa.comcast.net[24.22.136.36]) by comcast.net (sccrmhc11) with ESMTP id <2005041415501101100234use>; Thu, 14 Apr 2005 15:50:12 +0000 Message-ID: <425E913C.50502@comcast.net> Date: Thu, 14 Apr 2005 08:50:20 -0700 From: Matt User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 15:50:13 -0000 I have a two disk array that I want to move to another machine. It is configured with striping using vinum. What is the best way to set it up under a new machine? Should I simply load the old vinum.conf file and enable vinum? Thanks much for any help. drive disk1 device /dev/ad5s1d drive disk2 device /dev/ad6s1d volume stripe plex org striped 256k sd length 114470m drive disk1 sd length 114470m drive disk2 FreeBSD tmodel 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 15:59:13 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A038A16A4CE for ; Thu, 14 Apr 2005 15:59:13 +0000 (GMT) Received: from mail.revolutionsp.com (ganymede.revolutionsp.com [64.246.0.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1745143D60 for ; Thu, 14 Apr 2005 15:59:13 +0000 (GMT) (envelope-from security@revolutionsp.com) Received: from mail.revolutionsp.com (localhost [127.0.0.1]) by mail.revolutionsp.com (Postfix) with ESMTP id 291E715C96 for ; Thu, 14 Apr 2005 10:58:02 -0500 (CDT) Received: from 81.84.174.45 (SquirrelMail authenticated user security@revolutionsp.com) by mail.revolutionsp.com with HTTP; Thu, 14 Apr 2005 10:58:02 -0500 (CDT) Message-ID: <53093.81.84.174.45.1113494282.squirrel@mail.revolutionsp.com> Date: Thu, 14 Apr 2005 10:58:02 -0500 (CDT) From: "H. S." To: freebsd-hackers@FreeBSD.org User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: imminent disk failure ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 15:59:13 -0000 Hi gang, I have a server running 4.X for almost two years now, without problems - rock solid as it should be - yesterday the server became unresponsive, now that I have access again, and while checking the logs, I found this as the last message before the unresponsiveness: /kernel: ad0: READ command timeout tag=0 serv=0 - resetting The next message is the system getting back on, 1hour later. I have not changed anything kernel-related on this system for a long time (jul 2004), just apply the occasional kernel patch and rebuild/reboot the system. I never encountered this problem before. Could this message mean this disk is giving its last breaths ? BTW- 4.10-STABLE system. Kind Regards From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 16:02:09 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D31416A4CE for ; Thu, 14 Apr 2005 16:02:09 +0000 (GMT) Received: from sarajevo.pacific.net.sg (sarajevo.pacific.net.sg [203.120.90.134]) by mx1.FreeBSD.org (Postfix) with SMTP id AD14D43D5D for ; Thu, 14 Apr 2005 16:02:07 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: (qmail 16376 invoked from network); 14 Apr 2005 16:02:01 -0000 Received: from unknown (HELO maxwell2.pacific.net.sg) (203.120.90.192) by sarajevo with SMTP; 14 Apr 2005 16:02:00 -0000 Received: from [192.168.0.107] ([210.24.247.53]) by maxwell2.pacific.net.sg with ESMTP <20050414160200.CTTE1191.maxwell2.pacific.net.sg@[192.168.0.107]>; Fri, 15 Apr 2005 00:02:00 +0800 Message-ID: <425E93D3.1000506@pacific.net.sg> Date: Fri, 15 Apr 2005 00:01:23 +0800 From: Erich Dollansky Organization: oceanare pte ltd User-Agent: Mozilla Thunderbird 1.0 (X11/20050224) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "H. S." References: <53093.81.84.174.45.1113494282.squirrel@mail.revolutionsp.com> In-Reply-To: <53093.81.84.174.45.1113494282.squirrel@mail.revolutionsp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@FreeBSD.org Subject: Re: imminent disk failure ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 16:02:09 -0000 Hi, you never can exclude it, but did you check the cabling? It is not always the drive itself. Erich H. S. wrote: > Hi gang, > > I have a server running 4.X for almost two years now, without problems - > rock solid as it should be - yesterday the server became unresponsive, now > that I have access again, and while checking the logs, I found this as the > last message before the unresponsiveness: > > /kernel: ad0: READ command timeout tag=0 serv=0 - resetting > > The next message is the system getting back on, 1hour later. > > I have not changed anything kernel-related on this system for a long time > (jul 2004), just apply the occasional kernel patch and rebuild/reboot the > system. I never encountered this problem before. Could this message mean > this disk is giving its last breaths ? > > BTW- 4.10-STABLE system. > > Kind Regards > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 16:11:26 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CDBA16A4CE for ; Thu, 14 Apr 2005 16:11:26 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80D0B43D39 for ; Thu, 14 Apr 2005 16:11:25 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j3EGBJnp000646 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 14 Apr 2005 18:11:21 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j3EGAqhs032933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2005 18:10:52 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j3EGAqKJ059029; Thu, 14 Apr 2005 18:10:52 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j3EGApDB059028; Thu, 14 Apr 2005 18:10:51 +0200 (CEST) (envelope-from ticso) Date: Thu, 14 Apr 2005 18:10:51 +0200 From: Bernd Walter To: Matt Message-ID: <20050414161050.GO48482@cicely12.cicely.de> References: <425E913C.50502@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <425E913C.50502@comcast.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: hackers@freebsd.org Subject: Re: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 16:11:26 -0000 On Thu, Apr 14, 2005 at 08:50:20AM -0700, Matt wrote: > I have a two disk array that I want to move to another machine. It is > configured with striping using vinum. What is the best way to set it up > under a new machine? Should I simply load the old vinum.conf file and > enable vinum? Thanks much for any help. > > drive disk1 device /dev/ad5s1d > drive disk2 device /dev/ad6s1d > volume stripe > plex org striped 256k > sd length 114470m drive disk1 > sd length 114470m drive disk2 Vinum should find and use the existing configuration. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 16:25:52 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49E0B16A4D4 for ; Thu, 14 Apr 2005 16:25:52 +0000 (GMT) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C2CD43D53 for ; Thu, 14 Apr 2005 16:25:50 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 77C261704A; Thu, 14 Apr 2005 13:25:48 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 64325-02; Thu, 14 Apr 2005 13:25:41 -0300 (BRT) Received: from [10.0.8.17] (nat.int.gov.br [200.20.196.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id A27E817049; Thu, 14 Apr 2005 13:25:41 -0300 (BRT) Message-ID: <425E9985.2010304@jonny.eng.br> Date: Thu, 14 Apr 2005 13:25:41 -0300 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050315) MIME-Version: 1.0 To: =?ISO-8859-1?Q?S=F8ren_Schmidt?= , hackers@freebsd.org References: <425DB913.1080302@jonny.eng.br> <425E11DA.9040006@DeepCore.dk> In-Reply-To: <425E11DA.9040006@DeepCore.dk> X-Enigmail-Version: 0.90.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at coe.ufrj.br Subject: Re: SATA NCQ by software? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 16:25:52 -0000 Søren Schmidt wrote: > João Carlos Mendes Luís wrote: > >> Hi, >> >> To use the advantages of SATA NCQ, do I have to use a specific >> controller, or is this only a software matter? > > > Both actually, and a disk that supports it as well. But then, if the controller should have NCQ support, how could I determine if it is compliant? > I'm working on getting the ATA driver to handle NCQ (and the older TCQ > for that matter). Humm, NCQ and TCQ are different? Do my previous questions apply to TCQ? And important, do you expect NCQ/TCQ to get the same performance gains as SCSI TCQ? IIRC, TCQ is the only technical performance advantage of SCSI drives nowadays (other than comparative specs, like RPM, etc). If you get some NCQ patches and my hardware is compatible, I will gladly beta test them for you. Let me know in private. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 16:31:07 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D063B16A4CE for ; Thu, 14 Apr 2005 16:31:07 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A97443D48 for ; Thu, 14 Apr 2005 16:31:07 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j3EGVeh3058642; Thu, 14 Apr 2005 09:31:43 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j3EGVZ2t058641; Thu, 14 Apr 2005 09:31:35 -0700 (PDT) (envelope-from www) Date: Thu, 14 Apr 2005 09:31:35 -0700 (PDT) Message-Id: <200504141631.j3EGVZ2t058641@marlena.vvi.at> To: security@revolutionsp.com From: "ALeine" cc: freebsd-hackers@FreeBSD.org Subject: Re: imminent disk failure ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 16:31:07 -0000 security@revolutionsp.com wrote: > /kernel: ad0: READ command timeout tag=0 serv=0 - resetting > > Could this message mean this disk is giving its last breaths ? Check to see if some part of the system is not overheating due to a failed fan somewhere. Also check the cabling and the SMART status of the drive. There were some issues with DMA and UDMA133 mode, so you may want to try to rule out those as possible causes first by putting hw.ata.ata_dma=0 into /boot/loader.conf and forcing UDMA100 mode with atacontrol(8) (see man 8 atacontrol for details). BTW, you may want to consider posting such questions to freebsd-questions@freebsd.org in the future as this is not the most appropriate list for such questions. ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 16:43:55 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB3F516A4CE for ; Thu, 14 Apr 2005 16:43:55 +0000 (GMT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3543743D1D for ; Thu, 14 Apr 2005 16:43:55 +0000 (GMT) (envelope-from mhersant@comcast.net) Received: from [192.168.2.102] (c-24-22-136-36.hsd1.wa.comcast.net[24.22.136.36]) by comcast.net (sccrmhc11) with ESMTP id <200504141643540110029n3be>; Thu, 14 Apr 2005 16:43:54 +0000 Message-ID: <425E9DD4.308@comcast.net> Date: Thu, 14 Apr 2005 09:44:04 -0700 From: Matt User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <425E913C.50502@comcast.net> <20050414161050.GO48482@cicely12.cicely.de> In-Reply-To: <20050414161050.GO48482@cicely12.cicely.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 16:43:55 -0000 Bernd Walter wrote: >On Thu, Apr 14, 2005 at 08:50:20AM -0700, Matt wrote: > > >>I have a two disk array that I want to move to another machine. It is >>configured with striping using vinum. What is the best way to set it up >>under a new machine? Should I simply load the old vinum.conf file and >>enable vinum? Thanks much for any help. >> >>drive disk1 device /dev/ad5s1d >>drive disk2 device /dev/ad6s1d >>volume stripe >> plex org striped 256k >> sd length 114470m drive disk1 >> sd length 114470m drive disk2 >> >> > >Vinum should find and use the existing configuration. > > > Well, it hasn't been that easy. The new machine is running 5.3. At boot I receive: panic: umount: dangling vnode / /when vinum loads at boot. I get around this by starting vinum from rc.local. The vinum device node (named stripe in this case) isn't in /dev/vinum. Do I need to create it on the new machine. I placed the old config file in /etc/vinum.conf. Is vinum supposed to create the nodes automatically? Thanks much. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 17:16:41 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0541916A4CE for ; Thu, 14 Apr 2005 17:16:41 +0000 (GMT) Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [216.148.227.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0AFC43D41 for ; Thu, 14 Apr 2005 17:16:40 +0000 (GMT) (envelope-from mhersant@comcast.net) Received: from [192.168.2.102] (c-24-22-136-36.hsd1.wa.comcast.net[24.22.136.36]) by comcast.net (rwcrmhc14) with ESMTP id <2005041417164001400hn5j0e>; Thu, 14 Apr 2005 17:16:40 +0000 Message-ID: <425EA581.6080509@comcast.net> Date: Thu, 14 Apr 2005 10:16:49 -0700 From: Matt User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <425E913C.50502@comcast.net> <20050414161050.GO48482@cicely12.cicely.de> <425E9DD4.308@comcast.net> In-Reply-To: <425E9DD4.308@comcast.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 17:16:41 -0000 Matt wrote: > Bernd Walter wrote: > >> On Thu, Apr 14, 2005 at 08:50:20AM -0700, Matt wrote: >> >> >>> I have a two disk array that I want to move to another machine. It >>> is configured with striping using vinum. What is the best way to >>> set it up under a new machine? Should I simply load the old >>> vinum.conf file and enable vinum? Thanks much for any help. >>> >>> drive disk1 device /dev/ad5s1d >>> drive disk2 device /dev/ad6s1d >>> volume stripe >>> plex org striped 256k >>> sd length 114470m drive disk1 >>> sd length 114470m drive disk2 >>> >> >> >> Vinum should find and use the existing configuration. >> >> >> > Well, it hasn't been that easy. The new machine is running 5.3. At > boot I receive: > > panic: umount: dangling vnode > / /when vinum loads at boot. I get around this by starting vinum from > rc.local. The vinum device node (named stripe in this case) isn't in > /dev/vinum. Do I need to create it on the new machine. I placed the > old config file in /etc/vinum.conf. Is vinum supposed to create the > nodes automatically? Thanks much. > > > _______________________________________________ > 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" > tmodel# vinum list 2 drives: D disk2 State: up /dev/ad6s1d A: 114470/114470 MB (100%) D disk1 State: up /dev/ad5s1d A: 114470/114470 MB (100%) 0 volumes: 0 plexes: 0 subdisks: Do I need to recreate the volumes? Vinum can't seem to find them. Hmmm. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 17:28:37 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9939316A4CF for ; Thu, 14 Apr 2005 17:28:37 +0000 (GMT) Received: from grummit.biaix.org (86.Red-213-97-212.pooles.rima-tde.net [213.97.212.86]) by mx1.FreeBSD.org (Postfix) with SMTP id C3F5C43D2F for ; Thu, 14 Apr 2005 17:28:35 +0000 (GMT) (envelope-from lists-freebsd-hackers@biaix.org) Received: (qmail 93810 invoked by uid 1000); 14 Apr 2005 17:27:35 -0000 Date: Thu, 14 Apr 2005 19:27:35 +0200 From: Joan Picanyol i Puig To: hackers@freebsd.org Message-ID: <20050414172735.GA91222@grummit.biaix.org> References: <425E913C.50502@comcast.net> <20050414161050.GO48482@cicely12.cicely.de> <425E9DD4.308@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <425E9DD4.308@comcast.net> User-Agent: Mutt/1.5.6i Subject: Re: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 17:28:37 -0000 * Matt [20050414 18:43]: > Bernd Walter wrote: > > >On Thu, Apr 14, 2005 at 08:50:20AM -0700, Matt wrote: > > > >>I have a two disk array that I want to move to another machine. It is > >>configured with striping using vinum. What is the best way to set it up > >>under a new machine? Should I simply load the old vinum.conf file and > >>enable vinum? Thanks much for any help. > >> > >>drive disk1 device /dev/ad5s1d > >>drive disk2 device /dev/ad6s1d > >>volume stripe > >>plex org striped 256k > >> sd length 114470m drive disk1 > >> sd length 114470m drive disk2 > >> > >Vinum should find and use the existing configuration. > > > Well, it hasn't been that easy. The new machine is running 5.3. Vinum has been migrated to geom, this should do the trick: sed -ibak -e 's,^vinum_load,geom_vinum_load,' /boot/loader.conf sed -ibak -e 's,/dev/vinum,/dev/gvinum,' /etc/fstab qvb -- pica From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 17:34:53 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C552716A4CE for ; Thu, 14 Apr 2005 17:34:53 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 421BB43D5D for ; Thu, 14 Apr 2005 17:34:53 +0000 (GMT) (envelope-from rexroof@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so502682wri for ; Thu, 14 Apr 2005 10:34:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UF6tSv6MeDG87HhIHBnaTLxRDZGvxttOwqlaCWfXtVBuHBZKz13yvHUA7SKwKH0AQc1eTQtv21thIkNku+4kJ3cQh+s9NlanU0XlLxUyoHZhbNpYQZeieXuTQUBjx8A43OWKRMT9XJrW1o7QNu+WI4TaByVi/G541hjKrpFpTjg= Received: by 10.54.21.9 with SMTP id 9mr957702wru; Thu, 14 Apr 2005 10:34:44 -0700 (PDT) Received: by 10.54.62.14 with HTTP; Thu, 14 Apr 2005 10:34:44 -0700 (PDT) Message-ID: <6afb69aa05041410346915cc72@mail.gmail.com> Date: Thu, 14 Apr 2005 13:34:44 -0400 From: Rex Roof To: Joan Picanyol i Puig In-Reply-To: <20050414172735.GA91222@grummit.biaix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <425E913C.50502@comcast.net><425E9DD4.308@comcast.net> <20050414172735.GA91222@grummit.biaix.org> cc: hackers@freebsd.org Subject: Re: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Rex Roof List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 17:34:53 -0000 i noticed the documentation hasn't been migrated to gvinum, though. anyone have a config suggestion to stripe two mirrors? I tried this: drive diska device /dev/ad4s1a drive diskb device /dev/ad6s1a drive diskc device /dev/ad8s1a drive diskd device /dev/ad12s1a volume mirrorone plex org concat sd length 238475m drive diska plex org concat=20 sd length 238475m drive diskb volume mirrortwo plex org concat sd length 238475m drive diskc plex org concat sd length 238475m drive diskd volume mstripe plex org striped 512k sd length 238475m drive mirrorone sd length 238475m drive mirrortwo without luck. I also don't seem to be able to find a way to cleanly shut down vinum and remove all configurations. I've been testing various raid configurations on FreeBSD6 and I've been working on scripts to setup and test and take down vinum configurations. I also noticed that I can often crash my machine by doing things like: gvinum rm -r diska On 4/14/05, Joan Picanyol i Puig wrote: > * Matt [20050414 18:43]: > > Bernd Walter wrote: > > > > >On Thu, Apr 14, 2005 at 08:50:20AM -0700, Matt wrote: > > > > > >>I have a two disk array that I want to move to another machine. It i= s > > >>configured with striping using vinum. What is the best way to set it= up > > >>under a new machine? Should I simply load the old vinum.conf file an= d > > >>enable vinum? Thanks much for any help. > > >> > > >>drive disk1 device /dev/ad5s1d > > >>drive disk2 device /dev/ad6s1d > > >>volume stripe > > >>plex org striped 256k > > >> sd length 114470m drive disk1 > > >> sd length 114470m drive disk2 > > >> > > >Vinum should find and use the existing configuration. > > > > > Well, it hasn't been that easy. The new machine is running 5.3. >=20 > Vinum has been migrated to geom, this should do the trick: >=20 > sed -ibak -e 's,^vinum_load,geom_vinum_load,' /boot/loader.conf > sed -ibak -e 's,/dev/vinum,/dev/gvinum,' /etc/fstab >=20 > qvb > -- > pica > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 17:44:58 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCFC616A4D2 for ; Thu, 14 Apr 2005 17:44:58 +0000 (GMT) Received: from grummit.biaix.org (86.Red-213-97-212.pooles.rima-tde.net [213.97.212.86]) by mx1.FreeBSD.org (Postfix) with SMTP id 118E643D31 for ; Thu, 14 Apr 2005 17:44:58 +0000 (GMT) (envelope-from lists-freebsd-hackers@biaix.org) Received: (qmail 95751 invoked by uid 1000); 14 Apr 2005 17:43:58 -0000 Date: Thu, 14 Apr 2005 19:43:58 +0200 From: Joan Picanyol i Puig To: hackers@freebsd.org Message-ID: <20050414174358.GB91222@grummit.biaix.org> References: <425E913C.50502@comcast.net> <20050414161050.GO48482@cicely12.cicely.de> <425E9DD4.308@comcast.net> <20050414172735.GA91222@grummit.biaix.org> <6afb69aa05041410346915cc72@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6afb69aa05041410346915cc72@mail.gmail.com> User-Agent: Mutt/1.5.6i Subject: Re: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 17:44:59 -0000 * Rex Roof [20050414 19:34]: > i noticed the documentation hasn't been migrated to gvinum, though. > > anyone have a config suggestion to stripe two mirrors? Short answer: you can't. Longer answer: http://docs.FreeBSD.org/cgi/mid.cgi?423CAE7E.4070009 qvb -- pica From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 17:53:41 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5B2F16A4CE for ; Thu, 14 Apr 2005 17:53:41 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 573F243D1D for ; Thu, 14 Apr 2005 17:53:41 +0000 (GMT) (envelope-from rexroof@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so508425wri for ; Thu, 14 Apr 2005 10:53:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lSPJoVYk56LnxC91tLxgazQeq09XcSZGE7jKIgitvOez5AJsTZsXH8qPSknqw3cRUJjMLsXuymmnX39qm3gAB1/m/nJYQ/kLqgQKpK4ww9hIXmhsFfs3xoDeNeMmP3nYU5Zed9CQYC2b+s5K0tyu8AhkPFhafoWLleBNmP5aGBw= Received: by 10.54.94.16 with SMTP id r16mr790178wrb; Thu, 14 Apr 2005 10:53:00 -0700 (PDT) Received: by 10.54.62.14 with HTTP; Thu, 14 Apr 2005 10:52:59 -0700 (PDT) Message-ID: <6afb69aa05041410523fed8fe5@mail.gmail.com> Date: Thu, 14 Apr 2005 13:52:59 -0400 From: Rex Roof To: Joan Picanyol i Puig In-Reply-To: <20050414174358.GB91222@grummit.biaix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <425E913C.50502@comcast.net><425E9DD4.308@comcast.net> <20050414172735.GA91222@grummit.biaix.org> <6afb69aa05041410346915cc72@mail.gmail.com> <20050414174358.GB91222@grummit.biaix.org> cc: hackers@freebsd.org Subject: Re: vinum question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Rex Roof List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 17:53:41 -0000 can I stripe two mirrors with vinum that were created with gmirror? On 4/14/05, Joan Picanyol i Puig wrote: > * Rex Roof [20050414 19:34]: > > i noticed the documentation hasn't been migrated to gvinum, though. > > > > anyone have a config suggestion to stripe two mirrors? >=20 > Short answer: you can't. Longer answer: >=20 > http://docs.FreeBSD.org/cgi/mid.cgi?423CAE7E.4070009 >=20 > qvb > -- > pica > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 23:07:21 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86B0616A4CE for ; Thu, 14 Apr 2005 23:07:21 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4B8F43D2D for ; Thu, 14 Apr 2005 23:07:20 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j3EN6SUu004248; Thu, 14 Apr 2005 17:06:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 14 Apr 2005 17:06:45 -0600 (MDT) Message-Id: <20050414.170645.132440858.imp@bsdimp.com> To: xdivac02@stud.fit.vutbr.cz From: "M. Warner Losh" In-Reply-To: <20050412145401.GA17895@stud.fit.vutbr.cz> References: <20050412145401.GA17895@stud.fit.vutbr.cz> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: dipjyoti.saikia@gmail.com Subject: Re: What is the best way to introduce delay in kernel ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 23:07:21 -0000 In message: <20050412145401.GA17895@stud.fit.vutbr.cz> Divacky Roman writes: : On Tue, Apr 12, 2005 at 06:01:52PM +0530, Dipjyoti Saikia wrote: : > Hi , : > : > I am writing a device driver and using DELAY() to intoduce delays in : > my code .Are there any better ways of doing the same for FreeBSD 4.10 : > ? : : : you can use [tm]sleep for this... or with another approach callouts might be : usefull DELAY is useful for short delays (< 1-2hz), while [tm]sleep are useful for longer delays. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 05:07:37 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 84B0616A4CE; Fri, 15 Apr 2005 05:07:37 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.3/8.13.1) with ESMTP id j3F58LvX099651; Fri, 15 Apr 2005 01:08:21 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.3/8.13.1/Submit) id j3F58Lim099650; Fri, 15 Apr 2005 01:08:21 -0400 (EDT) (envelope-from green) Date: Fri, 15 Apr 2005 01:08:21 -0400 From: Brian Fundakowski Feldman To: hackers@freebsd.org, current@freebsd.org Message-ID: <20050415050821.GO981@green.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: NFS client/buffer cache deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 05:07:37 -0000 I'll spare a lengthy write-up because I think the patch documents it well enough. It certainly appears to fix things here when doing very large block-sized writes, but it also reduces the throughput with those block sizes. (I don't think there should be any difference when using reasonable block sizes). Would anyone care to take a shot at fixing it in a more elegant manner? Index: sys/buf.h =================================================================== RCS file: /export/ncvs/src/sys/sys/buf.h,v retrieving revision 1.167.2.1 diff -u -r1.167.2.1 buf.h --- sys/buf.h 31 Jan 2005 23:26:55 -0000 1.167.2.1 +++ sys/buf.h 15 Apr 2005 02:00:44 -0000 @@ -469,6 +469,7 @@ extern int maxswzone; /* Max KVA for swap structures */ extern int maxbcache; /* Max KVA for buffer cache */ extern int runningbufspace; +extern int hibufspace; extern int buf_maxio; /* nominal maximum I/O for buffer */ extern struct buf *buf; /* The buffer headers. */ extern char *buffers; /* The buffer contents. */ Index: kern/vfs_bio.c =================================================================== RCS file: /export/ncvs/src/sys/kern/vfs_bio.c,v retrieving revision 1.444.2.2 diff -u -r1.444.2.2 vfs_bio.c --- kern/vfs_bio.c 31 Jan 2005 23:26:18 -0000 1.444.2.2 +++ kern/vfs_bio.c 15 Apr 2005 01:59:38 -0000 @@ -113,7 +113,7 @@ static int lobufspace; SYSCTL_INT(_vfs, OID_AUTO, lobufspace, CTLFLAG_RD, &lobufspace, 0, "Minimum amount of buffers we want to have"); -static int hibufspace; +int hibufspace; SYSCTL_INT(_vfs, OID_AUTO, hibufspace, CTLFLAG_RD, &hibufspace, 0, "Maximum allowed value of bufspace (excluding buf_daemon)"); static int bufreusecnt; Index: nfsclient/nfs_bio.c =================================================================== RCS file: /export/ncvs/src/sys/nfsclient/nfs_bio.c,v retrieving revision 1.133.2.2 diff -u -r1.133.2.2 nfs_bio.c --- nfsclient/nfs_bio.c 31 Jan 2005 23:26:46 -0000 1.133.2.2 +++ nfsclient/nfs_bio.c 15 Apr 2005 04:41:13 -0000 @@ -726,6 +726,7 @@ struct vattr vattr; struct nfsmount *nmp = VFSTONFS(vp->v_mount); daddr_t lbn; + off_t commitleft; int bcount; int n, on, error = 0; int haverslock = 0; @@ -755,6 +756,7 @@ */ if (ioflag & (IO_APPEND | IO_SYNC)) { if (np->n_flag & NMODIFIED) { +flush_and_restart: np->n_attrstamp = 0; error = nfs_vinvalbuf(vp, V_SAVE, cred, td, 1); if (error) @@ -832,12 +834,65 @@ } biosize = vp->v_mount->mnt_stat.f_iosize; + commitleft = 0; + /* + * If there are possible modifications, then there may be some + * B_NEEDCOMMIT buffers. Total those up here and force a flush + * before starting to write if our writes can exceed the local + * maximum per-file write commit size. + * + * If there are no possible pending modifications, we still need + * to limit our write to that size. + */ + if ((ioflag & (IO_SYNC | IO_INVAL)) != (IO_SYNC | IO_INVAL)) { + commitleft = nmp->nm_wcommitsize; + if (np->n_flag & NMODIFIED) { + int wouldcommit = 0; + VI_LOCK(vp); + TAILQ_FOREACH(bp, &vp->v_dirtyblkhd, b_vnbufs) { + if (bp->b_flags & B_NEEDCOMMIT) + wouldcommit += bp->b_bcount; + } + VI_UNLOCK(vp); + /* + * Since we're not operating synchronously and + * bypassing the buffer cache, we are in a commit + * and holding all of these buffers whether + * transmitted or not. If not limited, this + * will lead to the buffer cache deadlocking, + * as no one else can flush our uncommitted buffers. + */ + wouldcommit += uio->uio_resid; + /* + * If we would initially exceed the maximum + * outstanding write commit size, flush and restart. + */ + if (wouldcommit > commitleft) { + if (haverslock) { + nfs_rsunlock(np, td); + haverslock = 0; + } + goto flush_and_restart; + } + } else { + /* + * With no outstanding commits, we are limited only + * by commitleft as to how far we can go. + */ + } + } do { nfsstats.biocache_writes++; lbn = uio->uio_offset / biosize; on = uio->uio_offset & (biosize-1); n = min((unsigned)(biosize - on), uio->uio_resid); + /* Always allow at least one write. */ + if (commitleft > 0) { + commitleft -= n; + if (commitleft == 0) + commitleft = -1; + } again: /* * Handle direct append and file extension cases, calculate @@ -932,12 +987,6 @@ break; } } - if (!bp) { - error = nfs_sigintr(nmp, NULL, td); - if (!error) - error = EINTR; - break; - } if (bp->b_wcred == NOCRED) bp->b_wcred = crhold(cred); np->n_flag |= NMODIFIED; @@ -1036,7 +1085,7 @@ } else { bdwrite(bp); } - } while (uio->uio_resid > 0 && n > 0); + } while (uio->uio_resid > 0 && n > 0 && commitleft >= 0); if (haverslock) nfs_rsunlock(np, td); Index: nfsclient/nfs_vfsops.c =================================================================== RCS file: /export/ncvs/src/sys/nfsclient/nfs_vfsops.c,v retrieving revision 1.158.2.3 diff -u -r1.158.2.3 nfs_vfsops.c --- nfsclient/nfs_vfsops.c 31 Jan 2005 23:26:46 -0000 1.158.2.3 +++ nfsclient/nfs_vfsops.c 15 Apr 2005 02:03:05 -0000 @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include #include @@ -625,6 +627,12 @@ else nmp->nm_readahead = NFS_MAXRAHEAD; } + if ((argp->flags & NFSMNT_WCOMMITSIZE) && argp->wcommitsize >= 0) { + if (argp->wcommitsize < nmp->nm_wsize) + nmp->nm_wcommitsize = nmp->nm_wsize; + else + nmp->nm_wcommitsize = argp->wcommitsize; + } if ((argp->flags & NFSMNT_DEADTHRESH) && argp->deadthresh >= 0) { if (argp->deadthresh <= NFS_MAXDEADTHRESH) nmp->nm_deadthresh = argp->deadthresh; @@ -785,6 +793,7 @@ nmp->nm_wsize = NFS_WSIZE; nmp->nm_rsize = NFS_RSIZE; } + nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000); nmp->nm_readdirsize = NFS_READDIRSIZE; nmp->nm_numgrps = NFS_MAXGRPS; nmp->nm_readahead = NFS_DEFRAHEAD; Index: nfsclient/nfsargs.h =================================================================== RCS file: /export/ncvs/src/sys/nfsclient/nfsargs.h,v retrieving revision 1.66.2.1 diff -u -r1.66.2.1 nfsargs.h --- nfsclient/nfsargs.h 31 Jan 2005 23:26:46 -0000 1.66.2.1 +++ nfsclient/nfsargs.h 15 Apr 2005 01:33:08 -0000 @@ -56,7 +56,7 @@ int retrans; /* times to retry send */ int maxgrouplist; /* Max. size of group list */ int readahead; /* # of blocks to readahead */ - int __pad1; /* was "leaseterm" */ + int wcommitsize; /* Max. write commit size in bytes */ int deadthresh; /* Retrans threshold */ char *hostname; /* server's name */ int acregmin; /* cache attrs for reg files min time */ @@ -80,7 +80,7 @@ #define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */ /* 0x400 free, was NFSMNT_KERB */ #define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */ -/* 0x1000 free, was NFSMNT_LEASETERM */ +#define NFSMNT_WCOMMITSIZE 0x00001000 /* set max write commit size */ #define NFSMNT_READAHEAD 0x00002000 /* set read ahead */ #define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */ #define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */ Index: nfsclient/nfsmount.h =================================================================== RCS file: /export/ncvs/src/sys/nfsclient/nfsmount.h,v retrieving revision 1.27.2.1 diff -u -r1.27.2.1 nfsmount.h --- nfsclient/nfsmount.h 31 Jan 2005 23:26:46 -0000 1.27.2.1 +++ nfsclient/nfsmount.h 15 Apr 2005 01:21:57 -0000 @@ -66,6 +66,7 @@ int nm_wsize; /* Max size of write rpc */ int nm_readdirsize; /* Size of a readdir rpc */ int nm_readahead; /* Num. of blocks to readahead */ + int nm_wcommitsize; /* Max size of commit for write */ int nm_acdirmin; /* Directory attr cache min lifetime */ int nm_acdirmax; /* Directory attr cache max lifetime */ int nm_acregmin; /* Reg file attr cache min lifetime */ -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 11:42:17 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50A3A16A4CE; Fri, 15 Apr 2005 11:42:14 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D9D243D2F; Fri, 15 Apr 2005 11:42:13 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3E7B8.dip.t-dialin.net[84.163.231.184] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwpI-1DMPD90U9p-0006Bg; Fri, 15 Apr 2005 13:42:11 +0200 From: Max Laier To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Date: Fri, 15 Apr 2005 13:42:00 +0200 User-Agent: KMail/1.8 References: <200504080220.57899.max@love2party.net> <4256F545.90401@elischer.org> In-Reply-To: <4256F545.90401@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1332277.2M6x2ijGPT"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200504151342.07851.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 cc: monthly@freebsd.org Subject: Re: Call for FreeBSD status reports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 11:42:17 -0000 --nextPart1332277.2M6x2ijGPT Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All, as I wrote last week: > Submissions are due on April 15. Thanks a lot, and we are hoping for a > big turn-out. As always this is not final, but please get your reports ready by monday an= d=20 maybe let us know that you are planing to submit. Unfortunately we have a= =20 dramatically lower turn-out so far, I hope to see more reports floating in= =20 over the weekend. Thanks a lot! http://www.FreeBSD.org/news/status/ =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 --nextPart1332277.2M6x2ijGPT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCX6iPXyyEoT62BG0RAv19AJwKSD5FgE/za881kHA8deU358C1PQCfSJ+M BtrsjPBHzW53uyb09Cau96M= =hgZ7 -----END PGP SIGNATURE----- --nextPart1332277.2M6x2ijGPT-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 12:16:18 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 223FB16A4CE for ; Fri, 15 Apr 2005 12:16:18 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BAB243D64 for ; Fri, 15 Apr 2005 12:16:17 +0000 (GMT) (envelope-from dipjyoti.saikia@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so675659wra for ; Fri, 15 Apr 2005 05:16:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bBTQmcuCHW9vREO2giXeAllMc9hYSBI/sxZ++XZMS5Ql0xAor7+JxUTts9OmHkS2Ib4NA9xKiDzkecUxJ+9RHu579Vo8eUbbY2hKHqRsJLA5UXpGMAdeYyOPf36jK15yoG67uzGr8KDQLWCsGseHaLkJfSFFQVN5bBStc+XdUjs= Received: by 10.54.40.34 with SMTP id n34mr1802456wrn; Fri, 15 Apr 2005 05:16:16 -0700 (PDT) Received: by 10.54.35.75 with HTTP; Fri, 15 Apr 2005 05:16:16 -0700 (PDT) Message-ID: Date: Fri, 15 Apr 2005 17:46:16 +0530 From: Dipjyoti Saikia To: Brooks Davis In-Reply-To: <20050412212044.GA9284@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050412212044.GA9284@odin.ac.hmc.edu> cc: freebsd-hackers@freebsd.org Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dipjyoti Saikia List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 12:16:18 -0000 Hi, DELAY() in FreeBSD uses a busy loop . I am looking for something like sleep_on_timeout() call in Linux . (dont' want to waste the CPU cycles by DELAY'ing) As I am pretty new to programming with Free BSD , can you help me with some details about equivalent implementation(wait queues etc) in Free BSD . ---Dip On 4/13/05, Brooks Davis wrote: > On Wed, Apr 13, 2005 at 02:33:22AM +0530, Dipjyoti Saikia wrote: > > Hi, > > > > Can any one help me out with a better Implementation of MDELAY() in > > FreeBSD kernel 4.10 >=20 > Please start by defining better. >=20 > -- Brooks >=20 > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 >=20 >=20 > From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 12:56:05 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0644716A4CF for ; Fri, 15 Apr 2005 12:56:05 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBE6B43D1D for ; Fri, 15 Apr 2005 12:56:01 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id j3FCtfK8085511; Fri, 15 Apr 2005 22:25:42 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org, Dipjyoti Saikia Date: Fri, 15 Apr 2005 22:25:39 +0930 User-Agent: KMail/1.8 References: <20050412212044.GA9284@odin.ac.hmc.edu> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1389490.M0T1n2tbtg"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200504152225.40067.doconnor@gsoft.com.au> X-Spam-Score: -2.5 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03,USER_AGENT X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 12:56:05 -0000 --nextPart1389490.M0T1n2tbtg Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Fri, 15 Apr 2005 21:46, Dipjyoti Saikia wrote: > DELAY() in FreeBSD uses a busy loop . I am looking for something like > sleep_on_timeout() call in Linux . (dont' want to waste the CPU cycles > by DELAY'ing) tsleep/msleep/timeout are probably what you want. =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 --nextPart1389490.M0T1n2tbtg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCX7nM5ZPcIHs/zowRAsrzAKCSnanNIYXI3X+y0n3ir21KJ9TP7gCgqws2 jQRYnKuXCHs9xz9ts7fXbhQ= =MMSI -----END PGP SIGNATURE----- --nextPart1389490.M0T1n2tbtg-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 13:02:37 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAD9516A4CE for ; Fri, 15 Apr 2005 13:02:37 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBBF943D39 for ; Fri, 15 Apr 2005 13:02:36 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j3FD3Gh3073437; Fri, 15 Apr 2005 06:03:18 -0700 (PDT) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j3FD3Bhv073436; Fri, 15 Apr 2005 06:03:11 -0700 (PDT) (envelope-from www) Date: Fri, 15 Apr 2005 06:03:11 -0700 (PDT) Message-Id: <200504151303.j3FD3Bhv073436@marlena.vvi.at> To: dipjyoti.saikia@gmail.com From: "ALeine" cc: freebsd-hackers@freebsd.org Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 13:02:38 -0000 dipjyoti.saikia@gmail.com wrote: > DELAY() in FreeBSD uses a busy loop . I am looking for something > like sleep_on_timeout() call in Linux . (dont' want to waste the CPU > cycles by DELAY'ing) You may want to check out timeout(9) / untimeout(9), see man 9 timeout for details. > As I am pretty new to programming with Free BSD , can you help > me with some details about equivalent implementation(wait queues > etc) in Free BSD . Reading the man pages for asleep(9) / wakeup(9) should give you a good introduction. ALeine ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 13:04:38 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E91B16A4CE for ; Fri, 15 Apr 2005 13:04:38 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEB1D43D1D for ; Fri, 15 Apr 2005 13:04:37 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so581453rnf for ; Fri, 15 Apr 2005 06:04:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dQiY38OtQ/OjHOw7wnssS+fH1cdKjqJ+Qwn7fTcSjgZhzut7VcBl8WZ+PEgrLJQrisNWhHZUpkDsnqvd7r0XtGrNdGi4yVjtqn82hXBlxeh3Yh+KVIj7CDlk1P4BHp7fyYW2MKK6tGQZTQhFZXE0g5Z7pcuuWAXbWQl9cockkDk= Received: by 10.38.75.21 with SMTP id x21mr3099237rna; Fri, 15 Apr 2005 06:04:37 -0700 (PDT) Received: by 10.38.209.22 with HTTP; Fri, 15 Apr 2005 06:04:37 -0700 (PDT) Message-ID: <84dead7205041506045923ca59@mail.gmail.com> Date: Fri, 15 Apr 2005 13:04:37 +0000 From: Joseph Koshy To: Dipjyoti Saikia In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050412212044.GA9284@odin.ac.hmc.edu> cc: freebsd-hackers@freebsd.org Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Joseph Koshy List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 13:04:38 -0000 > sleep_on_timeout() call in Linux . (dont' want to waste the CPU cycles You may want to try the manual pages. % man -k sleep | fgrep '(9)' =20 endtsleep(9), sleepinit(9), unsleep(9) - manage the queues of sleeping proc= esses init_sleepqueues(9) ... sleepq_wait_sig(9) - manage the queues of sleeping threads sleep(9), msleep(9), tsleep(9), wakeup(9) - wait for events vm_page_sleep_busy(9) - wait for a busy page to become unbusy % man -k DELAY | fgrep '(9)' DELAY(9) - busy loop for an interval --=20 FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 13:21:10 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01D6A16A4CE; Fri, 15 Apr 2005 13:21:10 +0000 (GMT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A1C543D49; Fri, 15 Apr 2005 13:21:09 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id 4A64B1F5AA; Fri, 15 Apr 2005 15:21:08 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id 310BE6347; Fri, 15 Apr 2005 15:21:08 +0200 (CEST) Date: Fri, 15 Apr 2005 15:21:08 +0200 From: Marc Olzheim To: Brian Fundakowski Feldman Message-ID: <20050415132108.GC85922@stack.nl> References: <20050415050821.GO981@green.homeunix.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hYooF8G/hrfVAmum" Content-Disposition: inline In-Reply-To: <20050415050821.GO981@green.homeunix.org> X-Operating-System: FreeBSD hammer.stack.nl 5.4-STABLE FreeBSD 5.4-STABLE X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.9i cc: hackers@freebsd.org cc: current@freebsd.org Subject: Re: NFS client/buffer cache deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 13:21:10 -0000 --hYooF8G/hrfVAmum Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 15, 2005 at 01:08:21AM -0400, Brian Fundakowski Feldman wrote: > I'll spare a lengthy write-up because I think the patch documents it well > enough. It certainly appears to fix things here when doing very large > block-sized writes, but it also reduces the throughput with those block > sizes. (I don't think there should be any difference when using reasonable > block sizes). Is this supposed to fix kern/79208 ? Marc --hYooF8G/hrfVAmum Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD4DBQFCX7/EezjnobFOgrERAoLmAJii/TuTg1aTOY8nktdo3d8UQM3gAJsHQT7r Ze2w/BMKz6HDJWrNgOT2dg== =moIe -----END PGP SIGNATURE----- --hYooF8G/hrfVAmum-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 14:10:59 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42AA316A4CE for ; Fri, 15 Apr 2005 14:10:59 +0000 (GMT) Received: from wjv.com (fl-65-40-24-38.sta.sprint-hsd.net [65.40.24.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41E4D43D54 for ; Fri, 15 Apr 2005 14:10:58 +0000 (GMT) (envelope-from bv@bilver.wjv.com) Received: from bilver.wjv.com (localhost.wjv.com [127.0.0.1]) by wjv.com (8.12.11/8.13.1) with ESMTP id j3FEArj4097160 for ; Fri, 15 Apr 2005 10:10:53 -0400 (EDT) (envelope-from bv@bilver.wjv.com) Received: (from bv@localhost) by bilver.wjv.com (8.12.11/8.13.1/Submit) id j3FEAqLp097159 for freebsd-hackers@freebsd.org; Fri, 15 Apr 2005 10:10:52 -0400 (EDT) (envelope-from bv) Date: Fri, 15 Apr 2005 10:10:52 -0400 From: Bill Vermillion To: freebsd-hackers@freebsd.org Message-ID: <20050415141052.GB96815@wjv.com> References: <20050415120104.AD04C16A4CF@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050415120104.AD04C16A4CF@hub.freebsd.org> Organization: W.J.Vermillion / Orlando - Winter Park ReplyTo: bv@wjv.com User-Agent: Mutt/1.5.6i X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on bilver.wjv.com Subject: Re: immenent disk failure ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: bv@wjv.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 14:10:59 -0000 On or about Fri, Apr 15, 2005 at 12:01 , while attempting a Zarathustra emulation freebsd-hackers-request@freebsd.org thus spake: > Message: 4 > Date: Thu, 14 Apr 2005 10:58:02 -0500 (CDT) > From: "H. S." > Subject: imminent disk failure ? ... > I have a server running 4.X for almost two years now, without > problems - rock solid as it should be - yesterday the server > became unresponsive, now that I have access again, and while > checking the logs, I found this as the last message before the > unresponsiveness: > /kernel: ad0: READ command timeout tag=0 serv=0 - resetting > The next message is the system getting back on, 1hour later. > I have not changed anything kernel-related on this system for > a long time (jul 2004), just apply the occasional kernel patch > and rebuild/reboot the system. I never encountered this problem > before. Could this message mean this disk is giving its last > breaths ? It might help if we knew a bit more about the system such a drive make and model - you can see that in dmesg. That may point out some device that is known to be problematic. The last time I got timeout errors like that was in the 3.x era with a SCSI controller. Last IDE problem I had was a bad read that force the system into PIO mode with over 75% performance decrease. The only way around that one that I was aware of was a reboot. Bill -- Bill Vermillion - bv @ wjv . com From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 15:04:13 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D68D716A4CE for ; Fri, 15 Apr 2005 15:04:13 +0000 (GMT) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8142A43D2F for ; Fri, 15 Apr 2005 15:04:13 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id 3DE1135707 for ; Fri, 15 Apr 2005 17:04:12 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1001) id 7F57A7D02; Fri, 15 Apr 2005 17:04:09 +0200 (CEST) Date: Fri, 15 Apr 2005 17:04:08 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20050415150408.GA1442@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200504151303.j3FD3Bhv073436@marlena.vvi.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504151303.j3FD3Bhv073436@marlena.vvi.at> User-Agent: Mutt/1.5.9i Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 15:04:14 -0000 On Fri, Apr 15, 2005 at 06:03:11AM -0700, ALeine wrote: > dipjyoti.saikia@gmail.com wrote: > > > DELAY() in FreeBSD uses a busy loop . I am looking for something > > like sleep_on_timeout() call in Linux . (dont' want to waste the CPU > > cycles by DELAY'ing) > > You may want to check out timeout(9) / untimeout(9), see man 9 timeout > for details. You should not use timeout(9) without a very good reason, the callout_* interface is prefered. Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 15:06:24 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6CE9A16A4CE; Fri, 15 Apr 2005 15:06:24 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.3/8.13.1) with ESMTP id j3FF78xA003047; Fri, 15 Apr 2005 11:07:08 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.3/8.13.1/Submit) id j3FF78F9003046; Fri, 15 Apr 2005 11:07:08 -0400 (EDT) (envelope-from green) Date: Fri, 15 Apr 2005 11:07:08 -0400 From: Brian Fundakowski Feldman To: Marc Olzheim Message-ID: <20050415150708.GP981@green.homeunix.org> References: <20050415050821.GO981@green.homeunix.org> <20050415132108.GC85922@stack.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050415132108.GC85922@stack.nl> User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org cc: current@freebsd.org Subject: Re: NFS client/buffer cache deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 15:06:24 -0000 On Fri, Apr 15, 2005 at 03:21:08PM +0200, Marc Olzheim wrote: > On Fri, Apr 15, 2005 at 01:08:21AM -0400, Brian Fundakowski Feldman wrote: > > I'll spare a lengthy write-up because I think the patch documents it well > > enough. It certainly appears to fix things here when doing very large > > block-sized writes, but it also reduces the throughput with those block > > sizes. (I don't think there should be any difference when using reasonable > > block sizes). > > Is this supposed to fix kern/79208 ? Yes, it does; would you like to try a more recent version of the patch? It's actually against -STABLE, but it needs to be tested in -CURRENT if it's going ot try to make it into 5.x (or hopefully 5.4-RELEASE). See: This also implements non-blocking writes for NFS clients and will do the right thing (perform a continuous write, flushing as it goes, and causing no drop in performance) for "non-atomic" I/O, but I don't know of any interface that allows you to do non-atomic writes. Buggy applications can break because of this. The behavior is almost never going to be different until you start trying to use extremely large (say, over a megabyte) writes: if you actually depend on writes being complete and atomic, you check that what you intended to write (a reasonable amount) was exactly what was written in a single system call. If you don't, then you're supposed to correctly handle short writes by completing them yourself. If your application expects to have multiple interleaved appenders do the right thing for these giant writes, I don't expect it will work. The implmentation, but not the manpage, would continue to match the POSIX semantics (with regard to short writes). See: If it expects NFS-level append atomicity of large writes, it will not get that. If it expects local-machine-level append atomicity of large writes, it could get that if we provide an interface for !IO_UNIT. Note that file locking is also an option... I don't believe there is any way to provide unlimited-sized, retryable (in the NFS atomic transaction level), NFS client writes. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 15:18:20 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 77CFD16A4CE; Fri, 15 Apr 2005 15:18:20 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.3/8.13.1) with ESMTP id j3FFJ4l3003148; Fri, 15 Apr 2005 11:19:04 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.3/8.13.1/Submit) id j3FFJ4x9003147; Fri, 15 Apr 2005 11:19:04 -0400 (EDT) (envelope-from green) Date: Fri, 15 Apr 2005 11:19:04 -0400 From: Brian Fundakowski Feldman To: Bill Vermillion Message-ID: <20050415151904.GR981@green.homeunix.org> References: <20050415120104.AD04C16A4CF@hub.freebsd.org> <20050415141052.GB96815@wjv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050415141052.GB96815@wjv.com> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: immenent disk failure ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 15:18:20 -0000 On Fri, Apr 15, 2005 at 10:10:52AM -0400, Bill Vermillion wrote: > On or about Fri, Apr 15, 2005 at 12:01 , while attempting a > Zarathustra emulation freebsd-hackers-request@freebsd.org thus spake: > > > > > Message: 4 > > Date: Thu, 14 Apr 2005 10:58:02 -0500 (CDT) > > From: "H. S." > > Subject: imminent disk failure ? > > ... > > > I have a server running 4.X for almost two years now, without > > problems - rock solid as it should be - yesterday the server > > became unresponsive, now that I have access again, and while > > checking the logs, I found this as the last message before the > > unresponsiveness: > > > /kernel: ad0: READ command timeout tag=0 serv=0 - resetting > > > The next message is the system getting back on, 1hour later. > > > I have not changed anything kernel-related on this system for > > a long time (jul 2004), just apply the occasional kernel patch > > and rebuild/reboot the system. I never encountered this problem > > before. Could this message mean this disk is giving its last > > breaths ? > > It might help if we knew a bit more about the system such > a drive make and model - you can see that in dmesg. That may > point out some device that is known to be problematic. > > The last time I got timeout errors like that was in the 3.x era > with a SCSI controller. Last IDE problem I had was a bad read > that force the system into PIO mode with over 75% performance > decrease. The only way around that one that I was aware of was a > reboot. For any disk within perhaps the last five years you should be able to just use SMART to perform a thorough health test on your hard drives and view their statistics and error logs. I don't know why it doesn't currently do much on SCSI, but ports/sysutils/smartmontools works great for ATA. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 15:43:15 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E54B316A4CE for ; Fri, 15 Apr 2005 15:43:15 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C43E043D53 for ; Fri, 15 Apr 2005 15:43:14 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id j3FFgsd1087448; Sat, 16 Apr 2005 01:12:55 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sat, 16 Apr 2005 01:12:42 +0930 User-Agent: KMail/1.8 References: <200504151303.j3FD3Bhv073436@marlena.vvi.at> <20050415150408.GA1442@britannica.bec.de> In-Reply-To: <20050415150408.GA1442@britannica.bec.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9280831.WS9p8XR1su"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200504160112.49813.doconnor@gsoft.com.au> X-Spam-Score: -2.5 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Joerg Sonnenberger Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 15:43:16 -0000 --nextPart9280831.WS9p8XR1su Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 16 Apr 2005 00:34, Joerg Sonnenberger wrote: > > You may want to check out timeout(9) / untimeout(9), see man 9 timeout > > for details. > > You should not use timeout(9) without a very good reason, the callout_* > interface is prefered. Can someone add a warning to the top of the makefile similar to the one for= =20 spl? =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 --nextPart9280831.WS9p8XR1su Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCX+D55ZPcIHs/zowRAl4iAJ9iOJKXuStBcMALTHID0gy63UpoiwCeNOqb EpTWKdmolsbIcYo4Zwmi8/I= =ikMS -----END PGP SIGNATURE----- --nextPart9280831.WS9p8XR1su-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 15:55:37 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D156716A4CE for ; Fri, 15 Apr 2005 15:55:37 +0000 (GMT) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4971643D45 for ; Fri, 15 Apr 2005 15:55:37 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id 2F2DB35707 for ; Fri, 15 Apr 2005 17:55:36 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1001) id 01CDE7D02; Fri, 15 Apr 2005 17:55:33 +0200 (CEST) Date: Fri, 15 Apr 2005 17:55:33 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20050415155533.GA3652@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200504151303.j3FD3Bhv073436@marlena.vvi.at> <20050415150408.GA1442@britannica.bec.de> <200504160112.49813.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504160112.49813.doconnor@gsoft.com.au> User-Agent: Mutt/1.5.9i Subject: Re: MDELAY() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 15:55:37 -0000 On Sat, Apr 16, 2005 at 01:12:42AM +0930, Daniel O'Connor wrote: > On Sat, 16 Apr 2005 00:34, Joerg Sonnenberger wrote: > > > You may want to check out timeout(9) / untimeout(9), see man 9 timeout > > > for details. > > > > You should not use timeout(9) without a very good reason, the callout_* > > interface is prefered. > > Can someone add a warning to the top of the makefile similar to the one for > spl? It's not that bad, timeout(9) has a few cases, where replacing it involves work. I've done that in DragonFly, I know what I'm talking about. The reason for this advice is that the timeout(9) API has two major short comings: (a) It depends on some internal magic to provide the storage, but doesn't have a clear way to handle errors. The storage space can be a few hundred KB of kernel memory mostly wasted. (b) It is difficult to cancel all outstanding timers correctly because the race conditions are difficult to avoid when calling untimeout. Since (b) is pretty much a requirement for the kernel nowaday and you have to keep track of the return value anyway, you can almost mechanically convert such code to the callout_* interface. That also avoids (a). Concerning your original question about the inefficiency of DELAY, what timeouts are we talking about? For anything in the area of a few micro seconds, DELAY is most likely better, because it avoids context switches and the associated cache pollution. Joerg From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 00:46:21 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA6DC16A4CE for ; Sat, 16 Apr 2005 00:46:21 +0000 (GMT) Received: from web50208.mail.yahoo.com (web50208.mail.yahoo.com [206.190.38.49]) by mx1.FreeBSD.org (Postfix) with SMTP id 72E0243D4C for ; Sat, 16 Apr 2005 00:46:21 +0000 (GMT) (envelope-from nahthan666@yahoo.com) Received: (qmail 51800 invoked by uid 60001); 16 Apr 2005 00:46:20 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=MhAt18L/vAX7cKKQHJaPsya+yqKpCzoiuQ+RZW4oY8y+tE8dshx7MoSxSWxBEc7bpJJzuVAsIV28rU/KkfnHcrF+aOtQTWZoh1hVPhwfT5T5vtiX+isMe7y5QUwKJK4vQvebwOZYQDtLp/GK3BXqXr0pinn2oE6zR6OGvkleFcs= ; Message-ID: <20050416004620.51798.qmail@web50208.mail.yahoo.com> Received: from [198.95.226.224] by web50208.mail.yahoo.com via HTTP; Fri, 15 Apr 2005 17:46:20 PDT Date: Fri, 15 Apr 2005 17:46:20 -0700 (PDT) From: nahthan subramanian To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: core dump submissions with send-pr? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 00:46:22 -0000 Hello, I have a few recent 5.3 panics I would like to submit. send-pr always bails telling me that it is out of space, despite the fact that the local filesystems have plenty of space free: pixie# send-pr -a ./backtrace -a ./uname-output -a ./messages -a ./sysctl-a-output -a ./dmesg.output -a ./GENERIC -a ./SMP -a /u/nate/proj/FreeBSD/crashes/bldf2.eng/vmcore.0.gz /usr/bin/send-pr: Out of space What is the proper method for submitting cores along with backtraces to the FreeBSD development team? Is it useful to submit cores, or is the backtrace sufficient? Thank you, --------------------------------- Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 01:41:40 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4564916A4CE for ; Sat, 16 Apr 2005 01:41:40 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB60B43D5D for ; Sat, 16 Apr 2005 01:41:39 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so695876rnf for ; Fri, 15 Apr 2005 18:41:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ve18+1sSM9QRnilvTNxFyijZ7rqyz1fbdivM0/Kx3QE7uvkD4y4sg7w+NgeD8rV9TJrZV31aY+1iQ3VE0pHNBJxObaNgqYEMMUqZ5QJlvK3M7a4g9mplafn/kAT49QkqvX+9O3QOE2KnHAcFYAcCj2v9wD9nYjttG1FuRo1caKI= Received: by 10.38.92.16 with SMTP id p16mr3246627rnb; Fri, 15 Apr 2005 18:41:38 -0700 (PDT) Received: by 10.38.209.22 with HTTP; Fri, 15 Apr 2005 18:41:38 -0700 (PDT) Message-ID: <84dead720504151841a6fb47f@mail.gmail.com> Date: Sat, 16 Apr 2005 01:41:38 +0000 From: Joseph Koshy To: nahthan subramanian In-Reply-To: <20050416004620.51798.qmail@web50208.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050416004620.51798.qmail@web50208.mail.yahoo.com> cc: freebsd-hackers@freebsd.org Subject: Re: core dump submissions with send-pr? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Joseph Koshy List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 01:41:40 -0000 > What is the proper method for submitting cores along with=20 > backtraces to the FreeBSD development team? Is it useful to=20 > submit cores, or is the backtrace sufficient? =20 Firstly, GNATS works over email and sending in a 4GB+ MIME=20 encoded core file could overload the mail servers of not just the FreeBSD project, but also those of the volunteers who track the freebsd-bugs list. Secondly the GNATS repository is itself replicated on many=20 sites and so you would also earn the wrath of mirror site admins across the world :). Instead, you could first describe the problem on -stable. =20 It may turn out to be a known problem (you can check yourself=20 with a quick browse of the archives). If it *is* a new bug then please do file a PR with a backtrace,=20 your machine configuration, and a description of the problem. =20 Many times a core file is not necessary, but if needed it generally suffices to put it up somewhere where a developer=20 can access it. --=20 FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 06:16:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B3AD16A4CE for ; Sat, 16 Apr 2005 06:16:19 +0000 (GMT) Received: from cliffclavin.cs.rpi.edu (cliffclavin.cs.rpi.edu [128.213.1.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id B695B43D48 for ; Sat, 16 Apr 2005 06:16:18 +0000 (GMT) (envelope-from crossd@cs.rpi.edu) Received: from monica.cs.rpi.edu (root@monica.cs.rpi.edu [128.213.7.2]) j3G6GHCU041043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 16 Apr 2005 02:16:17 -0400 (EDT) Received: from monica.cs.rpi.edu (crossd@localhost [127.0.0.1]) by monica.cs.rpi.edu (8.12.9p2/8.12.6) with ESMTP id j3G6GHir091573 for ; Sat, 16 Apr 2005 02:16:17 -0400 (EDT) (envelope-from crossd@monica.cs.rpi.edu) Received: from localhost (crossd@localhost)j3G6GHqC091570 for ; Sat, 16 Apr 2005 02:16:17 -0400 (EDT) (envelope-from crossd@monica.cs.rpi.edu) Date: Sat, 16 Apr 2005 02:16:17 -0400 (EDT) From: "David E. Cross" To: freebsd-hackers@freebsd.org Message-ID: <20050416021004.Q91559@monica.cs.rpi.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.43 Subject: ASUS DRW-1608P, doesn't write anything X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 06:16:19 -0000 I have problem with an ASUS DRW-1609P with both 5.3 and 5.4. It won't write any media. Even "burncd" fails with the following error: (Yes, I know I have "test" mode on, I got tired of making coasters) > burncd -f /dev/acd0 -s max -v -t data file.iso fixate > adding type 0x08 file mp3.iso.aa size 720000 KB 360000 blocks > next writeable LBA 2136 > addr = 2136 size = 737280000 blocks = 360000 > writing from file mp3.iso.aa size 720000 KB > written this track 1120 KB (0%) total 1120 KB > only wrote -1 of 32768 bytes: Device busy Relevent line from dmesg: acd0: DVDR at ata1-master PIO4 atapicam doesn't fix it. UDMA doesn't fix it. GENERIC kernel. Reading works fine. Suggestions? -- David E. Cross From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 06:45:26 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE0D316A4CE for ; Sat, 16 Apr 2005 06:45:26 +0000 (GMT) Received: from cydem.org (S0106000103ce4c9c.ed.shawcable.net [68.149.254.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57A9443D2F for ; Sat, 16 Apr 2005 06:45:26 +0000 (GMT) (envelope-from soralx@cydem.org) Received: from S01060020ed3972ba.ed.shawcable.net (S01060020ed3972ba.ed.shawcable.net [68.149.254.68]) by cydem.org (Postfix/FreeBSD) with ESMTP id A0F7A38DE4; Sat, 16 Apr 2005 00:45:25 -0600 (MDT) From: To: Date: Sat, 16 Apr 2005 00:45:45 -0600 User-Agent: KMail/1.5.4 References: <20050416021004.Q91559@monica.cs.rpi.edu> In-Reply-To: <20050416021004.Q91559@monica.cs.rpi.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504160045.45791.soralx@cydem.org> Subject: Re: ASUS DRW-1608P, doesn't write anything X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 06:45:26 -0000 > I have problem with an ASUS DRW-1609P with both 5.3 and 5.4. It won't > write any media. Even "burncd" fails with the following error: > > (Yes, I know I have "test" mode on, I got tired of making coasters) > > > burncd -f /dev/acd0 -s max -v -t data file.iso fixate > > adding type 0x08 file mp3.iso.aa size 720000 KB 360000 blocks > > next writeable LBA 2136 > > addr = 2136 size = 737280000 blocks = 360000 > > writing from file mp3.iso.aa size 720000 KB > > written this track 1120 KB (0%) total 1120 KB > > only wrote -1 of 32768 bytes: Device busy > > Relevent line from dmesg: > > acd0: DVDR at ata1-master PIO4 > > atapicam doesn't fix it. UDMA doesn't fix it. GENERIC kernel. > > Reading works fine. > > Suggestions? Same with: acd1: DVDR drive at ata1 as slave acd1: read 5511KB/s (5511KB/s) write 2755KB/s (2755KB/s), 2000KB buffer, PIO4 acd1: Reads: CDR, CDRW, CDDA stream, DVDROM, DVDR, packet acd1: Writes: CDR, CDRW, DVDR, test write, burnproof acd1: Audio: play, 256 volume levels acd1: Mechanism: ejectable tray, unlocked acd1: Medium: no/blank disc I simply use it through ATAPICAM layer with cdrecord - always worked perfectly. Would be interesting to know why these devices don't behave properly. Timestamp: 0x4260B31F [SorAlx] http://cydem.org.ua/ ridin' VN1500-B2 From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 09:51:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DB1D16A4CE for ; Sat, 16 Apr 2005 09:51:19 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 667A043D1F for ; Sat, 16 Apr 2005 09:51:18 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j3G9mQHU008457 for freebsd-hackers@freebsd.org.checked; Sat, 16 Apr 2005 13:48:26 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (localhost.cronyx.ru [127.0.0.1]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j3G9kPEt008451; Sat, 16 Apr 2005 13:46:25 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <4260DCB2.1000108@cronyx.ru> Date: Sat, 16 Apr 2005 13:36:50 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: Max Laier References: <200504080220.57899.max@love2party.net> <4256F545.90401@elischer.org> <200504151342.07851.max@love2party.net> In-Reply-To: <200504151342.07851.max@love2party.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org cc: monthly@freebsd.org Subject: Re: Call for FreeBSD status reports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 09:51:19 -0000 IIRC most of reports should valid from the last call since they wasn't published. Am I right, or we should send them again? rik Max Laier: >All, > >as I wrote last week: > > >>Submissions are due on April 15. Thanks a lot, and we are hoping for a >>big turn-out. >> >> > >As always this is not final, but please get your reports ready by monday and >maybe let us know that you are planing to submit. Unfortunately we have a >dramatically lower turn-out so far, I hope to see more reports floating in >over the weekend. Thanks a lot! > >http://www.FreeBSD.org/news/status/ > > > From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 20:20:48 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90D9916A4CE for ; Sat, 16 Apr 2005 20:20:48 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A91043D1F for ; Sat, 16 Apr 2005 20:20:48 +0000 (GMT) (envelope-from mrparsons@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so834106rng for ; Sat, 16 Apr 2005 13:20:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:content-type:content-transfer-encoding; b=S24ic301uaonbOy4MRW+Bw9jkiiyYMDzaTBJW7iWiOoRW5WR7nyLkM5MODvLryvTZaAHOfzod6Ks+4PEjEUCT9Ge4da13wTvFHntO5hg07vmIUqZzAFXPjoXCwL+lnuxqkF/DKQ0u1SVEU4toribEffoNKHDHhN67dUhZRHPFn8= Received: by 10.38.152.65 with SMTP id z65mr2388515rnd; Sat, 16 Apr 2005 13:20:47 -0700 (PDT) Received: from ?192.168.0.2? ([70.49.41.137]) by mx.gmail.com with ESMTP id f3sm1383218rne.2005.04.16.13.20.46; Sat, 16 Apr 2005 13:20:47 -0700 (PDT) Message-ID: <426173A4.90200@gmail.com> Date: Sat, 16 Apr 2005 16:20:52 -0400 From: "M. Parsons" User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: ext2 drives under 5.3 not umounting on reboots X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 20:20:48 -0000 I have a ext2 linux partition mounted under /linux via the fstab line: /dev/ad2s1 /linux ext2fs rw 1 2 It will automount on bootup, but if I do a reboot or shutdown -h now, it doesnt get umounted properly. In fact, if this /linux is mounted, then /, /usr, /var, and /tmp (all seperate ufs slices on another hard drive) also get tainted during a reboot. And on the next startup I get the good ole: WARNING: /usr was not properly dismounted, leaving me to fsck the drives in single mode (which sucks, as the fbsd machine is a headless NAT machine). Running fsck in single mode does fix everything. So whats going on here? reboot aint properly umounting partitions, and fsck doesnt seem to be properly running during bootup if it detects tainted filesystems. Any ideas? Freebsd 5.3 SMP kernel. From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 21:07:40 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE05D16A4CE for ; Sat, 16 Apr 2005 21:07:40 +0000 (GMT) Received: from mxsf35.cluster1.charter.net (mxsf35.cluster1.charter.net [209.225.28.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4767843D49 for ; Sat, 16 Apr 2005 21:07:40 +0000 (GMT) (envelope-from c0ldbyte@myrealbox.com) Received: from mxip11.cluster1.charter.net (mxip11a.cluster1.charter.net [209.225.28.141])j3GL7dGN026257 for ; Sat, 16 Apr 2005 17:07:39 -0400 Received: from 24.247.253.134.gha.mi.chartermi.net (HELO eleanor.us1.wmi.uvac.net) (24.247.253.134) by mxip11.cluster1.charter.net with ESMTP; 16 Apr 2005 17:07:39 -0400 X-Ironport-AV: i="3.92,106,1112587200"; d="scan'208"; a="1033609315:sNHT13085620" Date: Sat, 16 Apr 2005 17:07:35 -0400 (EDT) From: c0ldbyte To: "M. Parsons" In-Reply-To: <426173A4.90200@gmail.com> Message-ID: <20050416170356.E70414@eleanor.us1.wmi.uvac.net> References: <426173A4.90200@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: ext2 drives under 5.3 not umounting on reboots X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 21:07:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 16 Apr 2005, M. Parsons wrote: > I have a ext2 linux partition mounted under /linux via the fstab line: > > /dev/ad2s1 /linux ext2fs rw 1 2 > > It will automount on bootup, but if I do a reboot or shutdown -h now, it > doesnt get umounted properly. In fact, if this /linux is mounted, then /, > /usr, /var, and /tmp (all seperate ufs slices on another hard drive) also get > tainted during a reboot. And on the next startup I get the good ole: > WARNING: /usr was not properly dismounted, leaving me to fsck the drives in > single mode (which sucks, as the fbsd machine is a headless NAT machine). > Running fsck in single mode does fix everything. > > So whats going on here? reboot aint properly umounting partitions, and fsck > doesnt seem to be properly running during bootup if it detects tainted > filesystems. > > Any ideas? > > Freebsd 5.3 SMP kernel. Try this line: /dev/ad2s1 /linux ext2fs rw 0 0 But remember the ext2 code has been buggy for a while and is not allways a good choice to try and do writes on it. Might be a better choice to change rw to ro and to also check that drive/partition for errors with its original fsck to fix any errors if there is any then it will most likely mount properly and umount properly. Best of luck, --c0ldbyte - -- ( When in doubt, use brute force. -- Ken Thompson 1998 ) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) Comment: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF7DF979F Comment: Fingerprint = D1DC 0AA4 1C4E EAD4 24EB 7E77 B261 50BA F7DF 979F iD8DBQFCYX6asmFQuvffl58RAilFAJ0RPeJHhvEJezh0qcy8lWj9we1IMwCfS7La /SULj+UxXMfIdKv+PYf+vQ4= =JRYg -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 22:45:58 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC9D116A4CE for ; Sat, 16 Apr 2005 22:45:58 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4613143D48 for ; Sat, 16 Apr 2005 22:45:58 +0000 (GMT) (envelope-from mrparsons@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so845359rng for ; Sat, 16 Apr 2005 15:45:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=a4u+vZUpHmyFoNahNmxOCbSkODWNGwCmhUlnLsia6irTZtFfDTS/D+IDFambqXASptD3cNqAJ9fkd0MbIp/zCLtWaR9mpx1vFF8tUv7MAuCBXxD0vKqXb9QR66uELK+IUE0VF2xEfTcDBUI2uJT3N4pJhNREAoEK4qZ4+FL6Nhk= Received: by 10.38.125.64 with SMTP id x64mr3451260rnc; Sat, 16 Apr 2005 15:45:57 -0700 (PDT) Received: from ?192.168.0.2? ([70.49.41.137]) by mx.gmail.com with ESMTP id 75sm850869rnb.2005.04.16.15.45.57; Sat, 16 Apr 2005 15:45:57 -0700 (PDT) Message-ID: <426195AB.7010302@gmail.com> Date: Sat, 16 Apr 2005 18:46:03 -0400 From: "M. Parsons" User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <426173A4.90200@gmail.com> <20050416170356.E70414@eleanor.us1.wmi.uvac.net> In-Reply-To: <20050416170356.E70414@eleanor.us1.wmi.uvac.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ext2 drives under 5.3 not umounting on reboots X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 22:45:58 -0000 c0ldbyte wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sat, 16 Apr 2005, M. Parsons wrote: > >> I have a ext2 linux partition mounted under /linux via the fstab line: >> >> /dev/ad2s1 /linux ext2fs rw 1 2 >> >> It will automount on bootup, but if I do a reboot or shutdown -h now, >> it doesnt get umounted properly. In fact, if this /linux is mounted, >> then /, /usr, /var, and /tmp (all seperate ufs slices on another hard >> drive) also get tainted during a reboot. And on the next startup I >> get the good ole: WARNING: /usr was not properly dismounted, leaving >> me to fsck the drives in single mode (which sucks, as the fbsd >> machine is a headless NAT machine). Running fsck in single mode does >> fix everything. >> >> So whats going on here? reboot aint properly umounting partitions, >> and fsck doesnt seem to be properly running during bootup if it >> detects tainted filesystems. >> >> Any ideas? >> >> Freebsd 5.3 SMP kernel. > > > Try this line: > /dev/ad2s1 /linux ext2fs rw 0 0 > > But remember the ext2 code has been buggy for a while and is not allways > a good choice to try and do writes on it. Might be a better choice to > change rw to ro and to also check that drive/partition for errors with > its original fsck to fix any errors if there is any then it will most > likely mount properly and umount properly. > > Best of luck, > --c0ldbyte Well, I just said screw it, backed up the files I needed, then converted the whole disk to UFS. Time to wash my hands clean of linux anywas. :-) Still sort of worried that reboot wasnt unmounting the linux drive, but oh well, no more worries now. :) Mark