From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 2 13:36:52 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 676CE1065672 for ; Mon, 2 Mar 2009 13:36:52 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8CFE78FC15 for ; Mon, 2 Mar 2009 13:36:51 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA23184 for ; Mon, 02 Mar 2009 15:36:49 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49ABE0F1.1040307@icyb.net.ua> Date: Mon, 02 Mar 2009 15:36:49 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: ieee working group on c++ posix bindings 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, 02 Mar 2009 13:36:52 -0000 Something that I learned today and that may be interesting to people here: http://standards.ieee.org/announcements/PR_New_Lan_Standards.html IEEE has also begun work on IEEE P1003.27â„¢, "Standard for Information Technology - POSIX® C++ Language Interfaces - Binding for System Application Program Interface (API)." This standard will provide a single, recommended method to allow portable C++ applications to make use of the POSIX standard interfaces, which will help to discourage the currently diverging practices in the industry which lead to poor design choices, inefficiencies, and incompatibilities. https://www.redhat.com/mailman/listinfo/posix-c++-wg -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 2 14:24:38 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DE7E1065673 for ; Mon, 2 Mar 2009 14:24:38 +0000 (UTC) (envelope-from vascim@yahoo.com) Received: from web38306.mail.mud.yahoo.com (web38306.mail.mud.yahoo.com [209.191.125.22]) by mx1.freebsd.org (Postfix) with SMTP id 512108FC1A for ; Mon, 2 Mar 2009 14:24:38 +0000 (UTC) (envelope-from vascim@yahoo.com) Received: (qmail 45285 invoked by uid 60001); 2 Mar 2009 13:57:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=wHPZMxVXMHdCZl20ViCno9KxigYhedGiQQLKrK0w1pzpqm96XqjjNiGTN1WQzO54jOZArnDr4azT32d28LJ13c94sBKacbrXtZeMwhA5AXtbTZfzKdEOWwRyooExSBnY5FF/B4FzYTn8CpOlq2zBjoMeCcm+FxI9N7/BbIS0d80=; X-YMail-OSG: i5s5JLwVM1l30RLXXjOjSLdYv_SgaGC6Pj96uQutCex7u2yG3ZrQTUm6MazHj907_5VF40NkSV6mxIbQeZ9.sVRogAt_J3zOHqgQEr3Z9NvhyHhb_nt_jukj.jCnGQQw0HJo4HJL2xIKtj2PZB7aKxOsjF8_HZ1ugWfzKzCXOaqBW0GptOKQuGzhapHFhQ-- Received: from [85.9.55.98] by web38306.mail.mud.yahoo.com via HTTP; Mon, 02 Mar 2009 05:57:56 PST X-Mailer: YahooMailWebService/0.7.289.1 Date: Mon, 2 Mar 2009 05:57:56 -0800 (PST) From: Vasile Marii To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <965289.45194.qm@web38306.mail.mud.yahoo.com> X-Mailman-Approved-At: Mon, 02 Mar 2009 14:33:36 +0000 Subject: slow freebsd cripto-accelerating framework X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vascim@yahoo.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 14:24:38 -0000 I'm working to port a cripto accelerating device driver(it's custom made device) from linux (which works fine) to bsd (freebsd 7.1), but i couldn't get the same(decent) results as for linux. The driver for linux and for bsd both a started from the corresponding driver for geode LX cripo accelerator. I concluded that it's not the device and the bottleneck is somewhere in the kernel. I modified the original glxsb(geode crypto accelerator) driver and made it return immediately after receiving a cripto task (so the device actually does nothing aka device is taking zero time to cript any block of data) and the data is actually not cripted. I made this for debugging purposes to see if the kernel delivers enough data to the device. The netperf results between the two exactly the same machines(with a tunnel(AES-CBC with HMAC_SHA256) between them) with the exactly the same driver shows a throughput of maximum 20Mbps(without IPSEC tunnel i can get 94,1 Mbps). I've seen similar problems on some threads regarding VIA(which should work with 1,1 Gbps throughput). I've tested the device not cripting network traffic (meaning "feed" the device manually and give it data immediately after it finishes the previous) and i can get a full speed of 117 Mbps(meaning it should be enough for my needs of 100Mbps NIC). Does anybody have any better results on glxsb or via?(i mean a netperf test between two machines) or there is a hack or a setting in the kernel or somewhere else? Any help is appreciated. Thanks! --------------- Vasile Marii From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 2 15:06:27 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D242C1065674 for ; Mon, 2 Mar 2009 15:06:27 +0000 (UTC) (envelope-from vanhu@zeninc.net) Received: from smtp.zeninc.net (smtp.zeninc.net [80.67.176.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8E8988FC16 for ; Mon, 2 Mar 2009 15:06:27 +0000 (UTC) (envelope-from vanhu@zeninc.net) Received: from astro.zen.inc (astro.zen.inc [192.168.1.239]) by smtp.zeninc.net (smtpd) with ESMTP id 3384B2798B8; Mon, 2 Mar 2009 15:50:23 +0100 (CET) Received: by astro.zen.inc (Postfix, from userid 1000) id 4349E17050; Mon, 2 Mar 2009 15:59:52 +0100 (CET) Date: Mon, 2 Mar 2009 15:59:52 +0100 From: VANHULLEBUS Yvan To: Vasile Marii Message-ID: <20090302145952.GA6708@zeninc.net> References: <965289.45194.qm@web38306.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <965289.45194.qm@web38306.mail.mud.yahoo.com> User-Agent: All mail clients suck. This one just sucks less. Cc: freebsd-hackers@freebsd.org Subject: Re: slow freebsd cripto-accelerating framework 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, 02 Mar 2009 15:06:28 -0000 Hi. On Mon, Mar 02, 2009 at 05:57:56AM -0800, Vasile Marii wrote: [....] > The netperf results between the two exactly the same > machines(with a tunnel(AES-CBC with HMAC_SHA256) between them) with > the exactly the same driver shows a throughput of maximum > 20Mbps(without IPSEC tunnel i can get 94,1 Mbps). > I've seen similar problems on some threads regarding VIA(which > should work with 1,1 Gbps throughput). While doing some benchs on IPsec, the very first thing to do is to ensure you'll have no fragmentation for ESP packets. You can do that by updating TCPMSS on the fly (for example with Pf), or by changing MTU on TRAFFIC interfaces (and NOT on tunnel interfaces). Once you did that, then you can start to have a look at performances. And yes, it take time to do IPsec processing, so your throughput will be much lower than non-IPsec traffic on the same hosts. Yvan. From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 2 19:14:36 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26D3A1065696 for ; Mon, 2 Mar 2009 19:14:36 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id DD39A8FC20 for ; Mon, 2 Mar 2009 19:14:35 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (166.10.87-79.rev.gaoland.net [79.87.10.166]) by smtp.lamaiziere.net (Postfix) with ESMTPA id 22C286332D9; Mon, 2 Mar 2009 20:14:34 +0100 (CET) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id D7628C638; Mon, 2 Mar 2009 20:14:40 +0100 (CET) Date: Mon, 2 Mar 2009 20:14:40 +0100 From: Patrick =?ISO-8859-15?Q?Lamaizi=E8re?= To: vascim@yahoo.com Message-ID: <20090302201440.1c878fab@baby-jane.lamaiziere.net> In-Reply-To: <965289.45194.qm@web38306.mail.mud.yahoo.com> References: <965289.45194.qm@web38306.mail.mud.yahoo.com> Organization: /dave/nulle X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: slow freebsd cripto-accelerating framework 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, 02 Mar 2009 19:14:36 -0000 Le Mon, 2 Mar 2009 05:57:56 -0800 (PST), Vasile Marii : > I'm working to port a cripto accelerating device driver(it's custom > made device) from linux (which works fine) to bsd (freebsd 7.1), but > i couldn't get the same(decent) results as for linux. The driver for > linux and for bsd both a started from the corresponding driver for > geode LX cripo accelerator. I concluded that it's not the device and > the bottleneck is somewhere in the kernel. I modified the original > glxsb(geode crypto accelerator) driver and made it return immediately > after receiving a cripto task (so the device actually does nothing > aka device is taking zero time to cript any block of data) and the > data is actually not cripted. I made this for debugging purposes to > see if the kernel delivers enough data to the device. The netperf > results between the two exactly the same machines(with a > tunnel(AES-CBC with HMAC_SHA256) between them) with the exactly the > same driver shows a throughput of maximum 20Mbps(without IPSEC tunnel > i can get 94,1 Mbps). I've seen similar problems on some threads > regarding VIA(which should work with 1,1 Gbps throughput). I've > tested the device not cripting network traffic (meaning "feed" the > device manually and give it data immediately after it finishes the > previous) and i can get a full speed of 117 Mbps(meaning it should be > enough for my needs of 100Mbps NIC). Does anybody have any better > results on glxsb or via?(i mean a netperf test between two machines) > or there is a hack or a setting in the kernel or somewhere else? Any > help is appreciated. Thanks! I didn't make any benchmark with glxsb on IPsec. I've made some measures with the cryptotest tool (see /usr/src/tools/tools/crypto/) and openssl. The throughput is far more better than 20 Mbits (around 150 Mbits with data size = 4096 bytes). So I don't think that the botleneck is in the crypto framework. But the throughput heavely depends of the size of the data see (on blue the current glxsb): http://user.lamaiziere.net/patrick/glxsb-171108/glxsb-perf.pdf Measured with the cryptotest tool. While I'm here, does someone know why there is a big drop in the throughput when the size is just > 4096 bytes (the size of a page on I386)? Regards. From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 2 20:32:19 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E62D21065688 for ; Mon, 2 Mar 2009 20:32:19 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.9]) by mx1.freebsd.org (Postfix) with ESMTP id B54458FC1D for ; Mon, 2 Mar 2009 20:32:19 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: (qmail 19587 invoked from network); 2 Mar 2009 20:31:12 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 2 Mar 2009 20:31:12 -0000 Message-ID: <49AC3FDE.9040405@telenix.org> Date: Mon, 02 Mar 2009 15:21:50 -0500 From: Chuck Robey User-Agent: Thunderbird 2.0.0.19 (X11/20090121) MIME-Version: 1.0 To: FreeBSD-Hackers X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: howto configure FreeBSD's hal? 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, 02 Mar 2009 20:32:20 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I can't seem to find anything on how to set up hal on FreeBSD. I hope it's because I'm being lousy at searching, not that there just isn't anything on the subject. I think all I want is to set up my Logitech wireless PS/2 (via a USB to PS/2 converter) mouse, and a PS/2 keyboard. I have a RAID/1 (via a twa driver), I don't know if that affects my hal or not. I honestly would far arther do my own configuration, if I could only find anything written up on how to accomplish this on FreeBSD (current). Sure would appreciate a pointer to this. I have the idea that anything I could find would be written for Linux, which wouldn't be terribly correct for FreeBSD's device setup, am I right? -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmsP94ACgkQz62J6PPcoOlnCQCcCOTg3iBny8uIbWDLIZJvASfI v+MAnjtujaWT9pUawJVmJFKVMU2M5qKJ =relA -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 2 21:34:38 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5FA2106566C for ; Mon, 2 Mar 2009 21:34:38 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by mx1.freebsd.org (Postfix) with ESMTP id A88618FC12 for ; Mon, 2 Mar 2009 21:34:38 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by wf-out-1314.google.com with SMTP id 27so2512660wfd.7 for ; Mon, 02 Mar 2009 13:34:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=JtXcuXlB9UIGzmU8FRBo8JMJ6eOpzA8XA5klupiymAQ=; b=Ybf8pGPxEXLd154hWS5oaCPgRIAJIGSlxKnqruTEUopX9MHTpRk13UXpq7kz1IMZfo KqnJB/Ecpdog/zrnXeULlA3TPJIxO0eeWp9TkBvLVZHnLIUk+HkTzUz3K9rRL4Mug2w1 6PAS/g7IbeFoThe4i71ICrKDM6Hj0z7jCV7q8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=E1AFa4vLS1g5ahBnxHgstAWDjqARstdsvOKVAEBdWLb25CxksHvF/nv4D1OWpyZsA5 SPf/IH6EIP+dNCidhSaqRKJTixxc43kGIgxc1YhMjFaU6i6uuBkj3j0rdptW3lL4pDsf fUCKDn+kDn15ROXAQHooUs90qwPRuO4SHc9t4= MIME-Version: 1.0 Received: by 10.142.242.8 with SMTP id p8mr3215000wfh.25.1236027902254; Mon, 02 Mar 2009 13:05:02 -0800 (PST) Date: Mon, 2 Mar 2009 13:05:02 -0800 Message-ID: From: Navdeep Parhar To: freebsd-hackers@freebsd.org Content-Type: multipart/mixed; boundary=000e0cd32af00bdf650464292c0d Subject: puc support for a generic card (patch attached) 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, 02 Mar 2009 21:34:39 -0000 --000e0cd32af00bdf650464292c0d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit This may interest puc and uart maintainers. I needed an extra serial port on my FreeBSD machine and bought a store-branded "1-Port Serial PCI Adapter" from a local computer store. This is what pciconf shows: puc0@pci0:4:1:0: class=0x070002 card=0x00011000 chip=0x98359710 rev=0x01 hdr=0x00 And here's what puc identified it as: puc0: port 0xec00-0xec07,0xe480-0xe487,0xe400-0xe407,0xe080-0xe087,0xe000-0xe007,0xdc00-0xdc0f irq 16 at device 1.0 on pci4 Visual inspection shows the card has missing circuitry and headers for the extra serial and parallel port that the chip supports. puc gave me 2 serial port and 1 parallel port devices for the card, and none of them would work (not even the first serial port device). I had to tweak pucdata.c to get the card working. Patch against HEAD is attached, and also pasted at the end of this email (in case this list drops attachements). Regards, Navdeep diff -r 025cb00d19d7 sys/dev/puc/puc.c --- a/sys/dev/puc/puc.c Sat Feb 28 12:42:37 2009 -0800 +++ b/sys/dev/puc/puc.c Mon Mar 02 12:21:07 2009 -0800 @@ -440,9 +440,6 @@ sc->sc_dev = dev; sc->sc_cfg = cfg; - /* We don't attach to single-port serial cards. */ - if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P) - return (EDOOFUS); error = puc_config(sc, PUC_CFG_GET_NPORTS, 0, &res); if (error) return (error); diff -r 025cb00d19d7 sys/dev/puc/pucdata.c --- a/sys/dev/puc/pucdata.c Sat Feb 28 12:42:37 2009 -0800 +++ b/sys/dev/puc/pucdata.c Mon Mar 02 12:21:07 2009 -0800 @@ -761,6 +761,12 @@ PUC_PORT_2P, 0x10, 8, 0, }, + { 0x9710, 0x9835, 0x1000, 1, + "NetMos NM9835 based 1-port serial", + DEFAULT_RCLK, + PUC_PORT_1S, 0x10, 4, 0, + }, + { 0x9710, 0x9835, 0xffff, 0, "NetMos NM9835 Dual UART and 1284 Printer port", DEFAULT_RCLK, --000e0cd32af00bdf650464292c0d Content-Type: application/octet-stream; name="puc.patch" Content-Disposition: attachment; filename="puc.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_frtmxci80 ZGlmZiAtciAwMjVjYjAwZDE5ZDcgc3lzL2Rldi9wdWMvcHVjLmMKLS0tIGEvc3lzL2Rldi9wdWMv cHVjLmMJU2F0IEZlYiAyOCAxMjo0MjozNyAyMDA5IC0wODAwCisrKyBiL3N5cy9kZXYvcHVjL3B1 Yy5jCU1vbiBNYXIgMDIgMTI6NTU6MjYgMjAwOSAtMDgwMApAQCAtNDQwLDkgKzQ0MCw2IEBACiAJ c2MtPnNjX2RldiA9IGRldjsKIAlzYy0+c2NfY2ZnID0gY2ZnOwogCi0JLyogV2UgZG9uJ3QgYXR0 YWNoIHRvIHNpbmdsZS1wb3J0IHNlcmlhbCBjYXJkcy4gKi8KLQlpZiAoY2ZnLT5wb3J0cyA9PSBQ VUNfUE9SVF8xUyB8fCBjZmctPnBvcnRzID09IFBVQ19QT1JUXzFQKQotCQlyZXR1cm4gKEVET09G VVMpOwogCWVycm9yID0gcHVjX2NvbmZpZyhzYywgUFVDX0NGR19HRVRfTlBPUlRTLCAwLCAmcmVz KTsKIAlpZiAoZXJyb3IpCiAJCXJldHVybiAoZXJyb3IpOwpkaWZmIC1yIDAyNWNiMDBkMTlkNyBz eXMvZGV2L3B1Yy9wdWNkYXRhLmMKLS0tIGEvc3lzL2Rldi9wdWMvcHVjZGF0YS5jCVNhdCBGZWIg MjggMTI6NDI6MzcgMjAwOSAtMDgwMAorKysgYi9zeXMvZGV2L3B1Yy9wdWNkYXRhLmMJTW9uIE1h ciAwMiAxMjo1NToyNiAyMDA5IC0wODAwCkBAIC03NjEsNiArNzYxLDEyIEBACiAJICAgIFBVQ19Q T1JUXzJQLCAweDEwLCA4LCAwLAogCX0sIAogCisJeyAgIDB4OTcxMCwgMHg5ODM1LCAweDEwMDAs IDEsCisJICAgICJOZXRNb3MgTk05ODM1IGJhc2VkIDEtcG9ydCBzZXJpYWwiLAorCSAgICBERUZB VUxUX1JDTEssCisJICAgIFBVQ19QT1JUXzFTLCAweDEwLCA0LCAwLAorCX0sCisKIAl7ICAgMHg5 NzEwLCAweDk4MzUsIDB4ZmZmZiwgMCwKIAkgICAgIk5ldE1vcyBOTTk4MzUgRHVhbCBVQVJUIGFu ZCAxMjg0IFByaW50ZXIgcG9ydCIsCiAJICAgIERFRkFVTFRfUkNMSywK --000e0cd32af00bdf650464292c0d-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 07:13:22 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C112106564A for ; Tue, 3 Mar 2009 07:13:22 +0000 (UTC) (envelope-from vascim@yahoo.com) Received: from web38302.mail.mud.yahoo.com (web38302.mail.mud.yahoo.com [209.191.125.18]) by mx1.freebsd.org (Postfix) with SMTP id 26E568FC15 for ; Tue, 3 Mar 2009 07:13:21 +0000 (UTC) (envelope-from vascim@yahoo.com) Received: (qmail 69816 invoked by uid 60001); 3 Mar 2009 07:13:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=o8JVmUDId0OUyAyCb+8QSep4iXmRPNifQvY44SJ+vzf2kXP1i0BbdSiKfIz2oxoFgtdJqi6c2MqTLqvMHHgZaRjRcjzxJfMVkiDqYGnGN/FwivsOwpRkQABMJBQDIYwW98lvWHwjibrVmsWc4GlANfWNBdPy/wjqJ/umUbUk8Kc=; X-YMail-OSG: tBWwJwwVM1m7hYB5CDmAXOv7D16QredgoeF8MRED8T63DzswuMIIUu3BkUxDq22ILmYTtVPBTzt5ujs8HJ7fIGEJfX0YH4wnN1.UVH716se2zIySmpduba6NZw6JDYgHdhjnYROyofztGIGZ91_CoveZ.GHAB7XTFuHD8naJqVduM3QpZ.rMfit_t5iYpg-- Received: from [85.9.55.98] by web38302.mail.mud.yahoo.com via HTTP; Mon, 02 Mar 2009 23:13:21 PST X-Mailer: YahooMailWebService/0.7.289.1 Date: Mon, 2 Mar 2009 23:13:21 -0800 (PST) From: Vasile Marii To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <397057.67515.qm@web38302.mail.mud.yahoo.com> Subject: no kern.usercrypto X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vascim@yahoo.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2009 07:13:22 -0000 Hello everybody! I'm a newbie in BSD. I don't have /dev/crypto nor kern.usercrypto in sysctl...so where can i read something about enabling this on my systems. Thanks --------------- Vasile Marii From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 08:34:46 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6066F106564A for ; Tue, 3 Mar 2009 08:34:46 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1828FC15 for ; Tue, 3 Mar 2009 08:34:45 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by gxk24 with SMTP id 24so6270392gxk.19 for ; Tue, 03 Mar 2009 00:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Sy7C38s7pC5hnXhUmdFzZRDrd0y8jixjCBtQoa/lRj0=; b=WSZjix+VLu4Bn008M/jZahn8CBv4yIf3suhzGAKh5FsuvtMakW+tbEjI20ufUn2+N2 Cm7+8XyFsqVrPV8NaGb3GvNPVlYXjbuk4czq3mhOjd4UArAYqcpHBYf7VXbeB78ay/xr APUY5HPSmAh/RysJdDAlWtYcu+bWXozw7kv8k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=XwdOSD/LkCI7FN1m0Ek2ZIdx/pH+2gYx/EzzrS6UDTQ0v2KryLtiNGXHhdcfCLD6dE Tn539T/Cgd3jUKCen287qf/nZuYRhm/Jv5zAdsWxB6FhMlmk8z2YhQo3j4IaNdHkPK3w +8NcaEpuXQo7KocqmfhUTu4i9VK0cv0yHlfXg= MIME-Version: 1.0 Received: by 10.90.101.7 with SMTP id y7mr1437722agb.108.1236069285217; Tue, 03 Mar 2009 00:34:45 -0800 (PST) In-Reply-To: <49AC3FDE.9040405@telenix.org> References: <49AC3FDE.9040405@telenix.org> Date: Tue, 3 Mar 2009 00:34:45 -0800 Message-ID: <7d6fde3d0903030034p207f2832i7d01fa19349d8129@mail.gmail.com> From: Garrett Cooper To: Chuck Robey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-Hackers Subject: Re: howto configure FreeBSD's hal? 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, 03 Mar 2009 08:34:46 -0000 On Mon, Mar 2, 2009 at 12:21 PM, Chuck Robey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I can't seem to find anything on how to set up hal on FreeBSD. =A0I hope = it's > because I'm being lousy at searching, not that there just isn't anything = on the > subject. =A0I think all I want is to set up my Logitech wireless PS/2 (vi= a a USB > to PS/2 converter) mouse, and a PS/2 keyboard. =A0I have a RAID/1 (via a = twa > driver), I don't know if that affects my hal or not. =A0I honestly would = far > arther do my own configuration, if I could only find anything written up = on how > to accomplish this on FreeBSD (current). > > Sure would appreciate a pointer to this. =A0I have the idea that anything= I could > find would be written for Linux, which wouldn't be terribly correct for > FreeBSD's device setup, am I right? Hi Chuck, What does the output look like when you try to boot with `boot -v' and how recent is your kernel, world, what revision of the source tree are they based off of (RELENG_7, HEAD?) and is your version of hal up-to-date? Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 13:29:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6DA2106567C for ; Tue, 3 Mar 2009 13:29:07 +0000 (UTC) (envelope-from darcsis@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id A18958FC17 for ; Tue, 3 Mar 2009 13:29:07 +0000 (UTC) (envelope-from darcsis@gmail.com) Received: by rv-out-0506.google.com with SMTP id f6so3178607rvb.43 for ; Tue, 03 Mar 2009 05:29:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :in-reply-to:organization:references:user-agent:x-envelope-to :mail-followup-to:date:message-id:mime-version:content-type; bh=ReOV3huLhliXqQNWpMazvlU5p7lMdqqzW9tHBR8nJ64=; b=AKbNfxFLwCAzihDOvFkXFszjIE9GiDgZc2yHhbdP/UOfDvjBh0h/Sb2CRHqnr6tjfz VvbCXZZy1j/MH2/uU9yFVIKeAqtpWaYs/A/itdqTJlyfFf8rWvaI7l/wCicAQfnWQ070 qhiLrHWt2bvPtHNGdA/kfl7vFzO6t3DvyFvbw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:organization:references:user-agent :x-envelope-to:mail-followup-to:date:message-id:mime-version :content-type; b=HJWBMPqYQdmD78o5d/FBrYNHpDdql4cY0zr2ZCkJegf4va2b3/qVZR7jIazRON3VMf SGRuwxcSXlgU7U1BzojdVseUI8nTd+PzM2EJWCQMS185jALsTN/7mem5JA48O9l2dgMH qccQOTAgyx05oX3FLWLhcwSFPBQ64wc3X6A10= Received: by 10.141.105.18 with SMTP id h18mr3512751rvm.109.1236084961666; Tue, 03 Mar 2009 04:56:01 -0800 (PST) Received: from pluton.xbsd.name ([125.34.67.56]) by mx.google.com with ESMTPS id b8sm4335223rvf.8.2009.03.03.04.55.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Mar 2009 04:56:01 -0800 (PST) From: darcsis@gmail.com (Denise H. G.) To: Chuck Robey In-Reply-To: <49AC3FDE.9040405@telenix.org> (Chuck Robey's message of "Mon, 02 Mar 2009 15:21:50 -0500") Organization: Terra Firma References: <49AC3FDE.9040405@telenix.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (berkeley-unix) X-Envelope-To: chuckr@telenix.org Mail-Followup-To: Chuck Robey , FreeBSD-Hackers Date: Tue, 03 Mar 2009 20:55:39 +0800 Message-ID: <86k576hik4.fsf@pluton.xbsd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: FreeBSD-Hackers Subject: Re: howto configure FreeBSD's hal? 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, 03 Mar 2009 13:29:08 -0000 >>>>> "Chuck" == Chuck Robey writes: Chuck> I can't seem to find anything on how to set up hal on Chuck> FreeBSD. I hope it's because I'm being lousy at searching, Chuck> not that there just isn't anything on the subject. I think Chuck> all I want is to set up my Logitech wireless PS/2 (via a USB Chuck> to PS/2 converter) mouse, and a PS/2 keyboard. I have a Chuck> RAID/1 (via a twa driver), I don't know if that affects my Chuck> hal or not. I honestly would far arther do my own Chuck> configuration, if I could only find anything written up on Chuck> how to accomplish this on FreeBSD (current). Chuck> Sure would appreciate a pointer to this. I have the idea that Chuck> anything I could find would be written for Linux, which Chuck> wouldn't be terribly correct for FreeBSD's device setup, am I Chuck> right? _______________________________________________ Chuck> freebsd-hackers@freebsd.org mailing list Chuck> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To Chuck> unsubscribe, send any mail to Chuck> "freebsd-hackers-unsubscribe@freebsd.org" HAL configuration is a complex if you don't know much about XML. Firstly I assume that you should be heading towards correct directions, then you just go ahead with XML stuff and HAL configuration. You would find some HAL stuff on RedHat websites. And google might be a good idea at the same time. Good luck. -- darcsis ZAI gmail DIAN com From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 14:32:19 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31C531065673; Tue, 3 Mar 2009 14:32:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 030518FC0C; Tue, 3 Mar 2009 14:32:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 85E6D46B32; Tue, 3 Mar 2009 09:32:18 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n23EW1On086187; Tue, 3 Mar 2009 09:32:12 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 3 Mar 2009 09:15:42 -0500 User-Agent: KMail/1.9.7 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: <200903030915.43037.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 03 Mar 2009 09:32:12 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/9065/Tue Mar 3 05:43:41 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: marcel@freebsd.org, Navdeep Parhar Subject: Re: puc support for a generic card (patch attached) 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, 03 Mar 2009 14:32:19 -0000 On Monday 02 March 2009 4:05:02 pm Navdeep Parhar wrote: > This may interest puc and uart maintainers. > > I needed an extra serial port on my FreeBSD machine and bought a > store-branded "1-Port Serial PCI Adapter" from a local computer > store. > > This is what pciconf shows: > puc0@pci0:4:1:0: class=0x070002 card=0x00011000 chip=0x98359710 > rev=0x01 hdr=0x00 > > And here's what puc identified it as: > puc0: port > 0xec00-0xec07,0xe480-0xe487,0xe400-0xe407,0xe080-0xe087,0xe000-0xe007,0xdc00-0xdc0f > irq 16 at device 1.0 on pci4 > > Visual inspection shows the card has missing circuitry and headers > for the extra serial and parallel port that the chip supports. puc > gave me 2 serial port and 1 parallel port devices for the card, and > none of them would work (not even the first serial port device). > > I had to tweak pucdata.c to get the card working. Patch against > HEAD is attached, and also pasted at the end of this email (in case > this list drops attachements). > > Regards, > Navdeep > > diff -r 025cb00d19d7 sys/dev/puc/puc.c > --- a/sys/dev/puc/puc.c Sat Feb 28 12:42:37 2009 -0800 > +++ b/sys/dev/puc/puc.c Mon Mar 02 12:21:07 2009 -0800 > @@ -440,9 +440,6 @@ > sc->sc_dev = dev; > sc->sc_cfg = cfg; > > - /* We don't attach to single-port serial cards. */ > - if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P) > - return (EDOOFUS); FWIW, the traditional reason for this is that we made the sio/uart or ppc drivers claim single port devices directly and only use puc for multiple-port cards. I'm not sure if that should still be the case or not. Marcel, do you have an opinion? > error = puc_config(sc, PUC_CFG_GET_NPORTS, 0, &res); > if (error) > return (error); > diff -r 025cb00d19d7 sys/dev/puc/pucdata.c > --- a/sys/dev/puc/pucdata.c Sat Feb 28 12:42:37 2009 -0800 > +++ b/sys/dev/puc/pucdata.c Mon Mar 02 12:21:07 2009 -0800 > @@ -761,6 +761,12 @@ > PUC_PORT_2P, 0x10, 8, 0, > }, > > + { 0x9710, 0x9835, 0x1000, 1, > + "NetMos NM9835 based 1-port serial", > + DEFAULT_RCLK, > + PUC_PORT_1S, 0x10, 4, 0, > + }, > + > { 0x9710, 0x9835, 0xffff, 0, > "NetMos NM9835 Dual UART and 1284 Printer port", > DEFAULT_RCLK, > -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 16:49:06 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D216106568E; Tue, 3 Mar 2009 16:49:06 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout011.mac.com (asmtpout011.mac.com [17.148.16.86]) by mx1.freebsd.org (Postfix) with ESMTP id 02A3B8FC24; Tue, 3 Mar 2009 16:49:05 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from aparmelee-t41.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp011.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KFX00GMTW17P310@asmtp011.mac.com>; Tue, 03 Mar 2009 08:48:43 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.7400:2.4.4,1.2.40,4.0.166 definitions=2009-03-03_07:2009-02-26, 2009-03-03, 2009-03-03 signatures=0 Message-id: From: Marcel Moolenaar To: John Baldwin In-reply-to: <200903030915.43037.jhb@freebsd.org> Date: Tue, 03 Mar 2009 08:48:42 -0800 References: <200903030915.43037.jhb@freebsd.org> X-Mailer: Apple Mail (2.930.3) Cc: FreeBSD Hackers , Navdeep Parhar Subject: Re: puc support for a generic card (patch attached) 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, 03 Mar 2009 16:49:07 -0000 On Mar 3, 2009, at 6:15 AM, John Baldwin wrote: >> diff -r 025cb00d19d7 sys/dev/puc/puc.c >> --- a/sys/dev/puc/puc.c Sat Feb 28 12:42:37 2009 -0800 >> +++ b/sys/dev/puc/puc.c Mon Mar 02 12:21:07 2009 -0800 >> @@ -440,9 +440,6 @@ >> sc->sc_dev = dev; >> sc->sc_cfg = cfg; >> >> - /* We don't attach to single-port serial cards. */ >> - if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P) >> - return (EDOOFUS); > > FWIW, the traditional reason for this is that we made the sio/uart > or ppc > drivers claim single port devices directly and only use puc for > multiple-port > cards. I'm not sure if that should still be the case or not. > Marcel, do you > have an opinion? Yes :-) I explicitly added the test with that particular error code to make it absolutely clear that puc(4) is not the driver for single port cards. The reason being that it's pointless. There are 2 things that puc(4) facilitates in: resource assignment and interrupt handling. For single port cards there's nothing to distribute nor is there any interrupt sharing. In other words: there's no value that puc(4) adds. As such, uart(4) and ppc(4) can attach directly to those cards and puc(4) does not have to be involved. BTW: Traditionally puc(4) was used to attach even to single port cards. With the puc(4) rewrite I changed that, because it was really a mixed bag. Some single-port cards were known to puc(4) others to uart(4)/sio(4) or ppc(4). That typically leads to confusion given that puc(4) is (still) not in GENERIC. (i.e. why is this UART attached, but that one isn't, they're both single port?) So, please do not apply the patch and instead add the IDs to sys/dev/uart/uart_bus_pci.c... FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 17:00:30 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B39410656C4 for ; Tue, 3 Mar 2009 17:00:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6188FC0A for ; Tue, 3 Mar 2009 17:00:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id EB76246B32; Tue, 3 Mar 2009 12:00:29 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n23H0IFB087453; Tue, 3 Mar 2009 12:00:24 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Marcel Moolenaar Date: Tue, 3 Mar 2009 11:59:54 -0500 User-Agent: KMail/1.9.7 References: <200903030915.43037.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903031159.55299.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 03 Mar 2009 12:00:24 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/9065/Tue Mar 3 05:43:41 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: FreeBSD Hackers , Navdeep Parhar Subject: Re: puc support for a generic card (patch attached) 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, 03 Mar 2009 17:00:31 -0000 On Tuesday 03 March 2009 11:48:42 am Marcel Moolenaar wrote: > > On Mar 3, 2009, at 6:15 AM, John Baldwin wrote: > > >> diff -r 025cb00d19d7 sys/dev/puc/puc.c > >> --- a/sys/dev/puc/puc.c Sat Feb 28 12:42:37 2009 -0800 > >> +++ b/sys/dev/puc/puc.c Mon Mar 02 12:21:07 2009 -0800 > >> @@ -440,9 +440,6 @@ > >> sc->sc_dev = dev; > >> sc->sc_cfg = cfg; > >> > >> - /* We don't attach to single-port serial cards. */ > >> - if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P) > >> - return (EDOOFUS); > > > > FWIW, the traditional reason for this is that we made the sio/uart > > or ppc > > drivers claim single port devices directly and only use puc for > > multiple-port > > cards. I'm not sure if that should still be the case or not. > > Marcel, do you > > have an opinion? > > Yes :-) > > I explicitly added the test with that particular error code > to make it absolutely clear that puc(4) is not the driver > for single port cards. The reason being that it's pointless. > > There are 2 things that puc(4) facilitates in: resource > assignment and interrupt handling. For single port cards > there's nothing to distribute nor is there any interrupt > sharing. In other words: there's no value that puc(4) adds. > As such, uart(4) and ppc(4) can attach directly to those > cards and puc(4) does not have to be involved. > > BTW: Traditionally puc(4) was used to attach even to single > port cards. With the puc(4) rewrite I changed that, because > it was really a mixed bag. Some single-port cards were known > to puc(4) others to uart(4)/sio(4) or ppc(4). That typically > leads to confusion given that puc(4) is (still) not in GENERIC. > (i.e. why is this UART attached, but that one isn't, they're > both single port?) > > So, please do not apply the patch and instead add the IDs to > sys/dev/uart/uart_bus_pci.c... This sounds fine to me. :) Navdeep, can you develop a patch for uart(4) instead and test that? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 17:04:39 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C61231065722; Tue, 3 Mar 2009 17:04:39 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout019.mac.com (asmtpout019.mac.com [17.148.16.94]) by mx1.freebsd.org (Postfix) with ESMTP id ADC498FC1A; Tue, 3 Mar 2009 17:04:39 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from espititu-t60.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp019.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KFX001G1WRK5460@asmtp019.mac.com>; Tue, 03 Mar 2009 09:04:33 -0800 (PST) Message-id: <9B775F97-1E5A-4E55-A2AE-26DC78CD08C0@mac.com> From: Marcel Moolenaar To: John Baldwin In-reply-to: <200903031159.55299.jhb@freebsd.org> Date: Tue, 03 Mar 2009 09:04:32 -0800 References: <200903030915.43037.jhb@freebsd.org> <200903031159.55299.jhb@freebsd.org> X-Mailer: Apple Mail (2.930.3) Cc: FreeBSD Hackers , Navdeep Parhar Subject: Re: puc support for a generic card (patch attached) 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, 03 Mar 2009 17:04:42 -0000 On Mar 3, 2009, at 8:59 AM, John Baldwin wrote: > On Tuesday 03 March 2009 11:48:42 am Marcel Moolenaar wrote: >> >> On Mar 3, 2009, at 6:15 AM, John Baldwin wrote: >> >>>> diff -r 025cb00d19d7 sys/dev/puc/puc.c >>>> --- a/sys/dev/puc/puc.c Sat Feb 28 12:42:37 2009 -0800 >>>> +++ b/sys/dev/puc/puc.c Mon Mar 02 12:21:07 2009 -0800 >>>> @@ -440,9 +440,6 @@ >>>> sc->sc_dev = dev; >>>> sc->sc_cfg = cfg; >>>> >>>> - /* We don't attach to single-port serial cards. */ >>>> - if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P) >>>> - return (EDOOFUS); >>> >>> FWIW, the traditional reason for this is that we made the sio/uart >>> or ppc >>> drivers claim single port devices directly and only use puc for >>> multiple-port >>> cards. I'm not sure if that should still be the case or not. >>> Marcel, do you >>> have an opinion? >> >> Yes :-) >> >> I explicitly added the test with that particular error code >> to make it absolutely clear that puc(4) is not the driver >> for single port cards. The reason being that it's pointless. >> >> There are 2 things that puc(4) facilitates in: resource >> assignment and interrupt handling. For single port cards >> there's nothing to distribute nor is there any interrupt >> sharing. In other words: there's no value that puc(4) adds. >> As such, uart(4) and ppc(4) can attach directly to those >> cards and puc(4) does not have to be involved. >> >> BTW: Traditionally puc(4) was used to attach even to single >> port cards. With the puc(4) rewrite I changed that, because >> it was really a mixed bag. Some single-port cards were known >> to puc(4) others to uart(4)/sio(4) or ppc(4). That typically >> leads to confusion given that puc(4) is (still) not in GENERIC. >> (i.e. why is this UART attached, but that one isn't, they're >> both single port?) >> >> So, please do not apply the patch and instead add the IDs to >> sys/dev/uart/uart_bus_pci.c... > > This sounds fine to me. :) Navdeep, can you develop a patch for > uart(4) > instead and test that? BTW: I forgot to mention that puc(4) needs to back-off from this particular card. That means that the catch-all that we have there needs to be tweaked. So, the change to pucdata.c can still be made, but with a big comment that states that the entry is added only to avoid puc(4) from attaching to that particular 1-port card so that uart(4) can claim it... -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 17:37:56 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51322106570C for ; Tue, 3 Mar 2009 17:37:56 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 151548FC1C for ; Tue, 3 Mar 2009 17:37:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n23Hbtg9079029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Mar 2009 09:37:55 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49AD6AF3.9060505@freebsd.org> Date: Tue, 03 Mar 2009 09:37:55 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: vascim@yahoo.com References: <397057.67515.qm@web38302.mail.mud.yahoo.com> In-Reply-To: <397057.67515.qm@web38302.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-x.dcc-servers-Metrics: ebb.errno.com; whitelist Cc: freebsd-hackers@freebsd.org Subject: Re: no kern.usercrypto 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, 03 Mar 2009 17:37:57 -0000 Vasile Marii wrote: > Hello everybody! > I'm a newbie in BSD. > I don't have /dev/crypto nor kern.usercrypto in sysctl...so where can i read something about enabling this on my systems. > man 4 crypto From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 18:15:39 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EFD11065670 for ; Tue, 3 Mar 2009 18:15:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CACC68FC17 for ; Tue, 3 Mar 2009 18:15:38 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA13723 for ; Tue, 03 Mar 2009 20:15:36 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49AD73C8.7010500@icyb.net.ua> Date: Tue, 03 Mar 2009 20:15:36 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: ln: posixly confused 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, 03 Mar 2009 18:15:42 -0000 Test case. Preparation: $ mkdir linktest $ cd linktest $ mkdir some_dir $ mkdir other_dir The test: $ ln -s some_dir the_link $ ln -s -f other_dir the_link Expected: the_link points to other_dir. Actual result: some_dir contains symlink other_dir -> other_dir. >From ln(1): SYNOPSIS ln [-s [-F]] [-f | -iw] [-hnv] source_file [target_file] ln [-s [-F]] [-f | -iw] [-hnv] source_file ... target_dir I thought that only true directory would trigger the second form. I thought that the second argument being a symlink (to a file or to a directory) should trigger the first form. I also read this: http://www.opengroup.org/onlinepubs/009695399/utilities/ln.html I think that the text there (and in ln(1)) implies what I expected, but this is not spelled out clearly. I am confused. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 18:32:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E43D81065672 for ; Tue, 3 Mar 2009 18:32:02 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id C6A4A8FC13 for ; Tue, 3 Mar 2009 18:32:02 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n23IW2o07506; Tue, 3 Mar 2009 10:32:02 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n23IW2q20639; Tue, 3 Mar 2009 10:32:02 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Tue, 3 Mar 2009 10:32:01 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Andriy Gapon In-Reply-To: <49AD73C8.7010500@icyb.net.ua> Message-ID: References: <49AD73C8.7010500@icyb.net.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: ln: posixly confused 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, 03 Mar 2009 18:32:03 -0000 On Tue, 3 Mar 2009, Andriy Gapon wrote: > > Test case. > Preparation: > $ mkdir linktest > $ cd linktest > $ mkdir some_dir > $ mkdir other_dir > The test: > $ ln -s some_dir the_link > $ ln -s -f other_dir the_link > > Expected: the_link points to other_dir. > Actual result: some_dir contains symlink other_dir -> other_dir. > >> From ln(1): > SYNOPSIS > ln [-s [-F]] [-f | -iw] [-hnv] source_file [target_file] > ln [-s [-F]] [-f | -iw] [-hnv] source_file ... target_dir > > I thought that only true directory would trigger the second form. > I thought that the second argument being a symlink (to a file or to a directory) > should trigger the first form. > > I also read this: > http://www.opengroup.org/onlinepubs/009695399/utilities/ln.html > > I think that the text there (and in ln(1)) implies what I expected, but this is > not spelled out clearly. FWIW, Linux and Solaris have the same behavior as FreeBSD. The standard says the second form is triggered if the second argument "names an existing directory". An informative note in the symlink() specification at http://www.opengroup.org/onlinepubs/009695399/functions/symlink.html says "a symbolic link allows a file to have multiple logical names". Therefore, I think it's a fair interpretation to say that a symbolic link to an existing directory "names" it. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 18:45:52 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9293B106567C for ; Tue, 3 Mar 2009 18:45:52 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C8A3B8FC1C for ; Tue, 3 Mar 2009 18:45:51 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA14756; Tue, 03 Mar 2009 20:44:31 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49AD7A8F.2030802@icyb.net.ua> Date: Tue, 03 Mar 2009 20:44:31 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: Nate Eldredge References: <49AD73C8.7010500@icyb.net.ua> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: ln: posixly confused 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, 03 Mar 2009 18:45:53 -0000 on 03/03/2009 20:32 Nate Eldredge said the following: > On Tue, 3 Mar 2009, Andriy Gapon wrote: > >> >> Test case. >> Preparation: >> $ mkdir linktest >> $ cd linktest >> $ mkdir some_dir >> $ mkdir other_dir >> The test: >> $ ln -s some_dir the_link >> $ ln -s -f other_dir the_link >> >> Expected: the_link points to other_dir. >> Actual result: some_dir contains symlink other_dir -> other_dir. >> >>> From ln(1): >> SYNOPSIS >> ln [-s [-F]] [-f | -iw] [-hnv] source_file [target_file] >> ln [-s [-F]] [-f | -iw] [-hnv] source_file ... target_dir >> >> I thought that only true directory would trigger the second form. >> I thought that the second argument being a symlink (to a file or to a >> directory) >> should trigger the first form. >> >> I also read this: >> http://www.opengroup.org/onlinepubs/009695399/utilities/ln.html >> >> I think that the text there (and in ln(1)) implies what I expected, >> but this is >> not spelled out clearly. > > FWIW, Linux and Solaris have the same behavior as FreeBSD. > > The standard says the second form is triggered if the second argument > "names an existing directory". An informative note in the symlink() > specification at > http://www.opengroup.org/onlinepubs/009695399/functions/symlink.html > says "a symbolic link allows a file to have multiple logical names". > Therefore, I think it's a fair interpretation to say that a symbolic > link to an existing directory "names" it. Thank you for the info! -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 19:51:48 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6190106567B for ; Tue, 3 Mar 2009 19:51:48 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 7E7138FC26 for ; Tue, 3 Mar 2009 19:51:48 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by wa-out-1112.google.com with SMTP id k34so1565906wah.27 for ; Tue, 03 Mar 2009 11:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Hgu7Rk5+KR/y8tLpnj+5Qd3/x4tfekfNgaT3jhdAQFQ=; b=FTS7vT0OZfVTHfLaX361GElZ6sGwp/YBwvGgc6GrwfKpQ4VEbMsKLvEkjDJfHI0vUk OuptNa93xCb0JpcXm8rsn/EmSlzoDiEy7TG3J3rZqYHrmScCOAfUtjHvs8HBl2SW27zk v/Fi+czeU74z09KuVvG3SQ/5t2B2eI3CT5A5E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; b=MtUlDtPtQOpjvju2XMxmmmeXKvO/5586zi30Gz0K6utflcsJx+cNeYDGzYhhdxGSS+ KM24PBu95DSr+KrZeGSn8vt1epDwxBUzKjb6E+XPgPf60avo4vtx8QL4dtyevOhYXgs4 cTAMbfFWnoAViQBRYhcF6RgjFIkH3w3CnPeXw= Received: by 10.115.75.14 with SMTP id c14mr3566110wal.86.1236109908094; Tue, 03 Mar 2009 11:51:48 -0800 (PST) Received: from insightsol.com (h-67-100-74-36.snvacaid.covad.net [67.100.74.36]) by mx.google.com with ESMTPS id v39sm171996wah.54.2009.03.03.11.51.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Mar 2009 11:51:47 -0800 (PST) Date: Tue, 3 Mar 2009 11:51:22 -0800 From: Navdeep Parhar To: Marcel Moolenaar Message-ID: <20090303195122.GA30421@insightsol.com> Mail-Followup-To: Marcel Moolenaar , John Baldwin , FreeBSD Hackers References: <200903030915.43037.jhb@freebsd.org> <200903031159.55299.jhb@freebsd.org> <9B775F97-1E5A-4E55-A2AE-26DC78CD08C0@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9B775F97-1E5A-4E55-A2AE-26DC78CD08C0@mac.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Cc: FreeBSD Hackers Subject: Re: puc support for a generic card (patch attached) 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, 03 Mar 2009 19:51:49 -0000 On Tue, Mar 03, 2009 at 09:04:32AM -0800, Marcel Moolenaar wrote: > > On Mar 3, 2009, at 8:59 AM, John Baldwin wrote: > >> On Tuesday 03 March 2009 11:48:42 am Marcel Moolenaar wrote: >>> >>> On Mar 3, 2009, at 6:15 AM, John Baldwin wrote: >>> >>>>> diff -r 025cb00d19d7 sys/dev/puc/puc.c >>>>> --- a/sys/dev/puc/puc.c Sat Feb 28 12:42:37 2009 -0800 >>>>> +++ b/sys/dev/puc/puc.c Mon Mar 02 12:21:07 2009 -0800 >>>>> @@ -440,9 +440,6 @@ >>>>> sc->sc_dev = dev; >>>>> sc->sc_cfg = cfg; >>>>> >>>>> - /* We don't attach to single-port serial cards. */ >>>>> - if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P) >>>>> - return (EDOOFUS); >>>> >>>> FWIW, the traditional reason for this is that we made the sio/uart >>>> or ppc >>>> drivers claim single port devices directly and only use puc for >>>> multiple-port >>>> cards. I'm not sure if that should still be the case or not. >>>> Marcel, do you >>>> have an opinion? >>> >>> Yes :-) >>> >>> I explicitly added the test with that particular error code >>> to make it absolutely clear that puc(4) is not the driver >>> for single port cards. The reason being that it's pointless. >>> >>> There are 2 things that puc(4) facilitates in: resource >>> assignment and interrupt handling. For single port cards >>> there's nothing to distribute nor is there any interrupt >>> sharing. In other words: there's no value that puc(4) adds. >>> As such, uart(4) and ppc(4) can attach directly to those >>> cards and puc(4) does not have to be involved. >>> >>> BTW: Traditionally puc(4) was used to attach even to single >>> port cards. With the puc(4) rewrite I changed that, because >>> it was really a mixed bag. Some single-port cards were known >>> to puc(4) others to uart(4)/sio(4) or ppc(4). That typically >>> leads to confusion given that puc(4) is (still) not in GENERIC. >>> (i.e. why is this UART attached, but that one isn't, they're >>> both single port?) >>> >>> So, please do not apply the patch and instead add the IDs to >>> sys/dev/uart/uart_bus_pci.c... >> >> This sounds fine to me. :) Navdeep, can you develop a patch for >> uart(4) >> instead and test that? > > BTW: I forgot to mention that puc(4) needs to back-off from this > particular card. That means that the catch-all that we have there > needs to be tweaked. > > So, the change to pucdata.c can still be made, but with a big > comment that states that the entry is added only to avoid puc(4) > from attaching to that particular 1-port card so that uart(4) > can claim it... OK, I'll keep this in mind and will modify the patch to have uart(4) claim the card and puc(4) ignore it. I'll post it once I've tested it. Regards, Navdeep > > -- > Marcel Moolenaar > xcllnt@mac.com > > > From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 22:48:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCF9106568B; Tue, 3 Mar 2009 22:48:25 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 662558FC1F; Tue, 3 Mar 2009 22:48:25 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by yx-out-2324.google.com with SMTP id 31so1676188yxl.13 for ; Tue, 03 Mar 2009 14:48:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=5Ycke98q+ruQIhgQAdnTEjkyA2S9RhjWIOgcDFKWhdM=; b=os8c5K0+X9s7VgsF07i7yKicFkHheRtNHCh9CgGFiSwCiHbEYzEBUobmNGNnQ4EHcz 2YHsDkaEQVM+gRQmW5B6wtfq7sUqv0ynrnY/54Zi00EN3vOkGi9yhwinIkpljYzxWS8a kCgkTZHnp7BK5JUut5Wt6DxshrXh0u4hJbmwg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ijGCfFh2nHu81CM8gKaiH1zzrMTKhJ48Qs4RqEsTeD1umXX+HQ0X2uGRU9W7RENF9T GwYDbXgVaEYIn5LTw56QwS37alCOhUfzvVvgwm/qMZOCo3u7jiCecbvGc06Fubk2rZXE hG2FlQpeRt0rYadOJQvhv+Z5IvWCgBXOmxYnA= MIME-Version: 1.0 Received: by 10.142.72.4 with SMTP id u4mr3826669wfa.216.1236120504312; Tue, 03 Mar 2009 14:48:24 -0800 (PST) In-Reply-To: <20090303195122.GA30421@insightsol.com> References: <200903030915.43037.jhb@freebsd.org> <200903031159.55299.jhb@freebsd.org> <9B775F97-1E5A-4E55-A2AE-26DC78CD08C0@mac.com> <20090303195122.GA30421@insightsol.com> Date: Tue, 3 Mar 2009 14:48:24 -0800 Message-ID: From: Navdeep Parhar To: Marcel Moolenaar Content-Type: multipart/mixed; boundary=001636ed65778f233d04643ebb99 Cc: FreeBSD Hackers Subject: Re: puc support for a generic card (patch attached) 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, 03 Mar 2009 22:48:27 -0000 --001636ed65778f233d04643ebb99 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Mar 3, 2009 at 11:51 AM, Navdeep Parhar wrote: > On Tue, Mar 03, 2009 at 09:04:32AM -0800, Marcel Moolenaar wrote: >> >> On Mar 3, 2009, at 8:59 AM, John Baldwin wrote: >> >>> On Tuesday 03 March 2009 11:48:42 am Marcel Moolenaar wrote: >>>> >>>> On Mar 3, 2009, at 6:15 AM, John Baldwin wrote: >>>> >>>>>> diff -r 025cb00d19d7 sys/dev/puc/puc.c >>>>>> --- a/sys/dev/puc/puc.c =A0 Sat Feb 28 12:42:37 2009 -0800 >>>>>> +++ b/sys/dev/puc/puc.c =A0 Mon Mar 02 12:21:07 2009 -0800 >>>>>> @@ -440,9 +440,6 @@ >>>>>> =A0 sc->sc_dev =3D dev; >>>>>> =A0 sc->sc_cfg =3D cfg; >>>>>> >>>>>> - /* We don't attach to single-port serial cards. */ >>>>>> - if (cfg->ports =3D=3D PUC_PORT_1S || cfg->ports =3D=3D PUC_PORT_1P= ) >>>>>> - =A0 =A0 =A0 =A0 return (EDOOFUS); >>>>> >>>>> FWIW, the traditional reason for this is that we made the sio/uart >>>>> or ppc >>>>> drivers claim single port devices directly and only use puc for >>>>> multiple-port >>>>> cards. =A0I'm not sure if that should still be the case or not. >>>>> Marcel, do you >>>>> have an opinion? >>>> >>>> Yes :-) >>>> >>>> I explicitly added the test with that particular error code >>>> to make it absolutely clear that puc(4) is not the driver >>>> for single port cards. The reason being that it's pointless. >>>> >>>> There are 2 things that puc(4) facilitates in: resource >>>> assignment and interrupt handling. For single port cards >>>> there's nothing to distribute nor is there any interrupt >>>> sharing. In other words: there's no value that puc(4) adds. >>>> As such, uart(4) and ppc(4) can attach directly to those >>>> cards and puc(4) does not have to be involved. >>>> >>>> BTW: Traditionally puc(4) was used to attach even to single >>>> port cards. With the puc(4) rewrite I changed that, because >>>> it was really a mixed bag. Some single-port cards were known >>>> to puc(4) others to uart(4)/sio(4) or ppc(4). That typically >>>> leads to confusion given that puc(4) is (still) not in GENERIC. >>>> (i.e. why is this UART attached, but that one isn't, they're >>>> both single port?) >>>> >>>> So, please do not apply the patch and instead add the IDs to >>>> sys/dev/uart/uart_bus_pci.c... >>> >>> This sounds fine to me. :) =A0Navdeep, can you develop a patch for >>> uart(4) >>> instead and test that? >> >> BTW: I forgot to mention that puc(4) needs to back-off from this >> particular card. That means that the catch-all that we have there >> needs to be tweaked. >> >> So, the change to pucdata.c can still be made, but with a big >> comment that states that the entry is added only to avoid puc(4) >> from attaching to that particular 1-port card so that uart(4) >> can claim it... > > OK, I'll keep this in mind and will modify the patch to have uart(4) > claim the card and puc(4) ignore it. =A0I'll post it once I've tested > it. Reworked patch attached. Works for me. Navdeep > > Regards, > Navdeep > >> >> -- >> Marcel Moolenaar >> xcllnt@mac.com >> >> >> > --001636ed65778f233d04643ebb99 Content-Type: application/octet-stream; name="puc.2.patch" Content-Disposition: attachment; filename="puc.2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_frv5w9ux0 ZGlmZiAtciAwMjVjYjAwZDE5ZDcgc3lzL2Rldi9wdWMvcHVjZGF0YS5jCi0tLSBhL3N5cy9kZXYv cHVjL3B1Y2RhdGEuYwlTYXQgRmViIDI4IDEyOjQyOjM3IDIwMDkgLTA4MDAKKysrIGIvc3lzL2Rl di9wdWMvcHVjZGF0YS5jCVR1ZSBNYXIgMDMgMTQ6MzI6MDEgMjAwOSAtMDgwMApAQCAtNzYxLDYg Kzc2MSwxOCBAQAogCSAgICBQVUNfUE9SVF8yUCwgMHgxMCwgOCwgMCwKIAl9LCAKIAorCS8qCisJ ICogVGhpcyBpcyBtb3JlIHNwZWNpZmljIHRoYW4gdGhlIGdlbmVyaWMgTk05ODM1IGVudHJ5IHRo YXQgZm9sbG93cywgYW5kCisJICogaXMgcGxhY2VkIGhlcmUgdG8gX3ByZXZlbnRfIHB1YyBmcm9t IGNsYWltaW5nIHRoaXMgc2luZ2xlIHBvcnQgY2FyZC4KKwkgKgorCSAqIHVhcnQoNCkgd2lsbCBj bGFpbSB0aGlzIGRldmljZS4KKwkgKi8KKwl7ICAgMHg5NzEwLCAweDk4MzUsIDB4MTAwMCwgMSwK KwkgICAgIk5ldE1vcyBOTTk4MzUgYmFzZWQgMS1wb3J0IHNlcmlhbCIsCisJICAgIERFRkFVTFRf UkNMSywKKwkgICAgUFVDX1BPUlRfMVMsIDB4MTAsIDQsIDAsCisJfSwKKwogCXsgICAweDk3MTAs IDB4OTgzNSwgMHhmZmZmLCAwLAogCSAgICAiTmV0TW9zIE5NOTgzNSBEdWFsIFVBUlQgYW5kIDEy ODQgUHJpbnRlciBwb3J0IiwKIAkgICAgREVGQVVMVF9SQ0xLLApkaWZmIC1yIDAyNWNiMDBkMTlk NyBzeXMvZGV2L3VhcnQvdWFydF9idXNfcGNpLmMKLS0tIGEvc3lzL2Rldi91YXJ0L3VhcnRfYnVz X3BjaS5jCVNhdCBGZWIgMjggMTI6NDI6MzcgMjAwOSAtMDgwMAorKysgYi9zeXMvZGV2L3VhcnQv dWFydF9idXNfcGNpLmMJVHVlIE1hciAwMyAxNDozMjowMSAyMDA5IC0wODAwCkBAIC0xMTAsNiAr MTEwLDcgQEAKIHsgMHgxNDE1LCAweDk1MGIsIDB4ZmZmZiwgMCwgIk94Zm9yZCBTZW1pY29uZHVj dG9yIE9YQ0I5NTAgQ2FyZGJ1cyAxNjk1MCBVQVJUIiwKIAkweDEwLCAxNjM4NDAwMCB9LAogeyAw eDE1MWYsIDB4MDAwMCwgMHhmZmZmLCAwLCAiVE9QSUMgU2VtaWNvbmR1Y3RvciBUUDU2MCA1Nmsg bW9kZW0iLCAweDEwIH0sCit7IDB4OTcxMCwgMHg5ODM1LCAweDEwMDAsIDEsICJOZXRNb3MgTk05 ODM1IFNlcmlhbCBQb3J0IiwgMHgxMCB9LAogeyAweGRlYWYsIDB4OTA1MSwgMHhmZmZmLCAwLCAi TWlkZGxlIERpZ2l0YWwgUEMgV2Vhc2VsIFNlcmlhbCBQb3J0IiwgMHgxMCB9LAogeyAweGZmZmYs IDAsIDB4ZmZmZiwgMCwgTlVMTCwgMCwgMH0KIH07Cg== --001636ed65778f233d04643ebb99-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 3 22:49:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 998D2106572F for ; Tue, 3 Mar 2009 22:49:43 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7088FC22 for ; Tue, 3 Mar 2009 22:49:43 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 3 Mar 2009 14:49:45 -0800 Message-ID: <06D5F9F6F655AD4C92E28B662F7F853E0275F4E1@seaxch09.desktop.isilon.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: knotes Thread-Index: AcmcUlkD0NOMtF8NR3OKHvKv7RLZFQ== From: "Matthew Fleming" To: Subject: knotes 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, 03 Mar 2009 22:49:44 -0000 I am trying to understand the knote system (on 6.1) and I am having some troubles. Specifically, I am confused by the uses of KN_DETACHED and EV_ONESHOT. >From what I can determine from the comments and code, knotes have a filterops member, kn_fop. This among other things has a callback to handle when a note is attached and detached. But e.g. in knlist_clear(), when knlist_remove_kq() removes a knote from the list, it sets KN_DETACHED but does not call the kn_fop->f_detach routine. Then, in the killkn case, KN_DETACHED is set (again). Otherwise, EV_ONESHOT is set, presumably so that kqueue_scan() will run on the knote. However, kqueue_scan() won't call kn_fop->f_detach either because KN_DETACHED is already set. It seems that in knlist_cleardel(), the killkn case should be calling kn_fop->f_detach before knote_drop(). It also seems that the !killkn case should not have KN_DETACHED set, which means that knlist_remove_kq() can't set it. Alternatively, knlist_remove_kq() should be calling kn_fop->f_detach itself before setting KN_DETACHED. But in that case I'm not sure I see why there needs to be a use of EV_ONESHOT. So am I reading this wrong, understanding it wrong, or is there a bug in the code? Thanks, matthew From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 4 12:35:39 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387931065678 for ; Wed, 4 Mar 2009 12:35:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id D00C88FC15 for ; Wed, 4 Mar 2009 12:35:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LeqK0-000CtG-H0; Wed, 04 Mar 2009 14:35:36 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n24CZO8o007853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Mar 2009 14:35:25 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n24CZOiu049469; Wed, 4 Mar 2009 14:35:24 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n24CZO6F049468; Wed, 4 Mar 2009 14:35:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Mar 2009 14:35:24 +0200 From: Kostik Belousov To: Matthew Fleming Message-ID: <20090304123524.GQ41617@deviant.kiev.zoral.com.ua> References: <06D5F9F6F655AD4C92E28B662F7F853E0275F4E1@seaxch09.desktop.isilon.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7Zo7F9byXsDd4al8" Content-Disposition: inline In-Reply-To: <06D5F9F6F655AD4C92E28B662F7F853E0275F4E1@seaxch09.desktop.isilon.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=unavailable version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LeqK0-000CtG-H0 98a262a57b3e4e8a40c407db1c4acce6 X-Terabit: YES Cc: freebsd-hackers@freebsd.org Subject: Re: knotes 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, 04 Mar 2009 12:35:39 -0000 --7Zo7F9byXsDd4al8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 03, 2009 at 02:49:45PM -0800, Matthew Fleming wrote: > I am trying to understand the knote system (on 6.1) and I am having some > troubles. >=20 > Specifically, I am confused by the uses of KN_DETACHED and EV_ONESHOT. > >From what I can determine from the comments and code, knotes have a > filterops member, kn_fop. This among other things has a callback to > handle when a note is attached and detached. >=20 > But e.g. in knlist_clear(), when knlist_remove_kq() removes a knote from > the list, it sets KN_DETACHED but does not call the kn_fop->f_detach > routine. Then, in the killkn case, KN_DETACHED is set (again). > Otherwise, EV_ONESHOT is set, presumably so that kqueue_scan() will run > on the knote. However, kqueue_scan() won't call kn_fop->f_detach either > because KN_DETACHED is already set. >=20 > It seems that in knlist_cleardel(), the killkn case should be calling > kn_fop->f_detach before knote_drop(). It also seems that the !killkn > case should not have KN_DETACHED set, which means that > knlist_remove_kq() can't set it. Alternatively, knlist_remove_kq() > should be calling kn_fop->f_detach itself before setting KN_DETACHED. > But in that case I'm not sure I see why there needs to be a use of > EV_ONESHOT. >=20 > So am I reading this wrong, understanding it wrong, or is there a bug in > the code? There are two pathes to each knote, one from the kqueue(2) syscall, and another is from the kernel subsystem. My understanding is that f_detach handler is intended to be called from the syscall path only. For instance, pipe destructor sys_pipe.c:pipeclose() calls knlist_clear, i.e. knlist_cleardel with killkn =3D=3D 0. The detach handler for the pipe removes the knote from the corresponding pipe' knlist. It seems that it is simply wrong to call pipe f_detach from knlist_clear(). --7Zo7F9byXsDd4al8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmudYsACgkQC3+MBN1Mb4hWlgCeKTI3BuN/Tn6n/EQNMzTYLRBh F/cAnA75cfsInrXNvFCpGLLkDGQRrF/C =igUn -----END PGP SIGNATURE----- --7Zo7F9byXsDd4al8-- From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 4 16:29:40 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602D11065673 for ; Wed, 4 Mar 2009 16:29:40 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from mail-ew0-f166.google.com (mail-ew0-f166.google.com [209.85.219.166]) by mx1.freebsd.org (Postfix) with ESMTP id E85B58FC2A for ; Wed, 4 Mar 2009 16:29:39 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by ewy10 with SMTP id 10so2433732ewy.43 for ; Wed, 04 Mar 2009 08:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=7z4igRC0bGkSyJXhoMfa6hqwrKyehlvDbvTj4OTMSk4=; b=h6A1RYkK2UZgOCY4jnOY87Qx4G6vc79IxaPvzjc5aYpNwa00QfnZl4+cGL64MO06lc Nfm2YzZNKYtkHWjS8oLXpPJalpO/I8MX/LQKg31nx/TSm3U52vYEv6XHMh5U/LQ31L1K MTPHshgJgCyvzYyJzrcsUrpG8sX/HAUGhCY08= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=P1lS9Dq49slb95FYPX7MpePyu/m153pIuWZUpcB+AE8fIcqibu0RS6sWuSsM9XfWCZ lMMXoH/i1bEVyNtmPuhVGD9dtOKklnRsXQKpYW5xyB07VB9JntTTNo8wSZ6fHjEfdZU4 XuC0Vg3uoAayhV3WvZqopaVxdWC2Zg61z8XGg= MIME-Version: 1.0 Received: by 10.210.11.17 with SMTP id 17mr15922ebk.96.1236184179012; Wed, 04 Mar 2009 08:29:39 -0800 (PST) Date: Wed, 4 Mar 2009 17:29:38 +0100 Message-ID: <671bb5fc0903040829m7c7ab79ay612868bb4260bd21@mail.gmail.com> From: Alexej Sokolov To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: uma_zone 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, 04 Mar 2009 16:29:40 -0000 how can I get the size and pointer of some allocated uma zone ? For example: zone_pack Thanx Alexej From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 4 17:42:54 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62CE71065675 for ; Wed, 4 Mar 2009 17:42:54 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 1D7F18FC08 for ; Wed, 4 Mar 2009 17:42:53 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: by yw-out-2324.google.com with SMTP id 2so1857004ywt.13 for ; Wed, 04 Mar 2009 09:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=YLSda1V6auyqsOQanU676aX/VZSs79TI+uydu/catjE=; b=mZju3t7Tk3/aPFXBjrEmZHa6RGy2rwUFlexokaaMBOsOdvZCSIkmmax5lY5udZ9YmV iXaG3pM75+TTFUgAJEeUMxkXvPf6n5K6TEpKcLilzIlEy62PHeALZBqyeTYDGAzIDXrQ usCrHYVbwyZbETb4X6cFYVSbHgpmAYqPJe//c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xm9Up618L9NQpjymU7u9u71bK1Gfps2dCyXFm84Wpwfk6oVG0TFK9vNr8XRrX0q8sQ fzPoL4Toeu4bo5fjSMLZ4d6jV0F6pOLQa6mujEn0E3K5XEnCvLY9n7pij3MgBOdBHWYq rC8dBgRUbVhUzN92AuEaM/W+thKZ7B6eoJKk4= MIME-Version: 1.0 Received: by 10.142.207.8 with SMTP id e8mr21241wfg.338.1236186629006; Wed, 04 Mar 2009 09:10:29 -0800 (PST) Date: Wed, 4 Mar 2009 11:10:28 -0600 Message-ID: From: Octavian Covalschi To: hackers@freebsd.org X-Mailman-Approved-At: Wed, 04 Mar 2009 18:18:13 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Spin down HDD after disk sync or before power off 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, 04 Mar 2009 17:42:54 -0000 Hi everyone. I'm looking a way to spin down HDD just right before power off. Why? Because currently when I call "shutdown -p now", HDD is powered off at it's full speed (7200.4) and as a result I hear a noise of stopping/spinning down of HDD, and _this_ concerns me as I'm afraid it can damage HDD. So basically I want to spin down hdd/put into sleep mode before system is powered off. I've tried to use rc.shutdown, but the sync of disks "wakes" HDD again... While searching for a solution, I noticed that reboot command/app _does_ spin down hdd right before it resets system power, I can hear how HDD is powered on after that... but halt (which is used by shutdown) doesn't do that... 2nd thing is I cannot find "halt.c" file, i wanted to take a look how it does it... although I'm up to date it's not not in /usr/src/sbin Thank you in advance From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 4 19:38:55 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03626106564A for ; Wed, 4 Mar 2009 19:38:55 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 717408FC0A for ; Wed, 4 Mar 2009 19:38:54 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n24JcqC3060154; Wed, 4 Mar 2009 20:38:53 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n24Jcqdr060153; Wed, 4 Mar 2009 20:38:52 +0100 (CET) (envelope-from olli) Date: Wed, 4 Mar 2009 20:38:52 +0100 (CET) Message-Id: <200903041938.n24Jcqdr060153@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, octavian.covalschi@gmail.com In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 04 Mar 2009 20:38:53 +0100 (CET) Cc: Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, octavian.covalschi@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 19:38:55 -0000 Octavian Covalschi wrote: > I'm looking a way to spin down HDD just right before power off. Why? > > Because currently when I call "shutdown -p now", HDD is powered off at it's > full speed (7200.4) and as a result > I hear a noise of stopping/spinning down of HDD, and _this_ concerns me as > I'm afraid it can damage HDD. You don't have to spin down a disk before powering it off. The noise you hear is probably caused by the "autopark" feature of the drive. It is harmless. > I've tried to use rc.shutdown, but the sync of disks "wakes" HDD again... Of course, upon halt or reboot the kernel will sync all file systems that have been mounted read+write. > While searching for a solution, I noticed that reboot command/app _does_ > spin down hdd right before it resets system power, > I can hear how HDD is powered on after that... No, the reboot command doesn't do that. It's probably your BIOS that resets the devices. > 2nd thing is I cannot find "halt.c" file, i wanted to take a look how it > does it... although I'm up to date it's not not in > /usr/src/sbin halt(8) is a hardlink to reboot(8). Look at src/sbin/reboot. By the way, the syncing does not happen in halt(8). At the time the kernel syncs the disks, no processes are running anymore, not even init(8). You can't do anything from userland at this point. If you want to insert a spin-down for your disks, you will have to modify the kernel. You have to install an event handler for "shutdown_post_sync". See the boot() function in src/sys/kern/kern_shutdown.c for details about the kernel's shutdown sequence. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Python is an experiment in how much freedom programmers need. Too much freedom and nobody can read another's code; too little and expressiveness is endangered." -- Guido van Rossum From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 4 20:15:51 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 666B81065670 for ; Wed, 4 Mar 2009 20:15:51 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 220758FC12 for ; Wed, 4 Mar 2009 20:15:51 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 8BF0D66662 for ; Wed, 4 Mar 2009 20:56:15 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 63A088DA5D; Wed, 4 Mar 2009 20:56:14 +0100 (CET) Date: Wed, 4 Mar 2009 20:56:14 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20090304195614.GA179@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903041938.n24Jcqdr060153@lurza.secnetix.de> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: Spin down HDD after disk sync or before power off 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, 04 Mar 2009 20:15:51 -0000 On Wed, Mar 04, 2009 at 08:38:52PM +0100, Oliver Fromme wrote: > Octavian Covalschi wrote: > > I'm looking a way to spin down HDD just right before power off. Why? > > > > Because currently when I call "shutdown -p now", HDD is powered off at it's > > full speed (7200.4) and as a result > > I hear a noise of stopping/spinning down of HDD, and _this_ concerns me as > > I'm afraid it can damage HDD. > > You don't have to spin down a disk before powering it off. > The noise you hear is probably caused by the "autopark" > feature of the drive. It is harmless. This is not true. Many hard disks don't like having to do an emergency shutdown as it affects the disk life time negatively. That's what happens if you poweroff the machine when the disks are still spinning. Joerg From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 4 21:17:54 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DD12106566C for ; Wed, 4 Mar 2009 21:17:54 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB848FC0A for ; Wed, 4 Mar 2009 21:17:54 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: by rv-out-0506.google.com with SMTP id f6so4002843rvb.43 for ; Wed, 04 Mar 2009 13:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=hgSXtNqcpkVCG1TGhFYcwfvftXOyabEkoYIkHV4IvSM=; b=GflNMJ+5B6HScjrek9F/HFacAO69ggiqidNQ9/hbm0jad3yJ8vWh5pUaEEpthf34Jh uQBlB1MZrS8uwxcpYPGcblqhtMUzo8vd5NzcmkKJHX8xGYnVCIBHUYzrbj8A5/hE6P38 FvENP1bV+bl8EVdbjjtt2MlY39dYXbalo3u6Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RpdjtByNcW0/nI6eVya/SSLZc4keQBkmKpiyjQ52ZLEgjdiwYnTvozsU5+8SEbZvWq tW94e/zt1yO6jC823fik7HbGfsLdMOkArgX7LWZAzlg1ZPgq0hzwE2FqZAU9npJyECGC FktLDi5fpw0sS77Kp22C4alYBOxLUPiBQ14I0= MIME-Version: 1.0 Received: by 10.142.177.5 with SMTP id z5mr115021wfe.90.1236199845341; Wed, 04 Mar 2009 12:50:45 -0800 (PST) In-Reply-To: <200903041938.n24Jcqdr060153@lurza.secnetix.de> References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> Date: Wed, 4 Mar 2009 14:50:45 -0600 Message-ID: From: Octavian Covalschi To: freebsd-hackers@freebsd.org, octavian.covalschi@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Spin down HDD after disk sync or before power off 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, 04 Mar 2009 21:17:54 -0000 Thank you for detailed and clear answer! On Wed, Mar 4, 2009 at 1:38 PM, Oliver Fromme wrote= : > Octavian Covalschi wrote: > > I'm looking a way to spin down HDD just right before power off. Why? > > > > Because currently when I call "shutdown -p now", HDD is powered off at > it's > > full speed (7200.4) and as a result > > I hear a noise of stopping/spinning down of HDD, and _this_ concerns m= e > as > > I'm afraid it can damage HDD. > > You don't have to spin down a disk before powering it off. > The noise you hear is probably caused by the "autopark" > feature of the drive. It is harmless. > > > I've tried to use rc.shutdown, but the sync of disks "wakes" HDD > again... > > Of course, upon halt or reboot the kernel will sync all > file systems that have been mounted read+write. > > > While searching for a solution, I noticed that reboot command/app _doe= s_ > > spin down hdd right before it resets system power, > > I can hear how HDD is powered on after that... > > No, the reboot command doesn't do that. It's probably your > BIOS that resets the devices. > > > 2nd thing is I cannot find "halt.c" file, i wanted to take a look how = it > > does it... although I'm up to date it's not not in > > /usr/src/sbin > > halt(8) is a hardlink to reboot(8). > Look at src/sbin/reboot. > > By the way, the syncing does not happen in halt(8). At the > time the kernel syncs the disks, no processes are running > anymore, not even init(8). You can't do anything from > userland at this point. If you want to insert a spin-down > for your disks, you will have to modify the kernel. You > have to install an event handler for "shutdown_post_sync". > See the boot() function in src/sys/kern/kern_shutdown.c > for details about the kernel's shutdown sequence. > > Best regards > Oliver > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. > Handelsregister: Registergericht Muenchen, HRA 74606, Gesch=E4ftsfuehrun= g: > secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M=FC= n- > chen, HRB 125758, Gesch=E4ftsf=FChrer: Maik Bachmann, Olaf Erb, Ralf Geb= hart > > FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd > > "Python is an experiment in how much freedom programmers need. > Too much freedom and nobody can read another's code; too little > and expressiveness is endangered." > -- Guido van Rossum > From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 00:52:34 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E04F81065672 for ; Thu, 5 Mar 2009 00:52:34 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 44BF98FC1B for ; Thu, 5 Mar 2009 00:52:33 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: (qmail invoked by alias); 05 Mar 2009 00:25:51 -0000 Received: from p54867F40.dip.t-dialin.net (EHLO impala.vnws.lan) [84.134.127.64] by mail.gmx.net (mp007) with SMTP; 05 Mar 2009 01:25:51 +0100 X-Authenticated: #19302822 X-Provags-ID: V01U2FsdGVkX1/BN1xLegLBi7guEhTUTjCYXxyWngGRIyIMVBm/EU R2+dh1wQqhZuF7 Message-ID: <49AF1C1B.3050604@gmx.net> Date: Thu, 05 Mar 2009 01:26:03 +0100 From: Daniel Thiele User-Agent: Thunderbird 2.0.0.19 (X11/20090124) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG, octavian.covalschi@gmail.com References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> In-Reply-To: <200903041938.n24Jcqdr060153@lurza.secnetix.de> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46 Cc: mav@FreeBSD.org Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 00:52:35 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Oliver Fromme wrote: | Octavian Covalschi wrote: | > I'm looking a way to spin down HDD just right before power off. Why? | > | > Because currently when I call "shutdown -p now", HDD is powered off at it's | > full speed (7200.4) and as a result | > I hear a noise of stopping/spinning down of HDD, and _this_ concerns me as | > I'm afraid it can damage HDD. | [...] | You can't do anything from | userland at this point. If you want to insert a spin-down | for your disks, you will have to modify the kernel. That is what I did and am still doing successfully since 2006. See http://lists.freebsd.org/pipermail/freebsd-acpi/2006-January/002375.html for my initial problem description and http://lists.freebsd.org/pipermail/freebsd-acpi/2006-February/002566.html for the "solution". Note that back then David Tolpin (dvd@davidashen.net) suggested to use " ... & (ATA_SUPPORT_APM|ATA_SUPPORT_STANDBY)" instead. I don't know if that is the way it should be done, but for me it worked across 3 hard disks and two notebooks so far. I am aware that 3 disks and 2 notebooks provide very limited test results, but maybe this work around solves your problem, too. It would still be great, though, if a proper solution for this could be permanently implemented into FreeBSD. That is, if the current behaviour really is not that healthy to hard drives, as Joerg suggested. Best regards, Daniel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmvHBUACgkQCOZKcWNoXg6LvQCgkT9GGMqa6M/t3hhN9cBM8Fee laQAoNPRvQkk4HkvQYjtVPRsxNZr3Lmn =InHj -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 07:58:52 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2724106564A for ; Thu, 5 Mar 2009 07:58:52 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4562E8FC13 for ; Thu, 5 Mar 2009 07:58:52 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n257womN088427; Thu, 5 Mar 2009 08:58:51 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n257wod8088426; Thu, 5 Mar 2009 08:58:50 +0100 (CET) (envelope-from olli) Date: Thu, 5 Mar 2009 08:58:50 +0100 (CET) Message-Id: <200903050758.n257wod8088426@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG In-Reply-To: <20090304195614.GA179@britannica.bec.de> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 05 Mar 2009 08:58:51 +0100 (CET) Cc: Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 07:58:53 -0000 Joerg Sonnenberger wrote: > Oliver Fromme wrote: > > Octavian Covalschi wrote: > > > I'm looking a way to spin down HDD just right before power off. Why? > > > > > > Because currently when I call "shutdown -p now", HDD is powered off at it's > > > full speed (7200.4) and as a result > > > I hear a noise of stopping/spinning down of HDD, and _this_ concerns me as > > > I'm afraid it can damage HDD. > > > > You don't have to spin down a disk before powering it off. > > The noise you hear is probably caused by the "autopark" > > feature of the drive. It is harmless. > > This is not true. Many hard disks don't like having to do an emergency > shutdown as it affects the disk life time negatively. That's what > happens if you poweroff the machine when the disks are still spinning. Can you point to any authoritative information (URL) about that claim, such as vendor specs, white paper or similar? Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd I suggested holding a "Python Object Oriented Programming Seminar", but the acronym was unpopular. -- Joseph Strout From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 09:55:32 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69B64106566B for ; Thu, 5 Mar 2009 09:55:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id D8CBE8FC19 for ; Thu, 5 Mar 2009 09:55:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPA id 236643684; Thu, 05 Mar 2009 10:55:29 +0200 Message-ID: <49AF9381.50709@FreeBSD.org> Date: Thu, 05 Mar 2009 10:55:29 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: Daniel Thiele References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <49AF1C1B.3050604@gmx.net> In-Reply-To: <49AF1C1B.3050604@gmx.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: octavian.covalschi@gmail.com, freebsd-hackers@FreeBSD.ORG Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 09:55:32 -0000 Daniel Thiele wrote: > Oliver Fromme wrote: > | Octavian Covalschi wrote: > | > I'm looking a way to spin down HDD just right before power off. Why? > | > > | > Because currently when I call "shutdown -p now", HDD is powered off > at it's > | > full speed (7200.4) and as a result > | > I hear a noise of stopping/spinning down of HDD, and _this_ > concerns me as > | > I'm afraid it can damage HDD. I am not sure that there is any problem. Last 10 years drives using electromagnetic head positioning which mechanically parts heads on power down. > | [...] > | You can't do anything from > | userland at this point. If you want to insert a spin-down > | for your disks, you will have to modify the kernel. > > That is what I did and am still doing successfully since 2006. > See > http://lists.freebsd.org/pipermail/freebsd-acpi/2006-January/002375.html > for my initial problem description and > http://lists.freebsd.org/pipermail/freebsd-acpi/2006-February/002566.html > for the "solution". Note that back then David Tolpin > (dvd@davidashen.net) suggested to use > " ... & (ATA_SUPPORT_APM|ATA_SUPPORT_STANDBY)" > instead. > > I don't know if that is the way it should be done, but for me it worked > across 3 hard disks and two notebooks so far. I am aware that 3 disks > and 2 notebooks provide very limited test results, but maybe this work > around solves your problem, too. > > It would still be great, though, if a proper solution for this could be > permanently implemented into FreeBSD. That is, if the current behaviour > really is not that healthy to hard drives, as Joerg suggested. I have thought about doing that on device detach to prepare drive to mechanical shocks in case of drive physical removing. But to work properly it requires some changes in ATA core to be made first to protect against submitting commands to already physically removed drive.. I can agree with doing that on suspend if ACPI does not doing it automatically. But on system shutdown having meaning of reboot, I think, commanding drive IDLE will just lead to additional mechanical and power stress for drive and PSU when drives will be spin-up in just a few seconds after spin-down. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 14:25:21 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D301065676 for ; Thu, 5 Mar 2009 14:25:21 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id AA5188FC12 for ; Thu, 5 Mar 2009 14:25:20 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 92C27666BC for ; Thu, 5 Mar 2009 15:25:18 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 10D1D8D827; Thu, 5 Mar 2009 15:25:17 +0100 (CET) Date: Thu, 5 Mar 2009 15:25:17 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20090305142517.GA2773@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20090304195614.GA179@britannica.bec.de> <200903050758.n257wod8088426@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903050758.n257wod8088426@lurza.secnetix.de> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 14:25:21 -0000 On Thu, Mar 05, 2009 at 08:58:50AM +0100, Oliver Fromme wrote: > > This is not true. Many hard disks don't like having to do an emergency > > shutdown as it affects the disk life time negatively. That's what > > happens if you poweroff the machine when the disks are still spinning. > > Can you point to any authoritative information (URL) about > that claim, such as vendor specs, white paper or similar? Not without digging. NetBSD PR 21531 had a reference, but that is dead nowadays. Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 14:43:33 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F286106564A for ; Thu, 5 Mar 2009 14:43:33 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by mx1.freebsd.org (Postfix) with ESMTP id 60C6B8FC16 for ; Thu, 5 Mar 2009 14:43:33 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: by wf-out-1314.google.com with SMTP id 27so4001308wfd.7 for ; Thu, 05 Mar 2009 06:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=0481YVRBan/2/V3LK+fFPEQ1kB9X1hfxSiKaLYZNYIA=; b=xqDR/2IpI6+ENAWtHtrfHrqhL1h5+5OzNehyV+pDbZE2YeiUzq7+lmWrPOVWQkgedU m1lnkzIekU+rqECmSn3+WXsqEBFjlVYBBpUsb3wbVAx0O5pquvHcFhwQbnB9kWbWKcpE BmE2EXCDLaCPzULNT1F1LYVqC77riorwIubJo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Kv/5oa/5qDPlxpjz3ey1l7D5VB0NdasYimruhXH/k8jR/nDa2H2kkcTrJ3ChDCEOIF 03kP8WhrcPzyKaswj/DqrGAYpeDfe+TA7Y+EuIzFTlb2L0pNNMqFfC6TfiUzS5IGWkF0 pBD7YPaPW4rkNBipLF28vxcypvNAq7LaB1C1w= MIME-Version: 1.0 Received: by 10.142.162.9 with SMTP id k9mr551654wfe.282.1236264212804; Thu, 05 Mar 2009 06:43:32 -0800 (PST) In-Reply-To: <20090305142517.GA2773@britannica.bec.de> References: <20090304195614.GA179@britannica.bec.de> <200903050758.n257wod8088426@lurza.secnetix.de> <20090305142517.GA2773@britannica.bec.de> Date: Thu, 5 Mar 2009 08:43:32 -0600 Message-ID: From: Octavian Covalschi To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 14:43:33 -0000 I think just HDD parking won't harm HDD, as my prev HDD was autoparking constantly (safe or powersave reasons). However in my case, I can hear a sound that is made by a vibration, it's like plates are slowing down and something is vibrating (arm?). It's kind the same with desktop PC, when your power is cut and your HDD are stopped too sudden. Thanks. On Thu, Mar 5, 2009 at 8:25 AM, Joerg Sonnenberger wrote: > On Thu, Mar 05, 2009 at 08:58:50AM +0100, Oliver Fromme wrote: > > > This is not true. Many hard disks don't like having to do an emergency > > > shutdown as it affects the disk life time negatively. That's what > > > happens if you poweroff the machine when the disks are still spinning. > > > > Can you point to any authoritative information (URL) about > > that claim, such as vendor specs, white paper or similar? > > Not without digging. NetBSD PR 21531 had a reference, but that is dead > nowadays. > > Joerg > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 19:18:11 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15120106566B for ; Thu, 5 Mar 2009 19:18:11 +0000 (UTC) (envelope-from abitos@abitos.org) Received: from mail-ew0-f166.google.com (mail-ew0-f166.google.com [209.85.219.166]) by mx1.freebsd.org (Postfix) with ESMTP id A1EE38FC13 for ; Thu, 5 Mar 2009 19:18:10 +0000 (UTC) (envelope-from abitos@abitos.org) Received: by ewy10 with SMTP id 10so47348ewy.43 for ; Thu, 05 Mar 2009 11:18:09 -0800 (PST) Received: by 10.216.47.71 with SMTP id s49mr995095web.72.1236279827182; Thu, 05 Mar 2009 11:03:47 -0800 (PST) Received: from ?192.168.101.161? (dslb-084-057-146-023.pools.arcor-ip.net [84.57.146.23]) by mx.google.com with ESMTPS id k7sm593147nfh.35.2009.03.05.11.03.46 (version=SSLv3 cipher=RC4-MD5); Thu, 05 Mar 2009 11:03:46 -0800 (PST) Message-ID: <49B02211.1010809@abitos.org> Date: Thu, 05 Mar 2009 20:03:45 +0100 From: Tobias Blersch User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Oliver Fromme References: <200903050758.n257wod8088426@lurza.secnetix.de> In-Reply-To: <200903050758.n257wod8088426@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 19:18:11 -0000 Oliver Fromme wrote: > > Joerg Sonnenberger wrote: > > This is not true. Many hard disks don't like having to do an emergency > > shutdown as it affects the disk life time negatively. That's what > > happens if you poweroff the machine when the disks are still spinning. > > Can you point to any authoritative information (URL) about > that claim, such as vendor specs, white paper or similar? http://www.hitachigst.com/tech/techlib.nsf/techdocs/28DCCB17E0EEC5A086256F4E006E2F5B Thats the specification for my notebooks hard drive. Section 6.6 Reliability gives data about how to power-off the disk. It also contains numbers of supported load/unloads and emergency unloads. Emergency unloads are invoked when the heads are still loaded and power fails. > The product supports a minimum of 600,000 normal load/unloads. > The drive supports a minimum of 20,000 emergency unloads. Tobias From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 19:49:11 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F1D1065670 for ; Thu, 5 Mar 2009 19:49:11 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id DAAE38FC18 for ; Thu, 5 Mar 2009 19:49:10 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n25JnAo24064; Thu, 5 Mar 2009 11:49:10 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n25JnAn28799; Thu, 5 Mar 2009 11:49:10 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Thu, 5 Mar 2009 11:49:10 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Tobias Blersch In-Reply-To: <49B02211.1010809@abitos.org> Message-ID: References: <200903050758.n257wod8088426@lurza.secnetix.de> <49B02211.1010809@abitos.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 19:49:11 -0000 On Thu, 5 Mar 2009, Tobias Blersch wrote: > Oliver Fromme wrote: >> > Joerg Sonnenberger wrote: >> > This is not true. Many hard disks don't like having to do an emergency >> > shutdown as it affects the disk life time negatively. That's what >> > happens if you poweroff the machine when the disks are still spinning. >> >> Can you point to any authoritative information (URL) about >> that claim, such as vendor specs, white paper or similar? > > http://www.hitachigst.com/tech/techlib.nsf/techdocs/28DCCB17E0EEC5A086256F4E006E2F5B > > Thats the specification for my notebooks hard drive. Section 6.6 > Reliability gives data about how to power-off the disk. It also contains > numbers of supported load/unloads and emergency unloads. Emergency > unloads are invoked when the heads are still loaded and power fails. Ok, I didn't know that. There are some drives that can unload the heads normally on power loss and don't need any special handling, and I was under the mistaken impression that this was universal. But the documentation suggests that this should be a BIOS function. When the kernel tries to poweroff the system, isn't that normally done via the BIOS (perhaps with ACPI/APM)? So maybe the BIOS is supposed to unload the heads (by sending a standby/sleep command) before cutting the power. This makes sense in some ways. Suppose the drive is attached to a weird ATA controller that FreeBSD doesn't know anything about. (Maybe it's used by the other system in a dual-boot setup.) There's no way that FreeBSD could send it a power-down sequence, but the BIOS could. Perhaps the OP's BIOS for some reason doesn't do this correctly. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 20:07:11 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 171371065670 for ; Thu, 5 Mar 2009 20:07:11 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id C70418FC1B for ; Thu, 5 Mar 2009 20:07:10 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 18C8066782 for ; Thu, 5 Mar 2009 21:07:08 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 8115F8D827; Thu, 5 Mar 2009 21:07:08 +0100 (CET) Date: Thu, 5 Mar 2009 21:07:07 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20090305200706.GA1790@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200903050758.n257wod8088426@lurza.secnetix.de> <49B02211.1010809@abitos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 20:07:11 -0000 On Thu, Mar 05, 2009 at 11:49:10AM -0800, Nate Eldredge wrote: > This makes sense in some ways. Suppose the drive is attached to a weird > ATA controller that FreeBSD doesn't know anything about. (Maybe it's > used by the other system in a dual-boot setup.) There's no way that > FreeBSD could send it a power-down sequence, but the BIOS could. As long as you can send a ATA command directly to the disk, you can spin it down. Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 20:37:21 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72498106564A for ; Thu, 5 Mar 2009 20:37:21 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id D2DF58FC0C for ; Thu, 5 Mar 2009 20:37:20 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: (qmail invoked by alias); 05 Mar 2009 20:37:18 -0000 Received: from p54867F40.dip.t-dialin.net (EHLO impala.vnws.lan) [84.134.127.64] by mail.gmx.net (mp024) with SMTP; 05 Mar 2009 21:37:18 +0100 X-Authenticated: #19302822 X-Provags-ID: V01U2FsdGVkX1/ANLZYdUbAgG34DrMWTEYVrZf/uYL5/OZoeqKhhg Q47di2y6liK9JI Message-ID: <49B037F6.3080001@gmx.net> Date: Thu, 05 Mar 2009 21:37:10 +0100 From: Daniel Thiele User-Agent: Thunderbird 2.0.0.19 (X11/20090124) MIME-Version: 1.0 To: Nate Eldredge References: <200903050758.n257wod8088426@lurza.secnetix.de> <49B02211.1010809@abitos.org> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46 Cc: Tobias Blersch , freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 20:37:21 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nate Eldredge wrote: | On Thu, 5 Mar 2009, Tobias Blersch wrote: | |> Oliver Fromme wrote: |>> > Joerg Sonnenberger wrote: |>> > This is not true. Many hard disks don't like having to do an emergency |>> > shutdown as it affects the disk life time negatively. That's what |>> > happens if you poweroff the machine when the disks are still spinning. |>> |>> Can you point to any authoritative information (URL) about |>> that claim, such as vendor specs, white paper or similar? |> |> http://www.hitachigst.com/tech/techlib.nsf/techdocs/28DCCB17E0EEC5A086256F4E006E2F5B |> |> |> Thats the specification for my notebooks hard drive. Section 6.6 |> Reliability gives data about how to power-off the disk. It also contains |> numbers of supported load/unloads and emergency unloads. Emergency |> unloads are invoked when the heads are still loaded and power fails. | | Ok, I didn't know that. There are some drives that can unload the heads | normally on power loss and don't need any special handling, and I was | under the mistaken impression that this was universal. | | But the documentation suggests that this should be a BIOS function. | When the kernel tries to poweroff the system, isn't that normally done | via the BIOS (perhaps with ACPI/APM)? So maybe the BIOS is supposed to | unload the heads (by sending a standby/sleep command) before cutting the | power. | Interestingly, the specification for the Hitachi drive in my notebook (a TravelStar 5K320) "Travelstar 5K320 Specification - HTSxxx models v1.0" avilable at http://www.hitachigst.com/tech/techlib.nsf/products/Travelstar_5K320 says in the paragraph "Required power-off sequence": "The required host system sequence for removing power from the drive is as follows [...]" whereas the TravelStar 5K100 specifications lists exactly the same steps but states that it is the BIOS' job to take care of executing them. | Perhaps the OP's BIOS for some reason doesn't do this correctly. I tried this on 2 different notebooks (2 ThinkPads though) and on both machines the disks make a very audible "click" sound when I "shutdown -p now" FreeBSD (6.x - CURRENT). With the patch I mentioned in my other reply, however, the disks seem to power-off more smoothly. On a Samsung X20 notebook I observed a comparable behavior. So I am not sure if it is just one badly implemented function in very few number of BIOSes or something that the operating system is supposed to take care of or should at least try to. Just for comparison: The original Windows XP on the Samsung X20 powers-off the disk in a "smooth" way, too. Unfortunately, I haven't had the time to test this with other operating systems. Best regards, Daniel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmwN/IACgkQCOZKcWNoXg6/fgCdFZkpy9Muz7BBw7VPqBVOcfr8 nPIAoLZ+S3aT19nW0jNhk9r41f/IC/rL =7wPG -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 21:22:00 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB9731065675 for ; Thu, 5 Mar 2009 21:22:00 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 22C968FC19 for ; Thu, 5 Mar 2009 21:21:59 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: (qmail invoked by alias); 05 Mar 2009 21:21:58 -0000 Received: from p54863FC3.dip.t-dialin.net (EHLO impala.vnws.lan) [84.134.63.195] by mail.gmx.net (mp070) with SMTP; 05 Mar 2009 22:21:58 +0100 X-Authenticated: #19302822 X-Provags-ID: V01U2FsdGVkX18POQ8ZTc0Ppd4eXTApy0OTFaoXgGUatWKc6MRTsH 3ypVDYBMkVDO/O Message-ID: <49B04281.2030406@gmx.net> Date: Thu, 05 Mar 2009 22:22:09 +0100 From: Daniel Thiele User-Agent: Thunderbird 2.0.0.19 (X11/20090124) MIME-Version: 1.0 To: Alexander Motin References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <49AF1C1B.3050604@gmx.net> <49AF9381.50709@FreeBSD.org> In-Reply-To: <49AF9381.50709@FreeBSD.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.44 Cc: octavian.covalschi@gmail.com, freebsd-hackers@FreeBSD.ORG Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 21:22:01 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander Motin wrote: | Daniel Thiele wrote: |> Oliver Fromme wrote: |> | Octavian Covalschi wrote: |> | > I'm looking a way to spin down HDD just right before power off. Why? |> | > |> | > Because currently when I call "shutdown -p now", HDD is powered off |> at it's |> | > full speed (7200.4) and as a result |> | > I hear a noise of stopping/spinning down of HDD, and _this_ |> concerns me as |> | > I'm afraid it can damage HDD. | | I am not sure that there is any problem. Last 10 years drives using | electromagnetic head positioning which mechanically parts heads on power | down. | |> | [...] |> | You can't do anything from |> | userland at this point. If you want to insert a spin-down |> | for your disks, you will have to modify the kernel. |> |> That is what I did and am still doing successfully since 2006. |> See |> http://lists.freebsd.org/pipermail/freebsd-acpi/2006-January/002375.html |> for my initial problem description and |> http://lists.freebsd.org/pipermail/freebsd-acpi/2006-February/002566.html |> for the "solution". Note that back then David Tolpin |> (dvd@davidashen.net) suggested to use |> " ... & (ATA_SUPPORT_APM|ATA_SUPPORT_STANDBY)" |> instead. |> |> I don't know if that is the way it should be done, but for me it worked |> across 3 hard disks and two notebooks so far. I am aware that 3 disks |> and 2 notebooks provide very limited test results, but maybe this work |> around solves your problem, too. |> |> It would still be great, though, if a proper solution for this could be |> permanently implemented into FreeBSD. That is, if the current behaviour |> really is not that healthy to hard drives, as Joerg suggested. | | I have thought about doing that on device detach to prepare drive to | mechanical shocks in case of drive physical removing. But to work | properly it requires some changes in ATA core to be made first to | protect against submitting commands to already physically removed drive.. | | I can agree with doing that on suspend if ACPI does not doing it | automatically. | | But on system shutdown having meaning of reboot, I think, commanding | drive IDLE will just lead to additional mechanical and power stress for | drive and PSU when drives will be spin-up in just a few seconds after | spin-down. | On reboot I do not observe the drives "click" noise, but the drive, too, gets powered off (without any patches). So I think that the ad-hoc fix I mentioned above does not introduce any additional stress to the drive on reboot or am I missing something? Looking at the numbers in the Hitachi drive specifications Tobias an I dug out from the Hitachi website (see replies in the Joerg Sonnenberger branch of this thread) the normal Load/Unload count is about 30 times higher than the Emergency Unload count. So even if an ATA_STANDBY_IMMEDIATE command may introduce additional Load/Unload stress on reboot it is not as bad as the stress causes by an Emergency Unload on shutdown. Of course this only applies if the "click" sound is really caused by an Emergency Unload. Is there a way to figure out? Maybe the S.M.A.R.T. feature records the two kinds of power-offs. Additionally, the Hitachi TravleStar 5K320 specification states that it is the host systems job to execute the drives proper power-off sequence. The TravelStar 5K100 specification, on the other hand, mentiones that the BIOS is responsible for that. Best regards, Daniel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmwQn8ACgkQCOZKcWNoXg41fACfYt9eYJkL6mYdKFXeiyo4pnZf OfoAnimxxjoKFxzuWx3/NHOvecRxjkhx =Cl7N -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 21:28:09 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01BEA106564A; Thu, 5 Mar 2009 21:28:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 90E4C8FC15; Thu, 5 Mar 2009 21:28:08 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 694991CD3E; Thu, 5 Mar 2009 22:28:07 +0100 (CET) Date: Thu, 5 Mar 2009 22:28:07 +0100 From: Ed Schouten To: Daniel Thiele Message-ID: <20090305212807.GC19161@hoeg.nl> References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <49AF1C1B.3050604@gmx.net> <49AF9381.50709@FreeBSD.org> <49B04281.2030406@gmx.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VjDX8kooLh5gCtu2" Content-Disposition: inline In-Reply-To: <49B04281.2030406@gmx.net> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: octavian.covalschi@gmail.com, freebsd-hackers@FreeBSD.ORG, Alexander Motin Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 21:28:09 -0000 --VjDX8kooLh5gCtu2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Daniel Thiele wrote: > Looking at the numbers in the Hitachi drive specifications Tobias an I > dug out from the Hitachi website (see replies in the Joerg Sonnenberger > branch of this thread) the normal Load/Unload count is about 30 times > higher than the Emergency Unload count. Have you also looked at the definition of `emergency unload'? Maybe this number doesn't actually refer to the number of unloads caused by power loss, but because they detect a very high amount of vibration. But I'm not a hard disk expert. --=20 Ed Schouten WWW: http://80386.nl/ --VjDX8kooLh5gCtu2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmwQ+cACgkQ52SDGA2eCwUI9ACfWCeMMEj+qQ4jjYovq9bt9i5i doQAn3elUAx08Rhbthx9p8z1oP01Tb/8 =UuTQ -----END PGP SIGNATURE----- --VjDX8kooLh5gCtu2-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 21:45:40 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9145B1065670 for ; Thu, 5 Mar 2009 21:45:40 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id DFFBE8FC1E for ; Thu, 5 Mar 2009 21:45:39 +0000 (UTC) (envelope-from dthiele@gmx.net) Received: (qmail invoked by alias); 05 Mar 2009 21:45:37 -0000 Received: from p54863FC3.dip.t-dialin.net (EHLO impala.vnws.lan) [84.134.63.195] by mail.gmx.net (mp065) with SMTP; 05 Mar 2009 22:45:37 +0100 X-Authenticated: #19302822 X-Provags-ID: V01U2FsdGVkX18Eclx8lMwE3jNnyDZc0HWH4ZFUo3fiWkkUJgQzts k64kVqwFbkXSSZ Message-ID: <49B0480A.3090909@gmx.net> Date: Thu, 05 Mar 2009 22:45:46 +0100 From: Daniel Thiele User-Agent: Thunderbird 2.0.0.19 (X11/20090124) MIME-Version: 1.0 To: Ed Schouten References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <49AF1C1B.3050604@gmx.net> <49AF9381.50709@FreeBSD.org> <49B04281.2030406@gmx.net> <20090305212807.GC19161@hoeg.nl> In-Reply-To: <20090305212807.GC19161@hoeg.nl> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.49 Cc: octavian.covalschi@gmail.com, freebsd-hackers@FreeBSD.ORG, Alexander Motin Subject: Re: Spin down HDD after disk sync or before power off 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, 05 Mar 2009 21:45:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ed Schouten wrote: | * Daniel Thiele wrote: |> Looking at the numbers in the Hitachi drive specifications Tobias an I |> dug out from the Hitachi website (see replies in the Joerg Sonnenberger |> branch of this thread) the normal Load/Unload count is about 30 times |> higher than the Emergency Unload count. | | Have you also looked at the definition of `emergency unload'? Maybe this | number doesn't actually refer to the number of unloads caused by power | loss, but because they detect a very high amount of vibration. But I'm | not a hard disk expert. | I am no disk expert either. The Hitachi TravelStar 5K320 specification says on this topic: 6.3.6.1 Emergency unload When hard disk drive power is interrupted while the heads are still loaded the micro code cannot operate and the normal 5 -volt power is unavailable to unload the heads. In this case, normal unload is not possible. The heads are unloaded by routing the back EMF of the spinning motor to the voice coil. The actuator velocity is greater than the normal case and the unload process is inherently less controllable without a normal seek current profile. Emergency unload is intended to be invoked in rare situations. Because this operation is inherently uncontrolled, it is more mechanically stressful than a normal unload. So it seems to be a kind of self protection mechanism that electro-mechanically tries to get the heads in a save position without firmware or microcode intervention in the case of a sudden power outage. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmwSAIACgkQCOZKcWNoXg7vlQCgzcSvK25cLBfemmsC7/xXmtcl /7kAmwQGM5xFVjZJW7YGqNWaWIXuXqcu =cPcz -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 06:54:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F89A106566B for ; Fri, 6 Mar 2009 06:54:07 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mx1.freebsd.org (Postfix) with SMTP id A4A1D8FC0A for ; Fri, 6 Mar 2009 06:54:06 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.198.227]) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKSbDIjgIftXnuRJ8HxL97c+aiRqbvaXjn@postini.com; Thu, 05 Mar 2009 22:54:06 PST Received: by rv-out-0506.google.com with SMTP id f6so334579rvb.11 for ; Thu, 05 Mar 2009 22:54:06 -0800 (PST) Received: by 10.140.163.12 with SMTP id l12mr1105664rve.41.1236320888896; Thu, 05 Mar 2009 22:28:08 -0800 (PST) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id g22sm1334329rvb.0.2009.03.05.22.28.08 (version=SSLv3 cipher=RC4-MD5); Thu, 05 Mar 2009 22:28:08 -0800 (PST) Date: Thu, 5 Mar 2009 22:27:50 -0800 (PST) From: Peter Steele To: freebsd-hackers@FreeBSD.ORG Message-ID: <17349951.141236320867093.JavaMail.HALO$@halo> In-Reply-To: <17738942.121236320716364.JavaMail.HALO$@halo> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: How to tear down a geom mirror? 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, 06 Mar 2009 06:54:07 -0000 I posed this question in the questions list but didn't get any traction. Hopefully someone here will have an answer. I've created a USB boot disk that is used to clone itself onto the systems hard drives, setting up mirrored file systems in the process. The main difficulty I'm having is reimaging a system with an existing OS whose drives are already configured in a mirror. I want of course to destroy the mirror and create a complete new one, but I can't find the right process to accomplish this reliably. I don't want to make any assumptions about what mirrors might exist already and I definitely don't want to do "gmirror load" before I get a chance to destroy any existing mirrors. What I am doing is to clean the drive using dd. For example, assume my target system has two drives ad1 and ad2. I issue the following commands: dd if=/dev/zero of=/dev/ad1 bs=512 count=79 dd if=/dev/zero of=/dev/ad2 bs=512 count=79 I'm assuming this is enough to destroy any existing mirrors on the target drives, and I do this before the geom driver is loaded. After this, I partition the drives as I want them, and then create the mirrored pair: gmirror load gmirror label -v -n -b round-robin gm0 ad1s1 gmirror insert gm0 ad2s1 This process works exactly as I want it if the system that is being reimaged has existing mirrors. However, if the drives were previously participating in a mirror, the label command fails, reporting the following error: gmirror: Can't store metadata on ad1s1: Operation not permitted. If I make sure the existing mirrors are torn down first doing an "remove" operation instead of using the dd method, this can solve the problem, but in some cases the mirror on the target system is in a suspect state and I've seen the "gmirror load" command hang idefiinitely. So I don't want to do a load command before I destroy the old mirrors, but I can't seem to find a way to reliably destroy the old mirrors. Can anyone suggest a way to do this? From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 10:32:39 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35B541065670 for ; Fri, 6 Mar 2009 10:32:39 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 71F8A8FC25 for ; Fri, 6 Mar 2009 10:32:37 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id HAA18502 for ; Fri, 6 Mar 2009 07:37:07 +0100 (CET) (envelope-from matthias.apitz@oclc.org) Received: from ppp-93-104-111-163.dynamic.mnet-online.de(93.104.111.163) by hunter.Sisis.de via smap (V2.1) id xma018498; Fri, 6 Mar 09 07:37:06 +0100 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id n266kX6E002791 for freebsd-hackers@freebsd.org; Fri, 6 Mar 2009 07:46:33 +0100 (CET) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Fri, 6 Mar 2009 07:46:33 +0100 From: Matthias Apitz To: freebsd-hackers@freebsd.org Message-ID: <20090306064633.GA2603@rebelion.Sisis.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-STABLE (i386) Subject: Fwd: associated to AP (WEP mode) && no IP addr via DHCP X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 10:32:39 -0000 Hello, I've posted the problem below to freebsd-mobile with zero (visible) effect; maybe someone from freebsd-hackers has at least an idea for me where to look into for further debugging; it should to stay that a simple stupid Nokia works in a Wifi zone, while FreeBSD does not :-) Thx for your time reading my problem matthias ----- Forwarded message from Matthias Apitz ----- From: Matthias Apitz Date: Thu, 5 Mar 2009 13:00:22 +0100 To: freebsd-mobile@freebsd.org Subject: associated to AP (WEP mode) && no IP addr via DHCP Hello, I'm going frequently to a Greek restaurant in my town to have dinner there or some red wine, and reading stuff; the owner of the restaurant has a Wifi zone and gave me, as its best client, the WEP-key to connect to Internet; the problem is that he does not have the admin password of the AP (some else configured it) and so I can't have a look into the config of the AP; my /etc/wpa_supplicant.conf for the AP is: # Restaurante Odyssey (2007-11-18) # network={ ssid="ConnectionPoint" scan_ssid=0 key_mgmt=NONE wep_tx_keyidx=0 wep_key0=xxxxxxxxxxxxxxxxxxxxxx } and the interface associates fine: # ifconfig ath0 ath0: flags=8843 metric 0 mtu 1500 ether 00:15:af:b2:ae:e6 inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps) status: associated ssid ConnectionPoint channel 11 (2462 Mhz 11g) bssid 00:01:e3:0e:97:99 authmode OPEN privacy ON deftxkey 1 wepkey 1:104-bit txpower 31.5 bmiss 7 scanvalid 60 protmode CTS burst roaming MANUAL but a DHCP request does not give me any IP addr; with # tcpdump -n -i ath0 it says: 19:01:01.603869 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:15:af:b2:ae:e6, length 300 19:01:02.036549 00:01:e3:0e:97:98 Unknown SSAP 0x2c > ff:ff:ff:ff:ff:ff Unknown DSAP 0xa2 Information, send seq 98, rcv seq 39, Flags [Command], length 36 19:01:02.958057 00:01:e3:0e:97:98 ProWay NM > ff:ff:ff:ff:ff:ff Unknown DSAP 0x5c Supervisory, Reject, rcv seq 8, Flags [Response], length 36 19:01:04.186892 00:01:e3:0e:97:98 Unknown SSAP 0xbe > ff:ff:ff:ff:ff:ff Unknown DSAP 0x44 Supervisory, Reject, rcv seq 39, Flags [Final], length 36 19:01:09.606218 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:15:af:b2:ae:e6, length 300 this situation is already for monthes and I gave up and always use UMTS if I want connect to Internet; until yesterday I was thinking in some kind of MAC addr filter in the AP, but .... yesterday I was there with a friend who has a Nokia mobile E51 device; I gave him the key, he associated like me and got in the next second IP, DNS and all was fine; what is that for a problem? it is not ath0 related because my other laptop with iwi0 does not get IP either; what can I provide as information to nail this down? Thx matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ _______________________________________________ freebsd-mobile@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-mobile To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org" ----- End forwarded message ----- -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 11:03:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C937D106566C for ; Fri, 6 Mar 2009 11:03:07 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 34DA98FC0A for ; Fri, 6 Mar 2009 11:03:06 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id n26B34N8023768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Mar 2009 12:03:04 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id n26B30Fj009494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Mar 2009 12:03:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id n26B30Jh066775; Fri, 6 Mar 2009 12:03:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id n26B30LO066774; Fri, 6 Mar 2009 12:03:00 +0100 (CET) (envelope-from ticso) Date: Fri, 6 Mar 2009 12:03:00 +0100 From: Bernd Walter To: Daniel Thiele Message-ID: <20090306110259.GG64172@cicely7.cicely.de> References: <200903050758.n257wod8088426@lurza.secnetix.de> <49B02211.1010809@abitos.org> <49B037F6.3080001@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49B037F6.3080001@gmx.net> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.045, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: Nate Eldredge , Tobias Blersch , freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 11:03:08 -0000 On Thu, Mar 05, 2009 at 09:37:10PM +0100, Daniel Thiele wrote: > > "Travelstar 5K320 Specification - HTSxxx models v1.0" avilable at > http://www.hitachigst.com/tech/techlib.nsf/products/Travelstar_5K320 > > says in the paragraph "Required power-off sequence": "The required host > system sequence for removing power from the drive is as follows [...]" > whereas the TravelStar 5K100 specifications lists exactly the same steps > but states that it is the BIOS' job to take care of executing them. > > | Perhaps the OP's BIOS for some reason doesn't do this correctly. The BIOS can only do this for known drives. There is always the chance that the kernel knows more drives than the BIOS, since usually people (including me) don't bother to tell the BIOS about more than the boot drive. Also FreeBSD had most recently used the ata controllers and it might be left in a mode, which can't be taken over by the BIOS. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 13:40:11 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BED641065673 for ; Fri, 6 Mar 2009 13:40:11 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 8A9D58FC24 for ; Fri, 6 Mar 2009 13:40:11 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: by rv-out-0506.google.com with SMTP id f6so496605rvb.43 for ; Fri, 06 Mar 2009 05:40:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=TOVd+oAZ7XHJjB8JqVcJBy5l4R56Z4842A/KNkw4Ot4=; b=E3r92Eu7pjA2P3rNLmryeEVoVMSWp0GL3ppNNxTfewLYDBJhM4ifJK4JoScOJ1hrXI dyu/q/ctA+TzoLHEAMUpW6gt4F0HLlYE9oyR1kcMjpkVjM5qbih/DMnSn05KpNel2EkA hECQoXGU8I2XsC/P2iJyQrqBvbYNYm4VqlORc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=hy1TbsVH0le3noZo1DsNqclz9Qyarvw07zvMXT7yICMx51+BRowh9A+u1XGYF2Xr82 w+MdgQDtwrHPR90L0dhUSiGCHszyXUyQFItz48p0+ZTxEdY7onkgy+Fyq3i9yPsiVRmX VVJkEi1NVw2AFEr9Vas9aTuR8YtRjhpIxJpmw= MIME-Version: 1.0 Received: by 10.143.29.17 with SMTP id g17mr1110380wfj.109.1236346811079; Fri, 06 Mar 2009 05:40:11 -0800 (PST) In-Reply-To: <49B04B19.5010100@gmx.net> References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <49AF1C1B.3050604@gmx.net> <49AF2CCA.2080706@gmx.net> <49B04563.3010002@gmx.net> <49B04B19.5010100@gmx.net> Date: Fri, 6 Mar 2009 07:40:11 -0600 Message-ID: From: Octavian Covalschi To: Daniel Thiele Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off 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, 06 Mar 2009 13:40:12 -0000 I played more with this, and got here so far: if (atadev->param.support.command1 & ATA_SUPPORT_STANDBY) { device_printf(dev, "Trying to spindown before poweroff.\n"); atadev->spindown = 1; ad_spindown((void *)dev); } else { device_printf(dev, "Cannot spindown before poweroff.\n"); } for some reason this check works on my laptop: if (atadev->param.support.command1 & ATA_SUPPORT_STANDBY) instead of if (atadev->param.support.command2 & ATA_SUPPORT_STANDBY) command1 vs command2 I'm using 7.1-STABLE... By the way, does anyone know why ad_shutdown is _not_ called at poweroff? Apparently it's called only at halt & reboot... Still looking... PS: I think last post didn't get to entire mail list, so trying to send it again. On Thu, Mar 5, 2009 at 3:58 PM, Daniel Thiele wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Octavian Covalschi wrote: > | I tried your patch 1st, but it didn't work for me for shutdown, although > I > | didn't try it with halt (I assumed they work the same). > | > | While I was looking into that, I've discovered "ad_spindown" function, > and > | tried to use it, and as I said, it works (for me at least), but only with > | halt. > | > > Hmm, here is what David Tolpin mentioned back in 2006 when he replied > (privately) to the fist fix I came up with: > > "Besides, I had to increase timeout in ata-queue for controlcmd " > > I am no kernel expert, so I am not quite sure how to incorporate his > suggestion, but may be this helps with your problem. > > I would be interested in your progress on this topic, for maybe some day > one of my machines will refuse to spin down the disk with the "simple" > patch, too. > > | > | On Thu, Mar 5, 2009 at 3:34 PM, Daniel Thiele wrote: > | > | Octavian Covalschi wrote: > | | OK. > | | > | | After several _kernel_ recompilations (by the end I found out that I > | can use > | | -DNO_KERNELCLEAN ) I've got some results. > | | > | | As i found out that ata-disk.c already has ad_spindown function, witch > I > | | tried to use, so after small changes I have: > | | > | | static void > | | ad_shutdown(device_t dev) > | | { > | | struct ata_device *atadev = device_get_softc(dev); > | | > | | if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) > | | ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); > | | > | | /* start */ > | | device_printf(dev, "Forced spindown\n"); > | | atadev->spindown = 1; > | | ad_spindown((void *)dev); > | | /* end */ > | | } > | | > | | But for some reason this works only with Halt or shutdown -h now, on > | | shutdown -p it even doesn't get inside ad_shutdown. > | | Well at least I have this :) > | | > | > | Does putting > | > | if (atadev->param.support.command2 & > (ATA_SUPPORT_APM|ATA_SUPPORT_STANDBY)) > | ~ ata_controlcmd(dev, ATA_STANDBY_IMMEDIATE, 0, 0, 0); > | > | directly into ad_shutdown() work? > | > | About your gmirror question: Unfortunately I never used gmirror together > | with the spindown-hack, but I (as a just layperson on this topic(!)) do > | not see any reason why this could cause a problem, since ad_shutdown() > | is most likely called after the disks got unmounted and after GEOM is > | done with them. > | > | Best regards, > | > | Daniel > |> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.11 (FreeBSD) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkmwSxUACgkQCOZKcWNoXg5QBQCcDADmK8RrIduZCAY6IksuHSNm > disAnRUjx6SgGUPghw+/X9uf5oFFdEs/ > =xmQO > -----END PGP SIGNATURE----- > From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 14:09:07 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79B731065675 for ; Fri, 6 Mar 2009 14:09:07 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5000::149]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0088FC32 for ; Fri, 6 Mar 2009 14:09:07 +0000 (UTC) (envelope-from jilles@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id D8E863F863; Fri, 6 Mar 2009 15:09:05 +0100 (CET) X-Spam-DCC: : X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on meestal-mk5.stack.nl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.3 X-Spam-Relay-Country: Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 7B87A3F85E; Fri, 6 Mar 2009 15:09:03 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id CC71C22892; Fri, 6 Mar 2009 15:08:50 +0100 (CET) Date: Fri, 6 Mar 2009 15:08:50 +0100 From: Jilles Tjoelker To: Peter Steele Message-ID: <20090306140850.GA62926@stack.nl> References: <17738942.121236320716364.JavaMail.HALO$@halo> <17349951.141236320867093.JavaMail.HALO$@halo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17349951.141236320867093.JavaMail.HALO$@halo> X-Operating-System: FreeBSD 7.1-PRERELEASE i386 User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to tear down a geom mirror? 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, 06 Mar 2009 14:09:07 -0000 On Thu, Mar 05, 2009 at 10:27:50PM -0800, Peter Steele wrote: > I've created a USB boot disk that is used to clone itself onto the > systems hard drives, setting up mirrored file systems in the process. > The main difficulty I'm having is reimaging a system with an existing > OS whose drives are already configured in a mirror. I want of course > to destroy the mirror and create a complete new one, but I can't find > the right process to accomplish this reliably. I don't want to make > any assumptions about what mirrors might exist already and I > definitely don't want to do "gmirror load" before I get a chance to > destroy any existing mirrors. > What I am doing is to clean the drive using dd. For example, assume my > target system has two drives ad1 and ad2. I issue the following > commands: > dd if=/dev/zero of=/dev/ad1 bs=512 count=79 > dd if=/dev/zero of=/dev/ad2 bs=512 count=79 gmirror and various other geom modules store their metadata on the last sector(s) of the drive, so you need to wipe that too. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 14:17:16 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F32E106566B for ; Fri, 6 Mar 2009 14:17:16 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id EBACD8FC13 for ; Fri, 6 Mar 2009 14:17:15 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LfarO-00009T-W0 for freebsd-hackers@freebsd.org; Fri, 06 Mar 2009 14:17:11 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 14:17:10 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 14:17:10 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 06 Mar 2009 15:16:41 +0100 Lines: 48 Message-ID: References: <17738942.121236320716364.JavaMail.HALO$@halo> <17349951.141236320867093.JavaMail.HALO$@halo> <20090306140850.GA62926@stack.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig258B2E1CE3BBC39D26872A0C" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.19 (X11/20090105) In-Reply-To: <20090306140850.GA62926@stack.nl> X-Enigmail-Version: 0.95.0 Sender: news Subject: Re: How to tear down a geom mirror? 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, 06 Mar 2009 14:17:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig258B2E1CE3BBC39D26872A0C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Jilles Tjoelker wrote: > On Thu, Mar 05, 2009 at 10:27:50PM -0800, Peter Steele wrote: >> I've created a USB boot disk that is used to clone itself onto the >> systems hard drives, setting up mirrored file systems in the process. >> The main difficulty I'm having is reimaging a system with an existing >> OS whose drives are already configured in a mirror. I want of course >> to destroy the mirror and create a complete new one, but I can't find >> the right process to accomplish this reliably. I don't want to make >> any assumptions about what mirrors might exist already and I >> definitely don't want to do "gmirror load" before I get a chance to >> destroy any existing mirrors.=20 >=20 >> What I am doing is to clean the drive using dd. For example, assume my= >> target system has two drives ad1 and ad2. I issue the following >> commands:=20 >=20 >> dd if=3D/dev/zero of=3D/dev/ad1 bs=3D512 count=3D79=20 >> dd if=3D/dev/zero of=3D/dev/ad2 bs=3D512 count=3D79=20 >=20 > gmirror and various other geom modules store their metadata on the last= > sector(s) of the drive, so you need to wipe that too. Or simply use the "clean" command, for example "gmirror clean" (also supported in other GEOM classes). --------------enig258B2E1CE3BBC39D26872A0C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJsTBQldnAQVacBcgRAqzXAJ92e0UPnKhK6chYE7fCgfdOWJ5/cwCgjuF5 7bCmyILdvVH/oI4rDmval88= =hz3t -----END PGP SIGNATURE----- --------------enig258B2E1CE3BBC39D26872A0C-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 14:21:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58C84106566C for ; Fri, 6 Mar 2009 14:21:07 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og116.obsmtp.com (exprod7og116.obsmtp.com [64.18.2.219]) by mx1.freebsd.org (Postfix) with SMTP id EF62D8FC20 for ; Fri, 6 Mar 2009 14:21:06 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.198.250]) by exprod7ob116.postini.com ([64.18.6.12]) with SMTP ID DSNKSbExUfx7XNqyqvNmlFOHuSbU6EjgkAuk@postini.com; Fri, 06 Mar 2009 06:21:07 PST Received: by rv-out-0708.google.com with SMTP id c5so620397rvf.16 for ; Fri, 06 Mar 2009 06:21:05 -0800 (PST) Received: by 10.141.53.4 with SMTP id f4mr1318072rvk.35.1236349265474; Fri, 06 Mar 2009 06:21:05 -0800 (PST) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id k37sm3133215rvb.1.2009.03.06.06.21.04 (version=SSLv3 cipher=RC4-MD5); Fri, 06 Mar 2009 06:21:04 -0800 (PST) Date: Fri, 6 Mar 2009 06:20:46 -0800 (PST) From: Peter Steele To: Ivan Voras Message-ID: <22091257.221236349245872.JavaMail.HALO$@halo> In-Reply-To: <26247649.201236349212696.JavaMail.HALO$@halo> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: How to tear down a geom mirror? 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, 06 Mar 2009 14:21:07 -0000 > Or simply use the "clean" command, for example "gmirror clean" (also >supported in other GEOM classes). Can I do a gmirror clean without first doing a gmirror load? That's what I want to avoid since it can hang if the mirror is is a bad state. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 14:27:12 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B5211065674 for ; Fri, 6 Mar 2009 14:27:12 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og116.obsmtp.com (exprod7og116.obsmtp.com [64.18.2.219]) by mx1.freebsd.org (Postfix) with SMTP id 0C78F8FC1D for ; Fri, 6 Mar 2009 14:27:11 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.198.245]) by exprod7ob116.postini.com ([64.18.6.12]) with SMTP ID DSNKSbEyv+4ZiKGdYyeh1ezn3h1TxGin9HRQ@postini.com; Fri, 06 Mar 2009 06:27:12 PST Received: by rv-out-0708.google.com with SMTP id f25so615956rvb.6 for ; Fri, 06 Mar 2009 06:27:11 -0800 (PST) Received: by 10.115.91.2 with SMTP id t2mr1539264wal.224.1236349631414; Fri, 06 Mar 2009 06:27:11 -0800 (PST) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id k37sm3138417rvb.1.2009.03.06.06.27.10 (version=SSLv3 cipher=RC4-MD5); Fri, 06 Mar 2009 06:27:10 -0800 (PST) Date: Fri, 6 Mar 2009 06:26:52 -0800 (PST) From: Peter Steele To: Jilles Tjoelker Message-ID: <4159914.261236349612218.JavaMail.HALO$@halo> In-Reply-To: <20090306140850.GA62926@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to tear down a geom mirror? 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, 06 Mar 2009 14:27:12 -0000 >gmirror and various other geom modules store their metadata on the last >sector(s) of the drive, so you need to wipe that too. In our case the systems we are using aren't mirroring the whole drive, just certain slices. Some systems have a single slice mirrored (plus an unmirrored slice), and others have two slices mirrored (plus a third unmirrored slice). I need a way to destroy the existing mirrors, without doing a gmirror load, and ultimately without making any assumptions about the number or condition of mirrored slices on the drives I am about to install a new OS onto. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 14:59:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43F281065672 for ; Fri, 6 Mar 2009 14:59:02 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id EBECD8FC20 for ; Fri, 6 Mar 2009 14:59:01 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LfbVt-0001r7-EK for freebsd-hackers@freebsd.org; Fri, 06 Mar 2009 14:59:01 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 14:59:01 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 14:59:01 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 06 Mar 2009 15:58:39 +0100 Lines: 34 Message-ID: References: <26247649.201236349212696.JavaMail.HALO$@halo> <22091257.221236349245872.JavaMail.HALO$@halo> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE3A3AE78CC6194876717CDA2" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.19 (X11/20090105) In-Reply-To: <22091257.221236349245872.JavaMail.HALO$@halo> X-Enigmail-Version: 0.95.0 Sender: news Subject: Re: How to tear down a geom mirror? 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, 06 Mar 2009 14:59:03 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE3A3AE78CC6194876717CDA2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Peter Steele wrote: >> Or simply use the "clean" command, for example "gmirror clean" (also=20 >> supported in other GEOM classes).=20 >=20 > Can I do a gmirror clean without first doing a gmirror load? That's wha= t I want to avoid since it can hang if the mirror is is a bad state.=20 Sorry, the actual command is "clear", not "clean". Yes. The "clear" commands usually just zero-out the last sector of the underlying provider (doesn't matter if it's a drive, slice or something altogether different) so you don't have to do it manually. --------------enigE3A3AE78CC6194876717CDA2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJsTogldnAQVacBcgRAsu6AJ4w2nm9HRgoItNcdv1/AKTUr6zMtwCg2kx+ 5vv6hcrwWqBdABwZ0JKkAHs= =y9cz -----END PGP SIGNATURE----- --------------enigE3A3AE78CC6194876717CDA2-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 15:26:00 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 577F01065674 for ; Fri, 6 Mar 2009 15:26:00 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og101.obsmtp.com (exprod7og101.obsmtp.com [64.18.2.155]) by mx1.freebsd.org (Postfix) with SMTP id 123E48FC08 for ; Fri, 6 Mar 2009 15:26:00 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.198.242]) by exprod7ob101.postini.com ([64.18.6.12]) with SMTP ID DSNKSbFAh7OqOqFmROChpPnuRyIpp+HsDh5M@postini.com; Fri, 06 Mar 2009 07:26:00 PST Received: by rv-out-0708.google.com with SMTP id l33so489177rvb.0 for ; Fri, 06 Mar 2009 07:25:57 -0800 (PST) Received: by 10.140.142.15 with SMTP id p15mr1330648rvd.177.1236353157618; Fri, 06 Mar 2009 07:25:57 -0800 (PST) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id b39sm2011609rvf.9.2009.03.06.07.25.56 (version=SSLv3 cipher=RC4-MD5); Fri, 06 Mar 2009 07:25:57 -0800 (PST) Date: Fri, 6 Mar 2009 07:25:38 -0800 (PST) From: Peter Steele To: freebsd-hackers@freebsd.org Message-ID: <27198392.361236353137467.JavaMail.HALO$@halo> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: How to tear down a geom mirror? 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, 06 Mar 2009 15:26:01 -0000 >Yes. The "clear" commands usually just zero-out the last sector of the >underlying provider (doesn't matter if it's a drive, slice or something >altogether different) so you don't have to do it manually. So, as a generic solution then I could just iterate through all slices of all drives and run "gmirror clear" on each, and run dd to clear the first sectors. What btw is in these first sectors? I use this command because I saw it being done in one of the gmirror tutorials. I understand what the gmirror clear command does, but what is the dd command clearing? From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 16:13:40 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB66106566C for ; Fri, 6 Mar 2009 16:13:40 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from mail-fx0-f158.google.com (mail-fx0-f158.google.com [209.85.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 0E1688FC15 for ; Fri, 6 Mar 2009 16:13:39 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by fxm2 with SMTP id 2so409695fxm.43 for ; Fri, 06 Mar 2009 08:13:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=ixptLAnslINwM+NO2jJA1+f9J6uE6bpFVcP3uTpuA+I=; b=tZCzBWZUSlG8vxzylC9rWDkDwHf3XddPofS59UzptpGcFhK9PajAl+mZ4ZR+KAm7Om lHQy9emOfJdWEqW/9gqSKkl5hIrfy/0ofhyoN433rIRdbgc52AtV7vSMa9pciODdXz7Y OTAODC6DhZRopyhsTcYaAM8a2YUCqg+28vV4g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Aie0ShFX1ZBPvtBVVhOgOoPHmpbw6/Qtob7/bwbP3hvkO6/mFTJ8cSeG/YrBFNHY/7 0HAoogQnZj97owMi9kKtIOPq2rtwial6h7Kgpjpyznx5uoqwTTr0PTUO9Wb1qVXwtqbm 5b0dsxZkFfRpELrrqLiDEkeJTBukgnSn74aFI= MIME-Version: 1.0 Received: by 10.86.76.20 with SMTP id y20mr1986341fga.75.1236356018939; Fri, 06 Mar 2009 08:13:38 -0800 (PST) Date: Fri, 6 Mar 2009 17:13:38 +0100 Message-ID: <671bb5fc0903060813s284673e2t4d3c77b0ed6abc54@mail.gmail.com> From: Alexej Sokolov To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: wrong data in remapped buffer 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, 06 Mar 2009 16:13:40 -0000 Hello, I try to MALLOC a buffer in kern, then remap it with vm_map_find(), to space of user process. Some times the remapped buffer in user space contain incorrect data. What could be a reason of this problem and how to solve it ? Thanx, Alexej P.S. Whole code of remapping function: http://pastebin.com/m78da0b37 From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 19:15:13 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83C421065672 for ; Fri, 6 Mar 2009 19:15:13 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id DCCBF8FC14 for ; Fri, 6 Mar 2009 19:15:12 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n26JFBdD071275; Fri, 6 Mar 2009 20:15:11 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n26JFBre071274; Fri, 6 Mar 2009 20:15:11 +0100 (CET) (envelope-from olli) Date: Fri, 6 Mar 2009 20:15:11 +0100 (CET) Message-Id: <200903061915.n26JFBre071274@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, psteele@maxiscale.com In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 06 Mar 2009 20:15:11 +0100 (CET) Cc: Subject: Re: How to tear down a geom mirror? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, psteele@maxiscale.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 19:15:13 -0000 Peter Steele wrote: > > Yes. The "clear" commands usually just zero-out the last sector of the > > underlying provider (doesn't matter if it's a drive, slice or something > > altogether different) so you don't have to do it manually. > > So, as a generic solution then I could just iterate through all > slices of all drives and run "gmirror clear" on each, and run dd > to clear the first sectors. What btw is in these first sectors? I > use this command because I saw it being done in one of the gmirror > tutorials. I understand what the gmirror clear command does, but what > is the dd command clearing? It clears the MBR (slice table) and GPT or disklabel (partition table), if any. Depending on how many sectors you clear, it will also destroy the beginning the file system, e.g. the first UFS superblock. By the way, if you cannot use "gmirror clear" for any reason, you can also easily clear the last sector on any devices using the information from diskinfo. For example: DEV=/dev/ad0s1a set -- $(diskinfo $DEV) BLOCKSIZE=$2 MEDIASIZE=$4 LASTSEC=$(( $MEDIASIZE - 1 )) dd if=/dev/zero of=$DEV bs=$BLOCKSIZE seek=$(( $MEDIASIZE - 1 )) count=1 That's pretty much what "gmirror clear /dev/ad0s1a" does. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs." -- Robert Firth From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 19:59:36 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A129106566B for ; Fri, 6 Mar 2009 19:59:36 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og107.obsmtp.com (exprod7og107.obsmtp.com [64.18.2.167]) by mx1.freebsd.org (Postfix) with SMTP id AAF638FC14; Fri, 6 Mar 2009 19:59:34 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.198.250]) by exprod7ob107.postini.com ([64.18.6.12]) with SMTP ID DSNKSbGApseFgbRuOb1oogsHd+fLma0LVwcn@postini.com; Fri, 06 Mar 2009 11:59:35 PST Received: by rv-out-0708.google.com with SMTP id k29so557084rvb.26 for ; Fri, 06 Mar 2009 11:59:34 -0800 (PST) Received: by 10.141.2.18 with SMTP id e18mr1448755rvi.142.1236369574338; Fri, 06 Mar 2009 11:59:34 -0800 (PST) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id g14sm356322rvb.0.2009.03.06.11.59.33 (version=SSLv3 cipher=RC4-MD5); Fri, 06 Mar 2009 11:59:33 -0800 (PST) Date: Fri, 6 Mar 2009 11:59:14 -0800 (PST) From: Peter Steele To: freebsd-hackers@FreeBSD.ORG, psteele@maxiscale.com Message-ID: <21286486.691236369552766.JavaMail.HALO$@halo> In-Reply-To: <200903061915.n26JFBre071274@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to tear down a geom mirror? 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, 06 Mar 2009 19:59:36 -0000 Okay, thanks everyone for their feedback. I think I have a workable solutio= n now.=20 Peter=20 ----- Original Message -----=20 From: "Oliver Fromme" =20 To: freebsd-hackers@FreeBSD.ORG, psteele@maxiscale.com=20 Sent: Friday, March 6, 2009 11:15:11 AM GMT -08:00 US/Canada Pacific=20 Subject: Re: How to tear down a geom mirror?=20 Peter Steele wrote:=20 > > Yes. The "clear" commands usually just zero-out the last sector of the= =20 > > underlying provider (doesn't matter if it's a drive, slice or something= =20 > > altogether different) so you don't have to do it manually.=20 >=20 > So, as a generic solution then I could just iterate through all=20 > slices of all drives and run "gmirror clear" on each, and run dd=20 > to clear the first sectors. What btw is in these first sectors? I=20 > use this command because I saw it being done in one of the gmirror=20 > tutorials. I understand what the gmirror clear command does, but what=20 > is the dd command clearing?=20 It clears the MBR (slice table) and GPT or disklabel=20 (partition table), if any. Depending on how many=20 sectors you clear, it will also destroy the beginning=20 the file system, e.g. the first UFS superblock.=20 By the way, if you cannot use "gmirror clear" for any=20 reason, you can also easily clear the last sector on=20 any devices using the information from diskinfo.=20 For example:=20 DEV=3D/dev/ad0s1a=20 set -- $(diskinfo $DEV)=20 BLOCKSIZE=3D$2=20 MEDIASIZE=3D$4=20 LASTSEC=3D$(( $MEDIASIZE - 1 ))=20 dd if=3D/dev/zero of=3D$DEV bs=3D$BLOCKSIZE seek=3D$(( $MEDIASIZE - 1 )) co= unt=3D1=20 That's pretty much what "gmirror clear /dev/ad0s1a" does.=20 Best regards=20 Oliver=20 --=20 Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.= =20 Handelsregister: Registergericht Muenchen, HRA 74606, Gesch=C3=A4ftsfuehrun= g:=20 secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M=C3= =BCn-=20 chen, HRB 125758, Gesch=C3=A4ftsf=C3=BChrer: Maik Bachmann, Olaf Erb, Ralf = Gebhart=20 FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd=20 "One of the main causes of the fall of the Roman Empire was that,=20 lacking zero, they had no way to indicate successful termination=20 of their C programs."=20 -- Robert Firth=20 From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 20:57:39 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29B9A106564A for ; Fri, 6 Mar 2009 20:57:39 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 94BF08FC14 for ; Fri, 6 Mar 2009 20:57:38 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 50320 invoked by uid 2001); 6 Mar 2009 20:30:57 -0000 Date: Fri, 6 Mar 2009 14:30:57 -0600 From: "Rick C. Petty" To: freebsd-hackers@freebsd.org Message-ID: <20090306203057.GA49994@keira.kiwi-computer.com> References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <20090304195614.GA179@britannica.bec.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090304195614.GA179@britannica.bec.de> User-Agent: Mutt/1.4.2.3i Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 20:57:39 -0000 On Wed, Mar 04, 2009 at 08:56:14PM +0100, Joerg Sonnenberger wrote: > On Wed, Mar 04, 2009 at 08:38:52PM +0100, Oliver Fromme wrote: > > Octavian Covalschi wrote: > > > I'm looking a way to spin down HDD just right before power off. Why? > > > > > > Because currently when I call "shutdown -p now", HDD is powered off at it's > > > full speed (7200.4) and as a result > > > I hear a noise of stopping/spinning down of HDD, and _this_ concerns me as > > > I'm afraid it can damage HDD. > > > > You don't have to spin down a disk before powering it off. > > The noise you hear is probably caused by the "autopark" > > feature of the drive. It is harmless. > > This is not true. Many hard disks don't like having to do an emergency > shutdown as it affects the disk life time negatively. That's what > happens if you poweroff the machine when the disks are still spinning. I believe you are incorrect. Most hard drives do an "autopark" of the head into the landing zone (which is near the spindle) when power is lost. My understanding is that because it is spinning so fast, the heads can fly for quite a long time so the HDD has enough time to autopark and such an operation does not consume much power. Thus the operation can be performed with a little capacitance or by using some of the mechanical energy in the spindle. If drives did not auto, there would be orders of magnitude more failures due to head crashes. The heads absolutely have to be retracted into the landing zone if the spindle speed is too low or the drive will fail. What's actually bad for the drives is the actual spinup and spindowns, which require the head to sit in the very bumpy landing zone until the drive reaches optimal spindle speed and thus enough airflow to safely move the heads around the platter without contact. Strangely, atacontrol(8) has a command for spindown (which is inherently bad for drives yet still a reasonable feature) but there is no command for spinup. I wish there was a spinup command because I've seen drives that won't do a spinup until they receive a special ATA command. I was never able to find any docs, so if anyone knows the command I'd be willing to write a patch against atacontrol! -- Rick C. Petty From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 21:30:15 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7429B106566C for ; Fri, 6 Mar 2009 21:30:15 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by mx1.freebsd.org (Postfix) with ESMTP id 43D988FC18 for ; Fri, 6 Mar 2009 21:30:15 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: by wf-out-1314.google.com with SMTP id 27so668314wfd.7 for ; Fri, 06 Mar 2009 13:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=8XTzKf6rpyu7v6/Ja693MhmLuv9gy4UD3Sgp6fUjAec=; b=Xxq2Q3I+MCFPCFo48+JJferXjPaqQ1JD1aEiMihYKqzYumJKqbeCg/T54eiY5BLK9c cb3YbZbJRkFHSfStIlqUf85D3QgpwnOIaf+IzuyWlJSe01z64+bFSweTn5oG4kgUz383 bQX9YsMV1FI2DVctQ/lTxvIv9o0VcSVE5oK4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vmoHa03rphdFOmzHpdp2qcxkgjyR/rkGx4fY298ZI+wiJdUHiD6d12B9DXa5VhJpPZ ih68w2k2zJIHPwEQf8LeLRmY81P94jXtwlJuBbAWmF0z6tKzsCDMcjtKtXPDoVIAclnU F2Q7/K7ohXml7WxZet/uXLePBpydkWWyjH720= MIME-Version: 1.0 Received: by 10.142.155.9 with SMTP id c9mr1271729wfe.70.1236375014873; Fri, 06 Mar 2009 13:30:14 -0800 (PST) In-Reply-To: <20090306203057.GA49994@keira.kiwi-computer.com> References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <20090304195614.GA179@britannica.bec.de> <20090306203057.GA49994@keira.kiwi-computer.com> Date: Fri, 6 Mar 2009 15:30:14 -0600 Message-ID: From: Octavian Covalschi To: rick-freebsd2008@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off 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, 06 Mar 2009 21:30:15 -0000 Why is spinning down is bad for HDD ? I believe it's better to spindown a drive, instead of cutting power too sudden. On Fri, Mar 6, 2009 at 2:30 PM, Rick C. Petty < rick-freebsd2008@kiwi-computer.com> wrote: > On Wed, Mar 04, 2009 at 08:56:14PM +0100, Joerg Sonnenberger wrote: > > On Wed, Mar 04, 2009 at 08:38:52PM +0100, Oliver Fromme wrote: > > > Octavian Covalschi wrote: > > > > I'm looking a way to spin down HDD just right before power off. Why? > > > > > > > > Because currently when I call "shutdown -p now", HDD is powered off > at it's > > > > full speed (7200.4) and as a result > > > > I hear a noise of stopping/spinning down of HDD, and _this_ concerns > me as > > > > I'm afraid it can damage HDD. > > > > > > You don't have to spin down a disk before powering it off. > > > The noise you hear is probably caused by the "autopark" > > > feature of the drive. It is harmless. > > > > This is not true. Many hard disks don't like having to do an emergency > > shutdown as it affects the disk life time negatively. That's what > > happens if you poweroff the machine when the disks are still spinning. > > I believe you are incorrect. Most hard drives do an "autopark" of the head > into the landing zone (which is near the spindle) when power is lost. My > understanding is that because it is spinning so fast, the heads can fly for > quite a long time so the HDD has enough time to autopark and such an > operation does not consume much power. Thus the operation can be performed > with a little capacitance or by using some of the mechanical energy in the > spindle. > > If drives did not auto, there would be orders of magnitude more failures > due to head crashes. The heads absolutely have to be retracted into the > landing zone if the spindle speed is too low or the drive will fail. > > What's actually bad for the drives is the actual spinup and spindowns, > which require the head to sit in the very bumpy landing zone until the > drive reaches optimal spindle speed and thus enough airflow to safely move > the heads around the platter without contact. > > Strangely, atacontrol(8) has a command for spindown (which is inherently > bad for drives yet still a reasonable feature) but there is no command for > spinup. I wish there was a spinup command because I've seen drives that > won't do a spinup until they receive a special ATA command. I was never > able to find any docs, so if anyone knows the command I'd be willing to > write a patch against atacontrol! > > -- Rick C. Petty > _______________________________________________ > 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 Mar 6 21:47:39 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 986A91065673 for ; Fri, 6 Mar 2009 21:47:39 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 2BAD58FC0A for ; Fri, 6 Mar 2009 21:47:39 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 51016 invoked by uid 2001); 6 Mar 2009 21:47:38 -0000 Date: Fri, 6 Mar 2009 15:47:38 -0600 From: "Rick C. Petty" To: Octavian Covalschi Message-ID: <20090306214738.GA50654@keira.kiwi-computer.com> References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <20090304195614.GA179@britannica.bec.de> <20090306203057.GA49994@keira.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 21:47:39 -0000 On Fri, Mar 06, 2009 at 03:30:14PM -0600, Octavian Covalschi wrote: > Why is spinning down is bad for HDD ? I believe it's better to spindown a > drive, > instead of cutting power too sudden. Comparing those two, I'd say it shouldn't matter (although probably a forced spindown may be better). But pulling power from a drive does not mean the drive immediately stops doing stuff. I was just saying spindown on disks is bad in the first place. Sure, you might save some wear and tear on the bearings, but you risk problems with the heads on both spindown and spinup. In other words, if you can avoid power-cycling your drives, they should last longer (in that you're less likely to destroy the heads). -- Rick C. Petty From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 7 14:37:09 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E11E5106566B for ; Sat, 7 Mar 2009 14:37:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BDD388FC0A for ; Sat, 7 Mar 2009 14:37:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 46CC746B7E; Sat, 7 Mar 2009 09:37:09 -0500 (EST) Date: Sat, 7 Mar 2009 14:37:09 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexej Sokolov In-Reply-To: <671bb5fc0903040829m7c7ab79ay612868bb4260bd21@mail.gmail.com> Message-ID: References: <671bb5fc0903040829m7c7ab79ay612868bb4260bd21@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: uma_zone 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, 07 Mar 2009 14:37:10 -0000 On Wed, 4 Mar 2009, Alexej Sokolov wrote: > how can I get the size and pointer of some allocated uma zone ? For example: > zone_pack Could you tell us a bit more about the context in which you want to do this? Normally kernel modules acquire pointers to globally visible zones via a symbol dependency resolved by the kernel linker (zone_pack is a globally visible symbol in the kernel). Our general userspace monitoring tools, such as vmstat -z, don't display the UMA zone pointers, and a pointer to the zone is not exported by the sysctls it depends on, currently, but if you run kgdb on kernel.symbols you should be able to print out the address of the global zone_pack directly. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 7 21:22:56 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1853B1065688 for ; Sat, 7 Mar 2009 21:22:56 +0000 (UTC) (envelope-from martinbadie@yahoo.com) Received: from n24.bullet.mail.mud.yahoo.com (n24.bullet.mail.mud.yahoo.com [68.142.206.163]) by mx1.freebsd.org (Postfix) with SMTP id D1A328FC17 for ; Sat, 7 Mar 2009 21:22:55 +0000 (UTC) (envelope-from martinbadie@yahoo.com) Received: from [68.142.200.221] by n24.bullet.mail.mud.yahoo.com with NNFMP; 07 Mar 2009 21:08:56 -0000 Received: from [76.13.13.26] by t9.bullet.mud.yahoo.com with NNFMP; 07 Mar 2009 21:08:56 -0000 Received: from [76.13.10.165] by t3.bullet.mail.ac4.yahoo.com with NNFMP; 07 Mar 2009 21:08:56 -0000 Received: from [127.0.0.1] by omp106.mail.ac4.yahoo.com with NNFMP; 07 Mar 2009 21:08:56 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 196298.93309.bm@omp106.mail.ac4.yahoo.com Received: (qmail 74280 invoked by uid 60001); 7 Mar 2009 21:08:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1236460136; bh=UEbwBMfKEcoBzml+imyTFcXdrF3f2e2aDEVkTZa2Vws=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=aDwPMOL1jZZYXKAUycy0s1OHTvqPabPORolAVHztmDFevepIKHpUtVDzJb0OzkbJKo71O3ckcGz3vtnBt/kdIgR9oKmmo/VjmBHRKopNeGEBOWfHMROZdQIb7HsfMqjDN8S6CmqcT29koveDQMn50KBZJH5yK+n8idWUy6j4QdQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=6nyYxJzDSia8rT/6cznYq8j6BxJjh/hlbFwYOjJh7d8cRPj/f+8bS+m3V1GapU/8GljhmkzxPlc6EfK6TZh5pDIvT24ADc0k/C807HFpcTP//Qk9TUh5XcuEha5UpywFTUlawx7++eV0A3h/C2TCHYCqvcROaeW6SeLmHQc8mtw=; Message-ID: <67469.69113.qm@web59906.mail.ac4.yahoo.com> X-YMail-OSG: udTyLk8VM1lpgUruUeLrXu_aFD4VKldGlsxwN1LP6AJnetILE39vfkhP3RAN0LVsk1XNgTgwg0Uvn95gTBrNUnWZbwGXTgih0A6Uo_ZTdFyBaD3niiAD931njGPiUHWIqotMaOSIbpHBB4zCY4h1XksGA7w- Received: from [85.103.48.49] by web59906.mail.ac4.yahoo.com via HTTP; Sat, 07 Mar 2009 13:08:56 PST X-Mailer: YahooMailRC/1155.45 YahooMailWebService/0.7.289.1 Date: Sat, 7 Mar 2009 13:08:56 -0800 (PST) From: Martin Badie To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: select.h FD_SETSIZE and Qmail-Postfix test 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, 07 Mar 2009 21:22:56 -0000 Hi, There is a test that I am doing with FreeBSD and Linux. This test involves qmail and postfix comparison. Both FreeBSD and Linux seems to have 1024 File Descriptor limit. (FD_SETSIZE in select.h in FreeBSD) . To have a better concurrency in qmail on smtp level. I have used a patch named big-todo patch also used big-concurrency patch. These patches helps me to increase concurrency in operating system. I set concurrent connection to 500(tcpserver -c 500). There is no problem until around 400-500 active smtp connection. But if the total smtp connection exceeds 500, load average increases to ~40-50 but cpu system time arises to %50-60. The strange issue is that, this load increases when the connection is limited to accept 500 connections but the tool I use is configured to 700 (more than 500) connections. Normally ucspi-tcp software limits connection to 500 ( -c 500) I suspect it is something to do with Operating system level. Additionally I have also patched FreeBSD kernel with 4096 FD_SETSIZE in select.h in kernel and booted with that kernel. I have also compiled qmail from scratch to accept 2040 connections (in conf-spawn) but there is no change I mean I still can't get more than decent 500 connections with acceptable load average. I have also used postfix on both Linux FreeBSD: default_process_limit = 500 smtpd_client_connection_count_limit = 500 but I still get strange load when connection raises more than 500 I suspect something is missing or need to be configured on the operating system level (both Linux and FreeBSD)