From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 8 00:05:29 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0C0F16A41F for ; Sun, 8 Jan 2006 00:05:29 +0000 (GMT) (envelope-from ilyaver@mail.ru) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 375EE43D45 for ; Sun, 8 Jan 2006 00:05:27 +0000 (GMT) (envelope-from ilyaver@mail.ru) Received: from [85.21.147.160] (port=1424 helo=UA0WONE34JO8YO8) by mx2.mail.ru with esmtp id 1EvO3p-000JR1-00 for freebsd-hackers@freebsd.org; Sun, 08 Jan 2006 03:05:25 +0300 Date: Sun, 8 Jan 2006 03:04:44 +0300 From: Ilya E Veretenkin X-Mailer: The Bat! (v3.0) Professional X-Priority: 3 (Normal) Message-ID: <72482398.20060108030444@mail.ru> To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: FreeBSD 6.0 - amount of total visible memory is decreasing in time X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ilya E Veretenkin List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 00:05:29 -0000 Problem: Total amount of visible memory is decreasing while system is running (total amount = sum of all memory fields in 'top' utility output, in other words: Active+Inact+Wired+Cache+Buf+Free) OS: FreeBSD 6 Server: 2xAmd64bit, 4GB memory, tyan motherboard hw.physmem: 3478589440 hw.realmem: 3488743424 These values don't change in time. Just after server boot, the sum of memory fields in 'top' utility output is 3405M (this is correct: hw.physmem is the same). But this sum(i.e. total visible memory for OS) is decreasing in time, according to top's output. After all, server begins to swap and needs to be rebooted again. Here goes monitoring log. It was created by hand-written perl script, which is called every minute and which summarizes 'top' utility's 6 memory fields. Total memory(Active+Inact+Wired+Cache+Buf+Free) is in the second column in the following log: Sat Jan 7 20:37:00 MSK 2006 3224 Sat Jan 7 20:38:00 MSK 2006 3224 Sat Jan 7 20:39:00 MSK 2006 3224 Sat Jan 7 20:40:00 MSK 2006 3225 Sat Jan 7 20:41:00 MSK 2006 3223 Sat Jan 7 20:42:00 MSK 2006 3224 Sat Jan 7 20:43:00 MSK 2006 3222 Sat Jan 7 20:44:00 MSK 2006 3223 Sat Jan 7 20:45:00 MSK 2006 3221 Sat Jan 7 20:46:00 MSK 2006 3218 Sat Jan 7 20:47:00 MSK 2006 3217 Sat Jan 7 20:48:00 MSK 2006 3218 Sat Jan 7 20:49:00 MSK 2006 3213 Sat Jan 7 20:50:00 MSK 2006 3212 Sat Jan 7 20:51:00 MSK 2006 3212 Sat Jan 7 20:52:00 MSK 2006 3212 Sat Jan 7 20:53:00 MSK 2006 3211 Sat Jan 7 20:54:00 MSK 2006 3211 Sat Jan 7 20:55:00 MSK 2006 3210 Sat Jan 7 20:56:00 MSK 2006 3211 Sat Jan 7 20:57:00 MSK 2006 3209 Sat Jan 7 20:58:00 MSK 2006 3211 Sat Jan 7 20:59:00 MSK 2006 3210 Sat Jan 7 21:00:00 MSK 2006 3209 Sat Jan 7 21:01:00 MSK 2006 3208 Sat Jan 7 21:02:00 MSK 2006 3207 Sat Jan 7 21:03:00 MSK 2006 3205 Sat Jan 7 21:04:00 MSK 2006 3206 Sat Jan 7 21:05:00 MSK 2006 3206 Sat Jan 7 21:06:00 MSK 2006 3204 Sat Jan 7 21:07:00 MSK 2006 3203 Sat Jan 7 21:08:00 MSK 2006 3204 Sat Jan 7 21:09:00 MSK 2006 3202 Sat Jan 7 21:10:00 MSK 2006 3202 Sat Jan 7 21:11:00 MSK 2006 3204 Sat Jan 7 21:12:00 MSK 2006 3203 Sat Jan 7 21:13:00 MSK 2006 3203 Sat Jan 7 21:14:00 MSK 2006 3203 Sat Jan 7 21:15:00 MSK 2006 3202 Sat Jan 7 21:16:00 MSK 2006 3202 Sat Jan 7 21:17:00 MSK 2006 3202 Sat Jan 7 21:18:00 MSK 2006 3201 Sat Jan 7 21:19:00 MSK 2006 3201 Sat Jan 7 21:20:00 MSK 2006 3201 Sat Jan 7 21:21:00 MSK 2006 3202 Sat Jan 7 21:22:00 MSK 2006 3201 Sat Jan 7 21:23:00 MSK 2006 3200 Sat Jan 7 21:24:00 MSK 2006 3203 Sat Jan 7 21:25:00 MSK 2006 3202 Sat Jan 7 21:26:00 MSK 2006 3201 Sat Jan 7 21:27:00 MSK 2006 3203 Sat Jan 7 21:28:00 MSK 2006 3203 Sat Jan 7 21:29:00 MSK 2006 3203 Sat Jan 7 21:30:00 MSK 2006 3202 Sat Jan 7 21:31:00 MSK 2006 3203 Sat Jan 7 21:32:00 MSK 2006 3203 Sat Jan 7 21:33:00 MSK 2006 3202 Sat Jan 7 21:34:00 MSK 2006 3202 Sat Jan 7 21:35:00 MSK 2006 3201 Sat Jan 7 21:36:00 MSK 2006 3201 Sat Jan 7 21:37:00 MSK 2006 3201 Sat Jan 7 21:38:00 MSK 2006 3200 Sat Jan 7 21:39:00 MSK 2006 3201 Sat Jan 7 21:40:00 MSK 2006 3199 Sat Jan 7 21:41:00 MSK 2006 3201 Sat Jan 7 21:42:01 MSK 2006 3201 Sat Jan 7 21:43:00 MSK 2006 3200 Sat Jan 7 21:44:00 MSK 2006 3200 Sat Jan 7 21:45:00 MSK 2006 3200 Sat Jan 7 21:46:00 MSK 2006 3200 Sat Jan 7 21:47:00 MSK 2006 3199 Sat Jan 7 21:48:00 MSK 2006 3199 Sat Jan 7 21:49:00 MSK 2006 3199 Sat Jan 7 21:50:00 MSK 2006 3198.544 Sat Jan 7 21:51:00 MSK 2006 3199 Sat Jan 7 21:52:00 MSK 2006 3199 Sat Jan 7 21:53:00 MSK 2006 3198 Sat Jan 7 21:54:00 MSK 2006 3197 Sat Jan 7 21:55:00 MSK 2006 3198 Sat Jan 7 21:56:00 MSK 2006 3197 Sat Jan 7 21:57:00 MSK 2006 3198 Sat Jan 7 21:58:00 MSK 2006 3197 Sat Jan 7 21:59:00 MSK 2006 3197 Sat Jan 7 22:00:00 MSK 2006 3198 Sat Jan 7 22:01:00 MSK 2006 3197 Sat Jan 7 22:02:00 MSK 2006 3197 Sat Jan 7 22:03:00 MSK 2006 3197 Sat Jan 7 22:04:00 MSK 2006 3196 Sat Jan 7 22:05:00 MSK 2006 3196 Sat Jan 7 22:06:00 MSK 2006 3195 Sat Jan 7 22:07:00 MSK 2006 3195.62 Sat Jan 7 22:08:00 MSK 2006 3196 Sat Jan 7 22:09:00 MSK 2006 3196 Sat Jan 7 22:10:00 MSK 2006 3196 Sat Jan 7 22:11:00 MSK 2006 3194 Sat Jan 7 22:12:00 MSK 2006 3195 Sat Jan 7 22:13:00 MSK 2006 3196 Sat Jan 7 22:14:00 MSK 2006 3195 Sat Jan 7 22:14:00 MSK 2006 3195 (+-2 megabyte fluctuations here is a result of rounding) As you can see, the memory, which was visible from OS's point of view, decreased from 3224 to 3195 Megabytes in less than 2 hours, according to 'top' utility's output. And this process will continue to the point, where swapping begins. Server during this monitoring was running MySql 4.1.15 + Apache 1.3 under heavy load. I'd like to mention one more time: _total_ memory decreases (not free memory). The problem seems very strange for me. How to get rid of such memory loss? And what is the reason of such memory loss? From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 8 01:11:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A8C116A41F for ; Sun, 8 Jan 2006 01:11:01 +0000 (GMT) (envelope-from lists-freebsd@silverwraith.com) Received: from gooseberry.silverwraith.com (pear.silverwraith.com [69.12.167.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1282143D49 for ; Sun, 8 Jan 2006 01:11:00 +0000 (GMT) (envelope-from lists-freebsd@silverwraith.com) Received: from avleen by gooseberry.silverwraith.com with local (Exim 4.52 (FreeBSD)) id 1EvP5I-0005wC-HV for freebsd-hackers@freebsd.org; Sat, 07 Jan 2006 17:11:00 -0800 Date: Sat, 7 Jan 2006 17:11:00 -0800 From: Avleen Vig To: freebsd-hackers@freebsd.org Message-ID: <20060108011100.GJ10162@silverwraith.com> References: <53e3a9930601070128w6d5a736bl69e48840c92826ae@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53e3a9930601070128w6d5a736bl69e48840c92826ae@mail.gmail.com> User-Agent: Mutt/1.5.11 Subject: Re: Microsoft Offfice on FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 01:11:01 -0000 On Sat, Jan 07, 2006 at 04:28:04AM -0500, Tom Wickline wrote: > Hello, > > I thought you guys would get a kick out of seeing Word 2003 running on > FreeBSD.. > Here is the link: http://wiki.winehq.org/Office-BSD?action=show Thanks for putting me off my lunch. :P -- Avleen Vig Systems Administrator Personal: www.silverwraith.com "Wickedness is a myth invented by good people to account for the curious attractiveness of others." - Oscar Wilde From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 8 06:46:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 D2A3916A422; Sun, 8 Jan 2006 06:46:07 +0000 (GMT) (envelope-from takawata@init-main.com) Received: from ns.init-main.com (104.194.138.210.bn.2iij.net [210.138.194.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45E3C43D45; Sun, 8 Jan 2006 06:45:54 +0000 (GMT) (envelope-from takawata@init-main.com) Received: from init-main.com (localhost [127.0.0.1]) by ns.init-main.com (8.13.3/8.13.3) with ESMTP id k086j60N044844; Sun, 8 Jan 2006 15:45:06 +0900 (JST) (envelope-from takawata@init-main.com) Message-Id: <200601080645.k086j60N044844@ns.init-main.com> To: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org From: takawata@jp.freebsd.org Date: Sun, 08 Jan 2006 15:45:06 +0900 Sender: takawata@init-main.com Cc: Subject: Driver for a 3G mobile phone. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 06:46:08 -0000 Hi, I recently bought a FOMA(NTT DoCoMo 3G system) mobile phone. It has USB device interface and you can access it with dedicated USB-mobile phone cable for a few thousands yen. You can access technical document at I wrote a driver for it. I heard Kyocera PHS terminal (a.k.a. kyopon) also work with it. dmesg: ucom0: SHARP Corporation. FOMA SH902i, rev 2.00/1.00, addr 2, iclass 2/136 ifno: 0 ucom0:Supported Mode:modem,vendor1 ucom0: data interface 1, has CM over data, has break ucom1: SHARP Corporation. FOMA SH902i, rev 2.00/1.00, addr 2, iclass 2/136 ifno: 3 ucom1:Supported Mode:obex,vendor1 ucom1: data interface 4, has CM over data, has break ucom2: SHARP Corporation. FOMA SH902i, rev 2.00/1.00, addr 2, iclass 2/136 ifno: 5 ucom2:Supported Mode:handsfree Features: Modem port:(ucom0) Packet data communication. 64K data communication. Issueing AT command. OBEX port:(ucom1) Accessing phone book etc. AT command port:(ucom2) Issueing AT command. Dialing voice or Video conferce. Watching RING. Those features are identified with dmesg for now. Enjoy! From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 8 11:14:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A251B16A41F; Sun, 8 Jan 2006 11:14:26 +0000 (GMT) (envelope-from dirkx@webweaving.org) Received: from skutsje.san.webweaving.org (skutsje.san.webweaving.org [209.132.96.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F35743D45; Sun, 8 Jan 2006 11:14:26 +0000 (GMT) (envelope-from dirkx@webweaving.org) Received: from skutsje.san.webweaving.org (skutsje.san.webweaving.org [209.132.96.45] (may be forged)) by skutsje.san.webweaving.org (8.12.9/8.12.9) with ESMTP id k08BEKBW068838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Jan 2006 03:14:21 -0800 (PST) (envelope-from dirkx@webweaving.org) Received: from localhost (dirkx@localhost) by skutsje.san.webweaving.org (8.12.9/8.12.9/Submit) with ESMTP id k08BEJCx068824; Sun, 8 Jan 2006 03:14:20 -0800 (PST) (envelope-from dirkx@webweaving.org) X-Authentication-Warning: skutsje.san.webweaving.org: dirkx owned process doing -bs Date: Sun, 8 Jan 2006 03:14:19 -0800 (PST) From: Dirk-Willem van Gulik X-X-Sender: dirkx@skutsje.san.webweaving.org To: takawata@jp.freebsd.org In-Reply-To: <200601080645.k086j60N044844@ns.init-main.com> Message-ID: <20060108031100.C65950@skutsje.san.webweaving.org> References: <200601080645.k086j60N044844@ns.init-main.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Driver for a 3G mobile phone. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 11:14:26 -0000 On Sun, 8 Jan 2006 takawata@jp.freebsd.org wrote: > I wrote a driver for it. WoW - thank you. This worked perfectly and out of the box (the modem,vendor1) ! Would love to see this going into freebsd by default. Dw. From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 8 12:47:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60F1716A41F for ; Sun, 8 Jan 2006 12:47:42 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from smtp.xbsd.org (xbsd.org [82.233.2.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE5AD43D45 for ; Sun, 8 Jan 2006 12:47:41 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id 6968511A42; Sun, 8 Jan 2006 13:47:40 +0100 (CET) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 80442-02; Sun, 8 Jan 2006 13:47:34 +0100 (CET) Received: from cream.xbsd.org (cream.xbsd.org [192.168.42.6]) by smtp.xbsd.org (Postfix) with ESMTP id 13B7B11A1E; Sun, 8 Jan 2006 13:47:33 +0100 (CET) From: Florent Thoumie To: freebsd-hackers@freebsd.org Date: Sun, 8 Jan 2006 13:47:22 +0100 User-Agent: KMail/1.8.2 References: <20060106205744.O13365@erdgeist.org> <20060107133847.GJ86645@submonkey.net> <20060107144020.M73297@erdgeist.org> In-Reply-To: <20060107144020.M73297@erdgeist.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1177575.tobxbktdo2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200601081347.27506.flz@xbsd.org> X-Virus-Scanned: amavisd-new at xbsd.org Cc: Ceri Davies , Dirk Engling Subject: Re: Using pkg_add fetch only X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 12:47:42 -0000 --nextPart1177575.tobxbktdo2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 07 January 2006 14:48, Dirk Engling wrote: > On Sat, 7 Jan 2006, Ceri Davies wrote: > > Two stage process. In chroot(), pkg_add -r portupgrade, then pkg_fetch > > -R the stuff you want. Once you're done you can just blow away the > > chroot environment and all the installed stuff. > > So I win nothing besides having to set up a complicated three-stage > chain. chroot() by itself will not be enough as long as the portupgrade > tools are not compiled static. > > > Sure, it'll install a bunch of other crap like ruby, but it's a lot > > easier than hacking up your own tool. > > > >From the ezjail Homepage: > > "Since ezjail is written entirely in sh, there is no need to install other > script languages into the Host-system" > > So: No way. But your help has pointed me into the right direction. I'll try to submit a patch for a fetch-only option to krion later if peopl= e=20 think it's useful. =2D-=20 =46lorent Thoumie flz@FreeBSD.org =46reeBSD Committer --nextPart1177575.tobxbktdo2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDwQnfMxEkbVFH3PQRArBfAJ9SjigknVKqNM6fr8NpbzPshZd6/gCbB/r5 LE1sE7CeOTUtNF4AlC4n8ao= =kdli -----END PGP SIGNATURE----- --nextPart1177575.tobxbktdo2-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 8 18:37:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E93C216A41F for ; Sun, 8 Jan 2006 18:37:39 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from smtp.xbsd.org (xbsd.org [82.233.2.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 572B843D46 for ; Sun, 8 Jan 2006 18:37:39 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id CE24A11A1F; Sun, 8 Jan 2006 19:37:37 +0100 (CET) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 82605-09; Sun, 8 Jan 2006 19:37:29 +0100 (CET) Received: from cream.xbsd.org (cream.xbsd.org [192.168.42.6]) by smtp.xbsd.org (Postfix) with ESMTP id 7E78311A18; Sun, 8 Jan 2006 19:37:29 +0100 (CET) From: Florent Thoumie To: freebsd-hackers@freebsd.org Date: Sun, 8 Jan 2006 19:37:19 +0100 User-Agent: KMail/1.8.2 References: <20060106205744.O13365@erdgeist.org> <20060107144020.M73297@erdgeist.org> <200601081347.27506.flz@xbsd.org> In-Reply-To: <200601081347.27506.flz@xbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1295540.9EaB7FGaRJ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200601081937.25081.flz@xbsd.org> X-Virus-Scanned: amavisd-new at xbsd.org Cc: Dirk Engling , Ceri Davies Subject: Re: Using pkg_add fetch only X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 18:37:40 -0000 --nextPart1295540.9EaB7FGaRJ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 08 January 2006 13:47, Florent Thoumie wrote: > On Saturday 07 January 2006 14:48, Dirk Engling wrote: > > On Sat, 7 Jan 2006, Ceri Davies wrote: > > > Two stage process. In chroot(), pkg_add -r portupgrade, then pkg_fet= ch > > > -R the stuff you want. Once you're done you can just blow away the > > > chroot environment and all the installed stuff. > > > > So I win nothing besides having to set up a complicated three-stage > > chain. chroot() by itself will not be enough as long as the portupgrade > > tools are not compiled static. > > > > > Sure, it'll install a bunch of other crap like ruby, but it's a lot > > > easier than hacking up your own tool. > > > > > >From the ezjail Homepage: > > > > "Since ezjail is written entirely in sh, there is no need to install > > other script languages into the Host-system" > > > > So: No way. But your help has pointed me into the right direction. > > I'll try to submit a patch for a fetch-only option to krion later if > people think it's useful. Here is something that should work [1]. I think you could do what you want with pkg_add -frnK . Note that the first package will be named package.t[bg]z but the others wi= ll=20 contain the version number. Please tell me if this works as expected. [1] http://people.freebsd.org/~flz/local/pkginstall-keep-pkg.diff =2D-=20 =46lorent Thoumie flz@FreeBSD.org =46reeBSD Committer --nextPart1295540.9EaB7FGaRJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDwVvlMxEkbVFH3PQRAjfRAKCNauSX5OqfiRnaKXi5/7GKW4SXSACdGbxj 6Z3IX0wcgmN+2KhSbGDff+o= =ZrzK -----END PGP SIGNATURE----- --nextPart1295540.9EaB7FGaRJ-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 02:30:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7A0916A41F for ; Mon, 9 Jan 2006 02:30:05 +0000 (GMT) (envelope-from b_h2004@mail.ru) Received: from relay.kiev.sovam.com (relay.kiev.sovam.com [212.109.32.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E90243D48 for ; Mon, 9 Jan 2006 02:30:05 +0000 (GMT) (envelope-from b_h2004@mail.ru) Received: from [83.170.253.194] (helo=SOL-dialup.194.253.170.83.sovam.net.ua) by relay.kiev.sovam.com with esmtp (Exim 4.54) id 1EvmnM-000Cgv-09 for freebsd-hackers@freebsd.org; Mon, 09 Jan 2006 04:30:04 +0200 Date: Mon, 9 Jan 2006 04:27:45 +0200 From: =?Windows-1251?B?0ODx8fvr6uA=?= X-Mailer: The Bat! (v1.62i) X-Priority: 3 (Normal) Message-ID: <1502233448.20060109042745@mail.ru> To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=Windows-1251 Content-Transfer-Encoding: 8bit X-Scanner-Signature: aaaa698a97d8009456dac6099b1a04d1 X-DrWeb-checked: yes X-SpamTest-Info: Profile: Formal (309/051227) X-SpamTest-Info: Profile: Detect Soft No RBL (4/030526) X-SpamTest-Info: {received from trusted relay} X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Marking - Keywords (2/030321) X-SpamTest-Method: Local Lists X-SpamTest-Status: Trusted X-SpamTest-Version: SMTP-Filter Version 2.1.1 [0150], SpamtestISP/Release Subject: (no subject) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?Windows-1251?B?0ODx8fvr6uA=?= List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 02:30:05 -0000 h2004@mail.ru From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 14:08:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF07516A420 for ; Mon, 9 Jan 2006 14:08:23 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with SMTP id B170143D46 for ; Mon, 9 Jan 2006 14:08:22 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: (qmail 66796 invoked from network); 9 Jan 2006 11:03:47 -0000 Received: from dullmdaler.ongs.co.jp (HELO ?192.168.1.101?) (202.216.232.62) by natial.ongs.co.jp with SMTP; 9 Jan 2006 11:03:47 -0000 Message-ID: <43C2472C.5070103@freebsd.org> Date: Mon, 09 Jan 2006 20:21:16 +0900 From: Daichi GOTO User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051219) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <43BD1054.7020409@ongs.co.jp> In-Reply-To: <43BD1054.7020409@ongs.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: daichi@freebsd.org, ozawa@ongs.co.jp Subject: Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 14:08:24 -0000 I have updated the patches: For 7-current patch: http://people.freebsd.org/~daichi/unionfs/unionfs-p3.diff For 6.x patch: http://people.freebsd.org/~daichi/unionfs/unionfs6-p3.diff changes from -p2 to -p3: - fixed problem of attribute associated with shadow dir - fixed lock/unlock problem (-p2 is not enought of this) - fixed initial treatment problem of some componentnames Please do the unionfs test with above new patch. And do not forget to include daichi@freebsd.org on Cc: even for mail directory to ozawa. He can not use English well. All mails he sent are written by daichi :) > For 7-current patch: > http://people.freebsd.org/~daichi/unionfs/unionfs-p2.diff (latest patch) > http://people.freebsd.org/~daichi/unionfs/unionfs-p1.diff (old patch) > > For 6.x patch: > http://people.freebsd.org/~daichi/unionfs/unionfs6-p2.diff (latest > patch) > http://people.freebsd.org/~daichi/unionfs/unionfs6-p1.diff (old patch) > > HowToInstall: > http://people.freebsd.org/~daichi/unionfs/howtoinstall (UTF-8) > > Detail description: > http://people.freebsd.org/~daichi/unionfs/index-ja.html (Japanese, UTF-8) > http://people.freebsd.org/~daichi/unionfs/index.html (English, but not > yet, so sorry) > > Please keep up your interest around unionfs. We need to improve > FreeBSD's unionfs I believe :) -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 16:12:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E878E16A41F for ; Mon, 9 Jan 2006 16:12:36 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 891D143D4C for ; Mon, 9 Jan 2006 16:12:36 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 85A3F11AC9; Mon, 9 Jan 2006 11:12:35 -0500 (EST) Received: by canoe.dclg.ca (Postfix, from userid 101) id 201084AC30; Mon, 9 Jan 2006 11:12:30 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17346.35694.82671.474056@canoe.dclg.ca> Date: Mon, 9 Jan 2006 11:12:30 -0500 To: freebsd-hackers@freebsd.org X-Mailer: VM 7.17 under 21.4 (patch 18) "Social Property" XEmacs Lucid Subject: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 16:12:37 -0000 Has anyone had a look at the following: none1@pci3:1:2: class=0x080501 card=0x01aa1028 chip=0x08221180 rev=0x17 hdr=0x00 vendor = 'Ricoh Co Ltd' device = 'SD Bus Host Adapter' class = base peripheral This shows up on my new Dell XPS-170 laptop. Since there is no USB attachment for the SD card reader, I can only surmise that this is it. Is someone looking at this, or is this completely new? Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================ From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 17:16:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FAF816A41F; Mon, 9 Jan 2006 17:16:42 +0000 (GMT) (envelope-from imp@BSDIMP.COM) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4A3A43D4C; Mon, 9 Jan 2006 17:16:41 +0000 (GMT) (envelope-from imp@BSDIMP.COM) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k09HEgxh053021; Mon, 9 Jan 2006 10:14:43 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 09 Jan 2006 10:14:44 -0700 (MST) Message-Id: <20060109.101444.117788644.imp@bsdimp.com> To: takawata@jp.freebsd.org From: "M. Warner Losh" In-Reply-To: <200601080645.k086j60N044844@ns.init-main.com> References: <200601080645.k086j60N044844@ns.init-main.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 09 Jan 2006 10:14:44 -0700 (MST) Cc: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Driver for a 3G mobile phone. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 17:16:42 -0000 takawata-san, I have looked over this patch, and it looks good to me. Will you have time to commit it soon, or would you like someone else to commit for you? Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 17:57:47 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 7086B16A41F for ; Mon, 9 Jan 2006 17:57:47 +0000 (GMT) (envelope-from hugo@gorlaeus.net) Received: from smtp-vbr8.xs4all.nl (smtp-vbr8.xs4all.nl [194.109.24.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id B197143D5E for ; Mon, 9 Jan 2006 17:57:44 +0000 (GMT) (envelope-from hugo@gorlaeus.net) Received: from [10.0.0.10] (a213-84-138-84.adsl.xs4all.nl [213.84.138.84]) by smtp-vbr8.xs4all.nl (8.13.3/8.13.3) with ESMTP id k09HvguD093477 for ; Mon, 9 Jan 2006 18:57:43 +0100 (CET) (envelope-from hugo@gorlaeus.net) Message-ID: <43C2A40A.8030503@gorlaeus.net> Date: Mon, 09 Jan 2006 18:57:30 +0100 From: Hugo Meiland User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) 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 X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Subject: typo src/sys/coda/coda_vfsops.c revision 1.60?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 17:57:47 -0000 Hi, I was just browsing the coda code in the head cvs, src/sys/coda/coda_vfsops.c revision 1.60 and came along the following defines : #define MARK_ENTRY(op) (coda_vfsopstats[op].entries++) #define MARK_INT_SAT(op) (coda_vfsopstats[op].sat_intrn++) #define MARK_INT_FAIL(op) (coda_vfsopstats[op].unsat_intrn++) #define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++) Is that last MARK/MRAK a possible typo?? btw it is called later on as MARK_INT_GEN.... Cheers, Hugo Meiland From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 18:08:00 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 2FB7A16A41F for ; Mon, 9 Jan 2006 18:08:00 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 724F043D48 for ; Mon, 9 Jan 2006 18:07:58 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.3/8.13.3) with ESMTP id k09I7vFu066050; Mon, 9 Jan 2006 21:07:57 +0300 (MSK) (envelope-from maxim@macomnet.ru) Date: Mon, 9 Jan 2006 21:07:57 +0300 (MSK) From: Maxim Konovalov To: Hugo Meiland In-Reply-To: <43C2A40A.8030503@gorlaeus.net> Message-ID: <20060109210714.D65844@mp2.macomnet.net> References: <43C2A40A.8030503@gorlaeus.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: hackers@freebsd.org Subject: Re: typo src/sys/coda/coda_vfsops.c revision 1.60?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 18:08:00 -0000 On Mon, 9 Jan 2006, 18:57+0100, Hugo Meiland wrote: > Hi, > > I was just browsing the coda code in the head cvs, > src/sys/coda/coda_vfsops.c revision 1.60 and came along the > following defines : > > #define MARK_ENTRY(op) (coda_vfsopstats[op].entries++) > #define MARK_INT_SAT(op) (coda_vfsopstats[op].sat_intrn++) > #define MARK_INT_FAIL(op) (coda_vfsopstats[op].unsat_intrn++) > #define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++) > > Is that last MARK/MRAK a possible typo?? Fixed. Thanks! > btw it is called later on as MARK_INT_GEN.... It is not used in coda_vfsops.c so it was harmless. -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 18:37:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A68316A41F for ; Mon, 9 Jan 2006 18:37:41 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8633943D45 for ; Mon, 9 Jan 2006 18:37:40 +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 k09Ibcwf015254; Mon, 9 Jan 2006 10:37:38 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k09IbcsM015253; Mon, 9 Jan 2006 10:37:38 -0800 Date: Mon, 9 Jan 2006 10:37:38 -0800 From: Brooks Davis To: David Gilbert Message-ID: <20060109183738.GA4822@odin.ac.hmc.edu> References: <17346.35694.82671.474056@canoe.dclg.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <17346.35694.82671.474056@canoe.dclg.ca> 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: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 18:37:41 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: > Has anyone had a look at the following: >=20 > none1@pci3:1:2: class=3D0x080501 card=3D0x01aa1028 chip=3D0x08221180 rev= =3D0x17 hdr=3D0x00 > vendor =3D 'Ricoh Co Ltd' > device =3D 'SD Bus Host Adapter' > class =3D base peripheral >=20 > This shows up on my new Dell XPS-170 laptop. Since there is no USB > attachment for the SD card reader, I can only surmise that this is > it. Is someone looking at this, or is this completely new? People are looking at it, but there are no docs available. Apparently, there is some work being done to reverse engineer it. Linux doesn't support it either. -- 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 --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDwq1wXY6L6fI4GtQRAqzPAKDXcbGHDgVsQHAxs3PFrwYzGoIcVwCeJvsp +N+n+9CD/Khk6BB658BzRtE= =2Sot -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 18:37:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0CF016A41F for ; Mon, 9 Jan 2006 18:37:59 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from mailserver.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAF3343D45 for ; Mon, 9 Jan 2006 18:37:58 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by mailserver.sandvine.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 9 Jan 2006 13:36:46 -0500 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id 23CB813652; Mon, 9 Jan 2006 13:37:57 -0500 (EST) Date: Mon, 9 Jan 2006 13:37:57 -0500 From: Ed Maste To: nielsen@memberwebs.com Message-ID: <20060109183756.GA14717@sandvine.com> References: <20060106022920.BF7DADCA990@mail.npubs.com> <20060107231659.DD05BDCA9A5@mail.npubs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060107231659.DD05BDCA9A5@mail.npubs.com> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 09 Jan 2006 18:36:46.0203 (UTC) FILETIME=[A5066CB0:01C6154B] Cc: freebsd-hackers@freebsd.org Subject: Re: Polling for devices other than NICs [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 18:37:59 -0000 On Sat, Jan 07, 2006 at 11:17:00PM +0000, Nate Nielsen wrote: > Nate Nielsen wrote: > > The polling functionality in FreeBSD is currently a bit NIC centric. > > With a few changes other types devices can use the polling subsystem. > > Attached is my first whack at this. > > > > This is some of my first hacking on the FreeBSD kernel. It'd be great if > > there was someone who could take a look and help me get it right. > > Attached is a patch against HEAD. This looks like a good start to expanding polling beyond network interfaces, but it doesn't address the fact that the polling code currently has a single feedback parameter, shared by all devices, to control the amount of work done in each handler. Passing the count parameter to devices other than network interfaces implies that their drivers should do roughly as much work as a network interface would to process that number of packets. If the other devices take too long per count then polling-enabled network interfaces will end up without enough CPU time to do their required work. In addition, the current polling algorithm breaks down when you get to very high CPU utilization by the stack (e.g. if acting as a high bandwidth router). This happens because it adds one count per tick if the polling did not run longer than one hardclock interval, but brings it down to 7/8ths if it did. This ends up producing a sawtooth effect in the amount of work done by the polling handlers. Andre Oppermann is performing some high-perf stack testing, and he ran into this effect; in polling mode the maximum packet rate was achieved while there was still idle CPU time. I have a proof of concept patch that modifies the polling feedback algorithm to measure the amount of time spent in the polling handlers, and then attempt to schedule an appropriate amount of work to fill out the time slot. Andre is going to be testing it out shortly. Don't get me wrong, I think your patch is a step in the right direction, but we do have more work to do in order to completely generalize the polling code. (By the way, it seems some of your driver diffs move the *_poll functions around, making it harder to see what you actually changed. It would be better to leave the functions where they already are, I think.) -Ed Maste From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 20:35:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 5DDE816A436 for ; Mon, 9 Jan 2006 20:35:53 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE42D43D45 for ; Mon, 9 Jan 2006 20:35:52 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 33C40121FA; Mon, 9 Jan 2006 15:35:52 -0500 (EST) Received: by canoe.dclg.ca (Postfix, from userid 101) id 4ADDE4AC30; Mon, 9 Jan 2006 15:35:51 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17346.51495.219254.784361@canoe.dclg.ca> Date: Mon, 9 Jan 2006 15:35:51 -0500 To: Brooks Davis In-Reply-To: <20060109183738.GA4822@odin.ac.hmc.edu> References: <17346.35694.82671.474056@canoe.dclg.ca> <20060109183738.GA4822@odin.ac.hmc.edu> X-Mailer: VM 7.17 under 21.4 (patch 18) "Social Property" XEmacs Lucid Cc: freebsd-hackers@freebsd.org, David Gilbert Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 20:35:53 -0000 >>>>> "Brooks" == Brooks Davis writes: Brooks> On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: >> Has anyone had a look at the following: >> >> none1@pci3:1:2: class=0x080501 card=0x01aa1028 chip=0x08221180 >> rev=0x17 hdr=0x00 vendor = 'Ricoh Co Ltd' device = 'SD Bus Host >> Adapter' class = base peripheral >> >> This shows up on my new Dell XPS-170 laptop. Since there is no USB >> attachment for the SD card reader, I can only surmise that this is >> it. Is someone looking at this, or is this completely new? Brooks> People are looking at it, but there are no docs available. Brooks> Apparently, there is some work being done to reverse engineer Brooks> it. Linux doesn't support it either. Wasn't there a disk extension to project evil? Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================ From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 20:38:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 378A116A41F for ; Mon, 9 Jan 2006 20:38:38 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7CCD43D48 for ; Mon, 9 Jan 2006 20:38:37 +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 k09Kca07024775; Mon, 9 Jan 2006 12:38:36 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k09Kca51024774; Mon, 9 Jan 2006 12:38:36 -0800 Date: Mon, 9 Jan 2006 12:38:36 -0800 From: Brooks Davis To: David Gilbert Message-ID: <20060109203836.GA24598@odin.ac.hmc.edu> References: <17346.35694.82671.474056@canoe.dclg.ca> <20060109183738.GA4822@odin.ac.hmc.edu> <17346.51495.219254.784361@canoe.dclg.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <17346.51495.219254.784361@canoe.dclg.ca> 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: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 20:38:38 -0000 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 09, 2006 at 03:35:51PM -0500, David Gilbert wrote: > >>>>> "Brooks" =3D=3D Brooks Davis writes: >=20 > Brooks> On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: > >> Has anyone had a look at the following: > >>=20 > >> none1@pci3:1:2: class=3D0x080501 card=3D0x01aa1028 chip=3D0x08221180 > >> rev=3D0x17 hdr=3D0x00 vendor =3D 'Ricoh Co Ltd' device =3D 'SD Bus Host > >> Adapter' class =3D base peripheral > >>=20 > >> This shows up on my new Dell XPS-170 laptop. Since there is no USB > >> attachment for the SD card reader, I can only surmise that this is > >> it. Is someone looking at this, or is this completely new? >=20 > Brooks> People are looking at it, but there are no docs available. > Brooks> Apparently, there is some work being done to reverse engineer > Brooks> it. Linux doesn't support it either. >=20 > Wasn't there a disk extension to project evil? It's been discussed, but I don't know of any actual work on it. -- 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 --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDwsnJXY6L6fI4GtQRAm6jAJ9GAD27nemieiz6RDySVQubZwHNMwCg4CeQ vBeXSiT6AGH2UiCNSfdkDSY= =ce2K -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 02:50:41 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 1494716A41F for ; Tue, 10 Jan 2006 02:50:41 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.220.107.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B82C43D45 for ; Tue, 10 Jan 2006 02:50:38 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 3726 invoked by uid 2003); 10 Jan 2006 02:43:22 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.048304 secs); 10 Jan 2006 02:43:22 -0000 Received: from unknown (HELO ?192.168.0.40?) (216.220.116.154) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 10 Jan 2006 02:43:21 -0000 Date: Mon, 9 Jan 2006 21:50:35 -0500 (EST) From: Charles Sprickman X-X-Sender: spork@gee5.local To: hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: nullfs/quota/jail interaction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 02:50:41 -0000 Hi all, I know nullfs is not to be relied upon, but I did hit an interesting bug the other day, and I was wondering if I should bother with a PR or not. In short, doing the following seems to dirty the partition and leave the machine in a state where a hard reset is required to recover. This is -stable from 1/4/06. -start a jail within a partition dedicated to jails, in my case it looks like: /jails /jails/jail1 /jails/jail2 etc... -use nullfs to link the host's ports tree into the jail: mount_nullfs /usr/ports /jails/jail1/usr/ports -enable quotas for the /jails partition -stop the jails and run quotacheck to make sure everything is consistent quotacheck -v /jails At that point, the quotacheck command seems to deadlock on something. The process is not interruptible (ie: CTRL-C, CTRL-Z do not do anything but echo) even with a "kill -9" from the host. Any subsequent command that attempts to read anything from that partition will also hang as above. If a shutdown is issued, that does not kill off any of the deadlocked processes and the machine must be manually reset (something of a pain if it's remote). In order to get a clean boot I had to remove all jail startup commands from rc.conf and make sure nothing else (like syslog) was trying to do anything in /jails. Even then, the background fsck eventually deadlocked as well. I had reboot once more with /jails commented out of fstab and then run the fsck manually to recover. Should I write this up and send it in case one day someone decides to fix nullfs? I'm also wondering about the seperate issue of having some deadlocked process not allowing the machine to reboot - I've seen similar reports of this behaviour with various other less-than-stable filesystems like vfs. It would be nice to have some way of telling the kernel "please stop waiting on this disk, it's not coming back, it's futile, please just reboot". Thanks, Charles From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 03:14:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83F0416A41F for ; Tue, 10 Jan 2006 03:14:54 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30004.mail.mud.yahoo.com (web30004.mail.mud.yahoo.com [68.142.200.67]) by mx1.FreeBSD.org (Postfix) with SMTP id E991A43D45 for ; Tue, 10 Jan 2006 03:14:53 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 89252 invoked by uid 60001); 10 Jan 2006 03:14:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ROgpVrtlQ7QkJ/H/XHLIqpye5T8X4Qp3N+OT0Ke7FZfJ5a6CdRPjRHCK8yamAL0qBv3P6IhtInuYH0uEmPVZ56/106CY8IOVp5479+Gmm6LV7yie4as+fw2pyogTahpmdDaU5DF9DgHRdAV3oGo4yydglFPmR8Dc2wh/VTue+eM= ; Message-ID: <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com> Received: from [202.79.60.148] by web30004.mail.mud.yahoo.com via HTTP; Mon, 09 Jan 2006 19:14:53 PST Date: Mon, 9 Jan 2006 19:14:53 -0800 (PST) From: kamal kc To: freebsd MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 03:14:54 -0000 dear everybody, i want to use the routine get_system_info() to get the load averages of the cpu. i found it that top uses it. but i do not know which object files do i need to link it to my program. also the struct system_info is defined in the machine.h of the /usr/src/contrib/top. do i need to include it or is there another header defining it. actually i want to know the load averages when my program runs in the kernel mode. is there other methods of obtaining the sytem load averages ??? thanks, kamal __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 04:09:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27BCD16A41F for ; Tue, 10 Jan 2006 04:09:42 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69CD243D45 for ; Tue, 10 Jan 2006 04:09:41 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail12.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0A49dim027293 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 10 Jan 2006 15:09:39 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0A49dHh060730; Tue, 10 Jan 2006 15:09:39 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0A49cFQ060729; Tue, 10 Jan 2006 15:09:39 +1100 (EST) (envelope-from pjeremy) Date: Tue, 10 Jan 2006 15:09:38 +1100 From: Peter Jeremy To: kamal kc Message-ID: <20060110040938.GE60380@cirb503493.alcatel.com.au> References: <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Cc: freebsd Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 04:09:42 -0000 On Mon, 2006-Jan-09 19:14:53 -0800, kamal kc wrote: >i want to use the routine get_system_info() to get the >load averages of the cpu. i found it that top uses it. The approved mechanism is via the sysctl(3) name "vm.loadavg" or OID CTL_VM.VM_LOADAVG - which returns a struct loadavg. See sysctl(3) for details. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 04:47:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 537E316A41F for ; Tue, 10 Jan 2006 04:47:45 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30002.mail.mud.yahoo.com (web30002.mail.mud.yahoo.com [68.142.200.65]) by mx1.FreeBSD.org (Postfix) with SMTP id C6EDF43D45 for ; Tue, 10 Jan 2006 04:47:44 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 64421 invoked by uid 60001); 10 Jan 2006 04:47:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ezXHfHT47l//d/xa4TsKnfXEbCup1TfqcYVukbva8KDhKyy+UVOWvF8V+Frd7kH0PMXJyFgydS3WlQPDeESlrlaoBfXykPDU9SpGApha4CO0tT5mbLgCY8W6akLwDPxP7QdyHtVNRDKCvLfJbpKV4wQwSjVBj/DHNadJunTnGRg= ; Message-ID: <20060110044744.64419.qmail@web30002.mail.mud.yahoo.com> Received: from [202.161.131.69] by web30002.mail.mud.yahoo.com via HTTP; Mon, 09 Jan 2006 20:47:44 PST Date: Mon, 9 Jan 2006 20:47:44 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <20060110040938.GE60380@cirb503493.alcatel.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 04:47:45 -0000 > On Mon, 2006-Jan-09 19:14:53 -0800, kamal kc wrote: > >i want to use the routine get_system_info() to get > the > >load averages of the cpu. i found it that top uses > it. > > The approved mechanism is via the sysctl(3) name > "vm.loadavg" or OID > CTL_VM.VM_LOADAVG - which returns a struct loadavg. > See sysctl(3) > for details. thanks a lot. i will use it . kamal __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 05:46:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFEB716A41F for ; Tue, 10 Jan 2006 05:46:59 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 536D343D46 for ; Tue, 10 Jan 2006 05:46:59 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id k0A5kujB069796; Mon, 9 Jan 2006 23:46:56 -0600 (CST) (envelope-from dan) Date: Mon, 9 Jan 2006 23:46:56 -0600 From: Dan Nelson To: kamal kc Message-ID: <20060110054656.GE89638@dan.emsphone.com> References: <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 05:46:59 -0000 In the last episode (Jan 09), kamal kc said: > dear everybody, > > i want to use the routine get_system_info() to get the load averages > of the cpu. i found it that top uses it. get_system_info is just a function /in/ top itself that gets the CPU usage. It uses the vm.loadavg sysctl to get the load average. A simpler way is to just call the getloadavg() function; see its manpage for more info. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 07:59:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 350FE16A422 for ; Tue, 10 Jan 2006 07:59:16 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30006.mail.mud.yahoo.com (web30006.mail.mud.yahoo.com [68.142.200.69]) by mx1.FreeBSD.org (Postfix) with SMTP id 9DE1443D49 for ; Tue, 10 Jan 2006 07:59:11 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 72060 invoked by uid 60001); 10 Jan 2006 07:59:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ePm2mVdf0j28Fo450SykoJ6r6awwWwcRvOAs/GgLk1QqeI4fvxs3D5W391Af3qIc2r2MXjbEls3nig0p0q26F2aCSu4giwE1+QMgi9rB3XiQnZ8DGRwvya1RwDZ2eibLucBVr821b4IoCdL8M5cZIetnUDHZXGyWNb6Io+wY4JY= ; Message-ID: <20060110075910.72058.qmail@web30006.mail.mud.yahoo.com> Received: from [202.161.131.69] by web30006.mail.mud.yahoo.com via HTTP; Mon, 09 Jan 2006 23:59:10 PST Date: Mon, 9 Jan 2006 23:59:10 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <20060110054656.GE89638@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 07:59:16 -0000 --- Dan Nelson wrote: > In the last episode (Jan 09), kamal kc said: > > dear everybody, > > > > i want to use the routine get_system_info() to get > the load averages > > of the cpu. i found it that top uses it. > > get_system_info is just a function /in/ top itself > that gets the CPU > usage. It uses the vm.loadavg sysctl to get the > load average. A > simpler way is to just call the getloadavg() > function; see its manpage > for more info. thanks i tried getloadavg() it worked. but when i tried to put it in the kernel the kernel failed to link. i also looked at sysctl(3) and i guess it is also for user based programs. so i looked at the sys/sysctl.h and found that there was sysctl_find_oid() that was defined for kernel. but i don't know how to use it. i could not get any info on the web. the function declaration was :: int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, int *nindx, struct sysctl_req *req); isn't it the function i should be using to retrieve the sysctl value ??? how should i use it ?? any demo on using it would be immensely helpful for me. thanks, kamal __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 08:16:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 28AFB16A41F; Tue, 10 Jan 2006 08:16:53 +0000 (GMT) (envelope-from matteo@freebsd.org) Received: from vsmtp4.tin.it (vsmtp4.tin.it [212.216.176.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id A85FA43D45; Tue, 10 Jan 2006 08:16:52 +0000 (GMT) (envelope-from matteo@freebsd.org) Received: from kaiser.sig11.org (82.54.178.124) by vsmtp4.tin.it (7.2.060.1) id 43BC4306003F0CFE; Tue, 10 Jan 2006 09:16:58 +0100 Received: by kaiser.sig11.org (Postfix, from userid 1000) id 7000C6306; Tue, 10 Jan 2006 09:16:51 +0100 (CET) Date: Tue, 10 Jan 2006 09:16:51 +0100 From: Matteo Riondato To: Daichi GOTO Message-ID: <20060110081651.GD42716@kaiser.sig11.org> Mail-Followup-To: Matteo Riondato , Daichi GOTO , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, ozawa@ongs.co.jp References: <43BD1054.7020409@ongs.co.jp> <43C2472C.5070103@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43C2472C.5070103@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, ozawa@ongs.co.jp Subject: Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 08:16:53 -0000 On Mon, Jan 09, 2006 at 08:21:16PM +0900, Daichi GOTO wrote: > I have updated the patches: > > For 7-current patch: > http://people.freebsd.org/~daichi/unionfs/unionfs-p3.diff > > For 6.x patch: > http://people.freebsd.org/~daichi/unionfs/unionfs6-p3.diff > > changes from -p2 to -p3: > - fixed problem of attribute associated with shadow dir > - fixed lock/unlock problem (-p2 is not enought of this) > - fixed initial treatment problem of some componentnames > > Please do the unionfs test with above new patch. I think that on sys/fs/unionfs/union_vfsops.c, line 116, done should be size_t, to have unionfs compiled on amd64 (and probably other !32bit archs) Best Regards -- Matteo Riondato FreeBSD Volunteer (http://freebsd.org) G.U.F.I. Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org) From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 09:10:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 C195E16A422 for ; Tue, 10 Jan 2006 09:10:07 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail24.syd.optusnet.com.au (mail24.syd.optusnet.com.au [211.29.133.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5776443D67 for ; Tue, 10 Jan 2006 09:09:58 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail24.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0A99uuJ024523 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 10 Jan 2006 20:09:56 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0A99uHh061017; Tue, 10 Jan 2006 20:09:56 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0A99t6q061016; Tue, 10 Jan 2006 20:09:55 +1100 (EST) (envelope-from pjeremy) Date: Tue, 10 Jan 2006 20:09:55 +1100 From: Peter Jeremy To: kamal kc Message-ID: <20060110090955.GF60380@cirb503493.alcatel.com.au> References: <20060110054656.GE89638@dan.emsphone.com> <20060110075910.72058.qmail@web30006.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060110075910.72058.qmail@web30006.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Cc: freebsd Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 09:10:07 -0000 On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote: >thanks i tried getloadavg() it worked. > >but when i tried to put it in the kernel the kernel > failed to link. You didn't mention the kernel bit before. To access the load average in the kernel, you just access "averunnable" (see ). Note that you cannot do floating point arithmetic in the kernel so the load averages are stored as fixed point numbers. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 11:00:57 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A52CD16A41F; Tue, 10 Jan 2006 11:00:57 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from hepitas.ongs.net (hepitas.ongs.net [202.216.232.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3937543D4C; Tue, 10 Jan 2006 11:00:57 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from [IPv6???1] (localhost.ongs.net [127.0.0.1]) by hepitas.ongs.net (Postfix) with ESMTP id 1F9863F; Tue, 10 Jan 2006 19:40:23 +0900 (JST) Message-ID: <43C393EB.4020304@ongs.co.jp> Date: Tue, 10 Jan 2006 20:00:59 +0900 From: Masanori OZAWA Organization: ONGS Inc. User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051219) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matteo Riondato References: <43BD1054.7020409@ongs.co.jp> <43C2472C.5070103@freebsd.org> <20060110081651.GD42716@kaiser.sig11.org> In-Reply-To: <20060110081651.GD42716@kaiser.sig11.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, daichi@freebsd.org, freebsd-current@freebsd.org Subject: Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ozawa@ongs.co.jp List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 11:00:57 -0000 Matteo Riondato wrote: > I think that on sys/fs/unionfs/union_vfsops.c, line 116, done should > be size_t, to have unionfs compiled on amd64 (and probably other > !32bit archs) > > Best Regards Yes, you are correct. Danny have pointed out the same problem. It is a careless mistake, so sorry. Please try the latest patch as follow: For 7-current patch: http://people.freebsd.org/~daichi/unionfs/unionfs-p4.diff For 6.x patch: http://people.freebsd.org/~daichi/unionfs/unionfs6-p4.diff -- ONGS Inc. Masanori OZAWA (ozawa@ongs.co.jp) WWW: http://www.ongs.co.jp/ From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 11:28:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 B0BDF16A41F for ; Tue, 10 Jan 2006 11:28:22 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30001.mail.mud.yahoo.com (web30001.mail.mud.yahoo.com [68.142.200.64]) by mx1.FreeBSD.org (Postfix) with SMTP id 2B80A43D46 for ; Tue, 10 Jan 2006 11:28:22 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 75290 invoked by uid 60001); 10 Jan 2006 11:28:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bedoGCpHg0GyTQrUoF5wtoFsfhVmH57hhjbqqAYGVYcmxmkY2n6jq27UWPAA+UpOIZcwTkuYqEvkA1Myf/WxLH/FT/92wUfs4ejp+SyvXPBxkO3eP674IkmVPGWDnMqWznkHTTK+qtIVIzm97uT6dE4CecNX4RgoUOFCcEaM4I4= ; Message-ID: <20060110112821.75288.qmail@web30001.mail.mud.yahoo.com> Received: from [202.161.131.69] by web30001.mail.mud.yahoo.com via HTTP; Tue, 10 Jan 2006 03:28:21 PST Date: Tue, 10 Jan 2006 03:28:21 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <20060110090955.GF60380@cirb503493.alcatel.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 11:28:22 -0000 --- Peter Jeremy wrote: > On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote: > >thanks i tried getloadavg() it worked. > > > >but when i tried to put it in the kernel the kernel > > failed to link. > > You didn't mention the kernel bit before. To access > the load average in the kernel, you just access > "averunnable" (see ). Note that you > cannot do floating point arithmetic in the kernel so > the load averages are stored as fixed point numbers. > thanks , it worked !!!! i used the ldavg[] and fscale of averunnable to get the system load. you people are great .. kamal __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 14:11:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D26C16A41F for ; Tue, 10 Jan 2006 14:11:18 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8DB443D5A for ; Tue, 10 Jan 2006 14:11:17 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1EwKDR-0007Wu-Li for freebsd-hackers@freebsd.org; Tue, 10 Jan 2006 16:11:13 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 10 Jan 2006 16:11:13 +0200 From: Danny Braniss Message-ID: Subject: pxeboot and serial console X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 14:11:18 -0000 I can't tell when this broke, but compiling pxeboot with BOOT_PXELDR_PROBE_KEYBOARD set would redirect the console to the serial port if no keyboard was detected. This no longer works, which explains the problems i had with the serial port on my intel 1U servers. the relevant code is in /sys/boot/i386/pxeldr/pxeldr.S. compiling with BOOT_PXELDR_ALWAYS_SERIAL works as expected, so IMHO the test: testb $KEYBOARD_BIT, MEM_BIOS_KEYBOARD # keyboard present? is failing, but i have no idea why any ideas? danny From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 18:55:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 E34CF16A41F for ; Tue, 10 Jan 2006 18:55:09 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 983BF43D48 for ; Tue, 10 Jan 2006 18:55:08 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5728956 for multiple; Tue, 10 Jan 2006 13:56:43 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k0AIt1NG065232; Tue, 10 Jan 2006 13:55:03 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 10 Jan 2006 13:49:53 -0500 User-Agent: KMail/1.8.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601101349.54457.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1237/Tue Jan 10 10:53:20 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Subject: Re: pxeboot and serial console X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 18:55:10 -0000 On Tuesday 10 January 2006 09:11 am, Danny Braniss wrote: > I can't tell when this broke, but compiling pxeboot with > BOOT_PXELDR_PROBE_KEYBOARD set would redirect the console to the serial > port if no keyboard was detected. This no longer works, which explains > the problems i had with the serial port on my intel 1U servers. > > the relevant code is in /sys/boot/i386/pxeldr/pxeldr.S. > > compiling with BOOT_PXELDR_ALWAYS_SERIAL works as expected, so IMHO > the test: > testb $KEYBOARD_BIT, MEM_BIOS_KEYBOARD # keyboard present? > is failing, but i have no idea why > > any ideas? USB keyboards? Actually, it sounds in your case as if the BIOS is always claiming a keyboard is present. Perhaps your BIOS is just being lame, but that single test isn't the greatest test to use either. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 00:00:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 4067116A48B for ; Wed, 11 Jan 2006 00:00:16 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26E4C43D46 for ; Wed, 11 Jan 2006 00:00:14 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail13.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0B00B7k008951 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 11 Jan 2006 11:00:12 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0B00BHh062257; Wed, 11 Jan 2006 11:00:11 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0B00BG4062256; Wed, 11 Jan 2006 11:00:11 +1100 (EST) (envelope-from pjeremy) Date: Wed, 11 Jan 2006 11:00:11 +1100 From: Peter Jeremy To: Ilya E Veretenkin Message-ID: <20060111000011.GK60380@cirb503493.alcatel.com.au> References: <72482398.20060108030444@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72482398.20060108030444@mail.ru> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 6.0 - amount of total visible memory is decreasing in time X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 00:00:24 -0000 Since no-one else has offered any input... On Sun, 2006-Jan-08 03:04:44 +0300, Ilya E Veretenkin wrote: >Problem: Total amount of visible memory is decreasing while system is >running >(total amount = sum of all memory fields in 'top' utility output, >in other words: Active+Inact+Wired+Cache+Buf+Free) This information is also available in sysctl variables (note units): Active: vm.stats.vm.v_active_count (pages) Inact: vm.stats.vm.v_inactive_count (pages) Wired: vm.stats.vm.v_wire_count (pages) Cache: vm.stats.vm.v_cache_count (pages) Buf: vfs.bufspace (bytes) Free: vm.stats.vm.v_free_count (pages) Unfortunately, the manipulation of these variables does not lend itself to easy understanding. There's also a 7th category "unmanaged" which is not directly reported. Active, inactive, cache and free pages are all managed via page queues (vm_page_queues) whilst wired pages, buffers and other other unmanaged pages don't exist on any queue. Two possibilities are: 1) There's a leak where pages are becoming unmanaged over time. Presumably there's a path where pages are being released without being returned to the free page queue. 2) There's a bug where pages are being placed onto page queues without the associated queue size variable being incremented. Unfortunately,I can't suggest a fix offhand. Note that since these counters are all managed independently and there's no locking when you access them from userland, you could expect to see some noise when adding them all up ("rounding errors" as you've noted). >OS: FreeBSD 6 >Server: 2xAmd64bit, 4GB memory, tyan motherboard I presume you're running an amd64 kernel. Are you in a position to check if the problem still exists with the i386 kernel or with a non-SMP kernel? Are you in a position to build a kernel with "INVARIANTS" enabled (which will impact kernel performance somewhat)? If you're interested in kernel hacking, you could write a kernel module that regularly scans vm_page_array and checks the number of pages on each page queue with the number reported for that queue, as well as reporting the number of unmanaged pages compared to the buffer space and wired pages. This would at least provide a pointer to where to look next. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 01:55:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9600C16A420 for ; Wed, 11 Jan 2006 01:55:05 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30015.mail.mud.yahoo.com (web30015.mail.mud.yahoo.com [68.142.201.218]) by mx1.FreeBSD.org (Postfix) with SMTP id F0D2A43D49 for ; Wed, 11 Jan 2006 01:55:04 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 48494 invoked by uid 60001); 11 Jan 2006 01:55:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=efAAF1G/Pb5ClaUsJf0xNCwrTwTl3mNFah9uwU68KbsoZ9as4DVfA0J16sm55CiiJgbKlPk4YvZrUNRk4KuXydmqmr7gxqbzK25DgvySUW6s76CQTvZAi7QeXSRFTV3/XXy5uWirnZY7XDSg4wcKWfegkT6LJa27P8ipJ0TtvU0= ; Message-ID: <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> Received: from [202.79.62.13] by web30015.mail.mud.yahoo.com via HTTP; Tue, 10 Jan 2006 17:55:04 PST Date: Tue, 10 Jan 2006 17:55:04 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <43C3DE68.70303@oxygen.az> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 01:55:05 -0000 --- Tofik Suleymanov wrote: > kamal kc wrote: > > >--- Peter Jeremy > wrote: > >>>thanks i tried getloadavg() it worked. > >>> > >>>but when i tried to put it in the kernel the > kernel > >>>failed to link. > >>You didn't mention the kernel bit before. To > access > >>the load average in the kernel, you just access > >>"averunnable" (see ). Note that > you > >>cannot do floating point arithmetic in the kernel > so > >>the load averages are stored as fixed point > numbers. > >thanks , it worked !!!! > > > >i used the ldavg[] and fscale of averunnable to get > >the system load. > > > > > >you people are great .. > > > >kamal > > > Just a curiosity: why use kernel-space functions to > get system load ? > Isn't it better to use sysctls in user-space ? actually the thing is , i have put some code in the bridge.c routine that attempts to compress/decompress ip packets. i don't know if it was a good idea since i am just a beginner in programming in the kernel and have a little knowledge regarding it. after i put my code i got a very high amount of interrupts (irq 21: xl1 interrupts) that overloads the cpu withing seconds if i pump about 4Mbps traffic through it. so i thought as a temp solution that i could turn off the compression if ever the cpu gets overloaded and that's it. But after a second thought--> the very idea of putting the large compression routine in the bridge code now seems awkward to me. since the compression takes time and putting the code in the bridge may be causing high interrupts i now think if i can do the compression stuffs in separate thread/process than in the bridge process itself. but right now i don't know how do i create a separate process/thread, what are the routines that i need to implement for this.. and also how to dispatch control from the bridge process to a new process without blocking. i am looking into these stuffs and hope i find something from the sources but it is getting really difficult ... maybe you people could have something to say, any advice on whether i am doing the right stuffs would be greatly helpful to me .. thanks, kamal __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 03:24:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 4C04716A41F for ; Wed, 11 Jan 2006 03:24:45 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2905A43D75 for ; Wed, 11 Jan 2006 03:24:32 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.146]) ([10.251.23.146]) by a50.ironport.com with ESMTP; 10 Jan 2006 19:24:32 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43C47A6F.4070903@elischer.org> Date: Tue, 10 Jan 2006 19:24:31 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kamal kc References: <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> In-Reply-To: <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 03:24:45 -0000 kamal kc wrote: > >actually the thing is , i have put some code in the >bridge.c >routine that attempts to compress/decompress ip >packets. > >i don't know if it was a good idea since i am just a >beginner >in programming in the kernel and have a little >knowledge >regarding it. > >after i put my code i got a very high amount >of interrupts (irq 21: xl1 interrupts) that overloads >the >cpu withing seconds if i pump about 4Mbps traffic >through it. > >so i thought as a temp solution that i could turn off >the >compression if ever the cpu gets overloaded and that's >it. > >But after a second thought--> > the very idea of putting the large compression >routine >in the bridge code now seems awkward to me. since the >compression >takes time and putting the code in the bridge may be >causing high interrupts i now think if i can do the >compression >stuffs in separate thread/process than in the bridge >process itself. > >but right now i don't know how do i create a separate >process/thread, >what are the routines that i need to implement for >this.. >and also how to dispatch control from the bridge >process to a new >process without blocking. i am looking into these >stuffs and >hope i find something from the sources but it is >getting really >difficult ... > >maybe you people could have something to say, any >advice >on whether i am doing the right stuffs would be >greatly >helpful to me .. > > > you could bridge through a userland process using netgraph. I've done it.. it does work. (doing other things than compression) check out netgraph bridging.. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 04:12:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 659A216A41F for ; Wed, 11 Jan 2006 04:12:21 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D27143D45 for ; Wed, 11 Jan 2006 04:12:20 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail17.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0B4CIqx019794 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 11 Jan 2006 15:12:18 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0B4CIHh062522; Wed, 11 Jan 2006 15:12:18 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0B4CIN1062521; Wed, 11 Jan 2006 15:12:18 +1100 (EST) (envelope-from pjeremy) Date: Wed, 11 Jan 2006 15:12:17 +1100 From: Peter Jeremy To: kamal kc Message-ID: <20060111041217.GM60380@cirb503493.alcatel.com.au> References: <43C3DE68.70303@oxygen.az> <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Cc: freebsd Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 04:12:21 -0000 On Tue, 2006-Jan-10 17:55:04 -0800, kamal kc wrote: >after i put my code i got a very high amount of interrupts (irq 21: >xl1 interrupts) that overloads the cpu withing seconds if i pump >about 4Mbps traffic through it. > >so i thought as a temp solution that i could turn off the compression >if ever the cpu gets overloaded and that's it. Load average isn't a good way of doing this. averunnable.ldavg[0] represents an exponential decay average of the run queue length that is updated (roughly) every 5 seconds with a 1 minute period. This is useless at measuring short-term CPU load. cp_time[] is probably a better choice for you - it uses statclock to report the CPU utilisation (every statclock interval, one element of the array is incremented) so you can (fairly) immediately detect if you have overloaded the CPU (for some definition of "overload"). -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 16:21:51 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 5E89616A41F for ; Mon, 9 Jan 2006 16:21:51 +0000 (GMT) (envelope-from hugo@meiland.nl) Received: from fwncism1.leidenuniv.nl (chem.leidenuniv.nl [132.229.170.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E28443D48 for ; Mon, 9 Jan 2006 16:21:50 +0000 (GMT) (envelope-from hugo@meiland.nl) Received: from localhost (localhost [127.0.0.1]) by fwncism1.leidenuniv.nl (Postfix) with ESMTP id 9013D3402F for ; Mon, 9 Jan 2006 17:21:48 +0100 (CET) Received: from fwncism1.leidenuniv.nl ([127.0.0.1]) by localhost (fwncism1.leidenuniv.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09464-07 for ; Mon, 9 Jan 2006 17:21:47 +0100 (CET) Received: from fwnc5323 (fwnc5323.wks.gorlaeus.net [132.229.173.11]) by fwncism1.leidenuniv.nl (Postfix) with ESMTP id DE1163402D for ; Mon, 9 Jan 2006 17:21:47 +0100 (CET) From: Sender: "Hugo Meiland" To: Date: Mon, 9 Jan 2006 17:21:48 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcYVOMotuM2C23P0QWOgoHsKNqNePg== Message-Id: <20060109162147.DE1163402D@fwncism1.leidenuniv.nl> X-Virus-Scanned: by amavisd-new at chem.leidenuniv.nl X-Mailman-Approved-At: Wed, 11 Jan 2006 04:17:02 +0000 Cc: Subject: typo in src/sys/coda/coda_vfsops.c ?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 16:21:51 -0000 Hi, I was just browsing the source tree, and came along a possible typo in src/sys/coda/coda_vfsops.c rev 1.60: #define MARK_ENTRY(op) (coda_vfsopstats[op].entries++) #define MARK_INT_SAT(op) (coda_vfsopstats[op].sat_intrn++) #define MARK_INT_FAIL(op) (coda_vfsopstats[op].unsat_intrn++) #define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++) The last MRAK should probably be MARK, as it is called that way a few times later in the code.... Hugo Meiland From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 9 17:35:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B090C16A41F; Mon, 9 Jan 2006 17:35:35 +0000 (GMT) (envelope-from takawata@init-main.com) Received: from ns.init-main.com (104.194.138.210.bn.2iij.net [210.138.194.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A36D43D48; Mon, 9 Jan 2006 17:35:32 +0000 (GMT) (envelope-from takawata@init-main.com) Received: from init-main.com (localhost [127.0.0.1]) by ns.init-main.com (8.13.3/8.13.3) with ESMTP id k09HY3S8079152; Tue, 10 Jan 2006 02:34:07 +0900 (JST) (envelope-from takawata@init-main.com) Message-Id: <200601091734.k09HY3S8079152@ns.init-main.com> To: "M. Warner Losh" In-reply-to: Your message of "Mon, 09 Jan 2006 10:14:44 MST." <20060109.101444.117788644.imp@bsdimp.com> Date: Tue, 10 Jan 2006 02:34:03 +0900 From: Takanori Watanabe X-Mailman-Approved-At: Wed, 11 Jan 2006 04:17:17 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Driver for a 3G mobile phone. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 17:35:35 -0000 In message <20060109.101444.117788644.imp@bsdimp.com>, "M. Warner Losh" wrote: >takawata-san, > >I have looked over this patch, and it looks good to me. Will you have >time to commit it soon, or would you like someone else to commit for >you? I'll commit it soon. Thanks. From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 01:14:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D6C216A41F for ; Tue, 10 Jan 2006 01:14:21 +0000 (GMT) (envelope-from nielsen@memberwebs.com) Received: from mail.npubs.com (mail.npubs.com [209.66.100.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8AC343D46 for ; Tue, 10 Jan 2006 01:14:20 +0000 (GMT) (envelope-from nielsen@memberwebs.com) From: Nate Nielsen User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ed Maste References: <20060106022920.BF7DADCA990@mail.npubs.com> <20060107231659.DD05BDCA9A5@mail.npubs.com> <20060109183756.GA14717@sandvine.com> X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20060110013318.B8E42DCAA15@mail.npubs.com> X-Virus-Scanned: ClamAV using ClamSMTP Date: Tue, 10 Jan 2006 01:33:22 +0000 (GMT) X-Mailman-Approved-At: Wed, 11 Jan 2006 04:19:22 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Polling for devices other than NICs [patch] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 01:14:21 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ed Maste wrote: > In addition, the current polling algorithm breaks down when you get to > very high CPU utilization by the stack (e.g. if acting as a high > bandwidth router). This happens because it adds one count per tick > if the polling did not run longer than one hardclock interval, but > brings it down to 7/8ths if it did. > > This ends up producing a sawtooth effect in the amount of work done by > the polling handlers. Andre Oppermann is performing some high-perf > stack testing, and he ran into this effect; in polling mode the maximum > packet rate was achieved while there was still idle CPU time. Interesting. My (simple) work on this has been on low powered CPU machines (such as the Soekris single board systems): http://memberwebs.com/nielsen/freebsd/slow-cpu-routers.html > I have a proof of concept patch that modifies the polling feedback > algorithm to measure the amount of time spent in the polling handlers, > and then attempt to schedule an appropriate amount of work to fill out > the time slot. Andre is going to be testing it out shortly. > > Don't get me wrong, I think your patch is a step in the right direction, > but we do have more work to do in order to completely generalize the > polling code. Agreed. And sometime in the future, we should probably work towards implementing auto-switching between polling and interrupts: http://www.stanford.edu/class/cs240/readings/mogul.pdf Cheers, Nate -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDwwfte/sRCNknZa8RAnMAAJ0de3eQELrbEgp5NF56wFtR2poYBACbBetq p/ZLh5bY6dbdPiIkIJMsCEM= =RADi -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 14:18:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDE7E16A422 for ; Tue, 10 Jan 2006 14:18:59 +0000 (GMT) (envelope-from tofik@oxygen.az) Received: from mail.alkar.net (mail.alkar.net [195.248.191.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 139B943D46 for ; Tue, 10 Jan 2006 14:18:58 +0000 (GMT) (envelope-from tofik@oxygen.az) Received: from [213.227.193.75] (HELO [192.168.0.178]) by mail.alkar.net (CommuniGate Pro SMTP 4.3.9) with ESMTP id 422973386; Tue, 10 Jan 2006 16:17:30 +0200 Message-ID: <43C3DE68.70303@oxygen.az> Date: Tue, 10 Jan 2006 16:18:48 +0000 From: Tofik Suleymanov User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: kamal kc References: <20060110112821.75288.qmail@web30001.mail.mud.yahoo.com> In-Reply-To: <20060110112821.75288.qmail@web30001.mail.mud.yahoo.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 11 Jan 2006 04:21:22 +0000 Cc: freebsd Subject: Re: using get_system_info() - obtaining system load averages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2006 14:18:59 -0000 kamal kc wrote: >--- Peter Jeremy wrote: > > > >>On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote: >> >> >>>thanks i tried getloadavg() it worked. >>> >>>but when i tried to put it in the kernel the kernel >>>failed to link. >>> >>> >>You didn't mention the kernel bit before. To access >>the load average in the kernel, you just access >>"averunnable" (see ). Note that you >>cannot do floating point arithmetic in the kernel so >>the load averages are stored as fixed point numbers. >> >> >> > >thanks , it worked !!!! > >i used the ldavg[] and fscale of averunnable to get >the system load. > > >you people are great .. > >kamal > > > > > > > > > >__________________________________________ >Yahoo! DSL – Something to write home about. >Just $16.99/mo. or less. >dsl.yahoo.com > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > Just a curiosity: why use kernel-space functions to get system load ? Isn't it better to use sysctls in user-space ? From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 05:35:31 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30B9E16A41F for ; Wed, 11 Jan 2006 05:35:31 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B41F143D49 for ; Wed, 11 Jan 2006 05:35:30 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0B5YsXE001393; Tue, 10 Jan 2006 22:34:54 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 10 Jan 2006 22:35:02 -0700 (MST) Message-Id: <20060110.223502.42773946.imp@bsdimp.com> To: brooks@one-eyed-alien.net From: "M. Warner Losh" In-Reply-To: <20060109203836.GA24598@odin.ac.hmc.edu> References: <20060109183738.GA4822@odin.ac.hmc.edu> <17346.51495.219254.784361@canoe.dclg.ca> <20060109203836.GA24598@odin.ac.hmc.edu> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 10 Jan 2006 22:34:54 -0700 (MST) Cc: freebsd-hackers@freebsd.org, dgilbert@dclg.ca Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 05:35:31 -0000 In message: <20060109203836.GA24598@odin.ac.hmc.edu> Brooks Davis writes: : On Mon, Jan 09, 2006 at 03:35:51PM -0500, David Gilbert wrote: : > >>>>> "Brooks" == Brooks Davis writes: : > : > Brooks> On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: : > >> Has anyone had a look at the following: : > >> : > >> none1@pci3:1:2: class=0x080501 card=0x01aa1028 chip=0x08221180 : > >> rev=0x17 hdr=0x00 vendor = 'Ricoh Co Ltd' device = 'SD Bus Host : > >> Adapter' class = base peripheral : > >> : > >> This shows up on my new Dell XPS-170 laptop. Since there is no USB : > >> attachment for the SD card reader, I can only surmise that this is : > >> it. Is someone looking at this, or is this completely new? : > : > Brooks> People are looking at it, but there are no docs available. : > Brooks> Apparently, there is some work being done to reverse engineer : > Brooks> it. Linux doesn't support it either. : > : > Wasn't there a disk extension to project evil? : : It's been discussed, but I don't know of any actual work on it. I've seen some work on it. However, the interface isn't as easy to emulate as the network layer... Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 05:35:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DA7016A41F for ; Wed, 11 Jan 2006 05:35:38 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB9DD43D48 for ; Wed, 11 Jan 2006 05:35:37 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0B5Y5dA001392; Tue, 10 Jan 2006 22:34:12 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 10 Jan 2006 22:34:13 -0700 (MST) Message-Id: <20060110.223413.94073242.imp@bsdimp.com> To: brooks@one-eyed-alien.net From: "M. Warner Losh" In-Reply-To: <20060109183738.GA4822@odin.ac.hmc.edu> References: <17346.35694.82671.474056@canoe.dclg.ca> <20060109183738.GA4822@odin.ac.hmc.edu> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 10 Jan 2006 22:34:15 -0700 (MST) Cc: freebsd-hackers@freebsd.org, dgilbert@dclg.ca Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 05:35:38 -0000 In message: <20060109183738.GA4822@odin.ac.hmc.edu> Brooks Davis writes: : On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: : > Has anyone had a look at the following: : > : > none1@pci3:1:2: class=0x080501 card=0x01aa1028 chip=0x08221180 rev=0x17 hdr=0x00 : > vendor = 'Ricoh Co Ltd' : > device = 'SD Bus Host Adapter' : > class = base peripheral : > : > This shows up on my new Dell XPS-170 laptop. Since there is no USB : > attachment for the SD card reader, I can only surmise that this is : > it. Is someone looking at this, or is this completely new? : : People are looking at it, but there are no docs available. Apparently, : there is some work being done to reverse engineer it. Linux doesn't : support it either. It does support the SDA Standard SD Host Adapter Interface. However, The standard costs $1000 (if you are a member of the SD Association, which I think is $1800 a year), and comes with an NDA so restrictive that you'll be lucky to release a binary only version of your driver. I'm working on a port of FreeBSD to an embedded platform. For that platform, we'll need to read data from MMC/SD cards. To do that, we'll need a mmc/sd disk driver, a mmc/sd bus and a mmc/sd bridge. This should give us a fairly good architecture to write a bridge driver for the SDA Standard SD Host Adapter Interface should someone ever figure out the interface. Tantalizing clues are available for the dilligent searcher on the web (the wikipedia entry for SD cards is especially enlightening). I have no plans to implement a the standard SD interface. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 06:14:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 9B73516A41F for ; Wed, 11 Jan 2006 06:14:19 +0000 (GMT) (envelope-from darren.pilgrim@bitfreak.org) Received: from mail.bitfreak.org (mail.bitfreak.org [65.75.198.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5493D43D45 for ; Wed, 11 Jan 2006 06:14:17 +0000 (GMT) (envelope-from darren.pilgrim@bitfreak.org) Received: from smiley (mail.bitfreak.org [65.75.198.146]) by mail.bitfreak.org (Postfix) with ESMTP id 41DDB19F2C; Tue, 10 Jan 2006 22:14:16 -0800 (PST) From: "Darren Pilgrim" To: "'Brooks Davis'" Date: Tue, 10 Jan 2006 22:14:14 -0800 Message-ID: <001401c61676$3fa0c290$672a15ac@smiley> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <20060109183738.GA4822@odin.ac.hmc.edu> Importance: Normal Cc: freebsd-hackers@freebsd.org Subject: RE: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 06:14:19 -0000 From: Brooks Davis > On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: > > Has anyone had a look at the following: > > [ Ricoh SD Bus Host Adapter, PCI ID 0x08221180 ] > > People are looking at it, but there are no docs available. Apparently, > there is some work being done to reverse engineer it. Linux doesn't > support it either. That's odd, because Ricoh provides technical documentation upon request via the LSI Contact Us[1] page on their website. 1: http://www.ricoh.com/LSI/mail.html From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 06:44:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C2DC16A41F for ; Wed, 11 Jan 2006 06:44:03 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B16443D48 for ; Wed, 11 Jan 2006 06:44:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0B6hgME002047; Tue, 10 Jan 2006 23:43:42 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 10 Jan 2006 23:43:50 -0700 (MST) Message-Id: <20060110.234350.82839919.imp@bsdimp.com> To: darren.pilgrim@bitfreak.org From: "M. Warner Losh" In-Reply-To: <001401c61676$3fa0c290$672a15ac@smiley> References: <20060109183738.GA4822@odin.ac.hmc.edu> <001401c61676$3fa0c290$672a15ac@smiley> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 10 Jan 2006 23:43:43 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 06:44:03 -0000 In message: <001401c61676$3fa0c290$672a15ac@smiley> "Darren Pilgrim" writes: : From: Brooks Davis : > On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: : > > Has anyone had a look at the following: : > > : [ Ricoh SD Bus Host Adapter, PCI ID 0x08221180 ] : > : > People are looking at it, but there are no docs available. Apparently, : > there is some work being done to reverse engineer it. Linux doesn't : > support it either. : : That's odd, because Ricoh provides technical documentation upon request via : the LSI Contact Us[1] page on their website. : : 1: http://www.ricoh.com/LSI/mail.html Are you sure they provide technical documentation sufficent to write the driver? The last time I asked, I got a nice document that said that it implemented the sds standard sd host interface, but didn't document what that was. TI and winbond chips datasheets are the same way. Prove me wrong. I'd love it :-) Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 09:07:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70DD616A42B; Wed, 11 Jan 2006 09:07:35 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E296044296; Wed, 11 Jan 2006 08:59:15 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1EwboO-000B6V-Tb; Wed, 11 Jan 2006 10:58:32 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: John Baldwin In-reply-to: Your message of Tue, 10 Jan 2006 13:49:53 -0500 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 11 Jan 2006 10:58:32 +0200 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org Subject: Re: pxeboot and serial console X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 09:07:35 -0000 > On Tuesday 10 January 2006 09:11 am, Danny Braniss wrote: > > I can't tell when this broke, but compiling pxeboot with > > BOOT_PXELDR_PROBE_KEYBOARD set would redirect the console to the serial > > port if no keyboard was detected. This no longer works, which explains > > the problems i had with the serial port on my intel 1U servers. > > > > the relevant code is in /sys/boot/i386/pxeldr/pxeldr.S. > > > > compiling with BOOT_PXELDR_ALWAYS_SERIAL works as expected, so IMHO > > the test: > > testb $KEYBOARD_BIT, MEM_BIOS_KEYBOARD # keyboard present? > > is failing, but i have no idea why > > > > any ideas? > > USB keyboards? Actually, it sounds in your case as if the BIOS is always > claiming a keyboard is present. Perhaps your BIOS is just being lame, but > that single test isn't the greatest test to use either. 2 words: Power Cycle This will guarantee that the bios will/won't detect the keyboard. all is ok now. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 12:13:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 33A4316A420 for ; Wed, 11 Jan 2006 12:13:07 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30013.mail.mud.yahoo.com (web30013.mail.mud.yahoo.com [68.142.201.216]) by mx1.FreeBSD.org (Postfix) with SMTP id 9190D43D75 for ; Wed, 11 Jan 2006 12:13:06 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 62834 invoked by uid 60001); 11 Jan 2006 12:13:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZUJ6+2xkvjdc3Rkop9tZb5jKdA/9EnTGfnElD/FMhM5yLQp29kOUq3KzXlUTAglzwmRvmAZJmXW1I3LC7Offsf3VGgiDZTFl9ohhas9Ax5XXT/tdrqpumcibfcQfe2FgrGMGzAWILRSKVi4NDzUwWtbV7GdzECRcu4p3NCNkVKE= ; Message-ID: <20060111121304.62832.qmail@web30013.mail.mud.yahoo.com> Received: from [202.79.62.15] by web30013.mail.mud.yahoo.com via HTTP; Wed, 11 Jan 2006 04:13:04 PST Date: Wed, 11 Jan 2006 04:13:04 -0800 (PST) From: kamal kc To: freebsd MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 12:13:07 -0000 dear everybody, i had previous thread going on about the cpu load average. and had some discussion regarding it. i have a newer thing to discuss on so i started this thread. as i mentioned earlier i had put some code in the bridge.c that performed compression which took a long time and hence i got a high number of interface interrupts (irq22: xl interrupts). so i thought of rescheduling the compression tasks without blocking the bridge function. i found this function swi_add() which i could use to add software interrupt handlers that could be run at a later time without causing high interface interrupts. the man page discussed the swi_add() and swi_sched() functions. what i don't understand is, how do i register my handler function ?? if i use the swi_add() for that purpose what do i use for the void *arg argument. and how can i dispatch control to the software interrupt handler ?? the swi_sched() uses only the cookie and the flags arguments. there is no way i can pass arguments to my handler function .. i guess most of you are familiar with this and can help me out ...... thanks, kamal __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 12:44:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16FC616A42A for ; Wed, 11 Jan 2006 12:44:39 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E990843D4C for ; Wed, 11 Jan 2006 12:44:37 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so135313nzo for ; Wed, 11 Jan 2006 04:44:37 -0800 (PST) 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=eHIWLmFuiFbaceeJl5rh34RI82UrpARtkAgQhmM8+HcxOPWLdirSzpwEjLPrNfJumdFFl9tZ6ajGFJ8ssQjI26RIzIYeqi6jBLVazAyDEJGH0EKfxMIaTkSKql3sipFgFak3RIsKrcDeWC3PnHc0wJ1QIuTwPCRC02tniQcQlSw= Received: by 10.36.224.9 with SMTP id w9mr691301nzg; Wed, 11 Jan 2006 04:44:37 -0800 (PST) Received: by 10.36.41.1 with HTTP; Wed, 11 Jan 2006 04:44:37 -0800 (PST) Message-ID: <3bbf2fe10601110444t66b6a8a4j@mail.gmail.com> Date: Wed, 11 Jan 2006 04:44:37 -0800 From: rookie To: freebsd-hackers@freebsd.org In-Reply-To: <3bbf2fe10601110439k11ed3b9ds@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060111121304.62832.qmail@web30013.mail.mud.yahoo.com> <3bbf2fe10601110439k11ed3b9ds@mail.gmail.com> Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 12:44:39 -0000 2006/1/11, kamal kc : > > dear everybody, > > i had previous thread going on about the cpu load > average. and had some discussion regarding it. i have > a newer thing to discuss on so i started this thread. > > as i mentioned earlier i had put some code in the > bridge.c > that performed compression which took a long time and > hence > i got a high number of interface interrupts (irq22: xl > interrupts). > > so i thought of rescheduling the compression tasks > without > blocking the bridge function. i found this function > swi_add() [snip] swi_* are used to rule interrupt threads but as you're speaking it doesn't seem you're in this case. In order to force a preemption you might use mi_switch(9) which causes a machine-independent context switch for curthread. cheers, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 10:41:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D1E616A41F for ; Wed, 11 Jan 2006 10:41:14 +0000 (GMT) (envelope-from arg-bsd@arg.me.uk) Received: from arg.me.uk (arg1.demon.co.uk [62.49.12.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0C1C43D76 for ; Wed, 11 Jan 2006 10:40:40 +0000 (GMT) (envelope-from arg-bsd@arg.me.uk) Received: by arg.me.uk (Postfix, from userid 1002) id A87EE9B02; Wed, 11 Jan 2006 10:40:11 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by arg.me.uk (Postfix) with ESMTP id 8CE295D12; Wed, 11 Jan 2006 10:40:11 +0000 (GMT) Date: Wed, 11 Jan 2006 10:40:11 +0000 (GMT) From: Andrew Gordon X-X-Sender: freebsd@server.arg.sj.co.uk To: "M. Warner Losh" In-Reply-To: <20060110.234350.82839919.imp@bsdimp.com> Message-ID: <20060111103350.H91662@server.arg.sj.co.uk> References: <20060109183738.GA4822@odin.ac.hmc.edu> <001401c61676$3fa0c290$672a15ac@smiley> <20060110.234350.82839919.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Wed, 11 Jan 2006 12:56:07 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 10:41:14 -0000 On Tue, 10 Jan 2006, M. Warner Losh wrote: > > Are you sure they provide technical documentation sufficent to write > the driver? The last time I asked, I got a nice document that said > that it implemented the sds standard sd host interface, but didn't > document what that was. TI and winbond chips datasheets are the same > way. Prove me wrong. I'd love it :-) Have you seen this datasheet from TI? http://focus.ti.com/docs/apps/catalog/resources/appnoteabstract.jhtml?abstractName=sprue30 It's not the one you are looking for, but it does at least give register-level documentation on the implementation in that particular chip, and TI devices tend to share peripherals. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 14:20:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 C087B16A41F for ; Wed, 11 Jan 2006 14:20:27 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A1A043D49 for ; Wed, 11 Jan 2006 14:20:26 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5794941 for multiple; Wed, 11 Jan 2006 09:18:49 -0500 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k0BEKM4C071494; Wed, 11 Jan 2006 09:20:22 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 11 Jan 2006 09:03:17 -0500 User-Agent: KMail/1.8.3 References: <20060111121304.62832.qmail@web30013.mail.mud.yahoo.com> In-Reply-To: <20060111121304.62832.qmail@web30013.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200601110903.18120.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1238/Wed Jan 11 05:19:06 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: kamal kc Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 14:20:27 -0000 On Wednesday 11 January 2006 07:13 am, kamal kc wrote: > dear everybody, > > i had previous thread going on about the cpu load > average. and had some discussion regarding it. i have > a newer thing to discuss on so i started this thread. > > as i mentioned earlier i had put some code in the > bridge.c > that performed compression which took a long time and > hence > i got a high number of interface interrupts (irq22: xl > interrupts). > > so i thought of rescheduling the compression tasks > without > blocking the bridge function. i found this function > swi_add() > which i could use to add software interrupt handlers > that > could be run at a later time without causing high > interface > interrupts. > > the man page discussed the swi_add() and swi_sched() > functions. > > what i don't understand is, how do i register my > handler > function ?? > if i use the swi_add() for that purpose what > do i use for the void *arg argument. > > and how can i dispatch control to the software > interrupt handler ?? > the swi_sched() uses only the cookie and the flags > arguments. > there is no way i can pass arguments to my handler > function .. > > i guess most of you are familiar with this and can > help me > out ...... Queue a task to a taskqueue. Behind the scenes that will invoke a swi_add = if=20 you use the taskqueue_swi queue. However, given that you want to do some=20 rather complicated work, you'd be better off creating a dedicated taskqueue= =20 thread and queueing tasks off to it I think. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 15:51:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA13116A41F for ; Wed, 11 Jan 2006 15:51:44 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D3E143D55 for ; Wed, 11 Jan 2006 15:51:44 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 16FAC46B96; Wed, 11 Jan 2006 10:51:43 -0500 (EST) Date: Wed, 11 Jan 2006 15:51:47 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: TSaplin Mikhail In-Reply-To: <200601031847.22199.tsmm@list.ru> Message-ID: <20060111154939.S28748@fledge.watson.org> References: <200601031847.22199.tsmm@list.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: devfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 15:51:44 -0000 On Tue, 3 Jan 2006, TSaplin Mikhail wrote: > Hi all i have a problem with devfs device hiding. > My system is FreeBSD 6.0 (i386 and amd64, compiled from last sunday source > (RELENG_6)) > > After mounting defs: > #mount -t devfs devfs /tmp/proba > > first devfs command: > # devfs -m /tmp/proba rule add type disk hide > devfs rule: ioctl DEVFSIO_RADD: Input/output error > > the second command hangs: > # devfs -m /tmp/proba rule add type disk hide > > command doesnt responds on HUP and TERM signals A week or two ago I fixed a bug in devfs where an error condition results in a lock leak, followed by hanging processes and a deadlock. I merged the change to RELENG_6 this morning having returned from India yesterday night. If a fair number of people are running into this, we may want to merge it to RELENG_6_0 and do an errata announcement for it. The change you want is this one: revision 1.21 date: 2006/01/03 09:49:10; author: rwatson; state: Exp; lines: +4 -2 When returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule lock. Otherwise the system comes to a rather sudden and grinding halt. MFC after: 1 week I ran into it while on travel, as I was trying to get devfs to make /dev/bpf* readable by the operator group, and typed the command wrong. The RELENG_6 revision is devfs_rule.c:1.14.2.3. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 15:59:58 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 424D116A41F for ; Wed, 11 Jan 2006 15:59:58 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16DF143D77 for ; Wed, 11 Jan 2006 15:59:51 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 4D54546B82; Wed, 11 Jan 2006 10:59:49 -0500 (EST) Date: Wed, 11 Jan 2006 15:59:53 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ceri Davies In-Reply-To: <7E919BA5-DF54-445D-98CA-E57E32B60892@submonkey.net> Message-ID: <20060111155348.J28748@fledge.watson.org> References: <5e575c8a0601051043r46ccfea1s352a5ea8ea7010a1@mail.gmail.com> <7E919BA5-DF54-445D-98CA-E57E32B60892@submonkey.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Ahnjoan Amous Subject: Re: setfacl file modification time X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 15:59:58 -0000 On Thu, 5 Jan 2006, Ceri Davies wrote: > On 5 Jan 2006, at 18:43, Ahnjoan Amous wrote: > >> In 5.2.1-RELEASE, setfacl updates the modification time of the file >> when acls are changed. I haven't been able to find any complaints >> about this behavior, is this something folks on the list would expect >> when using setfacl? If so, does anyone know a work around? > > PR 76818 is open for this issue, but there is no progress logged at present. This likely occurs because EA writes modify the last modification timestamp. I can imagine a couple of possible avenues to explore in fixing it, including: (1) Make system name space EA writes not update the modification time. (2) Add a flag to allow EA writes to be marked as not updating the modification time. It could be POSIX.1e has something to say about time stamp modifications for setfacl; personally I'd expect it to match the behavior of chmod. And I believe chmod doesn't update the time stamp. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 16:37:50 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 A268916A41F for ; Wed, 11 Jan 2006 16:37:50 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30008.mail.mud.yahoo.com (web30008.mail.mud.yahoo.com [68.142.200.71]) by mx1.FreeBSD.org (Postfix) with SMTP id EE5C843D5E for ; Wed, 11 Jan 2006 16:37:45 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 30385 invoked by uid 60001); 11 Jan 2006 16:37:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=eX19OIx8OOhnBlA1Glbp2p2MtzYckJYRYhPvfPkwkdda0Qs+l/VG3kksa+DrtrIqzoZ3A7VBBM+di/8tSLIn8inG7cpqi01uTiDiQMBdz6n6HTOqz6iSsj6svGZ2GglPrh2/7rUaJkXnGJ/pf72dJg3XoEuOspIyTJY5kebA9UQ= ; Message-ID: <20060111163745.30383.qmail@web30008.mail.mud.yahoo.com> Received: from [202.79.62.13] by web30008.mail.mud.yahoo.com via HTTP; Wed, 11 Jan 2006 08:37:45 PST Date: Wed, 11 Jan 2006 08:37:45 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <200601110903.18120.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 16:37:50 -0000 --- John Baldwin wrote: > > > > the man page discussed the swi_add() and > swi_sched() > > functions. > > > > what i don't understand is, how do i register my > > handler > > function ?? > > if i use the swi_add() for that purpose what > > do i use for the void *arg argument. > > > > and how can i dispatch control to the software > > interrupt handler ?? > > the swi_sched() uses only the cookie and the flags > > arguments. > > there is no way i can pass arguments to my handler > > function .. > > > > i guess most of you are familiar with this and can > > help me > > out ...... > > Queue a task to a taskqueue. Behind the scenes that > will invoke a swi_add if > you use the taskqueue_swi queue. However, given > that you want to do some > rather complicated work, you'd be better off > creating a dedicated taskqueue > thread and queueing tasks off to it I think. thanks for the suggestion on the taskqueue. i tried it on a dummy kernel module and got some output, but i don't know if they were correct or not. i would like to know if i followed the right steps. here is the code i used :: struct taskqueue_arguments { int a; int b; }; void taskqueue_function(void *,int); typedef void taskqueue_function_t(void *,int); /* taskqueue function */ void taskqueue_function(void *arguments,int int_arg) { struct taskqueue_arguments *arg; arg=(struct taskqueue_arguments *)arguments; printf("\ntakqueue_function was called the args are %d %d",arg->a,arg->b); return; } __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 16:46:00 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 A98C416A41F for ; Wed, 11 Jan 2006 16:46:00 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30009.mail.mud.yahoo.com (web30009.mail.mud.yahoo.com [68.142.200.72]) by mx1.FreeBSD.org (Postfix) with SMTP id D19AB43D48 for ; Wed, 11 Jan 2006 16:45:59 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 5716 invoked by uid 60001); 11 Jan 2006 16:45:59 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gsuNxe6gkDWPyrNORQmgXZGZLk1Mh23RWnxWTN9RTnOwv28XM4VNnqrUUdrl94+BSzz5blDLgBG1dZ/2HPucEhbzbmYYiWkiNU+tCKxGZh6wy6fUz2AeBCEfGXAvtrCyWAABQA7I2QssJi26jFyMyOA7ZksblM+pSR+JEnP1oqc= ; Message-ID: <20060111164559.5714.qmail@web30009.mail.mud.yahoo.com> Received: from [202.79.62.13] by web30009.mail.mud.yahoo.com via HTTP; Wed, 11 Jan 2006 08:45:59 PST Date: Wed, 11 Jan 2006 08:45:59 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <200601110903.18120.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 16:46:00 -0000 --- John Baldwin wrote: > > the man page discussed the swi_add() and > swi_sched() > > functions. > > > > what i don't understand is, how do i register my > > handler > > function ?? > > if i use the swi_add() for that purpose what > > do i use for the void *arg argument. > > > > and how can i dispatch control to the software > > interrupt handler ?? > > the swi_sched() uses only the cookie and the flags > > arguments. > > there is no way i can pass arguments to my handler > > function .. > > > > i guess most of you are familiar with this and can > > help me > > out ...... > > Queue a task to a taskqueue. Behind the scenes that > will invoke a swi_add if > you use the taskqueue_swi queue. However, given > that you want to do some > rather complicated work, you'd be better off > creating a dedicated taskqueue > thread and queueing tasks off to it I think. > thanks for the suggestion on the taskqueue. i tried it on my dummy kernel module and got some output but i am not sure if i followed the correct steps to use the taskqueue. the only thing i found was the man pages and the taskqueue.h. here is the code: ----------------------- struct taskqueue_arguments { int a; int b; }; void taskqueue_function(void *,int); typedef void taskqueue_function_t(void *,int); /* taskqueue function */ void taskqueue_function(void *arguments,int int_arg) { struct taskqueue_arguments *arg; arg=(struct taskqueue_arguments *)arguments; printf("\ntakqueue_function was called the args are %d %d",arg->a,arg->b); return; } /* function implementing the syscall */ static int hello(struct thread *td, void *arg) { ......... struct task mytask; taskqueue_function_t *taskqueue_function_ptr; taskqueue_function_ptr=taskqueue_function; struct taskqueue_arguments arg_var; arg_var.a=10; arg_var.b=20; TASK_INIT(&mytask,50,taskqueue_function_ptr,&arg_var); taskqueue_enqueue(taskqueue_swi, &mytask); ........... } did i do it correctly ??? thanks, kamal __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 18:32:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1E6A16A422 for ; Wed, 11 Jan 2006 18:32:44 +0000 (GMT) (envelope-from darren.pilgrim@bitfreak.org) Received: from mail.bitfreak.org (mail.bitfreak.org [65.75.198.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1508F43D4C for ; Wed, 11 Jan 2006 18:32:27 +0000 (GMT) (envelope-from darren.pilgrim@bitfreak.org) Received: from smiley (mail.bitfreak.org [65.75.198.146]) by mail.bitfreak.org (Postfix) with ESMTP id F227B19F3F; Wed, 11 Jan 2006 10:32:23 -0800 (PST) From: "Darren Pilgrim" To: "'M. Warner Losh'" Date: Wed, 11 Jan 2006 10:32:16 -0800 Message-ID: <002301c616dd$5ca99940$672a15ac@smiley> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <20060110.234350.82839919.imp@bsdimp.com> Importance: Normal Cc: freebsd-hackers@freebsd.org Subject: RE: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 18:32:45 -0000 From: M. Warner Losh [mailto:imp@bsdimp.com]=20 > In message: <001401c61676$3fa0c290$672a15ac@smiley> > "Darren Pilgrim" writes: > : From: Brooks Davis > : > On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: > : > > Has anyone had a look at the following: > : > > > : [ Ricoh SD Bus Host Adapter, PCI ID 0x08221180 ] > : >=20 > : > People are looking at it, but there are no docs available. > : > Apparently, there is some work being done to reverse engineer > : > it. Linux doesn't support it either. > :=20 > : That's odd, because Ricoh provides technical documentation upon > : request via the LSI Contact Us[1] page on their website. > :=20 > : 1: http://www.ricoh.com/LSI/mail.html >=20 > Are you sure they provide technical documentation sufficent to write > the driver? The last time I asked, I got a nice document that said > that it implemented the sds standard sd host interface, but didn't > document what that was. TI and winbond chips datasheets are the same > way. Prove me wrong. I'd love it :-) The SD protocols aren't open standards. Ricoh can't legally include information about the protocols in their documentation. Without working implementation of the SDA's standards, FreeBSD is stuck. I don't blame = the funding behind FreeBSD development for not ponying up the dosh; I think = such fees are extortion made legal by intellectual property laws. But hey, it's the business. It's not like we're trying to make a good, = free product everyone can use, right? From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 21:45:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 463DD16A41F for ; Wed, 11 Jan 2006 21:45:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B795343D58 for ; Wed, 11 Jan 2006 21:44:58 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0BLh2Gm013976; Wed, 11 Jan 2006 14:43:04 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 11 Jan 2006 14:43:02 -0700 (MST) Message-Id: <20060111.144302.74736479.imp@bsdimp.com> To: darren.pilgrim@bitfreak.org From: Warner Losh In-Reply-To: <002301c616dd$5ca99940$672a15ac@smiley> References: <20060110.234350.82839919.imp@bsdimp.com> <002301c616dd$5ca99940$672a15ac@smiley> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 11 Jan 2006 14:43:05 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 21:45:02 -0000 From: "Darren Pilgrim" Subject: RE: Ricoh PCI to SD device? Date: Wed, 11 Jan 2006 10:32:16 -0800 > From: M. Warner Losh [mailto:imp@bsdimp.com] > > In message: <001401c61676$3fa0c290$672a15ac@smiley> > > "Darren Pilgrim" writes: > > : From: Brooks Davis > > : > On Mon, Jan 09, 2006 at 11:12:30AM -0500, David Gilbert wrote: > > : > > Has anyone had a look at the following: > > : > > > > : [ Ricoh SD Bus Host Adapter, PCI ID 0x08221180 ] > > : > > > : > People are looking at it, but there are no docs available. > > : > Apparently, there is some work being done to reverse engineer > > : > it. Linux doesn't support it either. > > : > > : That's odd, because Ricoh provides technical documentation upon > > : request via the LSI Contact Us[1] page on their website. > > : > > : 1: http://www.ricoh.com/LSI/mail.html > > > > Are you sure they provide technical documentation sufficent to write > > the driver? The last time I asked, I got a nice document that said > > that it implemented the sds standard sd host interface, but didn't > > document what that was. TI and winbond chips datasheets are the same > > way. Prove me wrong. I'd love it :-) > > The SD protocols aren't open standards. Ricoh can't legally include > information about the protocols in their documentation. Without working > implementation of the SDA's standards, FreeBSD is stuck. I don't blame the > funding behind FreeBSD development for not ponying up the dosh; I think such > fees are extortion made legal by intellectual property laws. The SD protocols are protected by trade secret means. Some of the protocol has leaked out, and can easily be implemented, once someone knows how to send the protocol to the devices on the bus. There may be some patent issues with the DRM control that's in the SD parts that may be problematic. There's no way to know all the issues because of the NDAs. The SDA Standard SD Host Interface is covered, as far as the basics go, should be reverse engineerable. There's enough data floating out there which should help those trying to engineer it. I don't think I'll be doing it, however. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 00:58:29 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 979A616A41F for ; Thu, 12 Jan 2006 00:58:29 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from fed1rmmtao11.cox.net (fed1rmmtao11.cox.net [68.230.241.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E81643D45 for ; Thu, 12 Jan 2006 00:58:29 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from [192.168.1.2] (really [68.111.13.24]) by fed1rmmtao11.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060112005720.BSSQ6244.fed1rmmtao11.cox.net@[192.168.1.2]> for ; Wed, 11 Jan 2006 19:57:20 -0500 Mime-Version: 1.0 (Apple Message framework v623) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-hackers@freebsd.org From: Dan Joumaa Date: Wed, 11 Jan 2006 17:58:28 -0700 X-Mailer: Apple Mail (2.623) Subject: Telling BSD to stop resetting the connection! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 00:58:29 -0000 Hello, I'm trying to code a software gateway with divert sockets. So far basic things are working, but the net stack constantly resets the connection whenever a SYN-ACK is sent to it. 103 9.443254 192.168.1.6 -> 205.166.76.40 TCP pacmand > https [SYN] Seq=0 Ack=0 Win=2920 Len=0 MSS=536 104 9.443364 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [SYN] Seq=0 Ack=0 Win=2920 Len=0 MSS=536 105 9.443617 192.168.1.6 -> 205.166.76.40 TCP pacmand > https [SYN] Seq=0 Ack=0 Win=2920 Len=0 MSS=536 106 9.443654 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [SYN] Seq=0 Ack=0 Win=2920 Len=0 MSS=536 107 9.496102 205.166.76.40 -> 192.168.1.2 TCP https > pacmand [SYN, ACK] Seq=0 Ack=1 Win=1608 Len=0 MSS=1460 108 9.496185 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [RST] Seq=1 Ack=341266652 Win=0 Len=0 (192.168.1.1 = next hop, 192.168.1.2 = this computer, 192.168.1.6 = the client) Any ideas on how to stop the net stack from resetting my connections, preferably programmatically? --ness From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 01:55:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 9789516A41F for ; Thu, 12 Jan 2006 01:55:07 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E0B543D45 for ; Thu, 12 Jan 2006 01:55:07 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.146]) ([10.251.23.146]) by a50.ironport.com with ESMTP; 11 Jan 2006 17:55:08 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43C5B6FA.4050909@elischer.org> Date: Wed, 11 Jan 2006 17:55:06 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Joumaa 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: Telling BSD to stop resetting the connection! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 01:55:07 -0000 Dan Joumaa wrote: > Hello, > > I'm trying to code a software gateway with divert sockets. So far > basic things are working, but the net stack constantly resets the > connection whenever a SYN-ACK is sent to it. > > 103 9.443254 192.168.1.6 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 104 9.443364 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 105 9.443617 192.168.1.6 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 106 9.443654 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 107 9.496102 205.166.76.40 -> 192.168.1.2 TCP https > pacmand [SYN, > ACK] Seq=0 Ack=1 Win=1608 Len=0 MSS=1460 > 108 9.496185 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [RST] > Seq=1 Ack=341266652 Win=0 Len=0 > > (192.168.1.1 = next hop, 192.168.1.2 = this computer, 192.168.1.6 = > the client) sounds like the SYN ACK is not getting diverted? > > Any ideas on how to stop the net stack from resetting my connections, > preferably programmatically? > > --ness > > _______________________________________________ > 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 Jan 12 02:25:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4F6D16A41F for ; Thu, 12 Jan 2006 02:25:02 +0000 (GMT) (envelope-from david@madole.net) Received: from d.omd3.com (d.omd3.com [69.90.174.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27D6143D46 for ; Thu, 12 Jan 2006 02:25:01 +0000 (GMT) (envelope-from david@madole.net) Received: from dhcp-66-212-201-164.myeastern.com ([66.212.201.164] helo=david) by d.omd3.com with esmtpa (Exim 4.54) id 1Ews97-000815-A4; Wed, 11 Jan 2006 21:25:01 -0500 Message-ID: <096b01c6171f$62711140$c3e7a8c0@david> From: "David S. Madole" To: , "Dan Joumaa" References: Date: Wed, 11 Jan 2006 21:24:58 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Cc: Subject: Re: Telling BSD to stop resetting the connection! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 02:25:02 -0000 From: "Dan Joumaa" > > I'm trying to code a software gateway with divert sockets. So far basic > things are working, but the net stack constantly resets the connection > whenever a SYN-ACK is sent to it. > > Any ideas on how to stop the net stack from resetting my connections, > preferably programmatically? I think you are doing something wrong, either not diverting packets that should be, or reinjecting packets from your code that are incorrect in some way. Without seeing the ipfw rules or code, there's not much else that can be said. David From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 04:06:15 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 688DC16A41F for ; Thu, 12 Jan 2006 04:06:15 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from fed1rmmtao05.cox.net (fed1rmmtao05.cox.net [68.230.241.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 089D543D45 for ; Thu, 12 Jan 2006 04:06:09 +0000 (GMT) (envelope-from nessup@gmail.com) Received: from [192.168.1.2] (really [68.111.13.24]) by fed1rmmtao05.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060112040415.QNVS17838.fed1rmmtao05.cox.net@[192.168.1.2]>; Wed, 11 Jan 2006 23:04:15 -0500 In-Reply-To: <096b01c6171f$62711140$c3e7a8c0@david> References: <096b01c6171f$62711140$c3e7a8c0@david> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Dan Joumaa Date: Wed, 11 Jan 2006 21:06:08 -0700 To: David S. Madole , julian@elischer.org X-Mailer: Apple Mail (2.623) Cc: freebsd-hackers@freebsd.org Subject: Re: Telling BSD to stop resetting the connection! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 04:06:15 -0000 On Jan 11, 2006, at 7:24 PM, David S. Madole wrote: > From: "Dan Joumaa" >> >> I'm trying to code a software gateway with divert sockets. So far >> basic things are working, but the net stack constantly resets the >> connection whenever a SYN-ACK is sent to it. >> >> Any ideas on how to stop the net stack from resetting my connections, >> preferably programmatically? > > I think you are doing something wrong, either not diverting packets > that should be, or reinjecting packets from your code that are > incorrect in some way. > > Without seeing the ipfw rules or code, there's not much else that can > be said. > > David > > Here's the rules: 00001 divert 4747 tcp from 192.168.1.6 to any in 00001 divert 4747 udp from 192.168.1.6 to any in The following rules are added dynamically when my client sends a packet to a server so we can get it back on the divert socket. In this case, it would be: 00001 divert 4747 tcp from 205.166.76.216 to any in 00001 divert 4747 udp from 205.166.76.216 to any in First thing, I receive the packets from the divert socket. ... if( (datagramlen = recvfrom( sock->ipfd, buffer, buflen, 0x0, (struct sockaddr *)&sin, &sinlen )) < 0 ) (void)fprintf( stderr, "Failed to receive packet. Error: %i\n", errno ); ... If it is from my client, I add the destination host the client wants to talk to as a divert rule to the IPFW... entry->version = IP_FW_CURRENT_API_VERSION; entry->fw_number = 1; entry->fw_src.s_addr = htonl(host); entry->fw_smsk.s_addr = ~0; entry->fw_prot = IPPROTO_TCP; entry->fw_flg = IP_FW_F_DIVERT|IP_FW_F_IN; entry->fw_un.fu_divert_port = DIVERTSOCKET_PORT; (void)memcpy( entry->fw_in_if.fu_via_if.name, sock->dev, FW_IFNLEN ); entry->fw_in_if.fu_via_if.unit = -1; if( setsockopt( sock->fwfd, IPPROTO_IP, IP_FW_ADD, entry, sizeof(struct ip_fw) ) < 0 ) { (void)fprintf( stderr, "Failed to add entry to filter. Error: %i\n", errno ); return (-1); } ... modify the packet for sending ... ip_hdr->ip_src.s_addr = htonl( thisIP ); /* checksuming code below */ ... and send it through a raw socket. sin.sin_family = AF_INET; sin.sin_port = 0; sin.sin_addr.s_addr = ip_hdr->ip_dst.s_addr; if( (datagramlen = sendto( socket->fwfd, buffer, buflen, 0x0, (struct sockaddr *)&sin, sizeof(sin) )) < 0 ) (void)fprintf( stderr, "Failed to send packet. Error: %i\n", errno ); If it's from someone outside the LAN, modify it for forwarding to the client... ip_hdr->ip_dst.s_addr = htonl( clientIP ); ip_hdr->ip_sum = 0; ip_hdr->ip_sum = htons( in_cksum( (u_short *)ip_hdr, sizeof(struct iphdr) ) ); /* checksuming code below */ And send it through a raw socket. All in all, that's really what it is. This seems to work with normal HTTP requests, but fails to work with establishing a connection on HTTPS. :/ --ness From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 04:59:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FF2D16A41F for ; Thu, 12 Jan 2006 04:59:34 +0000 (GMT) (envelope-from david@madole.net) Received: from d.omd3.com (d.omd3.com [69.90.174.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id C73B443D45 for ; Thu, 12 Jan 2006 04:59:33 +0000 (GMT) (envelope-from david@madole.net) Received: from dhcp-66-212-201-164.myeastern.com ([66.212.201.164] helo=david) by d.omd3.com with esmtpa (Exim 4.54) id 1EwuYe-000AJA-UX; Wed, 11 Jan 2006 23:59:33 -0500 Message-ID: <09c201c61734$f8b7a140$c3e7a8c0@david> From: "David S. Madole" To: "Dan Joumaa" References: <096b01c6171f$62711140$c3e7a8c0@david> Date: Wed, 11 Jan 2006 23:59:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Cc: freebsd-hackers@freebsd.org Subject: Re: Telling BSD to stop resetting the connection! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 04:59:34 -0000 From: "Dan Joumaa" > > 103 9.443254 192.168.1.6 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 104 9.443364 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 105 9.443617 192.168.1.6 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 106 9.443654 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [SYN] > Seq=0 Ack=0 Win=2920 Len=0 MSS=536 > 107 9.496102 205.166.76.40 -> 192.168.1.2 TCP https > pacmand [SYN, > ACK] Seq=0 Ack=1 Win=1608 Len=0 MSS=1460 > 108 9.496185 192.168.1.2 -> 205.166.76.40 TCP pacmand > https [RST] > Seq=1 Ack=341266652 Win=0 Len=0 > > (192.168.1.1 = next hop, 192.168.1.2 = this computer, 192.168.1.6 = > the client) > > Here's the rules: > > 00001 divert 4747 tcp from 192.168.1.6 to any in > 00001 divert 4747 udp from 192.168.1.6 to any in > > The following rules are added dynamically when my client sends a packet > to a server so we can get it back on the divert socket. In this case, > it would be: That seems like a maybe dicey strategy to me. Seems like it wouldn't scale well and could be subject to some race conditions. Why not just divert all packets (or all TCP and UDP) and sift them in your program for what's interesting? Or use a rule based on a destination of 192.168.1.6? > 00001 divert 4747 tcp from 205.166.76.216 to any in > 00001 divert 4747 udp from 205.166.76.216 to any in Ok, so why shouldn't the machine send a RST when the SYN,ACK is received? It sounds like you are sending a synthesized SYN packet (one the OS didn't generate) with the source address of your machine (192.168.1.2), which the other end responds correctly to with a SYN,ACK which is getting delivered to the OS since you have no divert rule for 192.168.1.2. Since the OS didn't send the SYN and knows nothing of the connection, it sends a RST. Perfectly normal. > ... modify the packet for sending ... > ... and send it through a raw socket. I find it more convenient when working with divert sockets to send packets through the divert socket itself. It lets you control where it reenters the rule chain, which direction it is travelling, which interface, etc. Just an idea. > If it's from someone outside the LAN, modify it for forwarding to the > client... I don't have any idea what you are trying to accomplish but am having a hard time imagining any situation where it would be useful to send the same packet out twice to two different destinations. I don't know that it will help much, but if you are interested in an example of another program working through divert sockets, you can take a look at this one I wrote: http://www.madole.net/shaper/ David From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 05:59:13 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 9ED1C16A41F for ; Thu, 12 Jan 2006 05:59:13 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C358643D45 for ; Thu, 12 Jan 2006 05:59:12 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0C5woPT017520; Wed, 11 Jan 2006 22:58:52 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 11 Jan 2006 22:59:00 -0700 (MST) Message-Id: <20060111.225900.117638343.imp@bsdimp.com> To: arg-bsd@arg.me.uk From: "M. Warner Losh" In-Reply-To: <20060111103350.H91662@server.arg.sj.co.uk> References: <001401c61676$3fa0c290$672a15ac@smiley> <20060110.234350.82839919.imp@bsdimp.com> <20060111103350.H91662@server.arg.sj.co.uk> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 11 Jan 2006 22:58:52 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 05:59:13 -0000 In message: <20060111103350.H91662@server.arg.sj.co.uk> Andrew Gordon writes: : : On Tue, 10 Jan 2006, M. Warner Losh wrote: : > : > Are you sure they provide technical documentation sufficent to write : > the driver? The last time I asked, I got a nice document that said : > that it implemented the sds standard sd host interface, but didn't : > document what that was. TI and winbond chips datasheets are the same : > way. Prove me wrong. I'd love it :-) : : Have you seen this datasheet from TI? : : http://focus.ti.com/docs/apps/catalog/resources/appnoteabstract.jhtml?abstractName=sprue30 : : It's not the one you are looking for, but it does at least give : register-level documentation on the implementation in that particular : chip, and TI devices tend to share peripherals. Thanks for the pointer... Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 08:52:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 CAD8D16A41F for ; Thu, 12 Jan 2006 08:52:40 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24BE843D46 for ; Thu, 12 Jan 2006 08:52:39 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail02.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0C8qcNl020805 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 12 Jan 2006 19:52:38 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0C8qbHh064424 for ; Thu, 12 Jan 2006 19:52:38 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0C8qb0H064423 for freebsd-hackers@freebsd.org; Thu, 12 Jan 2006 19:52:37 +1100 (EST) (envelope-from pjeremy) Date: Thu, 12 Jan 2006 19:52:37 +1100 From: Peter Jeremy To: freebsd-hackers@freebsd.org Message-ID: <20060112085237.GA64401@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Subject: Atomic operations across multiple processors X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 08:52:40 -0000 atomic(9) states: The current set of atomic operations do not necessarily guarantee atomic- ity across multiple processors. ... On the i386 architecture, the cache coherency model requires that the hardware perform this task, thus the atomic operations are atomic across multiple processors. On the ia64 architecture, coherency is only guaranteed for pages that are configured to using a caching policy of either uncached or write back. Unfortunately, this doesn't document the behaviour for other architectures - this makes it difficult to write portable code. For the ia64, the statement isn't especially helpful because there's no indication of what caching policy is used by default and how to change it. Also, it seems odd that write-back pages would be coherent whilst write-through pages aren't - is this a typo? The man page is also inconsistent with /sys/ia64/include/atomic.h which states that atomic operations _are_ SMP safe. I've tried looking at the mutex code to see how the iA64 achieves inter-processor synchronisation on top of (supposedly) non- synchronised atomic(9) primitives but can't find anything. I'd appreciate comments from people familiar with non-iA32 architectures. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 11:19:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79D4416A41F for ; Thu, 12 Jan 2006 11:19:06 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30006.mail.mud.yahoo.com (web30006.mail.mud.yahoo.com [68.142.200.69]) by mx1.FreeBSD.org (Postfix) with SMTP id 0D0CF43D4C for ; Thu, 12 Jan 2006 11:19:05 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 85811 invoked by uid 60001); 12 Jan 2006 11:19:05 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UsRsNhM7GPMWW7Nd3xziSzAOSHFNq40EopsGA7w8+yeFU9tH4wL83ec6BQFaSiRM8UIbOqWEdGqlheaF54VoYfUZX5qjTGp42DxRRXQhgvuo78kKnMaIsaw1jK7KgNmSkgnnuI3qBhED68cs8BDFfuwMIVFn07rMeXQHoyUs3ME= ; Message-ID: <20060112111905.85809.qmail@web30006.mail.mud.yahoo.com> Received: from [202.161.131.69] by web30006.mail.mud.yahoo.com via HTTP; Thu, 12 Jan 2006 03:19:05 PST Date: Thu, 12 Jan 2006 03:19:05 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <20060111164559.5714.qmail@web30009.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 11:19:06 -0000 --- kamal kc wrote: > > > > Queue a task to a taskqueue. Behind the scenes > that > > will invoke a swi_add if > > you use the taskqueue_swi queue. However, given > > that you want to do some > > rather complicated work, you'd be better off > > creating a dedicated taskqueue > > thread and queueing tasks off to it I think. > > > > thanks for the suggestion on the taskqueue. i tried > it > > on my dummy kernel module and got some output but i > am not sure if i followed the correct steps to > use the taskqueue. the only thing i found > was the man pages and the taskqueue.h. > > here is the code: > ----------------------- > > struct taskqueue_arguments > { int a; > int b; > }; > > void taskqueue_function(void *,int); > typedef void taskqueue_function_t(void *,int); > > /* taskqueue function */ > void taskqueue_function(void *arguments,int int_arg) > { > struct taskqueue_arguments *arg; > arg=(struct taskqueue_arguments *)arguments; > printf("\ntakqueue_function was called the args > are %d %d",arg->a,arg->b); > return; > } > > /* function implementing the syscall */ > static int > hello(struct thread *td, void *arg) > { ......... > struct task mytask; > taskqueue_function_t *taskqueue_function_ptr; > taskqueue_function_ptr=taskqueue_function; > > struct taskqueue_arguments arg_var; > arg_var.a=10; > arg_var.b=20; > > > TASK_INIT(&mytask,50,taskqueue_function_ptr,&arg_var); > taskqueue_enqueue(taskqueue_swi, &mytask); > > ........... > } > dear all , i run the above code and the kernel would crash whenever i would do the syscall for few number of times. the crashing process is (swi6: task queue). the kernel crashes very soon when i make the system call in a loop. i guess i didn't follow all the steps to use the taskqueue .... i think some of you can help what did i miss .... thanks, kamal __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 09:48:43 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 C0F2516A41F for ; Thu, 12 Jan 2006 09:48:43 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (www.kukulies.org [213.146.112.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7CDF43D45 for ; Thu, 12 Jan 2006 09:48:40 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (localhost [127.0.0.1]) by www.kukulies.org (8.13.3/8.12.10) with ESMTP id k0C9mcmQ092896 for ; Thu, 12 Jan 2006 10:48:38 +0100 (CET) (envelope-from kuku@www.kukulies.org) Received: (from kuku@localhost) by www.kukulies.org (8.13.3/8.12.10/Submit) id k0C9mcqR092895 for freebsd-hackers@freebsd.org; Thu, 12 Jan 2006 10:48:38 +0100 (CET) (envelope-from kuku) Date: Thu, 12 Jan 2006 10:48:38 +0100 (CET) From: Christoph Kukulies Message-Id: <200601120948.k0C9mcqR092895@www.kukulies.org> To: freebsd-hackers@freebsd.org X-Mailman-Approved-At: Thu, 12 Jan 2006 12:47:56 +0000 Subject: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 09:48:43 -0000 My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to develop read errors. I have FreeBSD and Win XP on that disk. Although FreeBSD ist still working , the errors in the Windows partition are causing Windows do ask for a filesystem check nearly everytime I reboot the computer. One time the error was in the hibernate.sys file, which impedes powering up quickly after a hibernate. Anyway, I decided to buy a second identical hard disk and tried to block by block copy the old disk to the new one using dd if=/dev/ad2 of=/dev/ad3 conv=noerror The process is running now since yesterday evening and it is at 53 MB at a transfer rate of about 1.1 MB/s. In case the the result being unusable I would like to find a way to make this copying faster. Any disk expert here? My motherboard is an ASUS P4S8X with an on board promise controller (currently not in use). System disk is on IDE1 and the two 80GB disks are master/slave on IDE2 bus. I wonder wether I could get better results (transfer rate) when attaching the disks to copy to the promise IDE bus. And another question: Is there a way to tweak the driver (be it the FreeBSD promise driver or the normal ata driver) to use more retries on errors so that I have the chance to copy everything or nearly everything of the already degrading hard disk? -- Chris Christoph P. U. Kukulies kuku_at_kukulies.org From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 12:59:12 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E053516A41F for ; Thu, 12 Jan 2006 12:59:12 +0000 (GMT) (envelope-from fullermd@over-yonder.net) Received: from mail.localelinks.com (web.localelinks.com [64.39.75.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DE7243D45 for ; Thu, 12 Jan 2006 12:59:12 +0000 (GMT) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (adsl-072-148-013-213.sip.jan.bellsouth.net [72.148.13.213]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.localelinks.com (Postfix) with ESMTP id 5C094AD; Thu, 12 Jan 2006 06:59:11 -0600 (CST) Received: by draco.over-yonder.net (Postfix, from userid 100) id 9166161C21; Thu, 12 Jan 2006 06:59:10 -0600 (CST) Date: Thu, 12 Jan 2006 06:59:10 -0600 From: "Matthew D. Fuller" To: Christoph Kukulies Message-ID: <20060112125910.GB20029@over-yonder.net> References: <200601120948.k0C9mcqR092895@www.kukulies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.11-fullermd.2 Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 12:59:13 -0000 On Thu, Jan 12, 2006 at 10:48:38AM +0100 I heard the voice of Christoph Kukulies, and lo! it spake thus: > > dd if=/dev/ad2 of=/dev/ad3 conv=noerror Give it a bigger blocksize (say, bs=1m or so) and it'll go a **LOT** faster. > My motherboard is an ASUS P4S8X with an on board promise controller > (currently not in use). System disk is on IDE1 and the two 80GB > disks are master/slave on IDE2 bus. You'll get much better results by having each drive be master on its own bus. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 13:01:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C78D216A420 for ; Thu, 12 Jan 2006 13:01:41 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6476E43D76 for ; Thu, 12 Jan 2006 13:01:37 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.134] (dhcp-171-134.centtech.com [10.177.171.134]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k0CD1aA5080829; Thu, 12 Jan 2006 07:01:37 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43C65332.6060009@centtech.com> Date: Thu, 12 Jan 2006 07:01:38 -0600 From: Eric Anderson User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060110) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Kukulies References: <200601120948.k0C9mcqR092895@www.kukulies.org> In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1239/Thu Jan 12 05:36:22 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 13:01:41 -0000 Christoph Kukulies wrote: >My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to develop read >errors. I have FreeBSD and Win XP on that disk. Although FreeBSD ist still >working , the errors in the Windows partition are causing Windows do ask for a >filesystem check nearly everytime I reboot the computer. One time the >error was in the hibernate.sys file, which impedes powering up quickly after >a hibernate. > >Anyway, I decided to buy a second identical hard disk and tried to >block by block copy the old disk to the new one using > >dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > Specify a larger block size - the default is 512bytes, which is not efficient for what you are doing. Maybe 1mb would be the right number. >The process is running now since yesterday evening and it is at 53 MB >at a transfer rate of about 1.1 MB/s. > >In case the the result being unusable I would like to find a way to make this >copying faster. > >Any disk expert here? My motherboard is an ASUS P4S8X with an on board >promise controller (currently not in use). System disk is >on IDE1 and the two 80GB disks are master/slave on IDE2 bus. > > Also, put the disks on separate IDE busses - one disk on ide1, the other on ide2. This will help a lot.. >I wonder wether I could get better results (transfer rate) when attaching the >disks to copy to the promise IDE bus. > >And another question: > >Is there a way to tweak the driver (be it the FreeBSD promise driver >or the normal ata driver) to use more retries on errors so that I >have the chance to copy everything or nearly everything of the already >degrading hard disk? > Not sure about that.. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 13:04:10 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 0192316A41F for ; Thu, 12 Jan 2006 13:04:10 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DC2D43D45 for ; Thu, 12 Jan 2006 13:04:03 +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 k0CD3qFx025929; Thu, 12 Jan 2006 14:03:57 +0100 (MET) Message-ID: <43C65332.906@fer.hr> Date: Thu, 12 Jan 2006 14:01:38 +0100 From: Ivan Voras User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050921) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Kukulies References: <200601120948.k0C9mcqR092895@www.kukulies.org> In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 13:04:10 -0000 Christoph Kukulies wrote: > Anyway, I decided to buy a second identical hard disk and tried to > block by block copy the old disk to the new one using > > dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > The process is running now since yesterday evening and it is at 53 MB > at a transfer rate of about 1.1 MB/s. The default block size for dd is 512 bytes, meaning dd will read 512 bytes from one disk and write them to the other before reading again. This is SLOW. You need to specify a larger block size to use it effectively, like adding "bs=1m" argument to dd (which will make it use 1 MB blocks). Also, you should probably add "sync" to your "conv" argument, see the manual page of dd. I don't know if using "sync" will produce a full 1 MB of zeros when a bad sector is encountered - I hope someone else will clarify this :) Btw. I don't think this is the right group for your question - in the future use questions@freebsd.org or stable@freebsd.org... From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 13:24:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 1A35D16A41F for ; Thu, 12 Jan 2006 13:24:27 +0000 (GMT) (envelope-from gilbert.fernandes@spamcop.net) Received: from mailgate.cesmail.net (mailgate.cesmail.net [216.154.195.36]) by mx1.FreeBSD.org (Postfix) with SMTP id 9868043D49 for ; Thu, 12 Jan 2006 13:24:23 +0000 (GMT) (envelope-from gilbert.fernandes@spamcop.net) Received: (qmail 27302 invoked from network); 12 Jan 2006 13:24:22 -0000 Received: from unknown (HELO delta.cesmail.net) (192.168.1.30) by mailgate.cesmail.net with SMTP; 12 Jan 2006 13:24:22 -0000 Received: (qmail 13530 invoked by uid 99); 12 Jan 2006 13:24:22 -0000 Received: from i02v-87-89-157-8.d4.club-internet.fr (i02v-87-89-157-8.d4.club-internet.fr [87.89.157.8]) by webmail.spamcop.net (Horde) with HTTP for ; Thu, 12 Jan 2006 14:24:22 +0100 Message-ID: <20060112142422.jmbhco044cwsc08o@webmail.spamcop.net> Date: Thu, 12 Jan 2006 14:24:22 +0100 From: Gilbert Fernandes To: freebsd-hackers@freebsd.org References: <200601120948.k0C9mcqR092895@www.kukulies.org> In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 13:24:27 -0000 > My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to > develop read errors. Since you are using a modern disk, you should check your smart counters. I know how to do it on NetBSD, and I believe the command is also available on FreeBSD. First, you have to turn on the smart (S.M.A.R.T.) stuff on the hard-disk. Then you can poll the hard disk and have counters reported back to you with precious information about errors :) Here is what I get from atactl on NetBSD : {/root} [root][1] atactl wd0 smart status SMART supported, SMART enabled id value thresh crit collect reliability description raw 1 100 51 yes online positive Raw read error rate 0 3 100 25 yes online positive Spin-up time 2944 4 100 0 no online positive Start/stop count 453 5 253 10 yes online positive Reallocated sector count 0 7 253 0 no online positive Seek error rate 0 8 253 0 no offline positive Seek time performance 0 9 100 0 no online positive Power-on hours count 7010 10 253 0 no online positive Spin retry count 0 12 100 0 no online positive Device power cycle count 9 191 100 0 no online positive Gsense error rate 35 194 112 0 no online positive Temperature 42 195 100 0 no online positive Hardware ECC Recovered 1981492 196 253 0 no online positive Reallocated event count 0 197 253 0 no online positive Current pending sector 0 198 253 0 no offline positive Offline uncorrectable 0 199 200 0 no online positive Ultra DMA CRC error count 0 200 100 0 no online positive Write error rate 0 201 253 0 no online positive Soft read error rate 0 223 253 0 no online positive Load/unload retry count 0 225 100 0 no online positive Load/unload cycle count 5513 255 100 0 no online positive Unknown 0 So by checking your own counters, you might get hints from the hardware that something is wrong there. Then, there is a web page with tools from Hitachi (IBM) that allow you to boot and check your disk : http://www.hitachigst.com/hdd/support/download.htm Which such tools, you can have access to some functions that are not available from our beloved BSD like turning ON the "check the noise you do and try to be quiet" option :) The feature tool will let you do that : Change the drive Automatic Acoustic Management settings to the: * Lowest acoustic emanation setting (Quiet Seek Mode), or * Maximum performance level (Normal Seek Mode). I was using a disk like yours on my Thinkpad X30. I replaced it with a Samsung which has the same kind of tools available and usually in the form of bootable floppies. Hope this will help ! -- unzip ; strip ; touch ; grep ; find ; finger ; mount ; fsck ; more ; yes ; fsck ; umount ; sleep From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 15:39:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABCE416A41F for ; Thu, 12 Jan 2006 15:39:28 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4109643D49 for ; Thu, 12 Jan 2006 15:39:24 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id k0CFdN4X098531; Thu, 12 Jan 2006 09:39:23 -0600 (CST) (envelope-from dan) Date: Thu, 12 Jan 2006 09:39:23 -0600 From: Dan Nelson To: Christoph Kukulies Message-ID: <20060112153919.GA21009@dan.emsphone.com> References: <200601120948.k0C9mcqR092895@www.kukulies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 15:39:28 -0000 In the last episode (Jan 12), Christoph Kukulies said: > My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to develop > read errors. I have FreeBSD and Win XP on that disk. Although FreeBSD > ist still working , the errors in the Windows partition are causing > Windows do ask for a filesystem check nearly everytime I reboot the > computer. One time the error was in the hibernate.sys file, which > impedes powering up quickly after a hibernate. > > Anyway, I decided to buy a second identical hard disk and tried to > block by block copy the old disk to the new one using > > dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > The process is running now since yesterday evening and it is at 53 MB > at a transfer rate of about 1.1 MB/s. Everybody has mentioned the first obvious fix: raise your blocksize from the default 512 bytes. The second fix addresses the problem that with a single dd, you are either reading or writing. If you pipe the first dd into a second one, it'll let you run at the max speed of the slowest device. dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 17:38:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E902616A41F for ; Thu, 12 Jan 2006 17:38:46 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97BF843D48 for ; Thu, 12 Jan 2006 17:38:46 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id k0CHcbQh063237; Thu, 12 Jan 2006 09:38:37 -0800 (PST) (envelope-from bakul@bitblocks.com) Message-Id: <200601121738.k0CHcbQh063237@gate.bitblocks.com> To: Dan Nelson In-reply-to: Your message of "Thu, 12 Jan 2006 09:39:23 CST." <20060112153919.GA21009@dan.emsphone.com> Date: Thu, 12 Jan 2006 09:38:37 -0800 From: Bakul Shah Cc: Christoph Kukulies , freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 17:38:47 -0000 > In the last episode (Jan 12), Christoph Kukulies said: > > My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to develop > > read errors. I have FreeBSD and Win XP on that disk. Although FreeBSD > > ist still working , the errors in the Windows partition are causing > > Windows do ask for a filesystem check nearly everytime I reboot the > > computer. One time the error was in the hibernate.sys file, which > > impedes powering up quickly after a hibernate. > > > > Anyway, I decided to buy a second identical hard disk and tried to > > block by block copy the old disk to the new one using > > > > dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > > > The process is running now since yesterday evening and it is at 53 MB > > at a transfer rate of about 1.1 MB/s. > > Everybody has mentioned the first obvious fix: raise your blocksize > from the default 512 bytes. The second fix addresses the problem that > with a single dd, you are either reading or writing. If you pipe the > first dd into a second one, it'll let you run at the max speed of the > slowest device. > > dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k So now on the new disk he has files with random blocks of zeroes and *no* error indication of which files are so trashed. This is asking for trouble. Silent erros are worse. He ought to do a file level copy, not disk level copy on unix. That way he knows *which* files are trashed and can do a better job of recovering. Assuming he has backups. Windows is pickier about things but I am sure there are windows tools that will handle all that and allow more retries. dd is the *wrong* tool for what he wants to do. If it were upto me first I'd backup all the data I may need; using multiple retries and all that and then install freebsd from scratch on the new *bigger* disk. Perfect time for house cleaning and removing all those ports you don't use any more! As for windows.... I'd use the recovery disk and in effect reinstall windows from scrach and then reinstall all apps and move over my data files. [What I actually do is to run win2k under qemu on my laptop. Good enough for what I need it for] From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 17:50:41 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EB3216A423 for ; Thu, 12 Jan 2006 17:50:41 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id C227043D46 for ; Thu, 12 Jan 2006 17:50:40 +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 k0CHoYFx021945 for ; Thu, 12 Jan 2006 18:50:35 +0100 (MET) Message-ID: <43C69664.2070505@fer.hr> Date: Thu, 12 Jan 2006 18:48:20 +0100 From: Ivan Voras User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050921) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20060112153919.GA21009@dan.emsphone.com> <200601121738.k0CHcbQh063237@gate.bitblocks.com> In-Reply-To: <200601121738.k0CHcbQh063237@gate.bitblocks.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 17:50:41 -0000 Bakul Shah wrote: >>In the last episode (Jan 12), Christoph Kukulies said: >>dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k > > > So now on the new disk he has files with random blocks of > zeroes and *no* error indication of which files are so > trashed. This is asking for trouble. Silent erros are > worse. > > He ought to do a file level copy, not disk level copy on > unix. That way he knows *which* files are trashed and can do The problem is, FreeBSD panics when it encounters bad sectors in filesystem metadata. I had the same situation ~a month ago and gave up, restoring from old backups. It will also probably panic on corrupted or zeroed metadata, but at least it's on a readable disk... From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 17:55:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 A300516A41F for ; Thu, 12 Jan 2006 17:55:22 +0000 (GMT) (envelope-from cliftonr@lava.net) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3974A43D68 for ; Thu, 12 Jan 2006 17:55:12 +0000 (GMT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id 14FDB153882; Thu, 12 Jan 2006 07:55:10 -1000 (HST) Date: Thu, 12 Jan 2006 07:55:10 -1000 From: Clifton Royston To: freebsd-hackers@freebsd.org Message-ID: <20060112175509.GB26547@lava.net> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20060112120031.D568A16A41F@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060112120031.D568A16A41F@hub.freebsd.org> User-Agent: Mutt/1.4.2i Subject: Re: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 17:55:22 -0000 On Thu, Jan 12, 2006 at 12:00:31PM +0000, freebsd-hackers-request@freebsd.org wrote: > Date: Wed, 11 Jan 2006 10:32:16 -0800 > From: "Darren Pilgrim" > Subject: RE: Ricoh PCI to SD device? > To: "'M. Warner Losh'" > Cc: freebsd-hackers@freebsd.org > > From: M. Warner Losh [mailto:imp@bsdimp.com] ... > > Are you sure they provide technical documentation sufficent to write > > the driver? The last time I asked, I got a nice document that said > > that it implemented the sds standard sd host interface, but didn't > > document what that was. TI and winbond chips datasheets are the same > > way. Prove me wrong. I'd love it :-) > > The SD protocols aren't open standards. Ricoh can't legally include > information about the protocols in their documentation. Without working > implementation of the SDA's standards, FreeBSD is stuck. I don't blame the > funding behind FreeBSD development for not ponying up the dosh; I think such > fees are extortion made legal by intellectual property laws. > > But hey, it's the business. It's not like we're trying to make a good, free > product everyone can use, right? IANAL, but it sounds like there are more serious issues than the money. If that NDA says some fairly typical things, and if the FreeBSD organization (or any individual developer) poneys up the money for the standard and signs the associated NDA, then either that developer or the FreeBSD group as a whole might then be permanently barred from writing open source code to implement the protocol, as a working implementation could disclose protocol information covered as a secret by the NDA. I'm sure that's *not* what you want to see. -- Clifton -- Clifton Royston -- cliftonr@iandicomputing.com / cliftonr@lava.net President - I and I Computing * http://www.iandicomputing.com/ Custom programming, network design, systems and network consulting services From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 17:56:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9561516A41F for ; Thu, 12 Jan 2006 17:56:34 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id E95C043D70 for ; Thu, 12 Jan 2006 17:56:32 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id k0CHuDiv063356; Thu, 12 Jan 2006 09:56:13 -0800 (PST) (envelope-from bakul@bitblocks.com) Message-Id: <200601121756.k0CHuDiv063356@gate.bitblocks.com> To: Ivan Voras In-reply-to: Your message of "Thu, 12 Jan 2006 18:48:20 +0100." <43C69664.2070505@fer.hr> Date: Thu, 12 Jan 2006 09:56:13 -0800 From: Bakul Shah Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 17:56:34 -0000 > Bakul Shah wrote: > >>In the last episode (Jan 12), Christoph Kukulies said: > > >>dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k > > > > > > So now on the new disk he has files with random blocks of > > zeroes and *no* error indication of which files are so > > trashed. This is asking for trouble. Silent erros are > > worse. > > > > He ought to do a file level copy, not disk level copy on > > unix. That way he knows *which* files are trashed and can do > > The problem is, FreeBSD panics when it encounters bad sectors in > filesystem metadata. I had the same situation ~a month ago and gave up, > restoring from old backups. It will also probably panic on corrupted or > zeroed metadata, but at least it's on a readable disk... Good point. Would fsdb help? If not someone ought to extend it. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 18:14:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C926816A41F for ; Thu, 12 Jan 2006 18:14:35 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68E3943D48 for ; Thu, 12 Jan 2006 18:14:34 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k0CIETEZ086604; Thu, 12 Jan 2006 12:14:29 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43C69C86.6000707@centtech.com> Date: Thu, 12 Jan 2006 12:14:30 -0600 From: Eric Anderson User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060110) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bakul Shah References: <200601121756.k0CHuDiv063356@gate.bitblocks.com> In-Reply-To: <200601121756.k0CHuDiv063356@gate.bitblocks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1239/Thu Jan 12 05:36:22 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 18:14:35 -0000 Bakul Shah wrote: >>Bakul Shah wrote: >> >> >>>>In the last episode (Jan 12), Christoph Kukulies said: >>>> >>>> >>>>dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k >>>> >>>> >>>So now on the new disk he has files with random blocks of >>>zeroes and *no* error indication of which files are so >>>trashed. This is asking for trouble. Silent erros are >>>worse. >>> >>>He ought to do a file level copy, not disk level copy on >>>unix. That way he knows *which* files are trashed and can do >>> >>> >>The problem is, FreeBSD panics when it encounters bad sectors in >>filesystem metadata. I had the same situation ~a month ago and gave up, >>restoring from old backups. It will also probably panic on corrupted or >>zeroed metadata, but at least it's on a readable disk... >> >> > >Good point. Would fsdb help? If not someone ought to extend it. > > I think after the dd is done, fsck should be run against the affected filesystems, which should take care of most of the issues. The OP's question was how to make dd faster, not really how to get the data across safely. :) Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 18:19:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D536516A41F for ; Thu, 12 Jan 2006 18:19:38 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F0B443D4C for ; Thu, 12 Jan 2006 18:19:38 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id k0CIJYNw063521; Thu, 12 Jan 2006 10:19:35 -0800 (PST) (envelope-from bakul@bitblocks.com) Message-Id: <200601121819.k0CIJYNw063521@gate.bitblocks.com> To: Eric Anderson In-reply-to: Your message of "Thu, 12 Jan 2006 12:14:30 CST." <43C69C86.6000707@centtech.com> Date: Thu, 12 Jan 2006 10:19:34 -0800 From: Bakul Shah Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 18:19:38 -0000 > I think after the dd is done, fsck should be run against the affected > filesystems, which should take care of most of the issues. For metadata yes, but not for normal file data. He wouldn't even know what got trashed. > The OP's question was how to make dd faster, not really how to get the > data across safely. :) Sometime you have to answer the question they should've asked! That is what a diagnostician has to do. Fix the cause. Not the symptom. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 19:26:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 713C916A420 for ; Thu, 12 Jan 2006 19:26:20 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACC3B43D48 for ; Thu, 12 Jan 2006 19:26:18 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5911741 for multiple; Thu, 12 Jan 2006 14:24:44 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k0CJQF2H085257; Thu, 12 Jan 2006 14:26:15 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 12 Jan 2006 14:27:01 -0500 User-Agent: KMail/1.8.2 References: <20060112085237.GA64401@cirb503493.alcatel.com.au> In-Reply-To: <20060112085237.GA64401@cirb503493.alcatel.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601121427.02185.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1239/Thu Jan 12 06:36:22 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Peter Jeremy Subject: Re: Atomic operations across multiple processors X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 19:26:20 -0000 On Thursday 12 January 2006 03:52 am, Peter Jeremy wrote: > atomic(9) states: > The current set of atomic operations do not necessarily guarantee atomic- > ity across multiple processors. ... On the i386 architecture, the cache > coherency model requires that the hardware perform this task, thus the > atomic operations are atomic across multiple processors. On the ia64 > architecture, coherency is only guaranteed for pages that are configured > to using a caching policy of either uncached or write back. > > Unfortunately, this doesn't document the behaviour for other > architectures - this makes it difficult to write portable code. > > For the ia64, the statement isn't especially helpful because there's > no indication of what caching policy is used by default and how to > change it. Also, it seems odd that write-back pages would be coherent > whilst write-through pages aren't - is this a typo? The man page is > also inconsistent with /sys/ia64/include/atomic.h which states that > atomic operations _are_ SMP safe. > > I've tried looking at the mutex code to see how the iA64 achieves > inter-processor synchronisation on top of (supposedly) non- > synchronised atomic(9) primitives but can't find anything. > > I'd appreciate comments from people familiar with non-iA32 architectures. What it is trying to communicate is the fact that the results of an atomic operation are not immediately visible on other CPUs. That is, other CPUs may have stale values in cache, etc. On i386 the caching policy doesn't really allow that much as lines get evicted when other CPUs write to them. On sparc9 for example, writes can sit in a store buffer for a while before they are posted to main memory, and other CPUs in the system won't see the effect of the write until then. However, if another CPU tries to do a cas on the same variable, it will either block or fail (not sure which, might be implementation dependent). That's all the mutex code needs though. Here's the non-hairy parts of _mtx_lock_sleep() to show how they work: while (!_obtain_lock(m, tid)) { turnstile_lock(&m->mtx_object); v = m->mtx_lock; /* * Check if the lock has been released while spinning for * the turnstile chain lock. */ if (v == MTX_UNOWNED) { turnstile_release(&m->mtx_object); cpu_spinwait(); continue; } /* * If the mutex isn't already contested and a failure occurs * setting the contested bit, the mutex was either released * or the state of the MTX_RECURSED bit changed. */ if ((v & MTX_CONTESTED) == 0 && !atomic_cmpset_ptr(&m->mtx_lock, v, v | MTX_CONTESTED)) { turnstile_release(&m->mtx_object); cpu_spinwait(); continue; } /* * Block on the turnstile. */ turnstile_wait(&m->mtx_object, mtx_owner(m)); } 1) First we try to obtain the lock vi atomic_cmpset_acq(). If it succeeds, all is happy and we return. 2) If it fails we acquire the turnstile spin lock (really, it's one of several turnstile locks based on a hash of the lock's KVA). It's important to note that all manipulation of the MTX_CONTESTED bit happens while this spin lock is held. 3) We read the value of mtx_lock after acquiring the turnstile lock. 4) We check to see if the lock is now free after we acquired the turnstile lock. If so, we drop the turnstile lock and try again from the top. 5) If MTX_CONTESTED is set, then we know that the owning thread is going to fail its simple mutex unlock and will end up in the _mtx_unlock_sleep() function where it will wake us up, so we go ahead and add ourselves to the thread queue on the turnstile via turnstile_wait() which will block us and handle any races in the queue mechanics itself. 6) If MTX_CONTESTED is clear, we need to make sure it is set before we block to ensure that the owning thread will wake us up when it drops the lock. If we can't set MTX_CONTESTED, then that means that the value of mtx_lock doesn't match what we think it is (v), so we drop the turnstile lock and try again. That's the simple overview anyway. Now suppose that an arch will fail atomic_cmpset_ptr() even if mtx_lock == v, but it knows that some other CPU has a pending write to mtx_lock that it can't see the value of yet (think of linked-load conditional-store as on Alpha, and available (but not currently used) on ia64), in that case, it doesn't hurt to just fail atomic_cmpset_ptr() as we will just spin until other CPUs writes post. So, in the mutex code, I don't really care if atomic_cmpset_ptr() has failed because v was stale and the CPU could tell because the actual compare failed, or if the CPU just knows that mtx_lock is in a cache-line that it knows is dirty in another CPU and thus can't be trusted. I'll loop until either I see that somebody else succeeded in setting MTX_CONTESTED or until I set it ok as well. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 19:26:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E1F216A41F for ; Thu, 12 Jan 2006 19:26:20 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACC1543D49 for ; Thu, 12 Jan 2006 19:26:18 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5911740 for multiple; Thu, 12 Jan 2006 14:24:44 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k0CJQF2G085257; Thu, 12 Jan 2006 14:26:15 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 12 Jan 2006 14:10:51 -0500 User-Agent: KMail/1.8.2 References: <20060112111905.85809.qmail@web30006.mail.mud.yahoo.com> In-Reply-To: <20060112111905.85809.qmail@web30006.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601121410.53884.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1239/Thu Jan 12 06:36:22 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: kamal kc Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 19:26:20 -0000 On Thursday 12 January 2006 06:19 am, kamal kc wrote: > --- kamal kc wrote: > > > Queue a task to a taskqueue. Behind the scenes > > > > that > > > > > will invoke a swi_add if > > > you use the taskqueue_swi queue. However, given > > > that you want to do some > > > rather complicated work, you'd be better off > > > creating a dedicated taskqueue > > > thread and queueing tasks off to it I think. > > > > thanks for the suggestion on the taskqueue. i tried > > it > > > > on my dummy kernel module and got some output but i > > am not sure if i followed the correct steps to > > use the taskqueue. the only thing i found > > was the man pages and the taskqueue.h. > > > > here is the code: > > ----------------------- > > > > struct taskqueue_arguments > > { int a; > > int b; > > }; > > > > void taskqueue_function(void *,int); > > typedef void taskqueue_function_t(void *,int); > > > > /* taskqueue function */ > > void taskqueue_function(void *arguments,int int_arg) > > { > > struct taskqueue_arguments *arg; > > arg=(struct taskqueue_arguments *)arguments; > > printf("\ntakqueue_function was called the args > > are %d %d",arg->a,arg->b); > > return; > > } > > > > /* function implementing the syscall */ > > static int > > hello(struct thread *td, void *arg) > > { ......... > > struct task mytask; > > taskqueue_function_t *taskqueue_function_ptr; > > taskqueue_function_ptr=taskqueue_function; > > > > struct taskqueue_arguments arg_var; > > arg_var.a=10; > > arg_var.b=20; > > TASK_INIT(&mytask,50,taskqueue_function_ptr,&arg_var); > > > taskqueue_enqueue(taskqueue_swi, &mytask); You can just use the name of the function w/o having to have an explicit function pointer var: TASK_INIT(&mytask, 50, taskqueue_functino, &arg_var); > > > > ........... > > } > > dear all , > > i run the above code and the kernel > would crash whenever i would do the syscall for few > number of times. the crashing process is > (swi6: task queue). the kernel crashes very soon > when i make the system call in a loop. > > i guess i didn't follow all the steps to use > the taskqueue .... > > i think some of you can help what did i > miss .... Are you calling TASK_INIT() while your task is still pending? Just init the task the first time, then call enqueue() to queue it up. You might want to call TASK_INIT() during the MOD_LOAD() event in your module handler for example. Be sure to call taskqueue_drain() during MOD_UNLOAD() to make sure your task has finished all the pending executes before your module is unloaded as well. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 21:13:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF58616A41F for ; Thu, 12 Jan 2006 21:13:05 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0349F43D49 for ; Thu, 12 Jan 2006 21:13:04 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail15.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0CLD0YV028897 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 13 Jan 2006 08:13:02 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0CLD0Hh013317; Fri, 13 Jan 2006 08:13:00 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0CLD0Sb013316; Fri, 13 Jan 2006 08:13:00 +1100 (EST) (envelope-from pjeremy) Date: Fri, 13 Jan 2006 08:13:00 +1100 From: Peter Jeremy To: Christoph Kukulies Message-ID: <20060112211300.GB13244@cirb503493.alcatel.com.au> References: <200601120948.k0C9mcqR092895@www.kukulies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 21:13:05 -0000 On Thu, 2006-Jan-12 10:48:38 +0100, Christoph Kukulies wrote: >dd if=/dev/ad2 of=/dev/ad3 conv=noerror > >The process is running now since yesterday evening and it is at 53 MB >at a transfer rate of about 1.1 MB/s. > >In case the the result being unusable I would like to find a way to make this >copying faster. Note that whilst increasing the DD blocksize will speed up the transfer, it will also increase the amount of collateral damage when a hard error occurs. If you rummage around the ports or tools tree, you'll find a utility (its name escapes me but I believe it was written by phk) that is designed to do disk-to-disk recovery - it copys data in big slabs until it gets an error and then works around the faulty area block by block. You should also install /usr/ports/sysutils/smartmontools - this handles S.M.A.R.T. >Is there a way to tweak the driver (be it the FreeBSD promise driver >or the normal ata driver) to use more retries on errors so that I >have the chance to copy everything or nearly everything of the already >degrading hard disk? A quick look at the ata driver suggests that there are a number of 'retry' and 'retries' variables/fields. I suspect you could increase the number of retries if you wanted to patch the driver. -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 21:20:31 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8773216A41F for ; Thu, 12 Jan 2006 21:20:31 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF50843D5A for ; Thu, 12 Jan 2006 21:20:30 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.3/8.12.9) with ESMTP id k0CLKTpW024553; Thu, 12 Jan 2006 22:20:29 +0100 (CET) (envelope-from cracauer@schlepper.zs64.net) Received: (from cracauer@localhost) by schlepper.zs64.net (8.13.3/8.12.9/Submit) id k0CLKTOH024552; Thu, 12 Jan 2006 16:20:29 -0500 (EST) (envelope-from cracauer) Date: Thu, 12 Jan 2006 16:20:29 -0500 From: Martin Cracauer To: Christoph Kukulies Message-ID: <20060112162029.A24320@cons.org> References: <200601120948.k0C9mcqR092895@www.kukulies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200601120948.k0C9mcqR092895@www.kukulies.org>; from kuku@www.kukulies.org on Thu, Jan 12, 2006 at 10:48:38AM +0100 Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 21:20:31 -0000 Moin moin, wie geht's :-) Christoph Kukulies wrote on Thu, Jan 12, 2006 at 10:48:38AM +0100: > > My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to develop read > errors. I have FreeBSD and Win XP on that disk. Although FreeBSD ist still > working , the errors in the Windows partition are causing Windows do ask for a > filesystem check nearly everytime I reboot the computer. One time the > error was in the hibernate.sys file, which impedes powering up quickly after > a hibernate. > > Anyway, I decided to buy a second identical hard disk and tried to > block by block copy the old disk to the new one using > > dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > The process is running now since yesterday evening and it is at 53 MB > at a transfer rate of about 1.1 MB/s. /usr/ports/mis/cstream is a dd-like tool which allows you to specify that it buffers up megabyte of input before writing to the output. You need that because you are on the same bus with both disks. Use the -B and -b options with some high values. Experiment with the -c option. > Is there a way to tweak the driver (be it the FreeBSD promise driver > or the normal ata driver) to use more retries on errors so that I > have the chance to copy everything or nearly everything of the already > degrading hard disk? Just retrying the same block probably doesn't do it. You'll be more successful by seeking to move the head around before retrying. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 21:23:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB7E216A41F for ; Thu, 12 Jan 2006 21:23:46 +0000 (GMT) (envelope-from ken@nargothrond.kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE6443D48 for ; Thu, 12 Jan 2006 21:23:41 +0000 (GMT) (envelope-from ken@nargothrond.kdm.org) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.13.4/8.12.11) with ESMTP id k0CLNcYD080286; Thu, 12 Jan 2006 14:23:38 -0700 (MST) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.13.4/8.12.5/Submit) id k0CLNbHN080285; Thu, 12 Jan 2006 14:23:37 -0700 (MST) (envelope-from ken) Date: Thu, 12 Jan 2006 14:23:37 -0700 From: "Kenneth D. Merry" To: Peter Jeremy Message-ID: <20060112212337.GA80216@nargothrond.kdm.org> References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112211300.GB13244@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060112211300.GB13244@cirb503493.alcatel.com.au> User-Agent: Mutt/1.4.2i X-Virus-Scanned: ClamAV 0.87.1/1239/Thu Jan 12 04:36:22 2006 on nargothrond.kdm.org X-Virus-Status: Clean Cc: Christoph Kukulies , freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 21:23:47 -0000 On Fri, Jan 13, 2006 at 08:13:00 +1100, Peter Jeremy wrote: > On Thu, 2006-Jan-12 10:48:38 +0100, Christoph Kukulies wrote: > >dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > > >The process is running now since yesterday evening and it is at 53 MB > >at a transfer rate of about 1.1 MB/s. > > > >In case the the result being unusable I would like to find a way to make this > >copying faster. > > Note that whilst increasing the DD blocksize will speed up the > transfer, it will also increase the amount of collateral damage when a > hard error occurs. If you rummage around the ports or tools tree, > you'll find a utility (its name escapes me but I believe it was > written by phk) that is designed to do disk-to-disk recovery - it > copys data in big slabs until it gets an error and then works around > the faulty area block by block. It's called 'recoverdisk', and is in src/tools/tools/recoverdisk. I used it to copy a friend's hard drive, and it worked well. (Although the supposedly 'bad' disk didn't turn out to have any bad sectors.) Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 21:41:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD9DE16A41F for ; Thu, 12 Jan 2006 21:41:34 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7781143D45 for ; Thu, 12 Jan 2006 21:41:34 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id k0CLf3Cs006320; Thu, 12 Jan 2006 13:41:03 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id k0CLf2cA006319; Thu, 12 Jan 2006 13:41:02 -0800 (PST) (envelope-from jmg) Date: Thu, 12 Jan 2006 13:41:01 -0800 From: John-Mark Gurney To: Ivan Voras Message-ID: <20060112214101.GL69162@funkthat.com> Mail-Followup-To: Ivan Voras , freebsd-hackers@freebsd.org References: <20060112153919.GA21009@dan.emsphone.com> <200601121738.k0CHcbQh063237@gate.bitblocks.com> <43C69664.2070505@fer.hr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43C69664.2070505@fer.hr> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 21:41:35 -0000 Ivan Voras wrote this message on Thu, Jan 12, 2006 at 18:48 +0100: > Bakul Shah wrote: > >>In the last episode (Jan 12), Christoph Kukulies said: > > >>dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k > > > > > >So now on the new disk he has files with random blocks of > >zeroes and *no* error indication of which files are so > >trashed. This is asking for trouble. Silent erros are > >worse. > > > >He ought to do a file level copy, not disk level copy on > >unix. That way he knows *which* files are trashed and can do > > The problem is, FreeBSD panics when it encounters bad sectors in > filesystem metadata. I had the same situation ~a month ago and gave up, > restoring from old backups. It will also probably panic on corrupted or > zeroed metadata, but at least it's on a readable disk... Recovery can be possible with ffsrecov.py: http://people.freebsd.org/~jmg/ffsrecov/ -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 23:59:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB17D16A420 for ; Thu, 12 Jan 2006 23:59:49 +0000 (GMT) (envelope-from nicolas@i.0x5.de) Received: from n.0x5.de (n.0x5.de [217.197.85.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD46243D46 for ; Thu, 12 Jan 2006 23:59:48 +0000 (GMT) (envelope-from nicolas@i.0x5.de) Received: by pc5.i.0x5.de (Postfix, from userid 1003) id 1EFC581C35; Fri, 13 Jan 2006 00:59:46 +0100 (CET) Date: Fri, 13 Jan 2006 00:59:46 +0100 From: Nicolas Rachinsky To: Peter Jeremy Message-ID: <20060112235946.GA45385@mid.pc5.i.0x5.de> Mail-Followup-To: Peter Jeremy , Christoph Kukulies , freebsd-hackers@freebsd.org References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112211300.GB13244@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060112211300.GB13244@cirb503493.alcatel.com.au> X-Powered-by: FreeBSD X-Homepage: http://www.rachinsky.de X-PGP-Keyid: 887BAE72 X-PGP-Fingerprint: 039E 9433 115F BC5F F88D 4524 5092 45C4 887B AE72 X-PGP-Keys: http://www.rachinsky.de/nicolas/gpg/nicolas_rachinsky.asc User-Agent: Mutt/1.5.11 Cc: Christoph Kukulies , freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 23:59:49 -0000 * Peter Jeremy [2006-01-13 08:13 +1100]: > Note that whilst increasing the DD blocksize will speed up the > transfer, it will also increase the amount of collateral damage when a > hard error occurs. If you rummage around the ports or tools tree, > you'll find a utility (its name escapes me but I believe it was > written by phk) that is designed to do disk-to-disk recovery - it > copys data in big slabs until it gets an error and then works around > the faulty area block by block. sysutils/dd_rescue I haven't tried it, but pkg-descr sounds promising. Nicolas -- http://www.rachinsky.de/nicolas From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 01:38:57 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 434C016A41F for ; Fri, 13 Jan 2006 01:38:57 +0000 (GMT) (envelope-from darren.pilgrim@bitfreak.org) Received: from mail.bitfreak.org (mail.bitfreak.org [65.75.198.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id E07E343D45 for ; Fri, 13 Jan 2006 01:38:56 +0000 (GMT) (envelope-from darren.pilgrim@bitfreak.org) Received: from smiley (mail.bitfreak.org [65.75.198.146]) by mail.bitfreak.org (Postfix) with ESMTP id E36B319F2C; Thu, 12 Jan 2006 17:38:53 -0800 (PST) From: "Darren Pilgrim" To: "'Clifton Royston'" , Date: Thu, 12 Jan 2006 17:38:44 -0800 Message-ID: <002001c617e2$1bc87e90$672a15ac@smiley> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <20060112175509.GB26547@lava.net> Importance: Normal Cc: Subject: RE: Ricoh PCI to SD device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 01:38:57 -0000 From: Clifton Royston >=20 > If that NDA says some fairly typical things, and if the FreeBSD > organization (or any individual developer) poneys up the money for the > standard and signs the associated NDA, then either that developer or > the FreeBSD group as a whole might then be permanently barred from > writing open source code to implement the protocol, as a working > implementation could disclose protocol information covered as a secret > by the NDA. >=20 > I'm sure that's *not* what you want to see. In a roundabout way, that's exactly what I'm saying. The SDA, by their actions, doesn't give a rats posterior about freedom. They're falsely convinced technology standards are a revenue vector and are surviving = solely upon Apple, Microsoft, Dell, HP, Sony, Samsung and all the other huge companies having the capital to just pony up their extortionist fees = rather than making a moral stand. The only reason I have any SD hardware at all is because it was a non-removable option in the notebook I bought. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 06:32:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6E8F16A41F for ; Fri, 13 Jan 2006 06:32:35 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BD5C43D45 for ; Fri, 13 Jan 2006 06:32:35 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so427260wxc for ; Thu, 12 Jan 2006 22:32:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=l2XME6mlim2aPwzRHgQOzixgGNWs4tS6SFsgCrRBqh/S4tR6YuiDPwoukZZX2haWKA3nGi/Tc2b1yhgVK6rVLhMEege1tDc80rsEHzGXrwszuSkTc4ro7BhshtkXmvzU9CCtoMJLBZW7TjbCKIFs1So7GbFw9ZSFGK1vfNT9xQM= Received: by 10.70.82.20 with SMTP id f20mr2716216wxb; Thu, 12 Jan 2006 22:32:34 -0800 (PST) Received: by 10.70.39.18 with HTTP; Thu, 12 Jan 2006 22:32:34 -0800 (PST) Message-ID: <1fa17f810601122232l25551bc5n4e4a01ff6b7921e@mail.gmail.com> Date: Fri, 13 Jan 2006 14:32:34 +0800 From: prime 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 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How priority propagation works on read/write lock? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 06:32:35 -0000 Hi hackers, I have a question about how priority propagation works on read/write lock.On locks that have only one owner at a determinate moment,we can simply propagate the priority to the owner of lock,but read/write lock may have many owners at some time,so how can we know who are the owners? I browse the OpenSolaris' read/write lock implementation,and find that, it simply treats the owner of the lock as NULL when readers own the read/write lock.In this way,we can not propagate our priority to all threads that block us. Thanks very much. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 06:45:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5693E16A41F for ; Fri, 13 Jan 2006 06:45:14 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30006.mail.mud.yahoo.com (web30006.mail.mud.yahoo.com [68.142.200.69]) by mx1.FreeBSD.org (Postfix) with SMTP id E37F243D46 for ; Fri, 13 Jan 2006 06:45:13 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 73472 invoked by uid 60001); 13 Jan 2006 06:45:13 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=0imxCIktBBe5+a0SDaOv3Y284ZoIIVk+oUH7japitsXm6kTD51PqoH7UtslL91UCUnvI7mvNNczggnMoux/jwGBCZoYXqW0w6oXOLZEHBId7LfKNHiT9lCvsXmgKtLihCodbb4qk7mssj8dh0L9WoCUdET6W0+95C2HQEtMtN44= ; Message-ID: <20060113064513.73470.qmail@web30006.mail.mud.yahoo.com> Received: from [202.161.131.69] by web30006.mail.mud.yahoo.com via HTTP; Thu, 12 Jan 2006 22:45:13 PST Date: Thu, 12 Jan 2006 22:45:13 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <200601121410.53884.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 06:45:14 -0000 --- John Baldwin wrote: > On Thursday 12 January 2006 06:19 am, kamal kc > wrote: > > --- kamal kc wrote: > > > > Queue a task to a taskqueue. Behind the > scenes > > > > > > that > > > > > > > will invoke a swi_add if > > > > you use the taskqueue_swi queue. However, > given > > > > that you want to do some > > > > rather complicated work, you'd be better off > > > > creating a dedicated taskqueue > > > > thread and queueing tasks off to it I think. > > > > > > thanks for the suggestion on the taskqueue. i > tried > > > it > > > > > > on my dummy kernel module and got some output > but i > > > am not sure if i followed the correct steps to > > > use the taskqueue. the only thing i found > > > was the man pages and the taskqueue.h. > > > > > > here is the code: > > > ----------------------- > > > > > > struct taskqueue_arguments > > > { int a; > > > int b; > > > }; > > > > > > void taskqueue_function(void *,int); > > > typedef void taskqueue_function_t(void *,int); > > > > > > /* taskqueue function */ > > > void taskqueue_function(void *arguments,int > int_arg) > > > { > > > struct taskqueue_arguments *arg; > > > arg=(struct taskqueue_arguments *)arguments; > > > printf("\ntakqueue_function was called the > args > > > are %d %d",arg->a,arg->b); > > > return; > > > } > > > > > > /* function implementing the syscall */ > > > static int > > > hello(struct thread *td, void *arg) > > > { ......... > > > struct task mytask; > > > taskqueue_function_t > *taskqueue_function_ptr; > > > taskqueue_function_ptr=taskqueue_function; > > > > > > struct taskqueue_arguments arg_var; > > > arg_var.a=10; > > > arg_var.b=20; > > > > > TASK_INIT(&mytask,50,taskqueue_function_ptr,&arg_var); > > > > > taskqueue_enqueue(taskqueue_swi, &mytask); > > You can just use the name of the function w/o having > to have an explicit > function pointer var: > > TASK_INIT(&mytask, 50, taskqueue_functino, > &arg_var); > > > > > > > ........... > > > } > > > > dear all , > > > > i run the above code and the kernel > > would crash whenever i would do the syscall for > few > > number of times. the crashing process is > > (swi6: task queue). the kernel crashes very soon > > when i make the system call in a loop. > > > > i guess i didn't follow all the steps to use > > the taskqueue .... > > > > i think some of you can help what did i > > miss .... the problem is solved i guess. now i used the structure : struct taskqueue_struct { struct task mytask; int a; int b; } everytime i call TASK_INIT() i allocate memory for the taskqueue_struct. and in the handler function deallocate the struct taskqueue_struct. this allowed me to do memory safe operation i guess !! > > Are you calling TASK_INIT() while your task is still > pending? Just init the > task the first time, then call enqueue() to queue it > up. You might want to > call TASK_INIT() during the MOD_LOAD() event in your > module handler for > example. Be sure to call taskqueue_drain() during > MOD_UNLOAD() to make sure > your task has finished all the pending executes > before your module is > unloaded as well. yes , i will do these things. now i will try to make a separate taskqueue thread for the job like you said before. i am looking at the kthread and other stuffs. i am more optimistic now than ever.. i am enjoying these stuffs .. thanks, kamal __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 08:14:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 9656016A41F for ; Fri, 13 Jan 2006 08:14:45 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (www.kukulies.org [213.146.112.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EBBA43D48 for ; Fri, 13 Jan 2006 08:14:44 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (localhost [127.0.0.1]) by www.kukulies.org (8.13.3/8.12.10) with ESMTP id k0D8Edc6004555; Fri, 13 Jan 2006 09:14:40 +0100 (CET) (envelope-from kuku@www.kukulies.org) Received: (from kuku@localhost) by www.kukulies.org (8.13.3/8.12.10/Submit) id k0D8EcjE004554; Fri, 13 Jan 2006 09:14:38 +0100 (CET) (envelope-from kuku) Date: Fri, 13 Jan 2006 09:14:38 +0100 From: "Christoph P. Kukulies" To: Peter Jeremy Message-ID: <20060113081438.GA4401@kukulies.org> References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112211300.GB13244@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060112211300.GB13244@cirb503493.alcatel.com.au> User-Agent: Mutt/1.4.1i Cc: Christoph Kukulies , freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 08:14:45 -0000 Thanks, folks, for the interesting contributions. I really should have marked the subject "OT" but there spring up a lot of interesting ideas. On Fri, Jan 13, 2006 at 08:13:00AM +1100, Peter Jeremy wrote: > On Thu, 2006-Jan-12 10:48:38 +0100, Christoph Kukulies wrote: > >dd if=/dev/ad2 of=/dev/ad3 conv=noerror > > > >The process is running now since yesterday evening and it is at 53 MB > >at a transfer rate of about 1.1 MB/s. > > > >In case the the result being unusable I would like to find a way to make this > >copying faster. > > Note that whilst increasing the DD blocksize will speed up the > transfer, it will also increase the amount of collateral damage when a > hard error occurs. If you rummage around the ports or tools tree, > you'll find a utility (its name escapes me but I believe it was > written by phk) that is designed to do disk-to-disk recovery - it /usr/src/tools/tools/recoverdisk I fired up this tool yesterday night and it is still running. Ah yes, it runs forever unless it empties the queued failed block reads. It writes out a line of numbers (which are a bit difficult to understand). I think the suggestion to do a filewise recovery would be the best since it will be very unlikely > copys data in big slabs until it gets an error and then works around > the faulty area block by block. > > You should also install /usr/ports/sysutils/smartmontools - this > handles S.M.A.R.T. Yes, but what would smart help me further with recovery? > > >Is there a way to tweak the driver (be it the FreeBSD promise driver > >or the normal ata driver) to use more retries on errors so that I > >have the chance to copy everything or nearly everything of the already > >degrading hard disk? > > A quick look at the ata driver suggests that there are a number of > 'retry' and 'retries' variables/fields. I suspect you could increase > the number of retries if you wanted to patch the driver. Thanks for the help. -- Chris Christoph P. U. Kukulies kuku_at_kukulies.org From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 09:46:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CAF116A41F for ; Fri, 13 Jan 2006 09:46:06 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1435743D45 for ; Fri, 13 Jan 2006 09:46:05 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: by wproxy.gmail.com with SMTP id i20so560742wra for ; Fri, 13 Jan 2006 01:46:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references; b=RYmFXzuZf/KoFtRTM7nFjfxH5yWTMVsbEwiob6OdvyMh5OQ+QT9FRPblhHSoqbuXJC/K+SqVCxmhvW9L9gPCYjQq2MI8XGQxb55ktL4GsFhWKqzcFdw85BxQxkQy7GgWKLRzR/ptMW/T/0Y50q81Kj4NEr7DvnuBp3SlW/rPKG4= Received: by 10.65.15.15 with SMTP id s15mr1717444qbi; Fri, 13 Jan 2006 01:46:05 -0800 (PST) Received: by 10.65.43.10 with HTTP; Fri, 13 Jan 2006 01:46:05 -0800 (PST) Message-ID: Date: Fri, 13 Jan 2006 15:16:05 +0530 From: "Kamal R. Prasad" Sender: kamalpr@gmail.com To: prime In-Reply-To: <1fa17f810601122232l25551bc5n4e4a01ff6b7921e@mail.gmail.com> MIME-Version: 1.0 References: <1fa17f810601122232l25551bc5n4e4a01ff6b7921e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: How priority propagation works on read/write lock? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 09:46:06 -0000 Priority need not be propagated to readers as they will not block other readers. Most likely, you only need to propagate to the writer to avoid priority inversron. regards -kamal On 1/13/06, prime wrote: > > Hi hackers, > I have a question about how priority propagation works on > read/write lock.On locks that have only one owner at a determinate > moment,we can simply propagate the priority to the owner of lock,but > read/write lock may have many owners at some time,so how can we know > who are the owners? > I browse the OpenSolaris' read/write lock implementation,and find > that, it simply treats the owner of the lock as NULL when readers own > the read/write lock.In this way,we can not propagate our priority to > all threads that block us. > > Thanks very much. > -- > Three passions, simple but overwhelmingly strong, have governed my life: > the longing for love, the search for knowledge, and unbearable pity for > the suffering of mankind. > ---------Bertrand Russell > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 10:20:50 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 A4DFE16A41F for ; Fri, 13 Jan 2006 10:20:50 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 347CD43D48 for ; Fri, 13 Jan 2006 10:20:49 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so451481wxc for ; Fri, 13 Jan 2006 02:20:48 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Jx91Gov+Gv2MgpWkukhQyZWY3aWWFf8cOiFnSV2blyqKR6MMHD+S/4wNDTUCFed5UJOHcIOajLZmGQwj9RxJT6TYQZrcPx51hi5KDvoSfAXwapbpiIERbSzBrkCh/ZS5ZTY9Y08vE4N8DKEAZ/QEzV2c4X+Tz3+eR3yUTxND8jI= Received: by 10.70.52.9 with SMTP id z9mr2920564wxz; Fri, 13 Jan 2006 02:20:44 -0800 (PST) Received: by 10.70.39.18 with HTTP; Fri, 13 Jan 2006 02:20:43 -0800 (PST) Message-ID: <1fa17f810601130220h521590banff7d775a8bd4eaa6@mail.gmail.com> Date: Fri, 13 Jan 2006 18:20:43 +0800 From: prime To: "Kamal R. Prasad" In-Reply-To: MIME-Version: 1.0 References: <1fa17f810601122232l25551bc5n4e4a01ff6b7921e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: How priority propagation works on read/write lock? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 10:20:50 -0000 On 1/13/06, Kamal R. Prasad wrote: > > Priority need not be propagated to readers as they will not block other > readers. > Most likely, you only need to propagate to the writer to avoid priority > inversron. > > regards > -kamal > > > On 1/13/06, prime wrote: > > > Hi hackers, > > I have a question about how priority propagation works on > > read/write lock.On locks that have only one owner at a determinate > > moment,we can simply propagate the priority to the owner of lock,but > > read/write lock may have many owners at some time,so how can we know > > who are the owners? > > I browse the OpenSolaris' read/write lock implementation,and find > > that, it simply treats the owner of the lock as NULL when readers own > > the read/write lock.In this way,we can not propagate our priority to > > all threads that block us. > > > > Thanks very much. > > -- > > Three passions, simple but overwhelmingly strong, have governed my life= : > > > > the longing for love, the search for knowledge, and unbearable pity for > > the suffering of mankind. > > ---------Bertrand Russell > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg > > " > > > > Thanks your reply. But readers may block writers, aren't they? For example, there are three threads,A,B and C, and a read/write lock rwlock1 ,and a mutex mtx1. 1.A lock mtx1, 2.B get the read lock of rwlock1 and then want to get mtx1,but mtx1 is locked by A,so B has to wait on mtx1. 3.C want to get the write lock of rwlock1 and it has to wait,because rwlock1 is read locked by B. Now if C's priority < A's priority(in numerical), then we get priority inversion. How can avoid this priority inversion? Thanks. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 12:39:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64D1016A41F for ; Fri, 13 Jan 2006 12:39:11 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9A1943D48 for ; Fri, 13 Jan 2006 12:39:06 +0000 (GMT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.3/8.13.3) with ESMTP id k0DCd4YW062018; Fri, 13 Jan 2006 15:39:04 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 13 Jan 2006 15:39:04 +0300 (MSK) From: Dmitry Morozovsky To: Peter Jeremy In-Reply-To: <20060112211300.GB13244@cirb503493.alcatel.com.au> Message-ID: <20060113153732.T73577@woozle.rinet.ru> References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112211300.GB13244@cirb503493.alcatel.com.au> X-NCC-RegID: ru.rinet MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (woozle.rinet.ru [0.0.0.0]); Fri, 13 Jan 2006 15:39:05 +0300 (MSK) Cc: Christoph Kukulies , freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 12:39:11 -0000 On Fri, 13 Jan 2006, Peter Jeremy wrote: PJ> >The process is running now since yesterday evening and it is at 53 MB PJ> >at a transfer rate of about 1.1 MB/s. PJ> > PJ> >In case the the result being unusable I would like to find a way to make this PJ> >copying faster. PJ> PJ> Note that whilst increasing the DD blocksize will speed up the PJ> transfer, it will also increase the amount of collateral damage when a PJ> hard error occurs. If you rummage around the ports or tools tree, PJ> you'll find a utility (its name escapes me but I believe it was PJ> written by phk) that is designed to do disk-to-disk recovery - it PJ> copys data in big slabs until it gets an error and then works around PJ> the faulty area block by block. PJ> PJ> You should also install /usr/ports/sysutils/smartmontools - this PJ> handles S.M.A.R.T. I would suggest also using src/tools/tools/recoverdisk by phk (I still not sure why it's not a port) Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 13:29:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 6BAB316A423; Fri, 13 Jan 2006 13:29:24 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (www.kukulies.org [213.146.112.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D01C43D60; Fri, 13 Jan 2006 13:29:22 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (localhost [127.0.0.1]) by www.kukulies.org (8.13.3/8.12.10) with ESMTP id k0DDTGAS006971; Fri, 13 Jan 2006 14:29:18 +0100 (CET) (envelope-from kuku@www.kukulies.org) Received: (from kuku@localhost) by www.kukulies.org (8.13.3/8.12.10/Submit) id k0DDTFq5006970; Fri, 13 Jan 2006 14:29:15 +0100 (CET) (envelope-from kuku) Date: Fri, 13 Jan 2006 14:29:15 +0100 From: "Christoph P. Kukulies" To: "Kenneth D. Merry" Message-ID: <20060113132915.GA6848@kukulies.org> References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112211300.GB13244@cirb503493.alcatel.com.au> <20060112212337.GA80216@nargothrond.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060112212337.GA80216@nargothrond.kdm.org> User-Agent: Mutt/1.4.1i Cc: Peter Jeremy , freebsd-hackers@freebsd.org, Christoph Kukulies Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 13:29:24 -0000 On Thu, Jan 12, 2006 at 02:23:37PM -0700, Kenneth D. Merry wrote: > > written by phk) that is designed to do disk-to-disk recovery - it > > copys data in big slabs until it gets an error and then works around > > the faulty area block by block. > > It's called 'recoverdisk', and is in src/tools/tools/recoverdisk. > > I used it to copy a friend's hard drive, and it worked well. (Although the > supposedly 'bad' disk didn't turn out to have any bad sectors.) > > Ken I was able to recover. The 0.99999980 copy of my damaged disk to the identical new one, using recoverdisk /dev/ad2 /dev/ad3 turned out to have been successful. The program was still trying to improve the result but I didn't see any increase of recoverd block, so I terminated it. But the result was a fully functioning bootable (Windows XP) disk. Probably due to the fact that the system (Windows) had been successful in repairing itself by remapping bad clusters of files to intact areas (all partitions were FAT32) the resulting copy was fully functional. I never had really hard disk errors, just the frequent CHKDSK that were required. I believe to recall that Hitach (IBM) had a design error in their Deskstar series when the firmware of the drive did not randomly park the head but left it only at the beginning of the disk all the time resulting in that area preferably being 'worn out' - I have been victim of that bad 40 GB Deskstar series in the past several times. Don't know if this still was the case with the Travelstar mobile computers disks series. The frequent errors I had in hiberfil.sys point into something in that direction (only my little theory). Just for the record: Before I wanted to give back in my faulty disk to my computer supplier as a case for warranty, I zeroed out the faulty disk. dd if=/dev/zero of=/dev/ad2 bs=1m It took half an hour to zero out the 80GB. Transferrate 44 MB/s? And not a single error ? Or is this normal? Then I tried to read back dd if=/dev/ad2 of=/dev/zero bs=2m Yes, just for the fun I said 2m blocksiye. And now we come back to FreeBSD contents: The system froze at this command (FreeBSD 5.2.1 on that machine) -- Chris Christoph P. U. Kukulies kuku_at_kukulies.org From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 14:26:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF2D616A41F for ; Fri, 13 Jan 2006 14:26:26 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5668643D45 for ; Fri, 13 Jan 2006 14:26:25 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from [127.0.0.1] (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.3/8.12.9) with ESMTP id k0DEQOh2044614; Fri, 13 Jan 2006 15:26:24 +0100 (CET) (envelope-from stb@lassitu.de) In-Reply-To: <20060113132915.GA6848@kukulies.org> References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112211300.GB13244@cirb503493.alcatel.com.au> <20060112212337.GA80216@nargothrond.kdm.org> <20060113132915.GA6848@kukulies.org> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Stefan Bethke Date: Fri, 13 Jan 2006 15:26:22 +0100 To: "Christoph P. Kukulies" X-Mailer: Apple Mail (2.746.2) Cc: freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 14:26:27 -0000 Am 13.01.2006 um 14:29 schrieb Christoph P. Kukulies: > Just for the record: Before I wanted to give back in my faulty disk > to my computer supplier as a case for warranty, I zeroed out the > faulty > disk. > > dd if=/dev/zero of=/dev/ad2 bs=1m > > It took half an hour to zero out the 80GB. Transferrate 44 MB/s? > And not a single error ? Or is this normal? Depending on the model, 44 MB/s seems quite OK. Certainly on the fast side for a 2.5" laptop drive, but not unheard of these days. It is quite possible that the disk controller had a couple of sectors it could not read anymore (and giving I/O errors for them), but was able to reallocate once you wrote to them. I would still ditch the disk, though. Would be interesting to see what the smart reallocated sector count says. Stefan -- Stefan Bethke Fon +49 170 346 0140 From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 14:26:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C18BD16A420 for ; Fri, 13 Jan 2006 14:26:46 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BCA743D4C for ; Fri, 13 Jan 2006 14:26:44 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id 1C6E9BAB40 for ; Fri, 13 Jan 2006 15:26:42 +0100 (CET) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29716-01 for ; Fri, 13 Jan 2006 15:26:34 +0100 (CET) Received: from firewall.demig (p50839880.dip0.t-ipconnect.de [80.131.152.128]) by server.absolute-media.de (Postfix) with ESMTP id 2AEA9B98E9 for ; Fri, 13 Jan 2006 15:26:34 +0100 (CET) Received: from ws-ew-3 (ws-ew-3.demig.intra [192.168.1.72]) by firewall.demig (8.13.5/8.13.4) with SMTP id k0DEMlIc047886 for ; Fri, 13 Jan 2006 15:22:47 +0100 (CET) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: Date: Fri, 13 Jan 2006 15:22:47 +0100 Message-ID: <000701c6184c$d3f27060$4801a8c0@ws-ew-3.demig.intra> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Importance: Normal X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Subject: device probe re-tried for failed isa device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 14:26:46 -0000 Hello. I wrote two isa device drivers A and B for FreeBSD4.11. Both are kld-loaded and have identify() entries. Here is the pseudo code for the identify() routines: A_identify() /* 2 units */ { for (i = 0; i <=1; ++ i) { dev = BUS_ADD_CHILD(parent, ISA-ORDER_SPECULATIVE, "a", 0); If (bus_set_resource (dev, ...) != 0) { device_delete_child (parent, dev); continue; }; init (device_get_softc (dev, i)); } } B_identify() /* 1 unit */ { dev = BUS_ADD_CHILD(parent, ISA-ORDER_SPECULATIVE, "a", 0); If (bus_set_resource (dev, ...) != 0) { device_delete_child (parent, dev); } } When I kldload the two drivers I see these function calls: 1. A_identify 2. A_probe(unit 0) 3. A_attach(unit 0) 4. A_probe(unit 1) <-- fails with ENXIO because hardware is not present 5. B_identify 6. A_probe(unit 1) <-- probed again!? 7. B_probe(unit 0) 8. B_attach(unit 0) Is it correct, that the isa bus re-tries to probe failed devices? The results from calling device_get_softc() differ for the two probe() calls 4 and 6. Is this correct? Is it correct to initialize softc in identify()? Should I call device_delete_child() in probe() when the hardware fails? Thank you, Norbert Koch From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 14:40:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 2CBD716A422; Fri, 13 Jan 2006 14:40:09 +0000 (GMT) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78CD143D90; Fri, 13 Jan 2006 14:39:53 +0000 (GMT) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id k0DEdor5038408; Fri, 13 Jan 2006 06:39:52 -0800 (PST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-hackers@freebsd.org Date: Fri, 13 Jan 2006 09:38:58 -0500 User-Agent: KMail/1.8.3 References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112212337.GA80216@nargothrond.kdm.org> <20060113132915.GA6848@kukulies.org> In-Reply-To: <20060113132915.GA6848@kukulies.org> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601130938.58932.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on ns1.jnielsen.net X-Virus-Status: Clean Cc: "Kenneth D. Merry" , Christoph Kukulies , Peter Jeremy Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 14:40:09 -0000 On Friday 13 January 2006 08:29 am, Christoph P. Kukulies wrote: > On Thu, Jan 12, 2006 at 02:23:37PM -0700, Kenneth D. Merry wrote: > > > written by phk) that is designed to do disk-to-disk recovery - it > > > copys data in big slabs until it gets an error and then works around > > > the faulty area block by block. > > > > It's called 'recoverdisk', and is in src/tools/tools/recoverdisk. > > > > I used it to copy a friend's hard drive, and it worked well. (Although > > the supposedly 'bad' disk didn't turn out to have any bad sectors.) > > I was able to recover. The 0.99999980 copy of my damaged disk to the > identical new one, using > > recoverdisk /dev/ad2 /dev/ad3 > > turned out to have been successful. The program was still trying to > improve the result but I didn't see any increase of recoverd block, so I > terminated it. > > Just for the record: Before I wanted to give back in my faulty disk > to my computer supplier as a case for warranty, I zeroed out the faulty > disk. > > dd if=/dev/zero of=/dev/ad2 bs=1m > > It took half an hour to zero out the 80GB. Transferrate 44 MB/s? > And not a single error ? Or is this normal? > > Then I tried to read back > > dd if=/dev/ad2 of=/dev/zero bs=2m > > Yes, just for the fun I said 2m blocksiye. And now we come back > to FreeBSD contents: > > The system froze at this command (FreeBSD 5.2.1 on that machine) I don't know if this is why the system froze, but /dev/zero is probably not a useful output device. You could use of=/dev/null just to see if the disk reads succeed w/o errors. I've also done "cmp /dev/adX /dev/zero" before, but you don't have any control over how the disk reads are handled that way. JN From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 18:42:58 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB4CA16A41F for ; Fri, 13 Jan 2006 18:42:58 +0000 (GMT) (envelope-from mdodd@FreeBSD.ORG) Received: from sasami.jurai.net (sasami.jurai.net [70.88.158.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49FD743D46 for ; Fri, 13 Jan 2006 18:42:56 +0000 (GMT) (envelope-from mdodd@FreeBSD.ORG) Received: from sasami.jurai.net (winter@sasami.jurai.net [70.88.158.93]) by sasami.jurai.net (8.13.1/8.13.1) with ESMTP id k0DIghLX082474; Fri, 13 Jan 2006 13:42:48 -0500 (EST) (envelope-from mdodd@FreeBSD.ORG) Date: Fri, 13 Jan 2006 13:42:43 -0500 (EST) From: "Matthew N. Dodd" X-X-Sender: winter@sasami.jurai.net To: Norbert Koch In-Reply-To: <000701c6184c$d3f27060$4801a8c0@ws-ew-3.demig.intra> Message-ID: <20060113133800.X91753@sasami.jurai.net> References: <000701c6184c$d3f27060$4801a8c0@ws-ew-3.demig.intra> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (sasami.jurai.net [70.88.158.93]); Fri, 13 Jan 2006 13:42:49 -0500 (EST) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: device probe re-tried for failed isa device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 18:42:58 -0000 On Fri, 13 Jan 2006, Norbert Koch wrote: > 4. A_probe(unit 1) > <-- fails with ENXIO because hardware is not present Your IDENTIFY method allows device enumeration. You should not create devices in IDENTIFY that do not exist. Consider use /boot/device.hints add ISA devices. An IDENTIFY method for ISA devices is only useful if there is some programatic method for identifying their presence in the system. Look at the ISA frontends for ex(4) and ep(4) for an example of a proper IDENTIFY method. > Is it correct to initialize softc in identify()? No. IDENTIFY only adds the devices. The association with the driver takes place after PROBE. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 19:18:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5320816A425; Fri, 13 Jan 2006 19:18:54 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id A70F343D49; Fri, 13 Jan 2006 19:18:53 +0000 (GMT) (envelope-from max@love2party.net) Received: from [84.163.245.1] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu9) with ESMTP (Nemesis), id 0ML2xA-1ExURn0W9N-0000wp; Fri, 13 Jan 2006 20:18:51 +0100 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Fri, 13 Jan 2006 20:19:34 +0100 User-Agent: KMail/1.8.3 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1826101.xxVUKlFlts"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200601132019.41896.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-current@freebsd.org Subject: Call for FreeBSD Status Reports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: monthly@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 19:18:54 -0000 --nextPart1826101.xxVUKlFlts Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All, no big news since 6.0, but in the background there are many interesting=20 projects: Just now the new malloc has hit current, we hear promising numbe= rs=20 from the network performance crew, the first batch of security advisories i= s=20 out and I'm sure some of you spent the holidays doing exiting stuff for=20 =46reeBSD as well. Please tell us! This is the call for Status Reports of your project activity between Octobe= r=20 and now. This is not limited to developers. We want a broad spectrum of=20 reports from everybody involved with FreeBSD. Check the Status Report=20 homepage[1] for earlier reports. Submission deadline is a week from now, January 20th! I don't want to dela= y=20 the publication much this time, so please write your report now! Please us= e=20 the XML-generator[2] or -template[3] and send your report to=20 monthly@freebsd.org by next Friday. Thanks a lot! As you write your report, did you consider to give a talk about your projec= t=20 at BSDCan? http://www.bsdcan.org/2006/papers.php [1] http://www.freebsd.org/news/status/ [2] http://www.freebsd.org/cgi/monthly.cgi [3] http://www.freebsd.org/news/status/report-sample.xml =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 --nextPart1826101.xxVUKlFlts Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDx/1NXyyEoT62BG0RAizaAJ9+mpkbQH2eafqsW+BdaYD1B8XJDgCfUcgN OZ01NpNiU0iQtYQyc88xDwY= =y/EE -----END PGP SIGNATURE----- --nextPart1826101.xxVUKlFlts-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 19:21:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 4CEB916A420 for ; Fri, 13 Jan 2006 19:21:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94ED543D48 for ; Fri, 13 Jan 2006 19:21:39 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 5998422 for multiple; Fri, 13 Jan 2006 14:20:07 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k0DJLaKF096034; Fri, 13 Jan 2006 14:21:36 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 13 Jan 2006 14:22:14 -0500 User-Agent: KMail/1.8.2 References: <1fa17f810601122232l25551bc5n4e4a01ff6b7921e@mail.gmail.com> <1fa17f810601130220h521590banff7d775a8bd4eaa6@mail.gmail.com> In-Reply-To: <1fa17f810601130220h521590banff7d775a8bd4eaa6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601131422.15208.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1240/Fri Jan 13 11:57:12 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: prime , "Kamal R. Prasad" Subject: Re: How priority propagation works on read/write lock? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 19:21:40 -0000 On Friday 13 January 2006 05:20 am, prime wrote: > On 1/13/06, Kamal R. Prasad wrote: > > Priority need not be propagated to readers as they will not block other > > readers. > > Most likely, you only need to propagate to the writer to avoid priority > > inversron. > > > > regards > > -kamal > > > > On 1/13/06, prime wrote: > > > Hi hackers, > > > I have a question about how priority propagation works on > > > read/write lock.On locks that have only one owner at a determinate > > > moment,we can simply propagate the priority to the owner of lock,but > > > read/write lock may have many owners at some time,so how can we know > > > who are the owners? > > > I browse the OpenSolaris' read/write lock implementation,and find > > > that, it simply treats the owner of the lock as NULL when readers own > > > the read/write lock.In this way,we can not propagate our priority to > > > all threads that block us. > > > > > > Thanks very much. > > > -- > > > Three passions, simple but overwhelmingly strong, have governed my > > > life: > > > > > > the longing for love, the search for knowledge, and unbearable pity for > > > the suffering of mankind. > > > ---------Bertrand Russell > > > _______________________________________________ > > > 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 " > > Thanks your reply. > But readers may block writers, aren't they? > For example, there are three threads,A,B and C, and a read/write lock > rwlock1 ,and a mutex mtx1. > 1.A lock mtx1, > 2.B get the read lock of rwlock1 and then want > to get mtx1,but mtx1 is locked by A,so B has to > wait on mtx1. > 3.C want to get the write lock of rwlock1 and it > has to wait,because rwlock1 is read locked by B. > Now if C's priority < A's priority(in numerical), then we get priority > inversion. > > How can avoid this priority inversion? > Thanks. I think you just kind of punt and do a best effort. Trying to manage a list of current read lock holders would be a bit PITA. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 00:41:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F338016A41F for ; Sat, 14 Jan 2006 00:41:37 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2559E43D46 for ; Sat, 14 Jan 2006 00:41:37 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0E0dsNl046948; Fri, 13 Jan 2006 17:39:54 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 13 Jan 2006 17:39:54 -0700 (MST) Message-Id: <20060113.173954.02259183.imp@bsdimp.com> To: NKoch@demig.de From: Warner Losh In-Reply-To: <000701c6184c$d3f27060$4801a8c0@ws-ew-3.demig.intra> References: <000701c6184c$d3f27060$4801a8c0@ws-ew-3.demig.intra> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 13 Jan 2006 17:39:54 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: device probe re-tried for failed isa device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 00:41:38 -0000 > I wrote two isa device drivers A and B for FreeBSD4.11. > Both are kld-loaded and have identify() entries. > > Here is the pseudo code for the identify() routines: > > A_identify() /* 2 units */ > { > for (i = 0; i <=1; ++ i) > { > dev = BUS_ADD_CHILD(parent, ISA-ORDER_SPECULATIVE, "a", 0); > If (bus_set_resource (dev, ...) != 0) > { > device_delete_child (parent, dev); > continue; > }; > init (device_get_softc (dev, i)); > } > } Don't get softc in your identify routine. It isn't allowed there. > B_identify() /* 1 unit */ > { > dev = BUS_ADD_CHILD(parent, ISA-ORDER_SPECULATIVE, "a", 0); > If (bus_set_resource (dev, ...) != 0) > { > device_delete_child (parent, dev); > } > } > > When I kldload the two drivers I see these function calls: > 1. A_identify > 2. A_probe(unit 0) > 3. A_attach(unit 0) > 4. A_probe(unit 1) > <-- fails with ENXIO because hardware is not present > 5. B_identify > 6. A_probe(unit 1) > <-- probed again!? Yes. It should be. The child hasn't been deleted. > 7. B_probe(unit 0) > 8. B_attach(unit 0) > > Is it correct, that the isa bus re-tries > to probe failed devices? Yes. > The results from calling device_get_softc() > differ for the two probe() calls 4 and 6. > Is this correct? Yes. softc is only valid if probe() returns 0. It is deleted otherwise. > Is it correct to initialize softc in identify()? No. It isn't, > Should I call device_delete_child() in > probe() when the hardware fails? No. You shouldn't. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 04:05:12 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D57A316A41F for ; Sat, 14 Jan 2006 04:05:12 +0000 (GMT) (envelope-from lists@nabble.com) Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BE9843D49 for ; Sat, 14 Jan 2006 04:05:06 +0000 (GMT) (envelope-from lists@nabble.com) Received: from localhost ([127.0.0.1] helo=talk.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1Excf3-0004VT-Tj for freebsd-hackers@freebsd.org; Fri, 13 Jan 2006 20:05:05 -0800 Message-ID: <2374502.post@talk.nabble.com> Date: Fri, 13 Jan 2006 20:05:05 -0800 (PST) From: "anchor (sent by Nabble.com)" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Nabble-Sender: Nabble Forums X-Nabble-From: anchor Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: My machine been hacked, I need help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: anchor List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 04:05:13 -0000 My machine been hacked. The message file was modified. Old dated backup files are deleted. The last log was truncated. You are gurus. Would you please tell me where I can find out other trace file or logfiles to figure out where the hacker come from? Thanks a lot. -- View this message in context: http://www.nabble.com/My-machine-been-hacked%2C-I-need-help-t915435.html#a2374502 Sent from the freebsd-hackers forum at Nabble.com. From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 04:17:16 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 A380816A41F for ; Sat, 14 Jan 2006 04:17:16 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AB3A43D48 for ; Sat, 14 Jan 2006 04:17:16 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.17.229]) ([10.251.17.229]) by a50.ironport.com with ESMTP; 13 Jan 2006 20:17:16 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43C87B4B.1080606@elischer.org> Date: Fri, 13 Jan 2006 20:17:15 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: anchor , hackers@freebsd.org References: <2374502.post@talk.nabble.com> In-Reply-To: <2374502.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: My machine been hacked, I need help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 04:17:16 -0000 anchor (sent by Nabble.com) wrote: >My machine been hacked. The message file was modified. Old dated backup files are deleted. The last log was truncated. You are gurus. Would you please tell me where I can find out other trace file or logfiles to figure out where the hacker come from? > >Thanks a lot. >-- >View this message in context: http://www.nabble.com/My-machine-been-hacked%2C-I-need-help-t915435.html#a2374502 >Sent from the freebsd-hackers forum at Nabble.com. >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > If you can get into the kernel debugger you may try to do a ps from there and see if there are any strange processes running. of course the first thing to do is physically unplug the machine. then make a backup for forensic purposes if you can. you don't say what version of the system it is and what it runs as services. there are rootkit finders in the ports under 'security' if you installed from CD see if you can get it from there.. From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 06:02:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 7289F16A41F for ; Sat, 14 Jan 2006 06:02:40 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACBDF43D46 for ; Sat, 14 Jan 2006 06:02:36 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp209-190.lns1.adl2.internode.on.net [203.122.209.190]) (authenticated bits=0) by cain.gsoft.com.au (8.13.5/8.13.4) with ESMTP id k0E62Vew027583 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 14 Jan 2006 16:32:31 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org, anchor Date: Sat, 14 Jan 2006 16:32:28 +1030 User-Agent: KMail/1.8.3 References: <2374502.post@talk.nabble.com> In-Reply-To: <2374502.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1396418.se7W9MObOf"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200601141632.29709.doconnor@gsoft.com.au> X-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.54 on 203.31.81.10 Cc: Subject: Re: My machine been hacked, I need help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 06:02:40 -0000 --nextPart1396418.se7W9MObOf Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 14 Jan 2006 14:35, anchor (sent by Nabble.com) wrote: > My machine been hacked. The message file was modified. Old dated backup > files are deleted. The last log was truncated. You are gurus. Would you > please tell me where I can find out other trace file or logfiles to figu= re > out where the hacker come from? 1) Turn it off 2) Put a new hard disk in it and install FreeBSD freshly on the new disk 3) Mount the old disk read only and recover all the data you can (no =20 executables) 4) Do forensics on the old disk, and/or back it up to tape. 5) Nuke the contents of the old disk. Basically it is really hard to trust any code run from the old disk althoug= h=20 as someone suggested DDB is most likely to be OK, but you never know :) =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 --nextPart1396418.se7W9MObOf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDyJP15ZPcIHs/zowRAvNvAJ9Zz+zjo95LhtvBxxLN7H1yTJbGuACfXZ+T hX6pyeGcUrTsP05bLY0EXQc= =/+hf -----END PGP SIGNATURE----- --nextPart1396418.se7W9MObOf-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 13:55:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 B9F5016A41F; Sat, 14 Jan 2006 13:55:07 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (www.kukulies.org [213.146.112.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id D799243D46; Sat, 14 Jan 2006 13:55:06 +0000 (GMT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (localhost [127.0.0.1]) by www.kukulies.org (8.13.3/8.12.10) with ESMTP id k0EDt3lb019169; Sat, 14 Jan 2006 14:55:03 +0100 (CET) (envelope-from kuku@www.kukulies.org) Received: (from kuku@localhost) by www.kukulies.org (8.13.3/8.12.10/Submit) id k0EDt1VP019168; Sat, 14 Jan 2006 14:55:01 +0100 (CET) (envelope-from kuku) Date: Sat, 14 Jan 2006 14:55:01 +0100 From: "Christoph P. Kukulies" To: "Kenneth D. Merry" Message-ID: <20060114135501.GA19007@kukulies.org> References: <200601120948.k0C9mcqR092895@www.kukulies.org> <20060112211300.GB13244@cirb503493.alcatel.com.au> <20060112212337.GA80216@nargothrond.kdm.org> <20060113132915.GA6848@kukulies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060113132915.GA6848@kukulies.org> User-Agent: Mutt/1.4.1i Cc: Peter Jeremy , Christoph Kukulies , freebsd-hackers@freebsd.org Subject: Re: increasing dd disk to disk transfer rate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 13:55:07 -0000 On Fri, Jan 13, 2006 at 02:29:15PM +0100, Christoph P. Kukulies wrote: > On Thu, Jan 12, 2006 at 02:23:37PM -0700, Kenneth D. Merry wrote: > > Then I tried to read back > > dd if=/dev/ad2 of=/dev/zero bs=2m > > Yes, just for the fun I said 2m blocksiye. And now we come back > to FreeBSD contents: > > The system froze at this command (FreeBSD 5.2.1 on that machine) I believe I posted a followup on this message but probably forgot to do a group reply: It turned out that I first thought it crashed only when I type ^T while the dd was running. But this was accidently happening. Also with bs=1m the system freezes (reproducably). Well, this is some intermediate 5.2.1 so I will give it a try some time again when I have a 6.x running. -- Chris Christoph P. U. Kukulies kuku_at_kukulies.org From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 16:06:53 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 8B1FD16A420 for ; Sat, 14 Jan 2006 16:06:53 +0000 (GMT) (envelope-from pranav.sawargaonkar@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C61543D55 for ; Sat, 14 Jan 2006 16:06:51 +0000 (GMT) (envelope-from pranav.sawargaonkar@gmail.com) Received: by wproxy.gmail.com with SMTP id i14so767815wra for ; Sat, 14 Jan 2006 08:06:48 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=SJFVk7vyJi2OpuesXE13ygBgwIVqznMVOu8Frlm9DKiJ1KMk04B6PS+h2bScLtdWx4IzECF6JImXWLPsf6rTmXMLOE2v8JpAafpLY36u/+TIUODiAU0L04RUEX132RnwRwv0h9BS7ln59ljEGdCHH9PjOQesudGA/1AUvD2JrWk= Received: by 10.54.105.7 with SMTP id d7mr2123wrc; Sat, 14 Jan 2006 08:06:48 -0800 (PST) Received: by 10.54.125.1 with HTTP; Sat, 14 Jan 2006 08:06:48 -0800 (PST) Message-ID: <5007e1a40601140806n12c85950ie577b2a61ea1009d@mail.gmail.com> Date: Sat, 14 Jan 2006 21:36:48 +0530 From: Pranav Sawargaonkar To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Kernel programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 16:06:53 -0000 Hi I have doubt about accessing vmspace structure using proc pointer. I have written code below in my module and try to find out data size of a program, but during make it is giving me errors.Please anyone tell me what is right way to code my function. Function I have written is- static int myfunction(void) { struct proc *p; p=3Dpfind(400); //400 is pid of one of process running at that time printf("\nData size %d",ctob(p->p_vmspace->vm_dsize)); UNLOCK_PROC(p); return 0; } Thank you. Pranav From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 16:19:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 110D216A444 for ; Sat, 14 Jan 2006 16:19:59 +0000 (GMT) (envelope-from Cy.Schubert@komquats.com) Received: from komquats.com (S0106002078125c0c.gv.shawcable.net [24.108.150.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2250F43D45 for ; Sat, 14 Jan 2006 16:19:57 +0000 (GMT) (envelope-from Cy.Schubert@komquats.com) Received: from cwsys.cwsent.com (cwsys [10.1.1.1]) by komquats.com (Postfix) with ESMTP id D03D04C5D1; Sat, 14 Jan 2006 08:19:55 -0800 (PST) Received: from cwsys (localhost [127.0.0.1]) by cwsys.cwsent.com (8.13.4/8.13.4) with ESMTP id k0EGJqN6091994; Sat, 14 Jan 2006 08:19:55 -0800 (PST) (envelope-from Cy.Schubert@komquats.com) Message-Id: <200601141619.k0EGJqN6091994@cwsys.cwsent.com> X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.0.4 From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: "Daniel O'Connor" In-Reply-To: Message from "Daniel O'Connor" of "Sat, 14 Jan 2006 16:32:28 +1030." <200601141632.29709.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 14 Jan 2006 08:19:52 -0800 Sender: Cy.Schubert@komquats.com Cc: freebsd-hackers@freebsd.org, anchor Subject: Re: My machine been hacked, I need help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cy Schubert List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 16:19:59 -0000 In message <200601141632.29709.doconnor@gsoft.com.au>, "Daniel O'Connor" writes : > --nextPart1396418.se7W9MObOf > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > Content-Disposition: inline > > On Sat, 14 Jan 2006 14:35, anchor (sent by Nabble.com) wrote: > > My machine been hacked. The message file was modified. Old dated backup > > files are deleted. The last log was truncated. You are gurus. Would you > > please tell me where I can find out other trace file or logfiles to figu= > re > > out where the hacker come from? > > 1) Turn it off > 2) Put a new hard disk in it and install FreeBSD freshly on the new disk > 3) Mount the old disk read only and recover all the data you can (no =20 > executables) > 4) Do forensics on the old disk, and/or back it up to tape. > 5) Nuke the contents of the old disk. > > Basically it is really hard to trust any code run from the old disk although > as someone suggested DDB is most likely to be OK, but you never know :) Probably but if a KLD rootkit was installed, you can't even trust DDB. To be on the safe side, panic the system and capture a core dump. Then remove the hard disk and analyse that using one of the various analysis tools on the market. If you dd the disk to another disk or tape, it is likely that if you do discover the perpetrator and take him to court, your evidence will not be admissible. Only evidence collected by a forensic analysis tool is admissible in court. Cheers, Cy Schubert Web: http://www.komquats.com and http://www.bcbodybuilder.com FreeBSD UNIX: Web: http://www.FreeBSD.org BC Government: "Lift long enough and I believe arrogance is replaced by humility and fear by courage and selfishness by generosity and rudeness by compassion and caring." -- Dave Draper From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 16:52:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB30016A41F for ; Sat, 14 Jan 2006 16:52:35 +0000 (GMT) (envelope-from les@ns3.safety.net) Received: from safety.net (ns3.safety.net [216.40.201.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id A223243D46 for ; Sat, 14 Jan 2006 16:52:33 +0000 (GMT) (envelope-from les@ns3.safety.net) Received: from ns3.safety.net (localhost [127.0.0.1]) by localhost (8.12.9/8.12.9) with ESMTP id k0EGqSK6006475; Sat, 14 Jan 2006 09:52:28 -0700 Received: (from les@localhost) by ns3.safety.net (8.12.9/8.12.9/Submit) id k0EGqStk006474; Sat, 14 Jan 2006 09:52:28 -0700 Message-Id: <200601141652.k0EGqStk006474@ns3.safety.net> In-Reply-To: <200601141619.k0EGJqN6091994@cwsys.cwsent.com> To: Cy Schubert Date: Sat, 14 Jan 2006 09:52:28 -0700 (MST) From: les@safety.net X-Mailer: ELM [version 2.4ME+ PL94 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: anchor , freebsd-hackers@freebsd.org Subject: Re: My machine been hacked, I need help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: les@safety.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 16:52:36 -0000 > In message <200601141632.29709.doconnor@gsoft.com.au>, "Daniel O'Connor" > writes > Only evidence collected by a forensic analysis tool > is admissible in court. Not necessarily true. Log data that is routinely collected can be admissible. Though, log data that you collected starting when you suspected there was something amiss will not be. -Les -- Les Biffle CISSP Information Systems Security Consultant (480) 585-4099 les@safety.net http://www.les.biffle.org/ Network Safety, PO Box 14461, Scottsdale, AZ 85267 From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 17:23:36 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1B1E16A41F for ; Sat, 14 Jan 2006 17:23:36 +0000 (GMT) (envelope-from Cy.Schubert@komquats.com) Received: from komquats.com (S0106002078125c0c.gv.shawcable.net [24.108.150.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8010343D49 for ; Sat, 14 Jan 2006 17:23:33 +0000 (GMT) (envelope-from Cy.Schubert@komquats.com) Received: from cwsys.cwsent.com (cwsys [10.1.1.1]) by komquats.com (Postfix) with ESMTP id BC3554C5D0; Sat, 14 Jan 2006 09:23:30 -0800 (PST) Received: from cwsys (localhost [127.0.0.1]) by cwsys.cwsent.com (8.13.4/8.13.4) with ESMTP id k0EHN874037714; Sat, 14 Jan 2006 09:23:08 -0800 (PST) (envelope-from Cy.Schubert@komquats.com) Message-Id: <200601141723.k0EHN874037714@cwsys.cwsent.com> X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.0.4 From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: les@safety.net In-Reply-To: Message from les@safety.net of "Sat, 14 Jan 2006 09:52:28 MST." <200601141652.k0EGqStk006474@ns3.safety.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 14 Jan 2006 09:23:08 -0800 Sender: Cy.Schubert@komquats.com Cc: anchor , Cy Schubert , freebsd-hackers@freebsd.org Subject: Re: My machine been hacked, I need help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cy Schubert List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 17:23:36 -0000 In message <200601141652.k0EGqStk006474@ns3.safety.net>, les@safety.net writes: > > In message <200601141632.29709.doconnor@gsoft.com.au>, "Daniel O'Connor" > > writes > > Only evidence collected by a forensic analysis tool > > is admissible in court. > > Not necessarily true. Log data that is routinely collected can be > admissible. Though, log data that you collected starting when you > suspected there was something amiss will not be. That is true for logfiles, however Canadian law requires a filesystem analysis tool. As little as fiveyears ago taking a DD dump of a device was admissible but I've been told by the RCMP that a forensic analysis tool is now required. I've been told that this is also true of US law. I'm not sure about British or European law. Unfortunately taking people to court over hacking is difficult but not impossible. Police forces are becoming more receptive to the idea and tools which have been admitted in court previously make the job of preparing a successful case easier. Cheers, Cy Schubert Web: http://www.komquats.com and http://www.bcbodybuilder.com FreeBSD UNIX: Web: http://www.FreeBSD.org BC Government: "Lift long enough and I believe arrogance is replaced by humility and fear by courage and selfishness by generosity and rudeness by compassion and caring." -- Dave Draper From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 18:27:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 0875316A41F for ; Sat, 14 Jan 2006 18:27:47 +0000 (GMT) (envelope-from lists@nabble.com) Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66F2943D45 for ; Sat, 14 Jan 2006 18:27:46 +0000 (GMT) (envelope-from lists@nabble.com) Received: from localhost ([127.0.0.1] helo=talk.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1Exq7t-00085a-MR for freebsd-hackers@freebsd.org; Sat, 14 Jan 2006 10:27:45 -0800 Message-ID: <2381067.post@talk.nabble.com> Date: Sat, 14 Jan 2006 10:27:45 -0800 (PST) From: "anchor (sent by Nabble.com)" To: freebsd-hackers@freebsd.org In-Reply-To: <2374502.post@talk.nabble.com> MIME-Version: 1.0 X-Nabble-Sender: Nabble Forums X-Nabble-From: anchor References: <2374502.post@talk.nabble.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: My machine been hacked, I need help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: anchor List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 18:27:47 -0000 Many thanks to all the replies. I need more time to understand them ;) I have taken off my machine from the internet to protect further damage. It takes me time to research it since I'm not that experienced in the system. The machine was hacked my my former system admin. But I need evidence. He put his machine IP into my rc.firewall file to allow him sudo. That's the only evidence I found. By the way, do sudo also leave logfile somewhere? There is another problem: The hacker also changed something or maybe added a backend process to auto log me out within 1 minute idle. I checked .profile of my account and the root acount. It very hard for to stay a screen and thinking, investigating, etc. -- View this message in context: http://www.nabble.com/My-machine-been-hacked%2C-I-need-help-t915435.html#a2381067 Sent from the freebsd-hackers forum at Nabble.com. From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 18:32:23 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DB9B16A41F for ; Sat, 14 Jan 2006 18:32:23 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with SMTP id AD01543D46 for ; Sat, 14 Jan 2006 18:32:22 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: (qmail 29042 invoked from network); 14 Jan 2006 14:09:31 -0000 Received: from dullmdaler.ongs.co.jp (HELO ?192.168.1.101?) (202.216.232.62) by natial.ongs.co.jp with SMTP; 14 Jan 2006 14:09:31 -0000 Message-ID: <43C90A68.9000909@freebsd.org> Date: Sat, 14 Jan 2006 23:27:52 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <43BD1054.7020409@ongs.co.jp> <43C2472C.5070103@freebsd.org> In-Reply-To: <43C2472C.5070103@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ozawa@ongs.co.jp Subject: Re: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 18:32:23 -0000 I have updated the patches: For 7-current patch http://people.freebsd.org/~daichi/unionfs/unionfs-p5.diff For 6.x patch http://people.freebsd.org/~daichi/unionfs/unionfs6-p5.diff Changes from -p4: - fixed around "can't fifo/vnode bypass -1" panic problem - added some comments into source-code for src-developer - edited style as style(9) saye -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 14 19:09:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 B2B5416A41F for ; Sat, 14 Jan 2006 19:09:07 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1338E43D48 for ; Sat, 14 Jan 2006 19:09:06 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so662662wxc for ; Sat, 14 Jan 2006 11:09:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=rNDveHzSqE7/5GmvCcGueTNwAcVrYvbnLq5jcrWDOf8B2t8UnVuP1B25HiiykljCS2nTEV8aRNQPTOUyetX/ZF81Y6NOsG7fRjicE9daoQvixNaSftQLa4x+UwDhCiPu2X2U4ZJIGt+zGFhl3PMHSuG5gMibkkFEyUzXkom6jzY= Received: by 10.70.14.6 with SMTP id 6mr4638022wxn; Sat, 14 Jan 2006 11:09:04 -0800 (PST) Received: by 10.70.39.18 with HTTP; Sat, 14 Jan 2006 11:09:04 -0800 (PST) Message-ID: <1fa17f810601141109u3e3a0586ud3b3cc86ebc6e80@mail.gmail.com> Date: Sun, 15 Jan 2006 03:09:04 +0800 From: prime To: Tiffany Snyder In-Reply-To: MIME-Version: 1.0 References: <1fa17f810601122232l25551bc5n4e4a01ff6b7921e@mail.gmail.com> <1fa17f810601130220h521590banff7d775a8bd4eaa6@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: How priority propagation works on read/write lock? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 19:09:07 -0000 On 1/15/06, Tiffany Snyder wrote: > > Does FreeBSD support rwlocks? > > On 1/13/06, prime wrote: > > > On 1/13/06, Kamal R. Prasad wrote: > > > > > > Priority need not be propagated to readers as they will not block > > other > > > readers. > > > Most likely, you only need to propagate to the writer to avoid > > priority > > > inversron. > > > > > > regards > > > -kamal > > > > > > > > > On 1/13/06, prime < guomingyan@gmail.com> wrote: > > > > > > > Hi hackers, > > > > I have a question about how priority propagation works on > > > > read/write lock.On locks that have only one owner at a determinate > > > > moment,we can simply propagate the priority to the owner of lock,bu= t > > > > read/write lock may have many owners at some time,so how can we kno= w > > > > who are the owners? > > > > I browse the OpenSolaris' read/write lock implementation,and find > > > > that, it simply treats the owner of the lock as NULL when readers > > own > > > > the read/write lock.In this way,we can not propagate our priority t= o > > > > all threads that block us. > > > > > > > > Thanks very much. > > > > -- > > > > Three passions, simple but overwhelmingly strong, have governed my > > life: > > > > > > > > the longing for love, the search for knowledge, and unbearable pity > > for > > > > the suffering of mankind. > > > > ---------Bertrand Russell > > > > _______________________________________________ > > > > 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 > > > > " > > > > > > > > > > > > Thanks your reply. > > But readers may block writers, aren't they? > > For example, there are three threads,A,B and C, and a read/write lock > > rwlock1 ,and a mutex mtx1. > > 1.A lock mtx1, > > 2.B get the read lock of rwlock1 and then want > > to get mtx1,but mtx1 is locked by A,so B has to > > wait on mtx1. > > 3.C want to get the write lock of rwlock1 and it > > has to wait,because rwlock1 is read locked by B. > > Now if C's priority < A's priority(in numerical), then we get priority > > inversion. > > > > How can avoid this priority inversion? > > Thanks. > > > > -- > > Three passions, simple but overwhelmingly strong, have governed my life= : > > the longing for love, the search for knowledge, and unbearable pity for > > the suffering of mankind. > > ---------Bertrand Russell > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > > freebsd-hackers-unsubscribe@freebsd.org" > > > > FreeBSD supports sx now,see sx(9).sx has the same semanteme as rwlock. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell