From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 00:20:25 2010 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 7B7321065675 for ; Sun, 22 Aug 2010 00:20:25 +0000 (UTC) (envelope-from jessefrgsmith@yahoo.ca) Received: from n20.bullet.mail.mud.yahoo.com (n20.bullet.mail.mud.yahoo.com [68.142.206.147]) by mx1.freebsd.org (Postfix) with SMTP id 2D5A08FC19 for ; Sun, 22 Aug 2010 00:20:25 +0000 (UTC) Received: from [68.142.200.226] by n20.bullet.mail.mud.yahoo.com with NNFMP; 22 Aug 2010 00:20:21 -0000 Received: from [68.142.201.72] by t7.bullet.mud.yahoo.com with NNFMP; 22 Aug 2010 00:20:24 -0000 Received: from [127.0.0.1] by omp424.mail.mud.yahoo.com with NNFMP; 22 Aug 2010 00:19:29 -0000 X-Yahoo-Newman-Id: 637275.80342.bm@omp424.mail.mud.yahoo.com Received: (qmail 46595 invoked from network); 22 Aug 2010 00:19:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=IYJ111eQ9oZxUbXCrgw5I6/jUSWgYxVSdcdn9ma9xuVHT7g0nSyUY+FAzq/qUx4Syyt27ak2HllTtvdwkltBYn7sTXR+vbsPPcH+Kt0v+p8dE7c2IqGmfFUzxJ/+pHSdDbBG1CEftroVELScvLtpr6y4myC3dADfTo6yUB4Hv1Q= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1282436369; bh=ZHI2buMf/iGxnkUixkZSIGm+XT6z0KDXxKIn4M0cI1g=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=Zm/qRUxencdwXpbIXDU774GSu8TgkhKxag4hxPJ7jcWUjpe/Vy+k0cFreFS71DBk3gOTtZnbUsFZYyCkCSMtElcFfnh7NemPKi1nmR06f4BUHi8FNpabB85EDqoY5MCiRHEVnBW25kyFhhnrUDc5zdPkc8IveNK0zjZhEOqZXN0= Received: from [192.168.0.104] (jessefrgsmith@71.7.176.238 with plain) by smtp136.mail.mud.yahoo.com with SMTP; 21 Aug 2010 17:19:29 -0700 PDT X-Yahoo-SMTP: NPm1JouswBClX_uJxHJINmnKUpROdMKvLL0- X-YMail-OSG: J.FsHOQVM1kAo1lIJK.dVr1iMq0HE5eofhwmwN521FP8Lsa 8vNbfd1f_svF53E.vqO2cJnQAQD7QqwoCfiiTck59UBHNtkyI7uycEVIVVlq DjfvRXtI5U4bNE4.PkvoWBe3IzLciXavBoKejCGQr20N79QSabg8z9.wMQSA Dmcs83TzUk1y1JOgy1z5j.fW36Gg0bv79IJRWA1gUOMKsJT6SREafFrs6KgF EPNDKfLYW4bztZs0yiQHl80WotRcmbt8XKFKrc0GyW4Bcu1om2MgeKLfUDIG SGAX1nR3E8ONBNxFcxiGlcdMFdHQsMj9_uc0AhRbc0e.2gIXtLKx2TsTKug- - X-Yahoo-Newman-Property: ymail-3 From: Jesse Smith To: Boris Kochergin In-Reply-To: <4C6E8732.8090304@acm.poly.edu> References: <1282310063.2601.9.camel@hp-laptop> <4C6E8732.8090304@acm.poly.edu> Content-Type: text/plain; charset="UTF-8" Date: Sat, 21 Aug 2010 21:19:20 -0300 Message-ID: <1282436360.31072.0.camel@hp-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Converting from jiffies to ticks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 00:20:25 -0000 -----Original Message----- From: Boris Kochergin To: Jesse Smith Cc: freebsd-hackers@freebsd.org Subject: Re: Converting from jiffies to ticks Date: Fri, 20 Aug 2010 09:46:26 -0400 Jesse Smith wrote: > I am currently trying to port a program from Linux to FreeBSD which > detects how much processor time a process is using. The native Linux > code does this (in part) by reading the number of "jiffies" a given > process uses. This info is pulled from the /proc/PID/stat file. > > One function is failing on FreeBSD and it's obviously because FreeBSD > does not have all the same files/data in the /proc directory. > > I've looked around and, as I understand it, FreeBSD uses "ticks" instead > of "jiffies" to measure process usage. However, how to gather that data > is a bit lost on me. > > This raises a question for me: > Where can I find the equivalent information on FreeBSD? I assume > there's a function call. Maybe in the kvm_* family? I need to be able to > get the number of ticks a given PID is using, both in the kernel and > userspace. > > > The rest of the program measures everything in "jiffies", so it would be > ideal for me to get the ticks used on FreeBSD (based on PID), convert it > to "jiffies" and pass it back to the main program. > > Thanks for any advice, > Jesse > > As someone pointed out on -hackers, the jiffies situation in Linux is messy because it depends on the architecture, what version of the kernel is in use, etc. If, in the end, you're just interested in things like the real and CPU time used, however, check out kvm_getprocs(3). The information available with that call is documented in the kinfo_proc structure in /usr/include/sys/user.h. -Boris ======================================= Thank you, this seems to do the trick. - Jesse From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 16:22:34 2010 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 81A3710656A3 for ; Sun, 22 Aug 2010 16:22:34 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 458EA8FC13 for ; Sun, 22 Aug 2010 16:22:33 +0000 (UTC) Received: by iwn36 with SMTP id 36so5587556iwn.13 for ; Sun, 22 Aug 2010 09:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SY19jtqZNPCpGK4Z3QbCyHKBM7+nw9deVlOuyDulRr4=; b=smVAR4oLhg5MgncYPmY4ZMO3t1XDsQTxHLNDseDHVRt1OcCy27f8zNVutNJvCqPUuo Y0Z9kI6809aLQ7X/Qducw0ItIW9bUK8UsNWbGqx1CmSCJUbhw1eIuEJkpup4IQ4T/JqZ q4xwIcm25WIzD3dYAeMEOp3dvk38ijdOlxlTQ= 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=N/dj91NORtBrBUK6FG89KPFDi/XorgKD0aUbOBMNKoHM95+5QAvCDek8MZnX3HCcYl 1FLKUzpBd+jfKLTwX+wLodfDO8blLyEa7vAZL6SnZ+I4esewUXWT4jbjvuDdCnlGiRkr 9cZbvG0pCfBVrX39+WZpJQD+tKVuyrNthE7uw= MIME-Version: 1.0 Received: by 10.231.183.200 with SMTP id ch8mr5150623ibb.124.1282492462216; Sun, 22 Aug 2010 08:54:22 -0700 (PDT) Received: by 10.231.146.10 with HTTP; Sun, 22 Aug 2010 08:54:22 -0700 (PDT) In-Reply-To: <86ocde8tzd.fsf@ds4.des.no> References: <4C2B07F5.6030801@delphij.net> <4C2B4D35.8060903@feral.com> <86lj9wmbrz.fsf@ds4.des.no> <4C2BBF3C.4070503@delphij.net> <86hbkkmad1.fsf@ds4.des.no> <4C2BD498.3090704@delphij.net> <86d3v7n093.fsf@ds4.des.no> <4C5D4BFD.9080803@delphij.net> <86ocde8tzd.fsf@ds4.des.no> Date: Sun, 22 Aug 2010 08:54:22 -0700 Message-ID: From: Xin LI To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Winbond Watchdog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 16:22:34 -0000 2010/8/7 Dag-Erling Sm=C3=B8rgrav : > Xin LI writes: >> I'm still polishing up the driver, there seems to be no way to figure >> out the base port address directly (datasheet said it's either 0x2e and >> 0x4e) so for now I have its device identify method to do some dirty >> hacks (outb/inb directly) and only check if with appropriate key entered >> to the port we will get non-0xff value. > > Sounds gross, but if there's no other way, I guess it'll have to do. =C2= =A0I > imagine you check the PCI id etc. first? It's not a PCI device unfortunately (at least, not the one I have encountered on my Supermicro board). I have a code snapshot at: http://people.freebsd.org/~delphij/for_review/winbondwd/ But there are some good features in bz@'s driver which I would like to brin= g in. Cheers, --=20 Xin LI http://www.delphij.net From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 18:50:31 2010 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 2AACC106566C for ; Sun, 22 Aug 2010 18:50:31 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 60FAC8FC0C for ; Sun, 22 Aug 2010 18:50:30 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 3A8022A28D21; Sun, 22 Aug 2010 20:50:29 +0200 (CEST) Date: Sun, 22 Aug 2010 20:50:29 +0200 From: Ed Schouten To: hackers@FreeBSD.org Message-ID: <20100822185029.GV2978@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lFRK9w0o3gensELN" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: A simple and hopefully usable FreeBSD live CD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 18:50:31 -0000 --lFRK9w0o3gensELN Content-Type: multipart/mixed; boundary="oTjmB4SGUHx7SKxS" Content-Disposition: inline --oTjmB4SGUHx7SKxS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello all, A couple of major releases ago, we had a FreeBSD disc1.iso which also included the livefs. Nowadays the livefs comes on a separate disc. This livefs disc has a couple of issues in my opinion: - The livefs disc does not feature any installsets, which means if your system has 1 CD-ROM drive, you have to resort to network connectivity to obtain the installsets to perform a manual install. - The livefs installation places everything in /dist and does some odd tricks to get the basic things working, which means that any tool that assumes a specific pathname doesn't work anymore. I remember the GEOM tools were once broken because of this. You also have to add symlinks here and there to make something as simple as scp(1) work, because the ssh(1) binary is in the wrong place. I think I already mentioned it on some of the lists, but I've spent some time creating a better FreeBSD live CD (or at least I tried to). Basically the CD is just a stock FreeBSD installation (base + manpages + kernel) with a small mfsroot between the boot process to let it use unionfs and tmpfs before calling into /sbin/init. You can just run adduser, dhclient and fire up a SSH daemon. It's exactly the same as an installation of FreeBSD on a harddisk, with the only exception that any changes don't survive a reboot. It also has a copy of all the installsets, which means you can do installations and recoveries. I've attached a copy of the script I use to generate the CD. Just make sure you have FreeBSD-9.0-CURRENT-201008-amd64-disc1.iso placed in the same directory as the script and that you have an up-to-date HEAD source tree in /usr/src, with a GENERIC kernel already built. You also need to have cdrtools installed. After that, you should be able to run gencd.sh as root (needed for retaining file permissions), which should generate a FreeBSD-9.0-CURRENT-201008-amd64-ed.iso. Right now it still requires the source tree, because the fixes for tmpfs needed to make it all work aren't in the 201008 snapshot. By the time 201009 is released, the script can easily be modified to use the kernel binaries. I'm sending this email for two different reasons: 1. Be sure to give the CD a try and share your experiences. Does it work? Does it crash? Is it usable for you? If not, why not? 2. Would a CD like this be a good addition to the provided install media? Does it actually solve shortcomings of the existing media? If people think it's a nice CD to work with, I could consider integrating it into release(7). Thanks! --=20 Ed Schouten WWW: http://80386.nl/ --oTjmB4SGUHx7SKxS Content-Type: application/octet-stream Content-Disposition: attachment; filename="freebsd-bootcd.tar.gz" Content-Transfer-Encoding: base64 H4sIAMVpcUwAA+1X6VPbSBafr+iveOOkJiaxfHCEzSQwY2wB2jUWK8lhqBQFstSyu6LDJcmQ ZCb/+/5eSwYbcnzJ7tbW+pXL6u53H939OsyEGOeBPk7Twg9aE5H4QTOf/vQjod1u7+3uEr6d vd02f9udnR31Zdjaam9Tp7OzvbPVftne61C7s9vZ6fxE7R9qxVdgnhdeBlNE8D06keXfwJe+ 0N33fwSe/Nway6SVTzXN7R7vv2q29d7Ito2hq2+1O+323zRzeDZy949QJ4dOX38KKt2Lg5c7 eiBzv9OUeapZI/crNCJQBFouCtKFpsmQ3tG1DEifX5OeCGrTpVZMRaJtCH+aUu0U+aCxoAz1 WMPiB1lQRwulpvnTMPImOek2JWnuTyfkB4ps6vnvaeuAWoG4aSXzKKK//qIimwsti0EdLtNp 8ftAZqTHpEpyGQP1t4ma/no7FSJaQWooEtI/fArpqYoH6T3Gs6ewzCswafGkNfZyof6av/1G MEOxzcCnlywrxLGXzLyJyO8GX2N6ssz1XmSJiHLeqyKT/ld4WryjK1rS9bzI5Ez303iWJiIp cgT1CcKzStd63sw/xuM0yrXYey9YUGueZ60880km2ChRVAn8h2EPe9bwaP/YGBq22aO+4bh9 096vXc9ug+uWH9TIHDpudzC4Glp943B0vF8G6uBOZ5R6gciafpqE9OYNGdaRFoc5h/yKUfu1 C8Op3S0lXiz2ayVntXaPLD7OgMTsqlwv4hnGS1LmiYSalSXWp2rumRKR3V7F6Twp9mtDq/aM DpSdovBRVaE3j4q8lfnKVq1I5/50gQ0RlbFWldWiXLgS7ydZujS+vR/n2Hia7xNy4xUSX2uL 9HPEGP8iy1IkNF2lbskE22Gx1PRVlsL8LqJVOO7LdvJJzkh/lTykYIOxL0O1m/S/Yyemuojn kboGSB+TIvaDcprS03KHk/6WwvLC4Kr8QVvyv30E/l9DuHr/39fWD9SB+/Bled9/8f7f3evs qft/e3d7e3uvzff/7tb6/v+PQOu5rtFz6qWzj5mcTAuq+5vENz8ZATk4HueFSOiNCH6vbvdm mk0OmKWLXa1YcsoEgnODux7rjLIFegNcOON5gWOXvCQghA9XCOXpPPOFWsF55mUfKUyzOG/Q rSymhCOPv9DJUuI0kKHEnQEZDfIyQTORxbIoRECzLL2RAQao1gJ/AnKiKL2VCc6gNAkkM+Us hfliUfzK407zgWk5peHCJj8NQMntRyYKD7ayVG+c3jCqig4LASQpzmvRAIXMKYI8FnOvVrm3 ahP3SpEnY9x3LGPrsSFQuBSRhSHwM5jDuH+PLVR6WUkKUn8eozfwFklrIR84DkAXewVaDS/K 7wOvEsaCl91YFIB7YjrkWEfuedc2COMz23pr9o0+HV4AaVB35J5YNnWHfUIb4drm4ci1bIeu r7sO6J89Y5SqsuEFGX+c2YbjEBjM07OBCTGQa3eHrmk4DfQZvcGobw6PGwQpNLRcGpinpgsy 12qwOhb0mJOsIzo17N4Jpt1Dc2C6F8qgI9MdsrojNpDOurZr9kaDrk1nI/vMcpQ0dqtvOr1B 1zw1+k2CEVBMxls0zuScoO1ZdhO/FS8PDVjYPRwoUUoNvET3ZPRcdud+1EPMYNygQc6Z0TN5 YPxhwJOufdGoxDrGP0cgApKl9bun3WP4Vv9OVJAQ9PnGKduLODijQ8c13ZFr0LFl9R0WBfGO Yb81e4bzmgaWowI2cowGlLhdpR5SEC2gMT4cOaaKmzl0DdsenbmmNdxkQSfWOQIDY7vg7qsY W0PlM2Jk2Rcsl+OhUtCg8xMD6zaHVEWty7FwEL2ey9KWKKEV8XSXnKWhcTww0ZT2DMZaLOjc dIxNZMx0mMAsNZ93L5SPI+U+5wq2lcOl0m2ojJJ5RN3+W5ONr4hRB45Z1Qz6SEhyRr2TKvq8 C1qa9kQmfjTHofIm/5i3Zl7mxc3pwYPlSCZoqR+vq1708fJcpry4tIpOMUlXCUM/KaIHvEUg 00dLkRw/XMtwQqyuoXUGqdJaNao3qQy0QIo6jhmcN/4Ub4/ncT7Z1P7UNmRSUBg0KFeGvda0 jXJE+1StbIQBJulMJPWaahBZTBqJGhJ6ZffP7U3Q4KFYB93P+6R36JdfqBzjjYHSujoyB8bQ 2tQ2NoL5bKvO6lYxELBQurBjY6Z66jrbiVkeCTGrd9qKFI/Megejzw9cTFUWVtykcsIH7bvL Bs2TXE4SHIfstohEnKsgII5zvyCJA9vn/3cKdQldKwySw4PjnuoSlrZfk6Q3pRQMX7zYJIja YHZ52cTnit+VIKyXpmwqIyRLXSaKcF/D7SLDoF6RbNIL6oAODqrIJqVjIG+U+hrU3uQAt1VQ kVrF2LlcCYpSW/q/iIMfhPm7S+j7U+MrpIbnEJ5iyGTND169fNnmUZilMX9VrvHq4PVW1Xcq fD7ziqmiyNKa9vn1N/Sph92XFSrUQ3m335FXvQu/LLFCrvgACx+pwGcscLnyoNYopdxOZSHQ yPDa7VQkiRC4Nb9jDQL0NVsU6pFqDqmSqaGc8BqUSZ3ryssmfqMqWIxv3l1yVWobred0lokb wVuUX3b5FP+84fm8UoUxEcVMBnVVCx2uBfRC8ywhtT1KASIrGxSuoLzkvNsoqAbsfPlJcA+C CbWq2aJkebstqFXC7sjV7Jv0VTruOKr5N3lU2O441OxL9Mozf8qvH/iOEKaE07YQsWqfkBxE aS7Uq5g7IF/k+X3MKj5VCqubqFaiamyRPw1kBqLaQp3xQfhorlUPlQkvovsnfilbgOCmrvLX vuQGeHKjXGPBCqfkLifo8/otvYY1rGENa1jDGtawhjWsYQ1rWMMa1rCGVfgXvtdQFAAoAAA= --oTjmB4SGUHx7SKxS-- --lFRK9w0o3gensELN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxxcXUACgkQ52SDGA2eCwV0UwCfRqYV93dxYWQHUtut8oZ7KM7I V4cAniAwZIoSp5AgnODBdupMzH/Hk/ni =LSt2 -----END PGP SIGNATURE----- --lFRK9w0o3gensELN-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 19:26:34 2010 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 6F1D61065696 for ; Sun, 22 Aug 2010 19:26:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 09C7A8FC1B for ; Sun, 22 Aug 2010 19:26:33 +0000 (UTC) Received: (qmail 14202 invoked by uid 399); 22 Aug 2010 18:59:52 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 22 Aug 2010 18:59:52 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C7173A7.4060501@FreeBSD.org> Date: Sun, 22 Aug 2010 11:59:51 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100807 Thunderbird/3.1.2 MIME-Version: 1.0 To: Ed Schouten References: <20100822185029.GV2978@hoeg.nl> In-Reply-To: <20100822185029.GV2978@hoeg.nl> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: A simple and hopefully usable FreeBSD live CD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 19:26:34 -0000 On 08/22/2010 11:50, Ed Schouten wrote: > 2. Would a CD like this be a good addition to the provided install > media? Does it actually solve shortcomings of the existing media? Yes. I'd also like to add that I've always wanted to see dd added to the livefs. I have in the past not-infrequently wanted a simple way to boot FreeBSD from a CD and wipe an installed HD. The changes you're actually asking about sound interesting and useful too. :) Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 20:20:05 2010 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 A9104106564A for ; Sun, 22 Aug 2010 20:20:05 +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 D1DD58FC14 for ; Sun, 22 Aug 2010 20:20:03 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA04550; Sun, 22 Aug 2010 23:20:02 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OnH1O-000ArX-5z; Sun, 22 Aug 2010 23:20:02 +0300 Message-ID: <4C71866C.10803@icyb.net.ua> Date: Sun, 22 Aug 2010 23:19:56 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Jeff Roberson , "Robert N. M. Watson" Subject: uma_zcreate: additional arg for uminit/fini X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 20:20:05 -0000 What do you think about adding an argument to uma_zcreate that would be passed on to uminit/fini as an additional parameter? Perhaps (probably?) to dtor/ctor. The idea is to provide additional context to uminit/fini. One immediate use is more efficient compatibility code for OpenSolaris kmem_cache: http://docs.sun.com/app/docs/doc/816-5180/kmem-cache-create-9f?a=view -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 20:45:24 2010 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 DFCAE10656A5; Sun, 22 Aug 2010 20:45:23 +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 BF64B8FC1F; Sun, 22 Aug 2010 20:45:22 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA04937; Sun, 22 Aug 2010 23:45:21 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OnHPs-000AuH-Pc; Sun, 22 Aug 2010 23:45:20 +0300 Message-ID: <4C718C60.2010205@icyb.net.ua> Date: Sun, 22 Aug 2010 23:45:20 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Jeff Roberson , "Robert N. M. Watson" Subject: uma: zone fragmentation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 20:45:24 -0000 It seems that with inclusion of ZFS, which is a significant UMA user even when it is not used for ARC, zone fragmentation becomes an issue. For example, on my systems with 4GB of RAM I routinely observe several hundred megabytes in free items after zone draining (via lowmem event). I wrote a one-liner (quite long line though) for post-processing vmstat -z output and here's an example: $ vmstat -z | sed -e 's/ /_/' -e 's/:_* / /' -e 's/,//g' | tail +3 | awk 'BEGIN { total = 0; } { total += $2 * $5; print $2 * $5, $1, $4, $5, $2;} END { print total, "total"; }' | sort -n | tail -10 6771456 256 7749 26451 256 10710144 128 173499 83673 128 13400424 VM_OBJECT 33055 62039 216 17189568 zfs_znode_cache 33259 48834 352 19983840 VNODE 33455 41633 480 30936464 arc_buf_hdr_t 145387 148733 208 57030400 dmu_buf_impl_t 82816 254600 224 57619296 dnode_t 78811 73494 784 62067712 512 71050 121226 512 302164776 total When UMA is used for ARC, then "wasted" memory grows above 1GB effectevily making that setup unusable for me. I see that in OpenSolaris they developed a few measures to (try to) prevent fragmentation and perform defragmentation. First, they keep their equivalent of partial slab list sorted by number of used items thus trying to fill up the most used slab. Second, they allow to set a 'move' callback for a zone and have a special monitoring thread that tries to compact slabs when zone fragmentation goes above certain limit. The details can be found here (lengthy comment at the beginning and links in it): http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/kmem.c Not sure if we would want to implement anything like or some alternative, but zone fragmentation seems to have become an issue, at least for ZFS. I am testing the following primitive patch that tries to "lazily sort" (or pseudo sort) slab partial list. Linked list is not the kind of data structure that's easy to keep sorted in efficient manner. diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 2dcd14f..ed07ecb 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2727,14 +2727,26 @@ zone_free_item(uma_zone_t zone, void *item, void *udata, } MPASS(keg == slab->us_keg); - /* Do we need to remove from any lists? */ + /* Move to the appropriate list or re-queue further from the head. */ if (slab->us_freecount+1 == keg->uk_ipers) { + /* Partial -> free. */ LIST_REMOVE(slab, us_link); LIST_INSERT_HEAD(&keg->uk_free_slab, slab, us_link); } else if (slab->us_freecount == 0) { + /* Full -> partial. */ LIST_REMOVE(slab, us_link); LIST_INSERT_HEAD(&keg->uk_part_slab, slab, us_link); } + else { + /* Partial -> partial. */ + uma_slab_t tmp; + + tmp = LIST_NEXT(slab, us_link); + if (tmp != NULL && slab->us_freecount > tmp->us_freecount) { + LIST_REMOVE(slab, us_link); + LIST_INSERT_AFTER(tmp, slab, us_link); + } + } /* Slab management stuff */ freei = ((unsigned long)item - (unsigned long)slab->us_data) Unfortunately I don't have any conclusive results to report. The numbers seem to be better with the patch, but they are changing all the time depending on system usage. I couldn't think of any good test that would reflect real-world usage patterns, which I believe to be not entirely random. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 21:30:52 2010 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 0BF94106566C for ; Sun, 22 Aug 2010 21:30:52 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 9D5668FC08 for ; Sun, 22 Aug 2010 21:30:51 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id C08902A28D21; Sun, 22 Aug 2010 23:30:50 +0200 (CEST) Date: Sun, 22 Aug 2010 23:30:50 +0200 From: Ed Schouten To: Tim Judd Message-ID: <20100822213050.GW2978@hoeg.nl> References: <20100822185029.GV2978@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UKsZWh/ZtaJX4ozz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Hackers Subject: Re: A simple and hopefully usable FreeBSD live CD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 21:30:52 -0000 --UKsZWh/ZtaJX4ozz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tim Judd wrote: > Your CDs won't reach as many people as possible, I fear. I fear because I > (for example) have no amd64 systems and just by the name of the snapshot = cd > image i need to have to use your script, I won't be able to use the final > product. Well, the script makes some assumptions it shouldn't. You can simply build i386 CDs by substituting all occurences of amd64 by i386 in gencd.sh. Porting it to non-x86 architectures isn't hard either, but I haven't looked at it at all. It should be fairly straightforward to accomplish that when integrating it into the release(7) infrastructure. The current shellscript is just a mockup. --=20 Ed Schouten WWW: http://80386.nl/ --UKsZWh/ZtaJX4ozz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxxlwoACgkQ52SDGA2eCwUtywCfcnADf4XjUSE3J+GIaxV0JA+2 qOkAn0bElh9tDyLo601T9wUjp+lAlWPW =+0NR -----END PGP SIGNATURE----- --UKsZWh/ZtaJX4ozz-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 21:46:37 2010 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 BC0201065673 for ; Sun, 22 Aug 2010 21:46:37 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CC6718FC15 for ; Sun, 22 Aug 2010 21:46:36 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA05762; Mon, 23 Aug 2010 00:46:35 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OnIN9-000B06-02; Mon, 23 Aug 2010 00:46:35 +0300 Message-ID: <4C719AB9.9020006@freebsd.org> Date: Mon, 23 Aug 2010 00:46:33 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: zfs-devel@freebsd.org, freebsd-hackers@freebsd.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: ZFS arc_reclaim_needed: better cooperation with pagedaemon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 21:46:37 -0000 I propose that the following code in arc_reclaim_needed (sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c) /* * If pages are needed or we're within 2048 pages * of needing to page need to reclaim */ if (vm_pages_needed || (vm_paging_target() > -2048)) be changed to if (vm_paging_needed()) Rationale. 1. Why not current checks. ARC sizing should cooperate with pagedaemon in freeing pages. If ARC starts shrinking "prematurely", before pagedaemon is waked up then no potentially eligible inactive pages will be recycled and no potentially eligible active pages will be inactive (subject to v_inactive_target). This would lead to ARC size going to its minimum value (which could hurt ZFS performance). Only after that there is a chance that pagedaemon would be waked up to do its cleaning. And conversely, if ARC doesn't shrink in time, then pagedaemon would have to recycle pages with data that could be needed again soon and that would lead to excessive swapping and disk I/O. vm_paging_target() is used only by pagedaemon internally, it effectively sets _upper_ limit on how many pages pagedaemon would free when it's activated. It is no indication of whether pagedaemon should be scanning/freeing pages. Thus check of vm_paging_target() leads to premature ARC shrinking. I believe that many people observe this behavior on sufficiently active systems (not dedicated file servers) with few GB of RAM (1-8). vm_pages_needed check is redundant, because this is a flag that is used to wake up pagedaemon. So when it is set vm_paging_needed() is true and vm_paging_target() is "way" above zero. And this flag is reset to zero when vm_page_count_min() becomes false, which corresponds to even fewer free pages than when vm_paging_needed() is true. 2. Why the new check. vm_paging_needed() is the (earliest) condition that wakes up pagedaemon (see vm_page_alloc). pagedaemon would first of all run vm_lowmem event for which ARC already has a handler and which would cause ARC size to shrink. It would seems like having vm_paging_needed() check would be redundant then. Almost - if memory pressure is significant, then vm_paging_needed() may stay true for a while and that would cause additional ARC reduction by arc_reclaim_thread. Final notes. I think that vm_paging_target() > -2048 check was modeled after the check in the original OpenSolaris code: freemem < lotsfree + needfree + extra The issue is that in my understanding OpenSolaris pagedaemon works differently from FreeBSD pagedaemon. OpenSolaris pagedaemon is activated when freemem (equivalent of our free + cache) falls down to a certain higher mark (lotsfree). Initially it scans pages at a slow rate. If freemem falls further the rate linearly increases until it reaches its maximum when freemem goes to or below certain lower mark. Our pagedaemon is activated when free + cache falls down to a value when vm_paging_needed() is true (see definition of this function). When it is activated it makes a scan pass though inactive and active pages setting a certain target for free+cache, but that target is "soft" and actually is an upper limit of how many pages could be freed during the pass. pagedaemon would make the second (or subsequent) pass only if free+cache falls to value that is even lower than the threshold in vm_paging_needed(), which means significant (severe even) memory pressure/shortage. So on sufficiently active system free+cache would typically oscillate between v_free_reserved+v_cache_min at the bottom and some semi-random values "near" v_free_target+v_cache_min at the tops. That's when excluding ARC from the picture. And about pictures :-) Behavior of free+cache with current arc_reclaim_needed code: http://people.freebsd.org/~avg/avail-mem-before.png and its behavior after the patch: http://people.freebsd.org/~avg/avail-mem-after.png The legends on the pictures are incorrect, sorry, my mastery of drraw is not good yet. Correct legends: "aqua" color - v_free_target+v_cache_min (vm_paging_target() == 0) "fuchsia" color - v_free_reserved+v_cache_min (vm_paging_needed() threshold) "lime" color - v_free_count+v_cache_count indeed :) Y axis - % of total page count. I think the graphs speak for themselves. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 21:47:31 2010 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 55249106566C for ; Sun, 22 Aug 2010 21:47:31 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D7EEA8FC1B for ; Sun, 22 Aug 2010 21:47:30 +0000 (UTC) Received: by bwz20 with SMTP id 20so1323395bwz.13 for ; Sun, 22 Aug 2010 14:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=wysLzd6g3isIDEo8rgaqUOdrnF0w77M1MH1ZwewGVEE=; b=yCk4HY/deB2Mk6v3R1A876rnITlzTxnMhVcGndMKBXdDor5r1Qhh2G4LW5E2Rz1Tnn aPR7CJfUSBRmhDKXP1uunxPyHgb5VjXhmUZdiDKDJ6T81SXQJJHhp7r21Px6PQqcULFQ DrSY2MVT0m/gO8Fx+JDs9CZpxUzy0I0NG8amg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Ei5kYqFIw2OgkYKZCQlaO3raYrAUzpo6AWRSzQJIrXEM0AcHHsW9iILKDBnOKSzmet qoG7AGn5XO30kmPsRnrwOu+tgZbQdaXoTuQZ3OvKbQoZK/Abmv5wszHDlGgaqEIBlYfi qewSmVg9jlZZzRtb9EdYxtGHDRRmj1zbLcKrc= Received: by 10.204.8.10 with SMTP id f10mr2833106bkf.181.1282511985209; Sun, 22 Aug 2010 14:19:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.66.211 with HTTP; Sun, 22 Aug 2010 14:19:25 -0700 (PDT) In-Reply-To: <20100822185029.GV2978@hoeg.nl> References: <20100822185029.GV2978@hoeg.nl> From: Tim Judd Date: Sun, 22 Aug 2010 15:19:25 -0600 Message-ID: To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org Subject: Re: A simple and hopefully usable FreeBSD live CD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 21:47:31 -0000 > 1. Be sure to give the CD a try and share your experiences. Does it > work? Does it crash? Is it usable for you? If not, why not? > > 2. Would a CD like this be a good addition to the provided install > media? Does it actually solve shortcomings of the existing media? > > If people think it's a nice CD to work with, I could consider > integrating it into release(7). Thanks! > > I have, for longer than I can count, create my own livecds because the media that's produced have a shortcoming for some reason or other. Your CDs won't reach as many people as possible, I fear. I fear because I (for example) have no amd64 systems and just by the name of the snapshot cd image i need to have to use your script, I won't be able to use the final product. FYI, an i386 OS can run on amd64 bit chips, with the same rules that apply. However, the mfsroot/tmpfs hooks i'm interested to see, so I am looking over your script. I have a script that will build a i386 system from the ground up. I keep hacking it as my needs change. I'll provide it if people would rather have a "virgin" livecd based on the install cd sets or if it's better to have a patched one. Thanks for the email, i'll look at it. From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 22:02:40 2010 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 76FB8106567A; Sun, 22 Aug 2010 22:02:40 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (ns0.blackend.org [82.227.222.164]) by mx1.freebsd.org (Postfix) with ESMTP id E55968FC12; Sun, 22 Aug 2010 22:02:39 +0000 (UTC) Received: from gothic.blackend.org (gothic.blackend.org [192.168.1.203]) by abigail.blackend.org (8.13.4/8.13.3) with ESMTP id o7MLqFhR025695; Sun, 22 Aug 2010 23:52:16 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from gothic.blackend.org (localhost [127.0.0.1]) by gothic.blackend.org (8.14.4/8.14.4) with ESMTP id o7MLqEkd002216; Sun, 22 Aug 2010 23:52:14 +0200 (CEST) (envelope-from marc@gothic.blackend.org) Received: (from marc@localhost) by gothic.blackend.org (8.14.4/8.14.4/Submit) id o7MLqEE8002215; Sun, 22 Aug 2010 23:52:14 +0200 (CEST) (envelope-from marc) Date: Sun, 22 Aug 2010 23:52:14 +0200 From: Marc Fonvieille To: Doug Barton Message-ID: <20100822215214.GB2078@gothic.blackend.org> References: <20100822185029.GV2978@hoeg.nl> <4C7173A7.4060501@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C7173A7.4060501@FreeBSD.org> X-Useless-Header: blackend.org X-Operating-System: FreeBSD 8.1-RELEASE User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Ed Schouten , hackers@FreeBSD.org Subject: Re: A simple and hopefully usable FreeBSD live CD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 22:02:40 -0000 On Sun, Aug 22, 2010 at 11:59:51AM -0700, Doug Barton wrote: > On 08/22/2010 11:50, Ed Schouten wrote: > > 2. Would a CD like this be a good addition to the provided install > > media? Does it actually solve shortcomings of the existing media? > > Yes. I'd also like to add that I've always wanted to see dd added to the > livefs. I have in the past not-infrequently wanted a simple way to boot > FreeBSD from a CD and wipe an installed HD. > dd(1) is already in our livefs, actually you have everything from /rescue. -- Marc From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 22 22:25:44 2010 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 1D5411065695 for ; Sun, 22 Aug 2010 22:25:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id A068B8FC0C for ; Sun, 22 Aug 2010 22:25:43 +0000 (UTC) Received: (qmail 14744 invoked by uid 399); 22 Aug 2010 22:25:41 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 22 Aug 2010 22:25:41 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C71A3E3.2020909@FreeBSD.org> Date: Sun, 22 Aug 2010 15:25:39 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100807 Thunderbird/3.1.2 MIME-Version: 1.0 To: Marc Fonvieille References: <20100822185029.GV2978@hoeg.nl> <4C7173A7.4060501@FreeBSD.org> <20100822215214.GB2078@gothic.blackend.org> In-Reply-To: <20100822215214.GB2078@gothic.blackend.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , hackers@FreeBSD.org Subject: Re: A simple and hopefully usable FreeBSD live CD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 22:25:44 -0000 On 08/22/2010 14:52, Marc Fonvieille wrote: > dd(1) is already in our livefs, actually you have everything from > /rescue. That's good news, guess it's been longer than I thought since I needed to do this. :) Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 00:14:26 2010 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 02FDF106564A; Mon, 23 Aug 2010 00:14:26 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 82BE48FC08; Mon, 23 Aug 2010 00:14:25 +0000 (UTC) Received: by vws7 with SMTP id 7so5554391vws.13 for ; Sun, 22 Aug 2010 17:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=r9FCry+Eg1eohNrqtsr3DynwTWe0jWjx7Vt0CEW3rtM=; b=tahhLFARIOcsPuGUqF2+WVbxIvOKEvNSYnueVaMLVf9SHe2ZahUuH9Ng77/VW7HCVF 6GEBNj/D1FbQLaTj8c0SmdXw7Tzw9LBonpnB7P0zFiw1HeitrtaAjK5SI5RyS4uyrZxD N8tRMl0hAhOwAgOhRwR6AKi6ZuKxU1cTsM0eE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=jT/RK5jBCFGn6ftRc9YPLpbB2iGax8UlLmw8LxaQQ+DrY+SqvaM8KOOFM98lYmViqz ilQqKyNFVEH+V/4B3ywsW/HZp/lltHuGqGPRibGzhepiAOOIo0U++4A43V2vU9BZz94m /kXNdMv70WAsawhYAYQk09aG9rOKnXdeEAJ9A= MIME-Version: 1.0 Received: by 10.220.88.167 with SMTP id a39mr2792109vcm.73.1282521120809; Sun, 22 Aug 2010 16:52:00 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.220.49.70 with HTTP; Sun, 22 Aug 2010 16:52:00 -0700 (PDT) In-Reply-To: <4C719AB9.9020006@freebsd.org> References: <4C719AB9.9020006@freebsd.org> Date: Sun, 22 Aug 2010 16:52:00 -0700 X-Google-Sender-Auth: 5-hwxrj3geu8D5AWbwn-u5kaWJ8 Message-ID: From: Artem Belevich To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 23 Aug 2010 00:14:26 -0000 Do you by any chance have a graph showing kstat.zfs.misc.arcstats.size behavior in addition to the stuff included on your graphs now? All I can tell from your graphs is that v_free_count+v_cache_count shifted a bit lower relative to v_free_target+v_cache_min. It would be interesting to see what effect your patch has on ARC itself, especially when ARC will start giving up memory and when does it stop shrinking. --Artem On Sun, Aug 22, 2010 at 2:46 PM, Andriy Gapon wrote: > > I propose that the following code in arc_reclaim_needed > (sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c) > /* > =A0* If pages are needed or we're within 2048 pages > =A0* of needing to page need to reclaim > =A0*/ > if (vm_pages_needed || (vm_paging_target() > -2048)) > > be changed to > > if (vm_paging_needed()) > > Rationale. > > 1. Why not current checks. > > ARC sizing should cooperate with pagedaemon in freeing pages. > If ARC starts shrinking "prematurely", before pagedaemon is waked up then= no > potentially eligible inactive pages will be recycled and no potentially e= ligible > active pages will be inactive (subject to v_inactive_target). > This would lead to ARC size going to its minimum value (which could hurt = ZFS > performance). =A0Only after that there is a chance that pagedaemon would = be waked > up to do its cleaning. > And conversely, if ARC doesn't shrink in time, then pagedaemon would have= to > recycle pages with data that could be needed again soon and that would le= ad to > excessive swapping and disk I/O. > > vm_paging_target() is used only by pagedaemon internally, it effectively = sets > _upper_ limit on how many pages pagedaemon would free when it's activated= . > It is no indication of whether pagedaemon should be scanning/freeing page= s. > Thus check of vm_paging_target() leads to premature ARC shrinking. > I believe that many people observe this behavior on sufficiently active s= ystems > (not dedicated file servers) with few GB of RAM (1-8). > > vm_pages_needed check is redundant, because this is a flag that is used t= o wake > up pagedaemon. =A0So when it is set vm_paging_needed() is true and > vm_paging_target() is "way" above zero. =A0And this flag is reset to zero= when > vm_page_count_min() becomes false, which corresponds to even fewer free p= ages > than when vm_paging_needed() is true. > > > 2. Why the new check. > > vm_paging_needed() is the (earliest) condition that wakes up pagedaemon (= see > vm_page_alloc). =A0pagedaemon would first of all run vm_lowmem event for = which ARC > already has a handler and which would cause ARC size to shrink. > It would seems like having vm_paging_needed() check would be redundant th= en. > Almost - if memory pressure is significant, then vm_paging_needed() may s= tay > true for a while and that would cause additional ARC reduction by > arc_reclaim_thread. > > > Final notes. > > I think that > vm_paging_target() > -2048 > check was modeled after the check in the original OpenSolaris code: > freemem < lotsfree + needfree + extra > > The issue is that in my understanding OpenSolaris pagedaemon works differ= ently > from FreeBSD pagedaemon. > > OpenSolaris pagedaemon is activated when freemem (equivalent of our free = + > cache) falls down to a certain higher mark (lotsfree). =A0Initially it sc= ans pages > at a slow rate. =A0If freemem falls further the rate linearly increases u= ntil it > reaches its maximum when freemem goes to or below certain lower mark. > > Our pagedaemon is activated when free + cache falls down to a value when > vm_paging_needed() is true (see definition of this function). =A0When it = is > activated it makes a scan pass though inactive and active pages setting a > certain target for free+cache, but that target is "soft" and actually is = an > upper limit of how many pages could be freed during the pass. pagedaemon = would > make the second (or subsequent) pass only if free+cache falls to value th= at is > even lower than the threshold in vm_paging_needed(), which means signific= ant > (severe even) memory pressure/shortage. > So on sufficiently active system free+cache would typically oscillate bet= ween > v_free_reserved+v_cache_min at the bottom and some semi-random values "ne= ar" > v_free_target+v_cache_min at the tops. =A0That's when excluding ARC from = the picture. > > And about pictures :-) > Behavior of free+cache with current arc_reclaim_needed code: > http://people.freebsd.org/~avg/avail-mem-before.png > and its behavior after the patch: > http://people.freebsd.org/~avg/avail-mem-after.png > > The legends on the pictures are incorrect, sorry, my mastery of drraw is = not > good yet. > Correct legends: > "aqua" color - v_free_target+v_cache_min (vm_paging_target() =3D=3D 0) > "fuchsia" color - v_free_reserved+v_cache_min (vm_paging_needed() thresho= ld) > "lime" color - v_free_count+v_cache_count indeed :) > Y axis - % of total page count. > > I think the graphs speak for themselves. > > -- > Andriy Gapon > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 02:13:00 2010 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 CD3131065698 for ; Mon, 23 Aug 2010 02:13:00 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 9D9D78FC16 for ; Mon, 23 Aug 2010 02:12:59 +0000 (UTC) Received: from ur.gsoft.com.au (Ur.gsoft.com.au [203.31.81.44]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id o7N2ClxG037713 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 23 Aug 2010 11:42:53 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/signed; boundary=Apple-Mail-57--720310907; protocol="application/pkcs7-signature"; micalg=sha1 From: "Daniel O'Connor" In-Reply-To: Date: Mon, 23 Aug 2010 11:42:46 +0930 Message-Id: References: <4C2B07F5.6030801@delphij.net> <4C2B4D35.8060903@feral.com> <86lj9wmbrz.fsf@ds4.des.no> <4C2BBF3C.4070503@delphij.net> <86hbkkmad1.fsf@ds4.des.no> <4C2BD498.3090704@delphij.net> <86d3v7n093.fsf@ds4.des.no> <4C5D4BFD.9080803@delphij.net> <86ocde8tzd.fsf@ds4.des.no> To: Xin LI X-Mailer: Apple Mail (2.1081) X-Spam-Score: -2.51 () ALL_TRUSTED,BAYES_00,T_RP_MATCHES_RCVD X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: Winbond Watchdog 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, 23 Aug 2010 02:13:00 -0000 --Apple-Mail-57--720310907 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 23/08/2010, at 1:24, Xin LI wrote: > 2010/8/7 Dag-Erling Sm=F8rgrav : >> Xin LI writes: >>> I'm still polishing up the driver, there seems to be no way to = figure >>> out the base port address directly (datasheet said it's either 0x2e = and >>> 0x4e) so for now I have its device identify method to do some dirty >>> hacks (outb/inb directly) and only check if with appropriate key = entered >>> to the port we will get non-0xff value. >>=20 >> Sounds gross, but if there's no other way, I guess it'll have to do. = I >> imagine you check the PCI id etc. first? >=20 > It's not a PCI device unfortunately (at least, not the one I have > encountered on my Supermicro board). They're LPC ISA devices, I don't know if they appear in any PNP or ACPI = tables though. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --Apple-Mail-57--720310907-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 06:12:58 2010 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 3F26E1065673; Mon, 23 Aug 2010 06:12:58 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CC7988FC17; Mon, 23 Aug 2010 06:12:54 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA11269; Mon, 23 Aug 2010 09:12:51 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OnQH5-000Dm3-56; Mon, 23 Aug 2010 09:12:51 +0300 Message-ID: <4C721161.40403@freebsd.org> Date: Mon, 23 Aug 2010 09:12:49 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Artem Belevich References: <4C719AB9.9020006@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 23 Aug 2010 06:12:58 -0000 on 23/08/2010 02:52 Artem Belevich said the following: > Do you by any chance have a graph showing kstat.zfs.misc.arcstats.size > behavior in addition to the stuff included on your graphs now? Yes, I do and not by a chance :-) > All I > can tell from your graphs is that v_free_count+v_cache_count shifted a > bit lower relative to v_free_target+v_cache_min. Don't belittle those graphs :-) Remember that the "fuchsia" line is when pagedaemon is woken up. > It would be > interesting to see what effect your patch has on ARC itself, > especially when ARC will start giving up memory and when does it stop > shrinking. In an extreme case it stops at arc_c_min as expected. An extreme case is when userland application(s) demand a lot of memory fast. Now the graphs: http://people.freebsd.org/~avg/arc1.png http://people.freebsd.org/~avg/arc2.png http://people.freebsd.org/~avg/pages.png http://people.freebsd.org/~avg/arc3.png What do you see? What do you think? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 07:28:09 2010 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 0ACE51065694; Mon, 23 Aug 2010 07:28:09 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 83C798FC18; Mon, 23 Aug 2010 07:28:08 +0000 (UTC) Received: by vws7 with SMTP id 7so5779518vws.13 for ; Mon, 23 Aug 2010 00:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Jgtv7TWfJwnpmhOm6b4jsBomOPI9yv3rowE3OKMkCZo=; b=pzN3epxiogxs+7ZvR6Wxm8GLOPWhd/jJ9CqqhTEL2UGvNErmfTms30kAKRJXCuX4y/ 1THI3jhqLTA1kB1Y9wD3/iBSFXPF2JmvVP3Ypz1tkQOWszqL1rEJl/P9Gc4oNkowneDn eIWevlPBz9syLluiCV8LL85jGVQs0O+eVQOjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=II9i4RHi031WiwmDntjWMTNywCUCIWVJ+XW2EdC+kYlk/H6eEKQOW6e338ONYbEGWl ukwRvxBAhcQuajAXAVgqrmMoKmW4kfiNqjdpjGg2TEmb45PrVa4EkZ+q9h0ti9RBLPpQ GpKzR4n8lJiyaV/huaLyg127B/GgnOKDzTvwE= MIME-Version: 1.0 Received: by 10.220.124.74 with SMTP id t10mr2850507vcr.179.1282548487609; Mon, 23 Aug 2010 00:28:07 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.220.49.70 with HTTP; Mon, 23 Aug 2010 00:28:07 -0700 (PDT) In-Reply-To: <4C721161.40403@freebsd.org> References: <4C719AB9.9020006@freebsd.org> <4C721161.40403@freebsd.org> Date: Mon, 23 Aug 2010 00:28:07 -0700 X-Google-Sender-Auth: 8X7QKvbEAmQydQw8TDx4sxgnh9c Message-ID: From: Artem Belevich To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 23 Aug 2010 07:28:09 -0000 Ah! After re-reading your first email and I think I've finally got what you're saying -- with your change ARC would only start giving up memory when pagedaemon is awake. Presumably once it's awake it will also run through inactive list pushing some of it to cache. On the other hand existing code voluntarily frees up memory even before pagedaemon wakes up and does such a good job that pagedaemon practically never wakes up and thus does not get to clean inactive list. Can anyone test the patch on a system with mix of UFS/ZFS filesystems and see if the change mitigates or solves the issue with inactive memory excessively backpressuring ARC. Overall I think that your proposed change seems to make sense to me. If we could also deal with zone fragmentation issue you've written in another thread, that should bring ZFS even closer to being usable without shaman-style (the one with lots of muttering, swearing and dancing around) tuning. Actually, it may be worth trying your test with re-enabled UMA allocator for ARC. Now that pagedaemon will be running, it would also invoke UMA's low memory handlers and those should be able to give some memory back to the system. --Artem On Sun, Aug 22, 2010 at 11:12 PM, Andriy Gapon wrote: > on 23/08/2010 02:52 Artem Belevich said the following: >> Do you by any chance have a graph showing kstat.zfs.misc.arcstats.size >> behavior in addition to the stuff included on your graphs now? > > Yes, I do and not by a chance :-) > >> All I >> can tell from your graphs is that v_free_count+v_cache_count shifted a >> bit lower relative to v_free_target+v_cache_min. > > Don't belittle those graphs :-) > Remember that the "fuchsia" line is when pagedaemon is woken up. > >> It would be >> interesting to see what effect your patch has on ARC itself, >> especially when ARC will start giving up memory and when does it stop >> shrinking. > > In an extreme case it stops at arc_c_min as expected. =A0An extreme case = is when > userland application(s) demand a lot of memory fast. > > Now the graphs: > http://people.freebsd.org/~avg/arc1.png > http://people.freebsd.org/~avg/arc2.png > http://people.freebsd.org/~avg/pages.png > http://people.freebsd.org/~avg/arc3.png > > What do you see? =A0What do you think? > > -- > Andriy Gapon > From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 07:32:02 2010 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 F3E1D10656AB; Mon, 23 Aug 2010 07:32:01 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 16F978FC24; Mon, 23 Aug 2010 07:32:00 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA12358; Mon, 23 Aug 2010 10:31:58 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OnRVe-000DtM-7q; Mon, 23 Aug 2010 10:31:58 +0300 Message-ID: <4C7223E9.8070801@freebsd.org> Date: Mon, 23 Aug 2010 10:31:53 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Artem Belevich References: <4C719AB9.9020006@freebsd.org> <4C721161.40403@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 23 Aug 2010 07:32:02 -0000 on 23/08/2010 10:28 Artem Belevich said the following: > If we could also deal with zone fragmentation issue you've written in > another thread, that should bring ZFS even closer to being usable > without shaman-style (the one with lots of muttering, swearing and > dancing around) tuning. > > Actually, it may be worth trying your test with re-enabled UMA > allocator for ARC. Now that pagedaemon will be running, it would also > invoke UMA's low memory handlers and those should be able to give some > memory back to the system. I tried, but still no go (for my taste). The fragmentation is too high and very significant portion of memory is effectively lost to it. E.g. ARC may think that it uses only 1GB but another 1GB is used by free items in ZFS zones (of 4GB total). -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 08:18:32 2010 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 673171065693 for ; Mon, 23 Aug 2010 08:18:32 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 260D38FC14 for ; Mon, 23 Aug 2010 08:18:31 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 287781FFC33; Mon, 23 Aug 2010 08:18:30 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C4E088452E; Mon, 23 Aug 2010 10:18:30 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Daniel O'Connor" References: <4C2B07F5.6030801@delphij.net> <4C2B4D35.8060903@feral.com> <86lj9wmbrz.fsf@ds4.des.no> <4C2BBF3C.4070503@delphij.net> <86hbkkmad1.fsf@ds4.des.no> <4C2BD498.3090704@delphij.net> <86d3v7n093.fsf@ds4.des.no> <4C5D4BFD.9080803@delphij.net> <86ocde8tzd.fsf@ds4.des.no> Date: Mon, 23 Aug 2010 10:18:30 +0200 In-Reply-To: (Daniel O'Connor's message of "Mon, 23 Aug 2010 11:42:46 +0930") Message-ID: <8639u5zqqx.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Winbond Watchdog 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, 23 Aug 2010 08:18:32 -0000 "Daniel O'Connor" writes: > They're LPC ISA devices, I don't know if they appear in any PNP or > ACPI tables though. Same issue with ichwd: ISTR there is actually supposed to be an entry for it in an ACPI table, but on the motherboard I had when I tested it before I committed it, that table either did not exist or was empty. That was three years ago, though, so my recollection is a bit fuzzy. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 09:24:49 2010 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 C470810656A7 for ; Mon, 23 Aug 2010 09:24:49 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 627658FC18 for ; Mon, 23 Aug 2010 09:24:49 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 58F132A28D21; Mon, 23 Aug 2010 11:24:48 +0200 (CEST) Date: Mon, 23 Aug 2010 11:24:48 +0200 From: Ed Schouten To: Lars Engels Message-ID: <20100823092448.GX2978@hoeg.nl> References: <20100822185029.GV2978@hoeg.nl> <20100823111832.huqfznovq8os8csg@0x20.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eG/Mb3lYspOUTzsV" Content-Disposition: inline In-Reply-To: <20100823111832.huqfznovq8os8csg@0x20.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Hackers Subject: Re: A simple and hopefully usable FreeBSD live CD 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, 23 Aug 2010 09:24:49 -0000 --eG/Mb3lYspOUTzsV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Lars Engels wrote: > could you please upload the resulting ISO so that people who don't > want to create it themselves can test your CD? Prrr... I have a horrible internet connection and the resulting ISO is about 600 MB big. I'll see what I can do. --=20 Ed Schouten WWW: http://80386.nl/ --eG/Mb3lYspOUTzsV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxyPmAACgkQ52SDGA2eCwWCwwCeOtGSiuOV0EG40o5CRMlCV6Yk R24An2RfSib96fqlHRg0arcHINgr4xJ8 =zRBc -----END PGP SIGNATURE----- --eG/Mb3lYspOUTzsV-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 09:31:10 2010 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 B53C71065679 for ; Mon, 23 Aug 2010 09:31:10 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 73AA98FC16 for ; Mon, 23 Aug 2010 09:31:10 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id o7N9V1eD000690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 23 Aug 2010 02:31:01 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id o7N9V1Tx000689; Mon, 23 Aug 2010 02:31:01 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA00752; Mon, 23 Aug 10 02:29:03 PDT Date: Mon, 23 Aug 2010 02:28:53 -0700 From: perryh@pluto.rain.com To: doconnor@gsoft.com.au Message-Id: <4c723f55.IHXUYM9HTnD6uCPO%perryh@pluto.rain.com> References: <4C2B07F5.6030801@delphij.net> <4C2B4D35.8060903@feral.com> <86lj9wmbrz.fsf@ds4.des.no> <4C2BBF3C.4070503@delphij.net> <86hbkkmad1.fsf@ds4.des.no> <4C2BD498.3090704@delphij.net> <86d3v7n093.fsf@ds4.des.no> <4C5D4BFD.9080803@delphij.net> <86ocde8tzd.fsf@ds4.des.no> In-Reply-To: User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, des@des.no Subject: Re: Winbond Watchdog 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, 23 Aug 2010 09:31:10 -0000 "Daniel O'Connor" wrote: > On 23/08/2010, at 1:24, Xin LI wrote: > > 2010/8/7 Dag-Erling Sm?rgrav : > >> Xin LI writes: > >>> I'm still polishing up the driver, there seems to be no way to > >>> figure out the base port address directly (datasheet said it's > >>> either 0x2e and 0x4e) so for now I have its device identify > >>> method to do some dirty hacks (outb/inb directly) and only > >>> check if with appropriate key entered to the port we will get > >>> non-0xff value. > >> > >> Sounds gross, but if there's no other way, I guess it'll have > >> to do. I imagine you check the PCI id etc. first? > > > > It's not a PCI device unfortunately (at least, not the one > > I have encountered on my Supermicro board). > > They're LPC ISA devices, I don't know if they appear in any PNP > or ACPI tables though. Any mainboard device on a non-enumerable bus, including LPC, is _supposed_ to be reported in the ACPI tables -- precisely to avoid the need for drivers to engage in risky probing to find their hardware. That's no guarantee of course -- there are plenty of buggy BIOS around -- but it might be worth looking to see if this one got it right. From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 09:33:39 2010 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 C6E7A106566B for ; Mon, 23 Aug 2010 09:33:39 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mx1.freebsd.org (Postfix) with ESMTP id 558D78FC19 for ; Mon, 23 Aug 2010 09:33:39 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mail.0x20.net (Postfix) with ESMTP id 8EFBD39DFE; Mon, 23 Aug 2010 11:18:32 +0200 (CEST) Received: from i011-63.fin-nrw.de (i011-63.fin-nrw.de [193.109.238.130]) by 0x20.net (Horde MIME library) with HTTP; Mon, 23 Aug 2010 11:18:32 +0200 Message-ID: <20100823111832.huqfznovq8os8csg@0x20.net> X-Priority: 3 (Normal) Date: Mon, 23 Aug 2010 11:18:32 +0200 From: Lars Engels To: Ed Schouten References: <20100822185029.GV2978@hoeg.nl> In-Reply-To: <20100822185029.GV2978@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_3iqws48xsc2s"; protocol="application/pgp-signature"; micalg="pgp-sha1" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) X-Mailman-Approved-At: Mon, 23 Aug 2010 11:11:37 +0000 Cc: hackers@FreeBSD.org Subject: Re: A simple and hopefully usable FreeBSD live CD 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, 23 Aug 2010 09:33:40 -0000 This message is in MIME format and has been PGP signed. --=_3iqws48xsc2s Content-Type: text/plain; charset=ISO-8859-15; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Ed Schouten : > Hello all, > > A couple of major releases ago, we had a FreeBSD disc1.iso which also > included the livefs. Nowadays the livefs comes on a separate disc. This > livefs disc has a couple of issues in my opinion: > > - The livefs disc does not feature any installsets, which means if your > system has 1 CD-ROM drive, you have to resort to network connectivity > to obtain the installsets to perform a manual install. > > - The livefs installation places everything in /dist and does some odd > tricks to get the basic things working, which means that any tool that > assumes a specific pathname doesn't work anymore. I remember the GEOM > tools were once broken because of this. You also have to add symlinks > here and there to make something as simple as scp(1) work, because the > ssh(1) binary is in the wrong place. > > I think I already mentioned it on some of the lists, but I've spent some > time creating a better FreeBSD live CD (or at least I tried to). > Basically the CD is just a stock FreeBSD installation (base + manpages + > kernel) with a small mfsroot between the boot process to let it use > unionfs and tmpfs before calling into /sbin/init. > > You can just run adduser, dhclient and fire up a SSH daemon. It's > exactly the same as an installation of FreeBSD on a harddisk, with the > only exception that any changes don't survive a reboot. It also has a > copy of all the installsets, which means you can do installations and > recoveries. > > I've attached a copy of the script I use to generate the CD. Just make > sure you have FreeBSD-9.0-CURRENT-201008-amd64-disc1.iso placed in the > same directory as the script and that you have an up-to-date HEAD source > tree in /usr/src, with a GENERIC kernel already built. You also need to > have cdrtools installed. After that, you should be able to run gencd.sh > as root (needed for retaining file permissions), which should generate a > FreeBSD-9.0-CURRENT-201008-amd64-ed.iso. > > Right now it still requires the source tree, because the fixes for tmpfs > needed to make it all work aren't in the 201008 snapshot. By the time > 201009 is released, the script can easily be modified to use the kernel > binaries. > > I'm sending this email for two different reasons: > > 1. Be sure to give the CD a try and share your experiences. Does it > work? Does it crash? Is it usable for you? If not, why not? > > 2. Would a CD like this be a good addition to the provided install > media? Does it actually solve shortcomings of the existing media? > > If people think it's a nice CD to work with, I could consider > integrating it into release(7). Thanks! > > -- > Ed Schouten > WWW: http://80386.nl/ > Hi Ed, could you please upload the resulting ISO so that people who don't =20 want to create it themselves can test your CD? TIA Lars --=20 Lars Engels E-Mail: lars.engels@0x20.net --=_3iqws48xsc2s Content-Type: application/pgp-signature Content-Description: PGP Digital Signature Content-Disposition: inline Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkxyPOgACgkQKc512sD3afiYpwCfVSSIFZ6nw4zxG5IQVWisbXau 2tQAn0Y3h4pXHJe6myQNL7ZB/4/7GGvs =d8xd -----END PGP SIGNATURE----- --=_3iqws48xsc2s-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 12:23:24 2010 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 AB5B6106566C for ; Mon, 23 Aug 2010 12:23:24 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 4790B8FC12 for ; Mon, 23 Aug 2010 12:23:23 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 261A02A28D21; Mon, 23 Aug 2010 14:23:23 +0200 (CEST) Date: Mon, 23 Aug 2010 14:23:23 +0200 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20100823122323.GY2978@hoeg.nl> References: <20100822185029.GV2978@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I9088/5HKimF9CYi" Content-Disposition: inline In-Reply-To: <20100822185029.GV2978@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: A simple and hopefully usable FreeBSD live CD -- now with images 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, 23 Aug 2010 12:23:24 -0000 --I9088/5HKimF9CYi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, Per Lars's request I've uploaded an ISO of the FreeBSD live CD for amd64: URL: http://people.freebsd.org/~ed/FreeBSD-9.0-CURRENT-201008-amd64-ed.iso.= xz Size: 422452056 bytes (403 MB) SHA256: e0b7ac8eac713ecd5ccdbf107c80563260e6000b27838b003ca11a42ae6ae700 Have fun! --=20 Ed Schouten WWW: http://80386.nl/ --I9088/5HKimF9CYi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxyaDsACgkQ52SDGA2eCwUPlQCfSK5aUGe43tg8foR8Qzh2w2he NIIAn33yYttAP4cjkPGQZQdo47pU3WHH =JbK7 -----END PGP SIGNATURE----- --I9088/5HKimF9CYi-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 12:40:28 2010 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 1B81110656BA; Mon, 23 Aug 2010 12:40:28 +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 DEC388FC2D; Mon, 23 Aug 2010 12:40:27 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 884F246B17; Mon, 23 Aug 2010 08:40:27 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B91DC8A04E; Mon, 23 Aug 2010 08:40:26 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 23 Aug 2010 08:07:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008230807.59582.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 23 Aug 2010 08:40:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: hackers@freebsd.org, Garrett Cooper Subject: Re: Question about printcpuinfo in sys/amd64/amd64/indentcpu.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 12:40:28 -0000 On Friday, August 20, 2010 10:14:46 am Garrett Cooper wrote: > Hi, > Currently the code in identcpu.c does a check for a specific cpu > value extension. This is set to 0x80000004 (even though the > corresponding code below iterates through 0x80000002:0x80000005): It does not invoke 0x80000005 (<, not <=, is used as the loop terminator). > /* Check for extended CPUID information and a processor name. */ > if (cpu_exthigh >= 0x80000004) { > brand = cpu_brand; > for (i = 0x80000002; i < 0x80000005; i++) { > do_cpuid(i, regs); > memcpy(brand, regs, sizeof(regs)); > brand += sizeof(regs); > } > } -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 12:40:28 2010 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 1B81110656BA; Mon, 23 Aug 2010 12:40:28 +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 DEC388FC2D; Mon, 23 Aug 2010 12:40:27 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 884F246B17; Mon, 23 Aug 2010 08:40:27 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B91DC8A04E; Mon, 23 Aug 2010 08:40:26 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 23 Aug 2010 08:07:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008230807.59582.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 23 Aug 2010 08:40:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: hackers@freebsd.org, Garrett Cooper Subject: Re: Question about printcpuinfo in sys/amd64/amd64/indentcpu.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 12:40:28 -0000 On Friday, August 20, 2010 10:14:46 am Garrett Cooper wrote: > Hi, > Currently the code in identcpu.c does a check for a specific cpu > value extension. This is set to 0x80000004 (even though the > corresponding code below iterates through 0x80000002:0x80000005): It does not invoke 0x80000005 (<, not <=, is used as the loop terminator). > /* Check for extended CPUID information and a processor name. */ > if (cpu_exthigh >= 0x80000004) { > brand = cpu_brand; > for (i = 0x80000002; i < 0x80000005; i++) { > do_cpuid(i, regs); > memcpy(brand, regs, sizeof(regs)); > brand += sizeof(regs); > } > } -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 12:40:29 2010 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 788351065696 for ; Mon, 23 Aug 2010 12:40:29 +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 47AF48FC16 for ; Mon, 23 Aug 2010 12:40:29 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E3BBD46B37; Mon, 23 Aug 2010 08:40:28 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D55BD8A04F; Mon, 23 Aug 2010 08:40:27 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 23 Aug 2010 08:10:04 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008230810.04710.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 23 Aug 2010 08:40:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Ryan Stone Subject: Re: kld modules remain loaded if MOD_LOAD handler returns an error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 12:40:29 -0000 On Friday, August 20, 2010 1:13:53 pm Ryan Stone wrote: > Consider the following modules: > > /* first.c */ > static int *test; > > int > test_function(void) > { > return *test; > } > > static int > first_modevent(struct module *m, int what, void *arg) > { > int err = 0; > > switch (what) { > case MOD_LOAD: /* kldload */ > test = malloc(sizeof(int), M_TEMP, M_NOWAIT | M_ZERO); > if (!test) > err = ENOMEM; > break; > case MOD_UNLOAD: /* kldunload */ > break; > default: > err = EINVAL; > break; > } > return(err); > } > > static moduledata_t first_mod = { > "first", > first_modevent, > NULL > }; > > DECLARE_MODULE(first, first_mod, SI_SUB_KLD, SI_ORDER_ANY); > MODULE_VERSION(first, 1); > > > /* second.c */ > static int > second_modevent(struct module *m, int what, void *arg) > { > int err = 0; > > switch (what) { > case MOD_LOAD: /* kldload */ > test_function(); > break; > case MOD_UNLOAD: /* kldunload */ > break; > default: > err = EINVAL; > break; > } > return(err); > } > > static moduledata_t second_mod = { > "second", > second_modevent, > NULL > }; > > DECLARE_MODULE(second, second_mod, SI_SUB_KLD, SI_ORDER_ANY); > MODULE_DEPEND(second, first, 1, 1, 1); > > > Consider the case where malloc fails in first_modevent. > first_modevent will return ENOMEM, but the module will remain loaded. > Now when the second module goes and loads, it calls into the first > module, which is not initialized properly, and promptly crashes when > test_function() dereferences a null pointer. > > It seems to me that a module should be unloaded if it returns an error > from its MOD_LOAD handler. However, that's easier said than done. > The MOD_LOAD handler is called from a SYSINIT, and there's no > immediately obvious way to pass information about the failure from the > SYSINIT to the kernel linker. Anybody have any thoughts on this? Yeah, it's not easy to fix. Probably we could patch the kernel linker to notice if any of the modules for a given linker file had errors during initialization and trigger an unload if that occurs. I don't think this would be too hard to do. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 13:39:38 2010 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 D36FB10656A4 for ; Mon, 23 Aug 2010 13:39:38 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 688918FC15 for ; Mon, 23 Aug 2010 13:39:38 +0000 (UTC) Received: by wwf26 with SMTP id 26so995229wwf.31 for ; Mon, 23 Aug 2010 06:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=H2skkCUqFR9qvd0W5EyNl8K/g/2Mvkra0iVngpKvwCY=; b=eGIszGZIJFB22dE+4KxGM/sswUN++TsOPNmcp4zBGjXjsHIYehPVdfiVvAw5WEBpD/ SDCTb6Tar+lURQ/PL2/DazX41Iszq4fRizrBHOc6xZEdg3T/+B6QHIwJZ0QkhcfD3xRN 27dWWuzth0lyH9mRnKwjTDxdpePpLBQ7F+yPw= 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:content-transfer-encoding; b=v1Qoi3lnj7CJd6QA4M/qOOKrwsA0jfyiAUNGVXHePNqtrKb1NSktT9TJjOP4SuhAL2 s7r89BBmh4ecXBzd2KDo+quY+35N1U2JEHi7CYe8w4SZrZEJD+607eynRH5dDoGymfos b0mLFMfZ3JKw8sdNDjt7GA/uE9DmsvHk0HMZE= MIME-Version: 1.0 Received: by 10.216.1.18 with SMTP id 18mr1624719wec.24.1282570777372; Mon, 23 Aug 2010 06:39:37 -0700 (PDT) Received: by 10.216.58.144 with HTTP; Mon, 23 Aug 2010 06:39:37 -0700 (PDT) In-Reply-To: <861v9sue4g.fsf@gmail.com> References: <1008211213030.2000@smasher> <8639u822tx.fsf@gmail.com> <861v9sue4g.fsf@gmail.com> Date: Mon, 23 Aug 2010 15:39:37 +0200 Message-ID: From: "Domagoj S." To: freebsd-hackers@freebsd.org, Anonymous Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: intel i5 - core? or core2? 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, 23 Aug 2010 13:39:39 -0000 On Sat, Aug 21, 2010 at 6:25 PM, Anonymous wrote: > "Domagoj S." writes: > >> 8.1 RELEASE =A032bit >> >> # gcc --version >> gcc (GCC) 4.2.1 20070719 =A0[FreeBSD] >> >> As per: =A0http://gcc.gnu.org/gcc-4.2/changes.html >> core2 is supported > > It's not! `core' and `core2' for -mtune/-march introduced since gcc43. Ups! I've been confusing FreeBSD's 'CPUTYPE' with gcc's '-march=3D' > BTW, while clang in base (on /head) supports -march=3Dcore2 it's still > better to stick to -march=3Dnative, e.g. on my box > > =A0CPU: Intel(R) Core(TM)2 Duo CPU =A0 =A0 E8400 =A0@ 3.00GHz (3177.07-MH= z K8-class CPU) > > `native' on clang implies `penryn', not a `core2'. While `native' on > gcc45 implies `core2' + extra cflags[1]. > > [1] -mcx16 -msahf -msse4.1 --param l1-cache-size=3D32 --param l1-cache-li= ne-size=3D64 --param l2-cache-size=3D6144 > I see..., so I should always go against FBSD devs and ensure that gcc's arg '-march=3D' is always populated by value 'native'? That is, gcc should alone determine CPU? Not a human user and then setting "discovered" CPU type in CPUTYPE? > You can populate MACHINE_CPU directly, e.g. > > =A0CPUTYPE ?=3D native > =A0MACHINE_CPU !=3D echo ${MACHINE_ARCH}; ${CC} -E -dM -v -march=3D${CPUT= YPE} - &1 \ > =A0 =A0 =A0 =A0| awk '/SSE|MMX/ && !/MATH/ { FS=3D"__"; gsub("_",".",$$2)= ; print tolower($$2) }' > =A0MACHINE_CPU +=3D i486 i586 i686 > > Note sure how well it'll work for cross-arch compilation, though. Setting CPUTYPE will populate MACHINE_CPU. Then I can ensure gcc's arg '-march=3Dnative' by setting: CFLAGS=3D-O2 -pipe -march=3Dnative But CPUTYPE will also append it's own '-march=3D', so to stop it: NO_CPU_CFLAGS=3Dyes I've also saw recommendation to add: COPTFLAGS=3D-O2 -pipe -march=3Dnative NO_CPU_COPTFLAGS=3Dyes But I didn't see that CPUTYPE, has ever set COPTFLAGS? So now I am totally confused with all this options? What is the right way? >> CPUTYPE?=3Dnative is nowhere mentioned "in FreeBSD" > > That cruft in bsd.cpu.mk was written in pre-gcc4 days, i.e. when it > didn't support -march=3Dnative. Besides, if not maintained to accommodate > for newer gcc's from ports those aliases are more harmful than > useful. And not much code uses MACHINE_CPU in base anyway, only > libcrypto and libz. > So if I decide to use a latest compiler from ports, I MUST avoid usage of CPUTYPE? Finally, should I use latest gcc compiler from ports, to build world & kernel, with: CFLAGS=3D-O2 -pipe -march=3Dnative COPTFLAGS=3D-O2 -pipe -march=3Dnative MACHINE_CPU=3D??? And a, regarding speed, please in percentage and taking regular binary install from .iso, as a speed of value 100%, to be compared against. What kind of gain, is compared to compilation from source: a) Without any variables set in /etc/make.conf or passed on CMD b) Only CPUTYPE var set, as officially recommended c) Appending CFLAGS, NO_CPU_CFLAGS ... to b) d) Using latest gcc from ports From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 15:04:23 2010 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 C176F10656CF; Mon, 23 Aug 2010 15:04:23 +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 D0DAE8FC15; Mon, 23 Aug 2010 15:04:22 +0000 (UTC) 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 SAA18631; Mon, 23 Aug 2010 18:04:21 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4C728DF4.2060203@icyb.net.ua> Date: Mon, 23 Aug 2010 18:04:20 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100823 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: John Baldwin References: <201008230810.04710.jhb@freebsd.org> In-Reply-To: <201008230810.04710.jhb@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ryan Stone Subject: Re: kld modules remain loaded if MOD_LOAD handler returns an error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 15:04:23 -0000 on 23/08/2010 15:10 John Baldwin said the following: > On Friday, August 20, 2010 1:13:53 pm Ryan Stone wrote: >> Consider the following modules: >> >> /* first.c */ >> static int *test; >> >> int >> test_function(void) >> { >> return *test; >> } >> >> static int >> first_modevent(struct module *m, int what, void *arg) >> { >> int err = 0; >> >> switch (what) { >> case MOD_LOAD: /* kldload */ >> test = malloc(sizeof(int), M_TEMP, M_NOWAIT | M_ZERO); >> if (!test) >> err = ENOMEM; >> break; >> case MOD_UNLOAD: /* kldunload */ >> break; >> default: >> err = EINVAL; >> break; >> } >> return(err); >> } >> >> static moduledata_t first_mod = { >> "first", >> first_modevent, >> NULL >> }; >> >> DECLARE_MODULE(first, first_mod, SI_SUB_KLD, SI_ORDER_ANY); >> MODULE_VERSION(first, 1); >> >> >> /* second.c */ >> static int >> second_modevent(struct module *m, int what, void *arg) >> { >> int err = 0; >> >> switch (what) { >> case MOD_LOAD: /* kldload */ >> test_function(); >> break; >> case MOD_UNLOAD: /* kldunload */ >> break; >> default: >> err = EINVAL; >> break; >> } >> return(err); >> } >> >> static moduledata_t second_mod = { >> "second", >> second_modevent, >> NULL >> }; >> >> DECLARE_MODULE(second, second_mod, SI_SUB_KLD, SI_ORDER_ANY); >> MODULE_DEPEND(second, first, 1, 1, 1); >> >> >> Consider the case where malloc fails in first_modevent. >> first_modevent will return ENOMEM, but the module will remain loaded. >> Now when the second module goes and loads, it calls into the first >> module, which is not initialized properly, and promptly crashes when >> test_function() dereferences a null pointer. >> >> It seems to me that a module should be unloaded if it returns an error >> from its MOD_LOAD handler. However, that's easier said than done. >> The MOD_LOAD handler is called from a SYSINIT, and there's no >> immediately obvious way to pass information about the failure from the >> SYSINIT to the kernel linker. Anybody have any thoughts on this? > > Yeah, it's not easy to fix. Probably we could patch the kernel linker to > notice if any of the modules for a given linker file had errors during > initialization and trigger an unload if that occurs. I don't think this would > be too hard to do. John, please note that for this testcase we would need to prevent second module's modevent from being executed at all. Perhaps a module shouldn't be considered as loaded until modevent caller marks it as successfully initialized, but I haven't looked at the actual code. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 15:10:34 2010 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 E70751065697 for ; Mon, 23 Aug 2010 15:10:34 +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 9C9D58FC08 for ; Mon, 23 Aug 2010 15:10:34 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id F05F746B60; Mon, 23 Aug 2010 11:10:33 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ECEE68A03C; Mon, 23 Aug 2010 11:10:32 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Mon, 23 Aug 2010 11:10:04 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201008230810.04710.jhb@freebsd.org> <4C728DF4.2060203@icyb.net.ua> In-Reply-To: <4C728DF4.2060203@icyb.net.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008231110.04552.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 23 Aug 2010 11:10:32 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Ryan Stone Subject: Re: kld modules remain loaded if MOD_LOAD handler returns an error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 15:10:35 -0000 On Monday, August 23, 2010 11:04:20 am Andriy Gapon wrote: > on 23/08/2010 15:10 John Baldwin said the following: > > On Friday, August 20, 2010 1:13:53 pm Ryan Stone wrote: > >> Consider the following modules: > >> > >> /* first.c */ > >> static int *test; > >> > >> int > >> test_function(void) > >> { > >> return *test; > >> } > >> > >> static int > >> first_modevent(struct module *m, int what, void *arg) > >> { > >> int err = 0; > >> > >> switch (what) { > >> case MOD_LOAD: /* kldload */ > >> test = malloc(sizeof(int), M_TEMP, M_NOWAIT | M_ZERO); > >> if (!test) > >> err = ENOMEM; > >> break; > >> case MOD_UNLOAD: /* kldunload */ > >> break; > >> default: > >> err = EINVAL; > >> break; > >> } > >> return(err); > >> } > >> > >> static moduledata_t first_mod = { > >> "first", > >> first_modevent, > >> NULL > >> }; > >> > >> DECLARE_MODULE(first, first_mod, SI_SUB_KLD, SI_ORDER_ANY); > >> MODULE_VERSION(first, 1); > >> > >> > >> /* second.c */ > >> static int > >> second_modevent(struct module *m, int what, void *arg) > >> { > >> int err = 0; > >> > >> switch (what) { > >> case MOD_LOAD: /* kldload */ > >> test_function(); > >> break; > >> case MOD_UNLOAD: /* kldunload */ > >> break; > >> default: > >> err = EINVAL; > >> break; > >> } > >> return(err); > >> } > >> > >> static moduledata_t second_mod = { > >> "second", > >> second_modevent, > >> NULL > >> }; > >> > >> DECLARE_MODULE(second, second_mod, SI_SUB_KLD, SI_ORDER_ANY); > >> MODULE_DEPEND(second, first, 1, 1, 1); > >> > >> > >> Consider the case where malloc fails in first_modevent. > >> first_modevent will return ENOMEM, but the module will remain loaded. > >> Now when the second module goes and loads, it calls into the first > >> module, which is not initialized properly, and promptly crashes when > >> test_function() dereferences a null pointer. > >> > >> It seems to me that a module should be unloaded if it returns an error > >> from its MOD_LOAD handler. However, that's easier said than done. > >> The MOD_LOAD handler is called from a SYSINIT, and there's no > >> immediately obvious way to pass information about the failure from the > >> SYSINIT to the kernel linker. Anybody have any thoughts on this? > > > > Yeah, it's not easy to fix. Probably we could patch the kernel linker to > > notice if any of the modules for a given linker file had errors during > > initialization and trigger an unload if that occurs. I don't think this would > > be too hard to do. > > John, > > please note that for this testcase we would need to prevent second module's > modevent from being executed at all. > Perhaps a module shouldn't be considered as loaded until modevent caller marks it > as successfully initialized, but I haven't looked at the actual code. Well, if these two event handlers are in the same module, I think that is a bug in the module really. I tend to collapse such things down to a single event handler per kld just so I can really get the ordering correct anyway. :) If they are in two separate .ko files then the other solution would work. We could also hack the module code to mark a linker_file as 'broken' and have the module_helper sysinit not call mod_load if the containing file is 'broken', etc. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 15:46:42 2010 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 94E5E1065693; Mon, 23 Aug 2010 15:46:42 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BE5568FC19; Mon, 23 Aug 2010 15:46:41 +0000 (UTC) Received: by bwz20 with SMTP id 20so114710bwz.13 for ; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=6O1XWW481q4YY+U9UJ7AFdp+RI+mie2pHy77Zk6e44w=; b=qSW16/m8ixCtV4UOtnfJuFV35zHK4AL28bq2g2VUXPhMDnxJ5qpli4vd1DYQPjhQik Y56V4zg7xcRQsHrjBDc6J6kEXtbkZIVgUTBp9LZfs98vHPkE2BjqwofNHe5dvU1CfKPU vYnuljXHXNKRYkyTVUS3eTM3oYp8Bv96nz2Ls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=PjClt7t9wn93YpAPTZ9xUd7olXwHB1rx9y8zpkc8RIlTeeavrU7Z2kWQHb+WdOvxQE SXxZ40iBg0y5nodSfHdG/Q6/OeBZuyW18Rzt1iyzu4UgcNPud1ZcAv2cLfDxz5ijXa0i /3NcWprTIG/lxVUdfcOnVtTX7WaKX9zdfwssQ= MIME-Version: 1.0 Received: by 10.204.29.23 with SMTP id o23mr3830587bkc.13.1282578400396; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.82.6 with HTTP; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) In-Reply-To: <201008230807.59582.jhb@freebsd.org> References: <201008230807.59582.jhb@freebsd.org> Date: Mon, 23 Aug 2010 08:46:40 -0700 X-Google-Sender-Auth: xVYciolMvR9zFy4ALoh6RuWhcBI Message-ID: From: Garrett Cooper To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Question about printcpuinfo in sys/amd64/amd64/indentcpu.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 15:46:42 -0000 On Mon, Aug 23, 2010 at 5:07 AM, John Baldwin wrote: > On Friday, August 20, 2010 10:14:46 am Garrett Cooper wrote: >> Hi, >> =A0 =A0 Currently the code in identcpu.c does a check for a specific cpu >> value extension. This is set to 0x80000004 (even though the >> corresponding code below iterates through 0x80000002:0x80000005): > > It does not invoke 0x80000005 (<, not <=3D, is used as the loop terminato= r). > >> =A0 =A0 =A0 =A0 /* Check for extended CPUID information and a processor = name. */ >> =A0 =A0 =A0 =A0 if (cpu_exthigh >=3D 0x80000004) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 brand =3D cpu_brand; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 for (i =3D 0x80000002; i < 0x80000005; i= ++) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 do_cpuid(i, regs); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(brand, regs, size= of(regs)); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 brand +=3D sizeof(regs); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >> =A0 =A0 =A0 =A0 } I'm blind :/. I did some poking around and now I know why it's doing that. It's checking for the items noted in chapter 4.2 Brand String under the "Intel Processor Identification and the CPUID Instruction" spec. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 15:46:42 2010 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 94E5E1065693; Mon, 23 Aug 2010 15:46:42 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BE5568FC19; Mon, 23 Aug 2010 15:46:41 +0000 (UTC) Received: by bwz20 with SMTP id 20so114710bwz.13 for ; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=6O1XWW481q4YY+U9UJ7AFdp+RI+mie2pHy77Zk6e44w=; b=qSW16/m8ixCtV4UOtnfJuFV35zHK4AL28bq2g2VUXPhMDnxJ5qpli4vd1DYQPjhQik Y56V4zg7xcRQsHrjBDc6J6kEXtbkZIVgUTBp9LZfs98vHPkE2BjqwofNHe5dvU1CfKPU vYnuljXHXNKRYkyTVUS3eTM3oYp8Bv96nz2Ls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=PjClt7t9wn93YpAPTZ9xUd7olXwHB1rx9y8zpkc8RIlTeeavrU7Z2kWQHb+WdOvxQE SXxZ40iBg0y5nodSfHdG/Q6/OeBZuyW18Rzt1iyzu4UgcNPud1ZcAv2cLfDxz5ijXa0i /3NcWprTIG/lxVUdfcOnVtTX7WaKX9zdfwssQ= MIME-Version: 1.0 Received: by 10.204.29.23 with SMTP id o23mr3830587bkc.13.1282578400396; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.82.6 with HTTP; Mon, 23 Aug 2010 08:46:40 -0700 (PDT) In-Reply-To: <201008230807.59582.jhb@freebsd.org> References: <201008230807.59582.jhb@freebsd.org> Date: Mon, 23 Aug 2010 08:46:40 -0700 X-Google-Sender-Auth: xVYciolMvR9zFy4ALoh6RuWhcBI Message-ID: From: Garrett Cooper To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Question about printcpuinfo in sys/amd64/amd64/indentcpu.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 15:46:42 -0000 On Mon, Aug 23, 2010 at 5:07 AM, John Baldwin wrote: > On Friday, August 20, 2010 10:14:46 am Garrett Cooper wrote: >> Hi, >> =A0 =A0 Currently the code in identcpu.c does a check for a specific cpu >> value extension. This is set to 0x80000004 (even though the >> corresponding code below iterates through 0x80000002:0x80000005): > > It does not invoke 0x80000005 (<, not <=3D, is used as the loop terminato= r). > >> =A0 =A0 =A0 =A0 /* Check for extended CPUID information and a processor = name. */ >> =A0 =A0 =A0 =A0 if (cpu_exthigh >=3D 0x80000004) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 brand =3D cpu_brand; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 for (i =3D 0x80000002; i < 0x80000005; i= ++) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 do_cpuid(i, regs); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(brand, regs, size= of(regs)); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 brand +=3D sizeof(regs); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >> =A0 =A0 =A0 =A0 } I'm blind :/. I did some poking around and now I know why it's doing that. It's checking for the items noted in chapter 4.2 Brand String under the "Intel Processor Identification and the CPUID Instruction" spec. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 16:00:58 2010 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 896AE1065673; Mon, 23 Aug 2010 16:00:58 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1FDC28FC1F; Mon, 23 Aug 2010 16:00:57 +0000 (UTC) Received: by qwg5 with SMTP id 5so5827103qwg.13 for ; Mon, 23 Aug 2010 09:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=BrMxt6cSoI2/ThnmbC+c1XdcS1gOviq6kFkuCk3CRSE=; b=Zz8s/Am0DDSo4tFSLY4X0QLbSH6AjdPEJVsNTJYoQhWJeMIC297fNMQtMZSnIoUqez R/7cz7cEFDejf8R2xbzFzYiiRWVL0dT53I6wwnyFYNfUyupcW1kpHQy3tkxDu5fyTsyU EhcGg8e6NHLFXfmjhoaCIa856Vi0L/MidCZ8c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=AUnN07PqQi72s5EQm2zkc1i9YRTWu6B7TjDMWRFkBZJDMzwHsZoZTe9pCILgz1+WOy 4ZMsQAX+BhT/N2BqmaDtzEFXpsX10F0za9LfTjR1CDQNIqrjbr6z0KBIDf8liXWJyijp 5pm90GYfpjJ8qAt15eF6BihYY818m6CDYKdwo= MIME-Version: 1.0 Received: by 10.229.10.217 with SMTP id q25mr2578983qcq.274.1282579257079; Mon, 23 Aug 2010 09:00:57 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.229.222.209 with HTTP; Mon, 23 Aug 2010 09:00:56 -0700 (PDT) In-Reply-To: <4C728DF4.2060203@icyb.net.ua> References: <201008230810.04710.jhb@freebsd.org> <4C728DF4.2060203@icyb.net.ua> Date: Mon, 23 Aug 2010 18:00:56 +0200 X-Google-Sender-Auth: c5miOgGa3mOA_12lXKfp8vvOKdI Message-ID: From: Attilio Rao To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Ryan Stone Subject: Re: kld modules remain loaded if MOD_LOAD handler returns an error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 16:00:58 -0000 2010/8/23 Andriy Gapon : > on 23/08/2010 15:10 John Baldwin said the following: >> On Friday, August 20, 2010 1:13:53 pm Ryan Stone wrote: >>> Consider the following modules: >>> >>> /* first.c */ >>> static int *test; >>> >>> int >>> test_function(void) >>> { >>> =C2=A0 =C2=A0 return *test; >>> } >>> >>> static int >>> first_modevent(struct module *m, int what, void *arg) >>> { >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 int err =3D 0; >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (what) { >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 case MOD_LOAD: =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* kldload */ >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 test =3D malloc= (sizeof(int), M_TEMP, M_NOWAIT | M_ZERO); >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!test) >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 err =3D ENOMEM; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 case MOD_UNLOAD: =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* kldunload */ >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 default: >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 err =3D EINVAL; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 } >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 return(err); >>> } >>> >>> static moduledata_t first_mod =3D { >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "first", >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 first_modevent, >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 NULL >>> }; >>> >>> DECLARE_MODULE(first, first_mod, SI_SUB_KLD, SI_ORDER_ANY); >>> MODULE_VERSION(first, 1); >>> >>> >>> /* second.c */ >>> static int >>> second_modevent(struct module *m, int what, void *arg) >>> { >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 int err =3D 0; >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (what) { >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 case MOD_LOAD: =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* kldload */ >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 test_function()= ; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 case MOD_UNLOAD: =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* kldunload */ >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 default: >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 err =3D EINVAL; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 } >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 return(err); >>> } >>> >>> static moduledata_t second_mod =3D { >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "second", >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 second_modevent, >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 NULL >>> }; >>> >>> DECLARE_MODULE(second, second_mod, SI_SUB_KLD, SI_ORDER_ANY); >>> MODULE_DEPEND(second, first, 1, 1, 1); >>> >>> >>> Consider the case where malloc fails in first_modevent. >>> first_modevent will return ENOMEM, but the module will remain loaded. >>> Now when the second module goes and loads, it calls into the first >>> module, which is not initialized properly, and promptly crashes when >>> test_function() dereferences a null pointer. >>> >>> It seems to me that a module should be unloaded if it returns an error >>> from its MOD_LOAD handler. =C2=A0However, that's easier said than done. >>> The MOD_LOAD handler is called from a SYSINIT, and there's no >>> immediately obvious way to pass information about the failure from the >>> SYSINIT to the kernel linker. =C2=A0Anybody have any thoughts on this? >> >> Yeah, it's not easy to fix. =C2=A0Probably we could patch the kernel lin= ker to >> notice if any of the modules for a given linker file had errors during >> initialization and trigger an unload if that occurs. =C2=A0I don't think= this would >> be too hard to do. > > John, > > please note that for this testcase we would need to prevent second module= 's > modevent from being executed at all. > Perhaps a module shouldn't be considered as loaded until modevent caller = marks it > as successfully initialized, but I haven't looked at the actual code. I replied in private, but I really agree with Andriy here. Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 19:01:06 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id B8ECD1065695; Mon, 23 Aug 2010 19:01:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Oleg Sharoyko Date: Mon, 23 Aug 2010 14:59:55 -0400 User-Agent: KMail/1.6.2 References: <201008161422.01541.jkim@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <201008231500.51152.jkim@FreeBSD.org> Cc: freebsd-hackers@freebsd.org, Christian Zander Subject: Re: PCI config space is not restored upon resume (macbook pro) 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, 23 Aug 2010 19:01:06 -0000 On Thursday 19 August 2010 12:48 am, Oleg Sharoyko wrote: > On 16 August 2010 22:21, Jung-uk Kim wrote: > > In theory, we can shadow video ROM and execute it in emulation > > *iff* it actually contains x86 real mode code.  It won't be too > > hard but I am not sure whether it is worth trying.  Are you sure > > the option ROM is actually real mode code but not shadowed again > > after resume? [Sorry for the late reply] > Sorry, I guess I wasn't clear enough. There is no VGA ROM at > 0xc0000 after resume. Yes, it was perfectly clear to me. > In patches for linux loader (which I've mentioned in previous > message) they search for ROM, then copy it into memory, execute and > install at proper address. This is possible during boot, but I don't > think this can be done after resume. That's exactly what I meant by "shadowing video ROM". And, it isn't too hard to implement in suspend/resume path. :-) > And, moreover, I tend to agree that this isn't worth trying as this > is very specific to macboocs only (AFAIK). Let's see if I can find some free time later. > By the way, do you think it could be possible to dump option ROM > contents into a file before suspending the system and then load it > back on resume from userland? I've seen a userland tool in ports > (sysutils/vbetool) which can execute VESA BIOS functions. So, I > guess, it could be possible to try to call POST using saved ROM > dump, but I don't know if it's possible to stick this ROM image > into memory "forever" and for all processes. Yes, that's one way to do it. In fact, I am the sysutils/vbetool maintainer, too. :-) hammer# dd if=/dev/mem of=video.rom bs=64k skip=0xc count=1 1+0 records in 1+0 records out 65536 bytes transferred in 0.000872 secs (75164864 bytes/sec) hammer# hexdump -C video.rom | head 00000000 55 aa 75 e9 fd 01 00 00 00 00 00 00 00 00 00 00 |U.u.............| 00000010 00 00 00 00 00 00 00 00 b0 01 00 00 00 00 49 42 |..............IB| 00000020 4d fb 00 00 00 00 00 00 00 00 00 00 00 00 00 04 |M...............| 00000030 20 37 36 31 32 39 35 35 32 30 00 00 00 00 00 00 | 761295520......| 00000040 f5 01 00 00 00 00 00 00 8c 01 00 00 00 00 00 00 |................| 00000050 30 34 2f 30 39 2f 30 38 2c 30 32 3a 33 39 3a 33 |04/09/08,02:39:3| 00000060 38 00 00 00 e9 92 03 00 e9 a5 03 00 00 00 94 00 |8...............| 00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000090 00 00 00 00 00 52 53 37 38 30 00 50 43 49 5f 45 |.....RS780.PCI_E| Please send me the dump privately, I'd like to see. Thanks, Jung-uk Kim From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 20:42:08 2010 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 83D281065673 for ; Mon, 23 Aug 2010 20:42:08 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 207DA8FC17 for ; Mon, 23 Aug 2010 20:42:07 +0000 (UTC) Received: by yxe42 with SMTP id 42so2717615yxe.13 for ; Mon, 23 Aug 2010 13:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=jHbvOGVv5XG6OltEtbCGp0MzipA3KSYzOjAW7p8hngk=; b=UjTgf9uVkYYeyJN1LXC/EwdHff6K7RkJVa7OsGrqGpgFg6rpt0VIRGM2avsmjoMom8 o8HtYV6gEn05d9lWZb/jvg9Wdh3WI2OKn1b7x74qnQrhUYHajU2mtaTRfMCOdONc+tjd tJLEGsDaf8WapZ0nqXNFNCgLQEtnHC8ygPvLc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=n84hGOdbZ2ERFOfaBBYPDNwUnBvyFBccJenXvVsU4201jjKR/2UtVaut3NLm09ogQE W6sricUb6UxRIUs+VOjbWWJNkB6eTu9iYjtyagNHvfp/KY4l2wAAqHNNjo8CeTf9M+y8 R/B5rzQqKfEM+6dXWfLW4C4ssvUBbbSR72ObM= Received: by 10.213.17.203 with SMTP id t11mr4067082eba.66.1282596126483; Mon, 23 Aug 2010 13:42:06 -0700 (PDT) Received: from centel.dataix.local (adsl-99-190-84-182.dsl.klmzmi.sbcglobal.net [99.190.84.182]) by mx.google.com with ESMTPS id v8sm11442799eeh.8.2010.08.23.13.42.04 (version=SSLv3 cipher=RC4-MD5); Mon, 23 Aug 2010 13:42:05 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C72DD1A.9070204@DataIX.net> Date: Mon, 23 Aug 2010 16:42:02 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100806 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: Artem Belevich References: <4C719AB9.9020006@freebsd.org> <4C721161.40403@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org, Andriy Gapon Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 23 Aug 2010 20:42:08 -0000 On 08/23/2010 03:28, Artem Belevich wrote: > Can anyone test the patch on a system with mix of UFS/ZFS filesystems > and see if the change mitigates or solves the issue with inactive > memory excessively backpressuring ARC. I have a system currently patched up to ZFSv15 and mm@'s metaslab patch running that I can test this on. Throw me a patch and some specific tests and I can have the results back to you in the next 2 days. Regards, -- jhell,v From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 23 20:44:57 2010 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 5B1021065674 for ; Mon, 23 Aug 2010 20:44:57 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B47068FC0C for ; Mon, 23 Aug 2010 20:44:56 +0000 (UTC) Received: by wyj26 with SMTP id 26so8558864wyj.13 for ; Mon, 23 Aug 2010 13:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=FT7hMW6eazNziYd4vKtoM2YRJ8pwKkGhB7GK/+FgnpM=; b=MosJ5LqcETAT7bwEzn9CKjqe7pMqS4F8crts5rLP/XLM771PkDJOLOK0i6WK38TYBT Ci6UKJLhmNAqsxbvamRb0FB9hS9L8tpcjBf3v1f7NQghqjNOCnW00eYFK70dj/7vIbDA 8JLEYV0OLHEQEExHBNyO9vxf1piGPJoCZcGqA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=wGQKRGsmYpqyS4i+Q5wf+3qDobxP/pIgYMiNbNTL9m+FuUuLDj+gRsfqnqbwQoGAC2 DzzK5yAAheh6K4SFhzPyICxuDm2xtCQtZUnQ0+vkTFOZROWkxatLETRFn/7F7C7cNUCG gxJ/D5m8RirG9MddumVVHFh3vRsWWDnIloq+Y= Received: by 10.227.127.193 with SMTP id h1mr5000926wbs.139.1282596294803; Mon, 23 Aug 2010 13:44:54 -0700 (PDT) Received: from centel.dataix.local (adsl-99-190-84-182.dsl.klmzmi.sbcglobal.net [99.190.84.182]) by mx.google.com with ESMTPS id i14sm3860128wbe.0.2010.08.23.13.44.53 (version=SSLv3 cipher=RC4-MD5); Mon, 23 Aug 2010 13:44:54 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C72DDC3.1000006@DataIX.net> Date: Mon, 23 Aug 2010 16:44:51 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100806 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: Artem Belevich References: <4C719AB9.9020006@freebsd.org> <4C721161.40403@freebsd.org> <4C72DD1A.9070204@DataIX.net> In-Reply-To: <4C72DD1A.9070204@DataIX.net> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org, Andriy Gapon Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 23 Aug 2010 20:44:57 -0000 On 08/23/2010 16:42, jhell wrote: > On 08/23/2010 03:28, Artem Belevich wrote: >> Can anyone test the patch on a system with mix of UFS/ZFS filesystems >> and see if the change mitigates or solves the issue with inactive >> memory excessively backpressuring ARC. > > I have a system currently patched up to ZFSv15 and mm@'s metaslab patch > running that I can test this on. Throw me a patch and some specific > tests and I can have the results back to you in the next 2 days. > Forget the patch 1 line change I can hand type that in. As for specific tests, let me know... -- jhell,v From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 00:16:52 2010 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 BCEE510656A4 for ; Tue, 24 Aug 2010 00:16:52 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 46B968FC13 for ; Tue, 24 Aug 2010 00:16:51 +0000 (UTC) Received: from park.js.berklix.net (p549A369A.dip.t-dialin.net [84.154.54.154]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id o7O0GiZJ023748; Tue, 24 Aug 2010 00:16:45 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id o7O0GXff051501; Tue, 24 Aug 2010 02:16:33 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id o7O0GIn2007299; Tue, 24 Aug 2010 02:16:23 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201008240016.o7O0GIn2007299@fire.js.berklix.net> To: Tim Judd From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Sun, 22 Aug 2010 15:19:25 MDT." Date: Tue, 24 Aug 2010 02:16:18 +0200 Sender: jhs@berklix.com Cc: Ed Schouten , hackers@freebsd.org Subject: Re: A simple and hopefully usable FreeBSD live CD 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, 24 Aug 2010 00:16:52 -0000 From: Tim Judd > I have, for longer than I can count, create my own livecds because the media > that's produced have a shortcoming for some reason or other. I automated my own build from sources (not .iso) of combined install + live CDROMs, a frighteningly long time ago: My top Makefile: -rw-r--r-- 1 jhs staff 128333 Apr 30 2004 Makefile The oldest custom printed bootable CDROM in my disc wallet is labelled: 18 Aug 2001, FreeBSD-4.3; The newest is 2003.09.14, FreeBSD-4.8. Back then it was novel. FreeBSD did similar later. I kept quiet at the time while negotiating with DrDobbs magazine & 1 or 2 others, to try to get a FreeBSD CD issued with a magazine issue. Negotiations slowly fizzled out, & I never got round to releasing it. Just archeological interest now, that Makefile, The cdrom.ps labels still format OK from the groff sources, 7 years on :-) Cheers, Julian -- Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text, Not HTML, quoted-printable & base 64 dumped with spam. Avoid top posting, It cripples itemised cumulative responses. From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 02:11:01 2010 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 8BB4C106566B; Tue, 24 Aug 2010 02:11:01 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 067AE8FC0C; Tue, 24 Aug 2010 02:11:00 +0000 (UTC) Received: by vws7 with SMTP id 7so26409vws.13 for ; Mon, 23 Aug 2010 19:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=TH0jI61hCMLXRzy4CdFHziS2srG+iybtfFG5uSHpIlQ=; b=VtMn8GDDH6kpofmw5rw1EUyy4YrH+NWdkYQ42N4Hq5BnEOxxeyjWcD3+AgWNSRqZPv h8JQ41aNCOBd8WJs8ZfInNFv/lxJ+D3aLaj2UOpfCz0OnRDnzFbx19zeNvNVvqv/W4lH ix4zKVJPY5RRC3vPEFRNDDuP/xz9HDrwR4pzQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=HU+fiejTt5yHKodzNqWts6SwDcIY7ZWZGgmsPQMXlBShBebey5wwKt2YTxF7mWg/TO /l4aH4Wyuiw+q+y3e//A27NEGp+6EFfcFH2ni2ksoR+LuEOC4jMT5v8iGW/mqs46CA8Z BlCyN2AaTKMH5AQEs2+mPO1AUD62M48wrwrxU= MIME-Version: 1.0 Received: by 10.220.85.196 with SMTP id p4mr3667193vcl.271.1282615859967; Mon, 23 Aug 2010 19:10:59 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.220.49.70 with HTTP; Mon, 23 Aug 2010 19:10:59 -0700 (PDT) In-Reply-To: <4C72DDC3.1000006@DataIX.net> References: <4C719AB9.9020006@freebsd.org> <4C721161.40403@freebsd.org> <4C72DD1A.9070204@DataIX.net> <4C72DDC3.1000006@DataIX.net> Date: Mon, 23 Aug 2010 19:10:59 -0700 X-Google-Sender-Auth: 185f49DgvbAQMAeXOWU8l1Vx1WQ Message-ID: From: Artem Belevich To: jhell Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org, Andriy Gapon Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 24 Aug 2010 02:11:01 -0000 Could you try following experiments before and after the patch while monitoring kstat.zfs.misc.arcstats.size and vm.stats.vm.v_inactive_count. First prepare the data. * You'll need some files totalling around the amount of physical memory on your box. Multiple copies of /usr/src should do the trick. * Place one copy on UFS filesystem and another on ZFS Experiment #1: * Prime ARC by tarring dataset on ZFS into /dev/null. * Now tar both datasets in parallel with output to /dev/null Previously you would end up with ARC size shrinking down to arc_min. What I hope to see after the patch is that inactive memory and ARC reach some sort of equilibrium with neither monopolizing all available memory. #Experiment #2: If equilibrium is reached, try running some application that would allocate and use about 1/2 of your physical memory. Something like that perl one-liner used to cause memory shortage, only a bit less drastic. perl -e '$x=3D"x"x1_000_000_000'; # this should allocate about 2GB. Tune the number to suit your system. Again, in the past ARC would be the one feeing up the memory. Let's see if inactive list gives up some, too. --Artem On Mon, Aug 23, 2010 at 1:44 PM, jhell wrote: > On 08/23/2010 16:42, jhell wrote: >> On 08/23/2010 03:28, Artem Belevich wrote: >>> Can anyone test the patch on a system with mix of UFS/ZFS filesystems >>> and see if the change mitigates or solves the issue with inactive >>> memory excessively backpressuring ARC. >> >> I have a system currently patched up to ZFSv15 and mm@'s metaslab patch >> running that I can test this on. Throw me a patch and some specific >> tests and I can have the results back to you in the next 2 days. >> > > Forget the patch 1 line change I can hand type that in. As for specific > tests, let me know... > > -- > > =A0jhell,v > From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 02:28:24 2010 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 B3DAC106566B; Tue, 24 Aug 2010 02:28:24 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2A2038FC0C; Tue, 24 Aug 2010 02:28:23 +0000 (UTC) Received: by qwg5 with SMTP id 5so6357727qwg.13 for ; Mon, 23 Aug 2010 19:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=4fqi2BKYIFEmvU/VaYL9GXnmLV0JV5sO/hxD8y23fXs=; b=M2Qj8kXme19LMVKALA+bjWIEeYNPKCijeayda53m1IusGhUGVRQBvU8s3v4PumuTX+ 72+f6C+h8lxI7s/yqsPaI3+NTn30gMn0YWW9fH48uTnSzOEnRAOnEDxb+waQ9pOFV3f4 1nxIonIY6FZMW6PTu5hzj325/yyWVW6sIYuAo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=CDhllPG/5p5AXC7g4Ag5NBQmenfeMYIZEVUIt66q69RkzsL2d3sMYWeHscJv9u6x68 5f9djOhJMH0rySgHs5bEBShxAdCjQ5U5tnU4sK+qdHySfJUgHyrg1uFrUCvJTb0grPy7 hPMPTIj3/pWmqq12DFOojVtP0EV3sualPRk4A= Received: by 10.229.222.6 with SMTP id ie6mr4311550qcb.28.1282616903208; Mon, 23 Aug 2010 19:28:23 -0700 (PDT) Received: from centel.dataix.local (adsl-99-190-84-182.dsl.klmzmi.sbcglobal.net [99.190.84.182]) by mx.google.com with ESMTPS id t4sm7901199qcs.40.2010.08.23.19.28.21 (version=SSLv3 cipher=RC4-MD5); Mon, 23 Aug 2010 19:28:22 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C732E44.50702@DataIX.net> Date: Mon, 23 Aug 2010 22:28:20 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100806 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: Artem Belevich References: <4C719AB9.9020006@freebsd.org> <4C721161.40403@freebsd.org> <4C72DD1A.9070204@DataIX.net> <4C72DDC3.1000006@DataIX.net> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org, Andriy Gapon Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon 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, 24 Aug 2010 02:28:24 -0000 On 08/23/2010 22:10, Artem Belevich wrote: > First prepare the data. > * You'll need some files totalling around the amount of physical > memory on your box. Multiple copies of /usr/src should do the trick. > * Place one copy on UFS filesystem and another on ZFS > > Experiment #1: > * Prime ARC by tarring dataset on ZFS into /dev/null. > * Now tar both datasets in parallel with output to /dev/null > > Previously you would end up with ARC size shrinking down to arc_min. > What I hope to see after the patch is that inactive memory and ARC > reach some sort of equilibrium with neither monopolizing all available > memory. > > #Experiment #2: > If equilibrium is reached, try running some application that would > allocate and use about 1/2 of your physical memory. > Something like that perl one-liner used to cause memory shortage, only > a bit less drastic. > perl -e '$x="x"x1_000_000_000'; # this should allocate about 2GB. > Tune the number to suit your system. > > Again, in the past ARC would be the one feeing up the memory. Let's > see if inactive list gives up some, too. Alright I should be able to have something together with the output of this by the 25th with my current workload being the ultimate determining factor. PBS, Regards, -- jhell,v From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 04:11:10 2010 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 E795C1065675; Tue, 24 Aug 2010 04:11:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A9F438FC0C; Tue, 24 Aug 2010 04:11:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o7O49aIn059380; Mon, 23 Aug 2010 22:09:36 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Aug 2010 22:09:45 -0600 (MDT) Message-Id: <20100823.220945.232861953240012158.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201008171615.21103.jhb@freebsd.org> References: <201008170907.20593.jhb@freebsd.org> <201008171615.21103.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: yanegomi@gmail.com, freebsd-hackers@FreeBSD.org Subject: Re: Why doesn't ppc(4) check non-ENXIO failures during probe? 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, 24 Aug 2010 04:11:11 -0000 In message: <201008171615.21103.jhb@freebsd.org> John Baldwin writes: : > So more or less it's for BIOSes with ISA that doesn't feature plug : > and play (286s, 386s, some 486s?)? Just trying to fill in the gap :). : : Yes, it may perhaps still be useful for some x86 embedded systems, though : it is doubtful that those would use a ppc(4) device perhaps. Many embedded x86 systems use ppc(4) as a DIO port. ppi attaches to it and can be used to frob bits. These days, of course, almost all boards have ACPI, so that means they get enumerated that way. Only boards that don't run windows might not have ACPI, in which case the devices are usually enumerated via PNPBIOS. But not always, since those boards tend to have the buggiest BIOSes on the planet in this area. Hints are needed on a few of these boards since nothing else will work. And they have Atom processors on them... Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 04:16:44 2010 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 E76DF1065673; Tue, 24 Aug 2010 04:16:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A39EF8FC20; Tue, 24 Aug 2010 04:16:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o7O4CnpO059416; Mon, 23 Aug 2010 22:12:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 23 Aug 2010 22:12:59 -0600 (MDT) Message-Id: <20100823.221259.904309299051719466.imp@bsdimp.com> To: ray@dlink.ua From: "M. Warner Losh" In-Reply-To: <20100819170643.38362078.ray@dlink.ua> References: <20100819153805.7d60302e.ray@dlink.ua> <201008190918.46947.jhb@freebsd.org> <20100819170643.38362078.ray@dlink.ua> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, jhb@FreeBSD.org Subject: Re: Modules and Buses 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, 24 Aug 2010 04:16:44 -0000 In message: <20100819170643.38362078.ray@dlink.ua> Alexandr Rybalko writes: : On Thu, 19 Aug 2010 09:18:46 -0400 : John Baldwin wrote: : : >> On Thursday, August 19, 2010 8:38:05 am Alexandr Rybalko wrote: : >> > Hi all, : >> > : >> > Can someone say, how `make` in sys/modules dir can obtain available buses. : >> > I try to make clean version of bfe, that can be for PCI bus or can be part : >> of SoC (like BCM5354) on SSB bus. : >> > So for proper module building I need to know what bus interface I must build : >> if_bfe_pci.c, or if_bfe_siba.c, or both? : >> : >> You can always include both buses. If a bus driver isn't present in the : >> kernel the attachment will just never be invoked. : : I was afraid of such response. Now I have to rewrite siba implementation to newbus :) : Thanks you for answer! In the module building system (modules built with sys/modules Makefiles), we generally include all relevant busses. So, for i386 we include EISA front ends for some devices, but omit that on amd64. For siba, you'd only include it on mips, since that's the only platform where this would be relevant (I know broadcom wireless drivers are implemented via a pci <-> siba bridge, but that's a really special case). Check out sys/modules/ep for an example from the mists of history.. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 13:35:15 2010 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 829F4106564A for ; Tue, 24 Aug 2010 13:35:15 +0000 (UTC) (envelope-from dr.clau@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0C1D58FC21 for ; Tue, 24 Aug 2010 13:35:14 +0000 (UTC) Received: by bwz20 with SMTP id 20so1112286bwz.13 for ; Tue, 24 Aug 2010 06:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=M5oTMNod36i+eSZHldcHdV0OQV0qwIBHYKYyf3MeCGk=; b=oQzn+pb9j6yjNeSlMLCfuuED0loG7l2Inhr2tXO/LRA0EY7QPVVUkZGAsrU3osep64 pGKiwc/DUiVYSdSxXbkxGkDoXz9l3l47hz7amGovN2P1Rid7+BAA9L6tq9ScjcdNwLkx RIWL5ymC8nz+JWDdnZJXSh/AhangBxmizvbJs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=kwHkjdHe26XT2tTe2H2D07hQlJqYL5Z1oJJrMfnhEQPJ/lj1xxPi+hWyvBCl4KHx4p BbWld116w6u75WPAaUNhBWi8SAGqTHgqTog0DsJlX/W4xqs7sW1hKcs9jKencv9IW0XC JCnd6MEnuWoXIcXAmY8frPcQvEfvv+3723Wyw= Received: by 10.204.68.206 with SMTP id w14mr4669571bki.132.1282655275561; Tue, 24 Aug 2010 06:07:55 -0700 (PDT) Received: from [127.0.0.103] ([95.76.18.220]) by mx.google.com with ESMTPS id 24sm50954bkr.19.2010.08.24.06.07.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Aug 2010 06:07:54 -0700 (PDT) Message-ID: <4C73C42A.4060103@gmail.com> Date: Tue, 24 Aug 2010 16:07:54 +0300 From: CDP User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.11) Gecko/20100722 Thunderbird/3.0.6 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 8.1-RELEASE amd64 src checksum mismatch 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, 24 Aug 2010 13:35:15 -0000 Hello, there seems to be a checksum mismatch in the src directory, for 8.1-RELEASE amd64, on ftp.freebsd.org. I haven't checked the ISO yet. From CHECKSUM.SHA256: SHA256 (scontrib.am) = 55c97e173a19fb5318aba5b045b52b4862479cdbc0224a2a0bcae3de2ca5b361 SHA256 (ssys.am) = 0bf66b7737cd66dd0da253cb2b2c35a4243b6822faf1b34751b8616fc294c002 while the checksums for the downloaded files are: SHA256 (scontrib.am) = 47892d5713c9b47dd2f34bade2ae6f6fb86db77dc5eb982838153b6cc0c3b20f SHA256 (ssys.am) = 7d9f263b7df3f2504f274a8b2b288e7fa79f9a151a51b3859b49366c43b8a749 The MD5 checksums are different too. Can someone confirm this ? Thanks, Claudiu Dragalina-Paraipan From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 13:47:41 2010 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 02EE51065679 for ; Tue, 24 Aug 2010 13:47:41 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4788FC08 for ; Tue, 24 Aug 2010 13:47:40 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 8B9442A28CF5; Tue, 24 Aug 2010 15:47:39 +0200 (CEST) Date: Tue, 24 Aug 2010 15:47:39 +0200 From: Ed Schouten To: Mubeesh ali Message-ID: <20100824134739.GO64651@hoeg.nl> References: <20100822185029.GV2978@hoeg.nl> <20100823122323.GY2978@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lBqJz4CGKwlWe7/k" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Hackers Subject: Re: A simple and hopefully usable FreeBSD live CD -- now with images 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, 24 Aug 2010 13:47:41 -0000 --lBqJz4CGKwlWe7/k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Mubeesh, * Mubeesh ali wrote: > Please excuse for my question: Is this a compressed version or all we n= eed > to do is to rename it to *.iso ? > after renaming it did not boot in vmware . Yes, it's compressed with xz(1). Just run unxz to decompress it. It should be part of the latest FreeBSD releases. If not, be sure to install /usr/ports/archivers/xz. Greetings, --=20 Ed Schouten WWW: http://80386.nl/ --lBqJz4CGKwlWe7/k Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxzzXsACgkQ52SDGA2eCwUYTgCaAmRyAXVG991Q9n3mZkIr7Zvc tW8An30zCuJaJeYQ1/8ceZRiHDeCDAkc =zhoP -----END PGP SIGNATURE----- --lBqJz4CGKwlWe7/k-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 14:03:54 2010 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 1A4A21065693 for ; Tue, 24 Aug 2010 14:03:54 +0000 (UTC) (envelope-from mubeeshalivm@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id D43328FC15 for ; Tue, 24 Aug 2010 14:03:53 +0000 (UTC) Received: by iwn36 with SMTP id 36so7668641iwn.13 for ; Tue, 24 Aug 2010 07:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=h7FDdxOjWJE3jqQzqR/KbUX/N+MJVOorES6TJFUzNNY=; b=QBMdz/DDCkhBNYX1BdTQvE5MSwsYZViQwXDSUIWaD87/cgw+oWWkWdZNSdoRvCXjdC PMG672yMghT7K+cSSXcP/0S29cjM055EpMkXjr0qCEtKjt9BLYyVj1SD8gmA9xKwpzL1 Wt4HJX41JOu5KygslVM1rEJRkrMMiB9FkFNcc= 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=eU6fWmt17IwyaFBpkY8gEUCummTEucHN+5Ze1v4j73i0NGVxEi14TPehmCaUerQxWe VdugV9nsKyYnNwg/WVb7d15ImfGbGtnZ/2GlGIT2KxWrL5cpRynHTBm/MphNguKvlLC7 rmQ+oCLfPlMdIKLJ45xDEF5pukCg8v2lIot+c= MIME-Version: 1.0 Received: by 10.231.191.6 with SMTP id dk6mr8552339ibb.51.1282657240482; Tue, 24 Aug 2010 06:40:40 -0700 (PDT) Received: by 10.231.166.141 with HTTP; Tue, 24 Aug 2010 06:40:40 -0700 (PDT) In-Reply-To: <20100823122323.GY2978@hoeg.nl> References: <20100822185029.GV2978@hoeg.nl> <20100823122323.GY2978@hoeg.nl> Date: Tue, 24 Aug 2010 19:10:40 +0530 Message-ID: From: Mubeesh ali To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers Subject: Re: A simple and hopefully usable FreeBSD live CD -- now with images 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, 24 Aug 2010 14:03:54 -0000 Hi Ed, Please excuse for my question: Is this a compressed version or all we need to do is to rename it to *.iso ? after renaming it did not boot in vmware . thanks, Mubeesh On Mon, Aug 23, 2010 at 5:53 PM, Ed Schouten wrote: > Hi all, > > Per Lars's request I've uploaded an ISO of the FreeBSD live CD for > amd64: > > URL: > http://people.freebsd.org/~ed/FreeBSD-9.0-CURRENT-201008-amd64-ed.iso.xz > Size: 422452056 bytes (403 MB) > SHA256: e0b7ac8eac713ecd5ccdbf107c80563260e6000b27838b003ca11a42ae6ae700 > > Have fun! > > -- > Ed Schouten > WWW: http://80386.nl/ > -- Best Regards, Mubeesh Ali.V.M From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 15:37:23 2010 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 10FAC106566B for ; Tue, 24 Aug 2010 15:37:23 +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 D2A208FC12 for ; Tue, 24 Aug 2010 15:37:22 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 631F146B92; Tue, 24 Aug 2010 11:37:22 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7C3CD8A03C; Tue, 24 Aug 2010 11:37:21 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Tue, 24 Aug 2010 10:09:46 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201008170907.20593.jhb@freebsd.org> <201008171615.21103.jhb@freebsd.org> <20100823.220945.232861953240012158.imp@bsdimp.com> In-Reply-To: <20100823.220945.232861953240012158.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008241009.46624.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 24 Aug 2010 11:37:21 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: yanegomi@gmail.com, freebsd-hackers@freebsd.org Subject: Re: Why doesn't ppc(4) check non-ENXIO failures during probe? 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, 24 Aug 2010 15:37:23 -0000 On Tuesday, August 24, 2010 12:09:45 am M. Warner Losh wrote: > In message: <201008171615.21103.jhb@freebsd.org> > John Baldwin writes: > : > So more or less it's for BIOSes with ISA that doesn't feature plug > : > and play (286s, 386s, some 486s?)? Just trying to fill in the gap :). > : > : Yes, it may perhaps still be useful for some x86 embedded systems, though > : it is doubtful that those would use a ppc(4) device perhaps. > > Many embedded x86 systems use ppc(4) as a DIO port. ppi attaches to > it and can be used to frob bits. > > These days, of course, almost all boards have ACPI, so that means they > get enumerated that way. Only boards that don't run windows might not > have ACPI, in which case the devices are usually enumerated via > PNPBIOS. But not always, since those boards tend to have the buggiest > BIOSes on the planet in this area. Hints are needed on a few of these > boards since nothing else will work. And they have Atom processors on > them... The specific code I am referring to is the code in ppc_isa_probe() that tries to auto-identify a ppc port by poking at various I/O ports directly. It is not enabled by default. You'd have to have a ppc hint that did not include an I/O port for this code to be triggered I think as it only gets executed if a ppc(4) device does not have an I/O port resource from ACPI/PnPBIOS/hints. I was mostly thinking of this in terms of ISA cards, and I doubt that even modern embedded systems have ISA slots. :) -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 16:10:31 2010 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 4C0361065697; Tue, 24 Aug 2010 16:10:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5188FC14; Tue, 24 Aug 2010 16:10:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o7OG59Oo066878; Tue, 24 Aug 2010 10:05:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 24 Aug 2010 10:05:20 -0600 (MDT) Message-Id: <20100824.100520.826498698880464924.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201008241009.46624.jhb@freebsd.org> References: <201008171615.21103.jhb@freebsd.org> <20100823.220945.232861953240012158.imp@bsdimp.com> <201008241009.46624.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: yanegomi@gmail.com, freebsd-hackers@FreeBSD.org Subject: Re: Why doesn't ppc(4) check non-ENXIO failures during probe? 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, 24 Aug 2010 16:10:31 -0000 In message: <201008241009.46624.jhb@freebsd.org> John Baldwin writes: : On Tuesday, August 24, 2010 12:09:45 am M. Warner Losh wrote: : > In message: <201008171615.21103.jhb@freebsd.org> : > John Baldwin writes: : > : > So more or less it's for BIOSes with ISA that doesn't feature plug : > : > and play (286s, 386s, some 486s?)? Just trying to fill in the gap :). : > : : > : Yes, it may perhaps still be useful for some x86 embedded systems, though : > : it is doubtful that those would use a ppc(4) device perhaps. : > : > Many embedded x86 systems use ppc(4) as a DIO port. ppi attaches to : > it and can be used to frob bits. : > : > These days, of course, almost all boards have ACPI, so that means they : > get enumerated that way. Only boards that don't run windows might not : > have ACPI, in which case the devices are usually enumerated via : > PNPBIOS. But not always, since those boards tend to have the buggiest : > BIOSes on the planet in this area. Hints are needed on a few of these : > boards since nothing else will work. And they have Atom processors on : > them... : : The specific code I am referring to is the code in ppc_isa_probe() that tries : to auto-identify a ppc port by poking at various I/O ports directly. It is : not enabled by default. You'd have to have a ppc hint that did not include an : I/O port for this code to be triggered I think as it only gets executed if a : ppc(4) device does not have an I/O port resource from ACPI/PnPBIOS/hints. Ah, that code... Yes, you're right... : I was mostly thinking of this in terms of ISA cards, and I doubt that even : modern embedded systems have ISA slots. :) There are still a few PC-104 boards knocking around (which is ISA in a different form-factor), but mostly people have moved PC-104+ which is really PCI or other things... Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 07:58:36 2010 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 8C0DD106564A; Wed, 25 Aug 2010 07:58:36 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 1C52C8FC19; Wed, 25 Aug 2010 07:58:35 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1OoAsT-0008J2-Oc; Wed, 25 Aug 2010 10:58:33 +0300 Date: Wed, 25 Aug 2010 10:59:08 +0300 From: Alexandr Rybalko To: "M. Warner Losh" Message-Id: <20100825105908.c8b626fd.ray@dlink.ua> In-Reply-To: <20100823.221259.904309299051719466.imp@bsdimp.com> References: <20100819153805.7d60302e.ray@dlink.ua> <201008190918.46947.jhb@freebsd.org> <20100819170643.38362078.ray@dlink.ua> <20100823.221259.904309299051719466.imp@bsdimp.com> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, jhb@FreeBSD.org Subject: Re: Modules and Buses 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, 25 Aug 2010 07:58:36 -0000 On Mon, 23 Aug 2010 22:12:59 -0600 (MDT) "M. Warner Losh" wrote: >> In message: <20100819170643.38362078.ray@dlink.ua> >> Alexandr Rybalko writes: >> : On Thu, 19 Aug 2010 09:18:46 -0400 >> : John Baldwin wrote: >> : >> : >> On Thursday, August 19, 2010 8:38:05 am Alexandr Rybalko wrote: >> : >> > Hi all, >> : >> > >> : >> > Can someone say, how `make` in sys/modules dir can obtain available buses. >> : >> > I try to make clean version of bfe, that can be for PCI bus or can be part >> : >> of SoC (like BCM5354) on SSB bus. >> : >> > So for proper module building I need to know what bus interface I must build >> : >> if_bfe_pci.c, or if_bfe_siba.c, or both? >> : >> >> : >> You can always include both buses. If a bus driver isn't present in the >> : >> kernel the attachment will just never be invoked. >> : >> : I was afraid of such response. Now I have to rewrite siba implementation to newbus :) >> : Thanks you for answer! >> >> In the module building system (modules built with sys/modules >> Makefiles), we generally include all relevant busses. So, for i386 we >> include EISA front ends for some devices, but omit that on amd64. For >> siba, you'd only include it on mips, since that's the only platform >> where this would be relevant (I know broadcom wireless drivers are >> implemented via a pci <-> siba bridge, but that's a really special >> case). >> >> Check out sys/modules/ep for an example from the mists of history.. >> >> Warner Thanks you Warner, I believe Broadcom wifi cards not last instance of Broadcom devices with PCI-to-SSB bridge. Since this is modular platform that can join multiple already existence chips onto biggest chip. And SSB is spacial case of OCP bus, who can be used not only for MIPS periphery, but ARM too. So I think I should implement the SSB as a full functional bus. Thanks again. -- Alexandr Rybalko aka Alex RAY From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 14:44:39 2010 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 E89C8106567A; Wed, 25 Aug 2010 14:44:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8C99A8FC1D; Wed, 25 Aug 2010 14:44:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o7PEZFLA010345; Wed, 25 Aug 2010 08:35:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 25 Aug 2010 08:35:27 -0600 (MDT) Message-Id: <20100825.083527.578650865239426955.imp@bsdimp.com> To: ray@dlink.ua From: "M. Warner Losh" In-Reply-To: <20100825105908.c8b626fd.ray@dlink.ua> References: <20100819170643.38362078.ray@dlink.ua> <20100823.221259.904309299051719466.imp@bsdimp.com> <20100825105908.c8b626fd.ray@dlink.ua> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, jhb@FreeBSD.org Subject: Re: Modules and Buses 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, 25 Aug 2010 14:44:40 -0000 In message: <20100825105908.c8b626fd.ray@dlink.ua> Alexandr Rybalko writes: : On Mon, 23 Aug 2010 22:12:59 -0600 (MDT) : "M. Warner Losh" wrote: : : >> In message: <20100819170643.38362078.ray@dlink.ua> : >> Alexandr Rybalko writes: : >> : On Thu, 19 Aug 2010 09:18:46 -0400 : >> : John Baldwin wrote: : >> : : >> : >> On Thursday, August 19, 2010 8:38:05 am Alexandr Rybalko wrote: : >> : >> > Hi all, : >> : >> > : >> : >> > Can someone say, how `make` in sys/modules dir can obtain available buses. : >> : >> > I try to make clean version of bfe, that can be for PCI bus or can be part : >> : >> of SoC (like BCM5354) on SSB bus. : >> : >> > So for proper module building I need to know what bus interface I must build : >> : >> if_bfe_pci.c, or if_bfe_siba.c, or both? : >> : >> : >> : >> You can always include both buses. If a bus driver isn't present in the : >> : >> kernel the attachment will just never be invoked. : >> : : >> : I was afraid of such response. Now I have to rewrite siba implementation to newbus :) : >> : Thanks you for answer! : >> : >> In the module building system (modules built with sys/modules : >> Makefiles), we generally include all relevant busses. So, for i386 we : >> include EISA front ends for some devices, but omit that on amd64. For : >> siba, you'd only include it on mips, since that's the only platform : >> where this would be relevant (I know broadcom wireless drivers are : >> implemented via a pci <-> siba bridge, but that's a really special : >> case). : >> : >> Check out sys/modules/ep for an example from the mists of history.. : >> : >> Warner : : Thanks you Warner, : : I believe Broadcom wifi cards not last instance of Broadcom devices with PCI-to-SSB bridge. : Since this is modular platform that can join multiple already existence chips onto biggest chip. : And SSB is spacial case of OCP bus, who can be used not only for MIPS periphery, but ARM too. : : So I think I should implement the SSB as a full functional bus. I agree we should implement it as a full functional bus. It would save a little code to only compile on mips. There's no arm ssb implementation in the tree, and the use case on non-mips is still theoretical. On the other hand, the bus attach code is small, and so would have little impact being always in the module. So I could go either way with this, due to the limitations in our module system. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 10:55:25 2010 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 CB88B1065693 for ; Thu, 26 Aug 2010 10:55:25 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4ACCC8FC18 for ; Thu, 26 Aug 2010 10:55:25 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o7QAtJM5077839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 26 Aug 2010 12:55:19 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1282820120; bh=sop+i8EMe/I3EVFQY+1f0ugJsdvthAXkihkyx1m7QX8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=QMFE0OxKSOjQ67N98DdSsosLK+gHQztKd6aL5jRzOTq0XzKwFBZuSNVxsyssm6OdH 3JkVF68ayV5a0UtCnPP1cs07QgR/dvdyIDov3T//JTDjeEm8+6z1sSrM8WUMUsA1vg IA5mIgGO9IL7Ehd2M8dcplyVOCo21PLly2SOnEos= Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o7QAtJgS077838; Thu, 26 Aug 2010 12:55:19 +0200 (CEST) (envelope-from uqs@spoerlein.net) Date: Thu, 26 Aug 2010 12:55:19 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Ed Schouten Message-ID: <20100826105519.GB50726@acme.spoerlein.net> Mail-Followup-To: Ed Schouten , hackers@freebsd.org References: <20100822185029.GV2978@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100822185029.GV2978@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: hackers@freebsd.org Subject: Re: A simple and hopefully usable FreeBSD live CD 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, 26 Aug 2010 10:55:25 -0000 On Sun, 22.08.2010 at 20:50:29 +0200, Ed Schouten wrote: > I think I already mentioned it on some of the lists, but I've spent some > time creating a better FreeBSD live CD (or at least I tried to). > Basically the CD is just a stock FreeBSD installation (base + manpages + > kernel) with a small mfsroot between the boot process to let it use > unionfs and tmpfs before calling into /sbin/init. > > You can just run adduser, dhclient and fire up a SSH daemon. It's > exactly the same as an installation of FreeBSD on a harddisk, with the > only exception that any changes don't survive a reboot. It also has a > copy of all the installsets, which means you can do installations and > recoveries. Hi Ed, I did something similar quite a while back, but never finished the installation part that I envisioned back then. What I had in mind was: - base system sitting on the ISO image, unaltered - this base system (binaries, manpages, etc.) will be copied over during installation (after, partitioning, newfs, etc. create fstab and rc.conf afterwards). - a unionfs layer on top with the LiveCD parts *plus* useful packages. Consider it more of a rescue CD lookalike The advantages would be access to way more useful tools (license permitting) and reduced storage size, as the binaries are re-used and there's no need for additional "install sets". ISTR that DragonflyBSD went a similar route and of course Ubuntu has this option (but they don't have the base/package distinction). Depending on the target media size (think about 2GB USB drives), you can add tons of packages that you deem useful. Btw, I had made the unionfs "override" layer persistent (storing it on the first FAT32 partition that could be found) if the user choose so before shutdown, so additionally installed packages or altered rc.conf settings survived reboots. The unionfs parts were kinda flaky during the 4.x/5.x days and I had quite some panics. Anyways, my vote is for integrating sth. like this with the new pcbsd installer and catapulting our installer into the 21st century! Uli From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 12:39:34 2010 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 7D3AD1065674 for ; Thu, 26 Aug 2010 12:39:34 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (brucec-2-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:679::2]) by mx1.freebsd.org (Postfix) with ESMTP id 22BFC8FC21 for ; Thu, 26 Aug 2010 12:39:32 +0000 (UTC) Received: from unknown (client-82-31-24-1.midd.adsl.virginmedia.com [82.31.24.1]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 7B3D15DBC; Thu, 26 Aug 2010 12:39:25 +0000 (UTC) Date: Thu, 26 Aug 2010 13:39:29 +0100 From: Bruce Cran To: Ed Schouten Message-ID: <20100826133929.00006ba3@unknown> In-Reply-To: <20100824134739.GO64651@hoeg.nl> References: <20100822185029.GV2978@hoeg.nl> <20100823122323.GY2978@hoeg.nl> <20100824134739.GO64651@hoeg.nl> X-Mailer: Claws Mail 3.7.4cvs1 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers , Mubeesh ali Subject: Re: A simple and hopefully usable FreeBSD live CD -- now with images 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, 26 Aug 2010 12:39:34 -0000 On Tue, 24 Aug 2010 15:47:39 +0200 Ed Schouten wrote: > Yes, it's compressed with xz(1). Just run unxz to > decompress it. It should be part of the latest FreeBSD releases. If > not, be sure to install /usr/ports/archivers/xz. You can also uncompress it using 7-zip (http://7-zip.org/) in Windows. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 20:21:07 2010 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 29B6E106566C for ; Thu, 26 Aug 2010 20:21:07 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id B3DB38FC22 for ; Thu, 26 Aug 2010 20:21:06 +0000 (UTC) Received: (qmail 20892 invoked by uid 399); 26 Aug 2010 19:54:26 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 26 Aug 2010 19:54:26 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C76C671.5070603@FreeBSD.org> Date: Thu, 26 Aug 2010 12:54:25 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: CDP References: <4C73C42A.4060103@gmail.com> In-Reply-To: <4C73C42A.4060103@gmail.com> X-Enigmail-Version: 1.1.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: 8.1-RELEASE amd64 src checksum mismatch 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, 26 Aug 2010 20:21:07 -0000 On 08/24/2010 06:07 AM, CDP wrote: > Hello, > > there seems to be a checksum mismatch in the src directory, for > 8.1-RELEASE amd64, on ftp.freebsd.org. I haven't checked the ISO yet. For future reference this message would have been better sent to freebsd-stable@FreeBSD.org. Also it's easier for people to help you if you provide links to the exact file in question. In this case I assume you mean ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.1-RELEASE/src/scontrib.am Are you seeing errors on more than just one file? Did you try downloading this file again? I can download the file and confirm the checksum just fine, so you might want to try again. hth, Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 20:22:17 2010 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 99E44106566B for ; Thu, 26 Aug 2010 20:22:17 +0000 (UTC) (envelope-from dr.clau@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 280D98FC20 for ; Thu, 26 Aug 2010 20:22:16 +0000 (UTC) Received: by fxm4 with SMTP id 4so1848052fxm.13 for ; Thu, 26 Aug 2010 13:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=3Wd96sOfkVJE5XKGp7JKO2dCs8MdzkChwcfHgFvM6AE=; b=LGR2Sdt64a6TmJRrTr4uawQUzbyblmrTBogzE3RwXahegRyfQXRjC0dLL9yMk64/vr Ad5XFFENVHsy9mBZA1Ys+X2Tir68amdfjsj4LCixxiNUUOn0+nW7LRKTruCLp/iC2cDQ OtaCBU6NpB8PglAnKK8Z+22ZKqhn5kmsW1hf4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=p8k5xKje5gfRiCC7CtB/ZDyOh2Fa+0gyBwRpqlu5qBct5//7gcO4FIDwYYtcJF8Q8k ecDOiUqDsra8+LMkQnHrm/lC4clQ7XyAwuTnn34Go0/6Qdp00i4felIPEmc84tu6ho2A jvPC/8BpeSlpunuzMqBjWIkYJKYTY8JEn3Jnw= Received: by 10.223.126.14 with SMTP id a14mr10205183fas.44.1282854135816; Thu, 26 Aug 2010 13:22:15 -0700 (PDT) Received: from [127.0.0.103] ([95.76.18.220]) by mx.google.com with ESMTPS id k25sm1660167fac.41.2010.08.26.13.22.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Aug 2010 13:22:14 -0700 (PDT) Message-ID: <4C76CCF7.7010103@gmail.com> Date: Thu, 26 Aug 2010 23:22:15 +0300 From: CDP User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.11) Gecko/20100722 Thunderbird/3.0.6 MIME-Version: 1.0 To: Doug Barton References: <4C73C42A.4060103@gmail.com> <4C76C671.5070603@FreeBSD.org> In-Reply-To: <4C76C671.5070603@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: 8.1-RELEASE amd64 src checksum mismatch 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, 26 Aug 2010 20:22:17 -0000 On 08/26/10 22:54, Doug Barton wrote: > On 08/24/2010 06:07 AM, CDP wrote: >> Hello, >> >> there seems to be a checksum mismatch in the src directory, for >> 8.1-RELEASE amd64, on ftp.freebsd.org. I haven't checked the ISO yet. > > For future reference this message would have been better sent to > freebsd-stable@FreeBSD.org. Also it's easier for people to help you if > you provide links to the exact file in question. In this case I assume > you mean > ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.1-RELEASE/src/scontrib.am > > > Are you seeing errors on more than just one file? Did you try > downloading this file again? I can download the file and confirm the > checksum just fine, so you might want to try again. The files on the FTP server are fine. The problem was Filezilla, which by default is treating files with 'am' extension as ASCII files. Claudiu. From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 20:24:34 2010 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 F1DCB1065695 for ; Thu, 26 Aug 2010 20:24:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 812358FC1E for ; Thu, 26 Aug 2010 20:24:34 +0000 (UTC) Received: (qmail 1274 invoked by uid 399); 26 Aug 2010 20:24:33 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 26 Aug 2010 20:24:33 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C76CD80.6040209@FreeBSD.org> Date: Thu, 26 Aug 2010 13:24:32 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: CDP References: <4C73C42A.4060103@gmail.com> <4C76C671.5070603@FreeBSD.org> <4C76CCF7.7010103@gmail.com> In-Reply-To: <4C76CCF7.7010103@gmail.com> X-Enigmail-Version: 1.1.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: 8.1-RELEASE amd64 src checksum mismatch 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, 26 Aug 2010 20:24:35 -0000 On 08/26/2010 01:22 PM, CDP wrote: > The files on the FTP server are fine. Good news. :) > The problem was Filezilla, which by default is treating files with 'am' > extension as ASCII files. D'oh! -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 26 23:47:41 2010 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 B53B01065694 for ; Thu, 26 Aug 2010 23:47:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 477158FC13 for ; Thu, 26 Aug 2010 23:47:40 +0000 (UTC) Received: (qmail 19897 invoked by uid 399); 26 Aug 2010 23:47:40 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 26 Aug 2010 23:47:40 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C76FD1B.50804@FreeBSD.org> Date: Thu, 26 Aug 2010 16:47:39 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 1.2a1pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Is there a boot manager that can handle this? 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, 26 Aug 2010 23:47:41 -0000 Howdy, I'm looking to have the following on 1 disk: Primary partitions: Windows XP, FreeBSD 9-current, FreeBSD 7-stable Extended partition: FAT32 data volume, Ubuntu Linux I have all that installed now (or did anyway) but what I can't do is boot all of it. Our boot manager would be fine for my taste, but doesn't seem to handle booting from a logical volume at all. The latest version of grub that came with Ubuntu works fine for that, and can handle the Windows and the *1st* FreeBSD partition just fine, but if I try to boot the 2nd FreeBSD partition grub just boots the first one again. I got some help from some Linux folks on some commands for grub that allowed me to "hide" the first FreeBSD partition, but what that seems to have done is change the partition type. When I tried changing it back and booting FreeBSD the data in the partition was gone. (No harm done, I have everything backed up and I hadn't started work on the FreeBSD partition, but still ...) So what I'm looking for is a boot manager that can do all this with minimal fuss, and without destroying my data. :) Any suggestions? BTW, the current arrangement is: Windows, Extended, FreeBSD, FreeBSD I thought of changing that to: Windows, FreeBSD, Extended, FreeBSD to see if that helps grub be less confused, but I'd prefer not to do that work unless a) someone can tell me that it will work for sure, or b) no other alternatives are forthcoming. TIA, Doug From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 00:26:34 2010 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 D331B10656AC for ; Fri, 27 Aug 2010 00:26:34 +0000 (UTC) (envelope-from alex-goncharov@comcast.net) Received: from qmta03.westchester.pa.mail.comcast.net (qmta03.westchester.pa.mail.comcast.net [76.96.62.32]) by mx1.freebsd.org (Postfix) with ESMTP id 94F988FC16 for ; Fri, 27 Aug 2010 00:26:34 +0000 (UTC) Received: from omta09.westchester.pa.mail.comcast.net ([76.96.62.20]) by qmta03.westchester.pa.mail.comcast.net with comcast id z1AV1e0030SCNGk53CDK0c; Fri, 27 Aug 2010 00:13:19 +0000 Received: from hanssachs.home ([24.61.85.144]) by omta09.westchester.pa.mail.comcast.net with comcast id zCDK1e00B36qgMk3VCDKTj; Fri, 27 Aug 2010 00:13:19 +0000 Received: from algo by hanssachs.home with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1OomZK-0005fE-BE; Thu, 26 Aug 2010 20:13:18 -0400 Date: Thu, 26 Aug 2010 20:13:18 -0400 Message-Id: From: Alex Goncharov To: Doug Barton In-reply-to: <4C76FD1B.50804@FreeBSD.org> (message from Doug Barton on Thu, 26 Aug 2010 16:47:39 -0700) References: <4C76FD1B.50804@FreeBSD.org> Sender: Alex Goncharov Cc: freebsd-hackers@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alex Goncharov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 00:26:34 -0000 ,--- You/Doug (Thu, 26 Aug 2010 16:47:39 -0700) ----* | Windows and the *1st* FreeBSD partition just fine, but if I try to boot | the 2nd FreeBSD partition grub just boots the first one again. Are you using a chainloader? You should, in my experience; something like that in grub's menu.lst or grub.cfg: ---------------------------------------- title fbsd-b64 -- chainloader (hd0,2,a) root (hd0,2,a) makeactive chainloader +1 title fbsd-b32 -- chainloader (hd0,3,a) root (hd0,3,a) makeactive chainloader +1 ---------------------------------------- -- Alex -- alex-goncharov@comcast.net -- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 00:54:03 2010 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 33DD01065697 for ; Fri, 27 Aug 2010 00:54:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id B54EB8FC1D for ; Fri, 27 Aug 2010 00:54:02 +0000 (UTC) Received: (qmail 836 invoked by uid 399); 27 Aug 2010 00:54:01 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 27 Aug 2010 00:54:01 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C770CA9.6040408@FreeBSD.org> Date: Thu, 26 Aug 2010 17:54:01 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Alex Goncharov References: <4C76FD1B.50804@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.2a1pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 00:54:03 -0000 On 8/26/2010 5:13 PM, Alex Goncharov wrote: > ,--- You/Doug (Thu, 26 Aug 2010 16:47:39 -0700) ----* > | Windows and the *1st* FreeBSD partition just fine, but if I try to boot > | the 2nd FreeBSD partition grub just boots the first one again. > > Are you using a chainloader? What you posted below seems like grub 1 syntax. The latest Ubuntu comes with grub 2. Here is what I have in /etc/grub.d/40_custom (after the required bits): menuentry "FreeBSD 9-Current amd64" { set root=(hd0,3) chainloader +1 } menuentry "FreeBSD 7-Stable i386" { set root=(hd0,3) chainloader +1 } > You should, in my experience; something like that in grub's menu.lst > or grub.cfg: > > ---------------------------------------- > title fbsd-b64 -- chainloader (hd0,2,a) > root (hd0,2,a) > makeactive > chainloader +1 > > title fbsd-b32 -- chainloader (hd0,3,a) > root (hd0,3,a) > makeactive > chainloader +1 > ---------------------------------------- > > -- Alex -- alex-goncharov@comcast.net -- > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 01:00:01 2010 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 7F480106564A for ; Fri, 27 Aug 2010 01:00:01 +0000 (UTC) (envelope-from alex-goncharov@comcast.net) Received: from qmta08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by mx1.freebsd.org (Postfix) with ESMTP id 244128FC08 for ; Fri, 27 Aug 2010 01:00:00 +0000 (UTC) Received: from omta08.westchester.pa.mail.comcast.net ([76.96.62.12]) by qmta08.westchester.pa.mail.comcast.net with comcast id yzET1e0040Fqzac58D01dZ; Fri, 27 Aug 2010 01:00:01 +0000 Received: from hanssachs.home ([24.61.85.144]) by omta08.westchester.pa.mail.comcast.net with comcast id zD001e00E36qgMk3UD01jp; Fri, 27 Aug 2010 01:00:01 +0000 Received: from algo by hanssachs.home with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1OonIV-0005ir-Jb; Thu, 26 Aug 2010 20:59:59 -0400 Date: Thu, 26 Aug 2010 20:59:59 -0400 Message-Id: From: Alex Goncharov To: Doug Barton In-reply-to: <4C770CA9.6040408@FreeBSD.org> (message from Doug Barton on Thu, 26 Aug 2010 17:54:01 -0700) References: <4C76FD1B.50804@FreeBSD.org> <4C770CA9.6040408@FreeBSD.org> Sender: Alex Goncharov Cc: freebsd-hackers@FreeBSD.org, alex-goncharov@comcast.net Subject: Re: Is there a boot manager that can handle this? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alex Goncharov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 01:00:01 -0000 ,--- I/Alex (Thu, 26 Aug 2010 20:13:18 -0400) ----* | title fbsd-b64 -- chainloader (hd0,2,a) | root (hd0,2,a) | chainloader +1 | title fbsd-b32 -- chainloader (hd0,3,a) | root (hd0,3,a) | chainloader +1 ,--- You/Doug (Thu, 26 Aug 2010 17:54:01 -0700) ----* | | What you posted below seems like grub 1 syntax. Right. But notice 2 and 3 above (in the "root" lines). | The latest Ubuntu comes | with grub 2. Here is what I have in /etc/grub.d/40_custom (after the | required bits): | menuentry "FreeBSD 9-Current amd64" { | set root=(hd0,3) | chainloader +1 | } | menuentry "FreeBSD 7-Stable i386" { | set root=(hd0,3) | chainloader +1 | } and notice 3 and 3 in yours. Aren't you pointing GRUB to the same location (the third partition on hd0), in both entries? -- Alex -- alex-goncharov@comcast.net -- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 01:04:27 2010 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 AE7051065693 for ; Fri, 27 Aug 2010 01:04:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9818FC13 for ; Fri, 27 Aug 2010 01:04:26 +0000 (UTC) Received: (qmail 13270 invoked by uid 399); 27 Aug 2010 01:04:26 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 27 Aug 2010 01:04:26 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C770F19.6090500@FreeBSD.org> Date: Thu, 26 Aug 2010 18:04:25 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Alex Goncharov References: <4C76FD1B.50804@FreeBSD.org> <4C770CA9.6040408@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.2a1pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 01:04:27 -0000 On 8/26/2010 5:59 PM, Alex Goncharov wrote: > ,--- I/Alex (Thu, 26 Aug 2010 20:13:18 -0400) ----* > | title fbsd-b64 -- chainloader (hd0,2,a) > | root (hd0,2,a) > | chainloader +1 > | title fbsd-b32 -- chainloader (hd0,3,a) > | root (hd0,3,a) > | chainloader +1 > > ,--- You/Doug (Thu, 26 Aug 2010 17:54:01 -0700) ----* > | > | What you posted below seems like grub 1 syntax. > > Right. But notice 2 and 3 above (in the "root" lines). > > | The latest Ubuntu comes > | with grub 2. Here is what I have in /etc/grub.d/40_custom (after the > | required bits): > | menuentry "FreeBSD 9-Current amd64" { > | set root=(hd0,3) > | chainloader +1 > | } > | menuentry "FreeBSD 7-Stable i386" { > | set root=(hd0,3) > | chainloader +1 > | } > > and notice 3 and 3 in yours. > > Aren't you pointing GRUB to the same location (the third partition on > hd0), in both entries? Ah, right, sorry. The bit I pasted was not the bit I actually used. I had changed the second one to hd0,4 in the running version but I didn't back up that version of the file. I also forgot to mention that I had found the ,a syntax while searching but that didn't help either. Someone responded to me privately to suggest gag.sf.net, which seems promising. Anyone have bad experiences with that? Doug From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 01:25:43 2010 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 39C5A10656A6 for ; Fri, 27 Aug 2010 01:25:43 +0000 (UTC) (envelope-from alex-goncharov@comcast.net) Received: from qmta09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id D87CB8FC16 for ; Fri, 27 Aug 2010 01:25:42 +0000 (UTC) Received: from omta08.westchester.pa.mail.comcast.net ([76.96.62.12]) by qmta09.westchester.pa.mail.comcast.net with comcast id zBTa1e0030Fqzac59DRjaS; Fri, 27 Aug 2010 01:25:43 +0000 Received: from hanssachs.home ([24.61.85.144]) by omta08.westchester.pa.mail.comcast.net with comcast id zDRi1e00536qgMk3UDRiEF; Fri, 27 Aug 2010 01:25:43 +0000 Received: from algo by hanssachs.home with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1OonhN-0005kD-Be; Thu, 26 Aug 2010 21:25:41 -0400 Date: Thu, 26 Aug 2010 21:25:41 -0400 Message-Id: From: Alex Goncharov To: Doug Barton In-reply-to: <4C770F19.6090500@FreeBSD.org> (message from Doug Barton on Thu, 26 Aug 2010 18:04:25 -0700) References: <4C76FD1B.50804@FreeBSD.org> <4C770CA9.6040408@FreeBSD.org> <4C770F19.6090500@FreeBSD.org> Sender: Alex Goncharov Cc: freebsd-hackers@FreeBSD.org, alex-goncharov@comcast.net Subject: Re: Is there a boot manager that can handle this? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alex Goncharov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 01:25:43 -0000 ,--- I/Alex (Thu, 26 Aug 2010 20:59:59 -0400) ----* | Aren't you pointing GRUB to the same location (the third partition on | hd0), in both entries? ,--- You/Doug (Thu, 26 Aug 2010 18:04:25 -0700) ----* | Ah, right, sorry. The bit I pasted was not the bit I actually used. :-) | I had changed the second one to hd0,4 in the running version but I didn't | back up that version of the file. I also forgot to mention that I had | found the ,a syntax while searching but that didn't help either. I just (a week ago) set up a dual-bootable laptop for my daughter (Debian 5.5 and FreeBSD 8.1), so my experience with GRUB 2 is very fresh and very positive. But that laptop is now 1000 miles away from me, at the college, and I can't take a look at the grub.cfg entries, so I am speaking from memory. I certainly didn't use the ,a syntax -- just the plain (hd0,3). I seem to remember though that I did use the "makeactive" in the menu entry for FreeBSD, like in my original reply (although that was taken from a GRUB 1 menu.lst elsewhere -- it is the "chainloader +1" that has been always critical): ,--- I/Alex (Thu, 26 Aug 2010 20:13:18 -0400) ----* | | title fbsd-b64 -- chainloader (hd0,2,a) | root (hd0,2,a) | makeactive | chainloader +1 I don't see "makeactive" in yours: ,--- You/Doug (Thu, 26 Aug 2010 17:54:01 -0700) ----* | | menuentry "FreeBSD 9-Current amd64" { | set root=(hd0,3) | chainloader +1 | } | menuentry "FreeBSD 7-Stable i386" { | set root=(hd0,3) | chainloader +1 | } | `---------------------------------------------------* And BTW, are you sure that you didn't forget to run update-grub2 and are looking at /boot/grub/grub.cfg, not at the /etc/grub entries? -- Alex -- alex-goncharov@comcast.net -- From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 01:35:16 2010 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 28012106567A for ; Fri, 27 Aug 2010 01:35:16 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id CD93A8FC1A for ; Fri, 27 Aug 2010 01:35:15 +0000 (UTC) Received: (qmail 19550 invoked by uid 399); 27 Aug 2010 01:35:15 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 27 Aug 2010 01:35:15 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C771653.1060004@FreeBSD.org> Date: Thu, 26 Aug 2010 18:35:15 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Alex Goncharov References: <4C76FD1B.50804@FreeBSD.org> <4C770CA9.6040408@FreeBSD.org> <4C770F19.6090500@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.2a1pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 01:35:16 -0000 On 8/26/2010 6:25 PM, Alex Goncharov wrote: > ,--- I/Alex (Thu, 26 Aug 2010 20:59:59 -0400) ----* > | Aren't you pointing GRUB to the same location (the third partition on > | hd0), in both entries? > ,--- You/Doug (Thu, 26 Aug 2010 18:04:25 -0700) ----* > | Ah, right, sorry. The bit I pasted was not the bit I actually used. > > :-) > > | I had changed the second one to hd0,4 in the running version but I didn't > | back up that version of the file. I also forgot to mention that I had > | found the ,a syntax while searching but that didn't help either. > > I just (a week ago) set up a dual-bootable laptop for my daughter > (Debian 5.5 and FreeBSD 8.1), so my experience with GRUB 2 is very > fresh and very positive. But that laptop is now 1000 miles away from > me, at the college, and I can't take a look at the grub.cfg entries, so I > am speaking from memory. > > I certainly didn't use the ,a syntax -- just the plain (hd0,3). > > I seem to remember though that I did use the "makeactive" in the > menu entry for FreeBSD, like in my original reply (although that was > taken from a GRUB 1 menu.lst elsewhere -- it is the "chainloader +1" that > has been always critical): Right. With the entries I have I could boot the first FreeBSD partition no problem, and you're right of course that the chainloader bit is critical. I'll try the makeactive next. Thanks again, Doug > ,--- I/Alex (Thu, 26 Aug 2010 20:13:18 -0400) ----* > | > | title fbsd-b64 -- chainloader (hd0,2,a) > | root (hd0,2,a) > | makeactive > | chainloader +1 > > I don't see "makeactive" in yours: > > ,--- You/Doug (Thu, 26 Aug 2010 17:54:01 -0700) ----* > | > | menuentry "FreeBSD 9-Current amd64" { > | set root=(hd0,3) > | chainloader +1 > | } > | menuentry "FreeBSD 7-Stable i386" { > | set root=(hd0,3) > | chainloader +1 > | } > | > `---------------------------------------------------* > > And BTW, are you sure that you didn't forget to run update-grub2 > and are looking at /boot/grub/grub.cfg, not at the /etc/grub entries? > > -- Alex -- alex-goncharov@comcast.net -- > > > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 02:44:14 2010 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 9591A1065672 for ; Fri, 27 Aug 2010 02:44:14 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 63D188FC08 for ; Fri, 27 Aug 2010 02:44:14 +0000 (UTC) Received: by iwn36 with SMTP id 36so2448187iwn.13 for ; Thu, 26 Aug 2010 19:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=25yB1msdbzMUZqjT2waktXrvN5Kc3CggRDSlpiuxwoM=; b=iZRce2byc75kwfZE3eoPtmKYO/oT/DeFnRFL6xko+2bAkayvFNKMaAU50ThZjTyzZu oS8cNZrpVdTNsQ57O8oT7mn7sGjvH1acMSi8WyP5FU7bCfiZ3P0ZehtIuT5E3tTiP13e SDn9pv0lyHg7S0jqjfU2akn9Jwf0QY1mlxaoo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=s7hMFhfWnvfCfCVOZ6P4UmT+o3sJ2ZknaDG2y1SjrH8aSVIkff6zIpLgIdNV4wVa2k epaE49bf6JY1ZCJxGtaf6Mw4q7+EaI4Ag1nVuXdenPXo3zdif+p0miZoR8dk7fXrLEdx +J0hUxrbeV4badEMHq7B2D48M6WPmzmE4PCgs= MIME-Version: 1.0 Received: by 10.231.166.72 with SMTP id l8mr288712iby.95.1282875460817; Thu, 26 Aug 2010 19:17:40 -0700 (PDT) Received: by 10.231.184.223 with HTTP; Thu, 26 Aug 2010 19:17:40 -0700 (PDT) Date: Thu, 26 Aug 2010 22:17:40 -0400 Message-ID: From: Aryeh Friedman To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: disassembler 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, 27 Aug 2010 02:44:14 -0000 Is there a disassembler in the base system if not what is a good option from ports? From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 03:12:50 2010 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 E97F81065698 for ; Fri, 27 Aug 2010 03:12:50 +0000 (UTC) (envelope-from erdgeist@erdgeist.org) Received: from elektropost.org (elektropost.org [217.13.206.130]) by mx1.freebsd.org (Postfix) with ESMTP id 2FEC18FC08 for ; Fri, 27 Aug 2010 03:12:49 +0000 (UTC) Received: (qmail 90619 invoked from network); 27 Aug 2010 02:46:09 -0000 Received: from elektropost.org (HELO elektropost.org) (erdgeist@erdgeist.org) by elektropost.org with CAMELLIA256-SHA encrypted SMTP; 27 Aug 2010 02:46:09 -0000 Message-ID: <4C7726F0.10001@erdgeist.org> Date: Fri, 27 Aug 2010 04:46:08 +0200 From: Dirk Engling User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Aryeh Friedman References: In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: disassembler 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, 27 Aug 2010 03:12:51 -0000 On 27.08.10 04:17, Aryeh Friedman wrote: > Is there a disassembler in the base system if not what is a good > option from ports? Try objdump -d, erdgeist From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 03:42:28 2010 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 73D6E1065693 for ; Fri, 27 Aug 2010 03:42:27 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 39F448FC0C for ; Fri, 27 Aug 2010 03:42:26 +0000 (UTC) Received: by iwn36 with SMTP id 36so2496028iwn.13 for ; Thu, 26 Aug 2010 20:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=EeWLdC0+TEChHkWnj9qhH/lDZQH0CtzFXhE7AUyzV10=; b=lUwY9Dxc42moVOgG/q7DLYEizy1BgA2Y7Q8/QtLVLCsXi9D7KDnY1hvDEwQQt7vbZ3 qMSK53S3JFSY7YGLc839dCSUQUIfnAj2gRjR712It+ZESCvfskOPVeFqgdG9dPfIBbO4 9gW2SaWz0pFbTabKIeWnH5EbAR4ZPjYC7PLMc= 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:content-transfer-encoding; b=DjeAglmYU5RHIYJg4JugxynEnfaSZu1vxSnDTKr08dw/yc5BBMMMhaLP6qtHPTLufz Xg6rwyjJBjCHQlyZx6tYrKa97QFlrttQfDzzwVxZ4z2M15MTCS2iWkYNpnK6nX3LUTve WffKwfQn3vJ6Purfw2gNnEcjwk57g57huBJOc= MIME-Version: 1.0 Received: by 10.231.13.130 with SMTP id c2mr442356iba.24.1282880545761; Thu, 26 Aug 2010 20:42:25 -0700 (PDT) Received: by 10.231.184.223 with HTTP; Thu, 26 Aug 2010 20:42:25 -0700 (PDT) In-Reply-To: References: <4C7726F0.10001@erdgeist.org> Date: Thu, 26 Aug 2010 23:42:25 -0400 Message-ID: From: Aryeh Friedman To: Dirk Engling , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: disassembler 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, 27 Aug 2010 03:42:30 -0000 On Thu, Aug 26, 2010 at 11:36 PM, Aryeh Friedman wrote: > On Thu, Aug 26, 2010 at 10:46 PM, Dirk Engling wr= ote: >> On 27.08.10 04:17, Aryeh Friedman wrote: >> >>> Is there a disassembler in the base system if not what is a good >>> option from ports? >> >> Try objdump -d, >> >> =A0erdgeist >> > > flosoft# objdump -d /dev/da0 > objdump: Warning: '/dev/da0' is not an ordinary file > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 05:15:44 2010 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 1983810656AA for ; Fri, 27 Aug 2010 05:15:44 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id D24DF8FC1A for ; Fri, 27 Aug 2010 05:15:43 +0000 (UTC) Received: by iwn36 with SMTP id 36so2569173iwn.13 for ; Thu, 26 Aug 2010 22:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=L13MWCkB9MxzbkJy+qhgHfqWPA+AlYOdsDlXfqQUAbc=; b=myZBNhV7VYKLrhW5eHl81hQ68vR3JVitfCZ6Z145MnN0a3F/y+LmajUxL7JTF9Rko9 +t6wdw9bCcAFxXsQxZ4jFABC2YmVtdrIN+YdSCHTdtcLcA3XZPsUwvTze7I9kpl16BUf ewnxqcaY9ZUZ/Pe0NMgeCJgpk4N4cz/BKB6dg= 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=HzRwYE4oiZs/SROFzmexi1yNn/MRrw+o57OQrUlE5cPBFFb1SR0SoYbHmH9P6DJoXB 49xnmUPyB0d2J3GFfhpboUqSHvbTaGjCK6TpE6v/9e1ZPaZScEsK5+txxX75PNiJWlB+ 8BknxxKl4vJVZfGyrY7C1jdooif1KCYWYn9Oc= MIME-Version: 1.0 Received: by 10.231.19.197 with SMTP id c5mr519858ibb.91.1282886143138; Thu, 26 Aug 2010 22:15:43 -0700 (PDT) Received: by 10.231.184.223 with HTTP; Thu, 26 Aug 2010 22:15:42 -0700 (PDT) In-Reply-To: References: <4C7726F0.10001@erdgeist.org> Date: Fri, 27 Aug 2010 01:15:42 -0400 Message-ID: From: Aryeh Friedman To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: disassembler 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, 27 Aug 2010 05:15:44 -0000 On Fri, Aug 27, 2010 at 12:37 AM, Aryeh Friedman wrote: > Not really I need to look at the MBR for a flash drive (both the > partiion table and the boot code) > > On Fri, Aug 27, 2010 at 12:32 AM, Rodrigo Mizobe wrote: >> hexdump could help you? what is your need? >> > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 06:52:59 2010 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 EB17010656A3 for ; Fri, 27 Aug 2010 06:52:59 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6D3F48FC08 for ; Fri, 27 Aug 2010 06:52:59 +0000 (UTC) Received: by bwz20 with SMTP id 20so2035742bwz.13 for ; Thu, 26 Aug 2010 23:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=gPhePDbR7zdHIl/3ueDqMXTeNDQDFnOHWqO1wsP+F2U=; b=fZZfb3H2aX3NmkcgKdoxSxlpTPJAbcAly+eMYu5mVcTiJZTkh0AnSChohQ2tqSHahT 0NQ0+4xTG+yyNKqul/1bXoNP17/TrSUNZ7ug23geTLbcff4fTUnr78x7FjAC9BGu93i7 mLVANLOWcjPvQC6dtd6QJ0LrLor+qiLwzDpgM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=RU6sgnlNmPDNKDQKxJnzJQBBnRi9rSqvVckycRlKsRwcCgl6dhSJAUiF/voDDpEseh YRP8Vix79IwvJS5VohLQyerGRdksi8QqSu6rjgB8mUjHiRoo2XWJBAiM8Zo7Xj+P4Rmp jwR1jrI8qJ00lb1LWtbOfba8fqtv+jCe0rBSY= Received: by 10.204.102.197 with SMTP id h5mr180504bko.24.1282890138461; Thu, 26 Aug 2010 23:22:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.66.211 with HTTP; Thu, 26 Aug 2010 23:21:57 -0700 (PDT) In-Reply-To: <4C76FD1B.50804@FreeBSD.org> References: <4C76FD1B.50804@FreeBSD.org> From: Tim Judd Date: Fri, 27 Aug 2010 00:21:57 -0600 Message-ID: To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 06:53:00 -0000 On Thu, Aug 26, 2010 at 5:47 PM, Doug Barton wrote: > Howdy, > > I'm looking to have the following on 1 disk: > > Primary partitions: > Windows XP, FreeBSD 9-current, FreeBSD 7-stable > > Extended partition: > FAT32 data volume, Ubuntu Linux > > I have all that installed now (or did anyway) but what I can't do is > boot all of it. Our boot manager would be fine for my taste, but doesn't > seem to handle booting from a logical volume at all. The latest version > of grub that came with Ubuntu works fine for that, and can handle the > Windows and the *1st* FreeBSD partition just fine, but if I try to boot > the 2nd FreeBSD partition grub just boots the first one again. I got > some help from some Linux folks on some commands for grub that allowed > me to "hide" the first FreeBSD partition, but what that seems to have > done is change the partition type. When I tried changing it back and > booting FreeBSD the data in the partition was gone. (No harm done, I > have everything backed up and I hadn't started work on the FreeBSD > partition, but still ...) > > So what I'm looking for is a boot manager that can do all this with > minimal fuss, and without destroying my data. :) Any suggestions? > > BTW, the current arrangement is: > Windows, Extended, FreeBSD, FreeBSD > > I thought of changing that to: > Windows, FreeBSD, Extended, FreeBSD > > to see if that helps grub be less confused, but I'd prefer not to do > that work unless a) someone can tell me that it will work for sure, or > b) no other alternatives are forthcoming. > FYI http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-introduction.html "...This MBR searches for the first bootable (a.k.a. active) slice on the disk, and then runs the code on that slice to load the remainder of the operating system. The MBR installed by fdisk(8), by default, is such an MBR. It is based on /boot/mbr." OK, so the default /boot/mbr doesn't consider a 2nd boot disk or slice. You *must* (imho) remove all of the bsd bootstrapping from the equasion. GAG might do it (I've seen it do some wonderful stuff).but you will need a native bsd bootstrap/loader *SOMEHOW* in order to load BSD. You might be chasing your tail. I wish you luck, But years ago when I read that, I never again tried two freebsd systems on the same platter. If necessary, add a 2nd hard disk and try boot0, GAG, or one of the other various other bootloaders. Good luck. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 06:53:54 2010 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 A89EE106564A for ; Fri, 27 Aug 2010 06:53:54 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6062D8FC18 for ; Fri, 27 Aug 2010 06:53:54 +0000 (UTC) Received: by gyg4 with SMTP id 4so1171987gyg.13 for ; Thu, 26 Aug 2010 23:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5Mk37uWK0teWRrd92TAjctqO+YSnZSYDRuwMOzp9w7E=; b=WZ6+6iw7N4ZSaEd88DCKZ2dfo/qHcNFnJ1MShDsiaaQ3ia9t2OdX6/NP+Oe+kipZPg RpqrleZB8nLcqWF45ne5JNdgm0ZMi4xUvanPLlkQAnnvduXb+b/x5JxzPE2wq96jqHkg EK0Nve0PrkIsIqLvtBFm6z3LeHxZ3z/VKEkyk= 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=s+3Tc7TA5m7wf1DY2Tq9PaN4t09iAtflt4P7RJjiCnDC7CbsaEkiXH0hFoB3rRtKzO 8jGMS2IDmEYOr8pEK5C0LYGr0/GpDIdDVOLZDd+Tu5l/grqJNI3OsvUaITq+wk0XA7ng WFf7zzB5mzYBTRnRP3S/m/YH05oC2Z9psCuic= MIME-Version: 1.0 Received: by 10.100.226.3 with SMTP id y3mr349827ang.188.1282892033655; Thu, 26 Aug 2010 23:53:53 -0700 (PDT) Received: by 10.231.184.223 with HTTP; Thu, 26 Aug 2010 23:53:53 -0700 (PDT) In-Reply-To: <4C776025.8000609@gmail.com> References: <4C7726F0.10001@erdgeist.org> <4C776025.8000609@gmail.com> Date: Fri, 27 Aug 2010 02:53:53 -0400 Message-ID: From: Aryeh Friedman To: Jim Bryant Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Dirk Engling Subject: Re: disassembler 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, 27 Aug 2010 06:53:54 -0000 No the issue is a drive that has roughly 10 years of work on it died and I was asked to see if it is readable/reviable... I already know the format of the MBR but I need to also read the code to see if something is wakey (I have written MBR's {with inline assemble in GCC) for an OS I am working on but never disambled one) On Fri, Aug 27, 2010 at 2:50 AM, Jim Bryant wrot= e: > umm, dude.... > > you writing a boot sector virus or something? > > funny though.... > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/boot-boot0= .html > > given your skill and goals are questionable, you can find it in the sourc= e > tree yourself. > > Aryeh Friedman wrote: >> >> On Thu, Aug 26, 2010 at 11:36 PM, Aryeh Friedman >> wrote: >> >>> >>> On Thu, Aug 26, 2010 at 10:46 PM, Dirk Engling >>> wrote: >>> >>>> >>>> On 27.08.10 04:17, Aryeh Friedman wrote: >>>> >>>> >>>>> >>>>> Is there a disassembler in the base system if not what is a good >>>>> option from ports? >>>>> >>>> >>>> Try objdump -d, >>>> >>>> =A0erdgeist >>>> >>>> >>> >>> flosoft# objdump -d /dev/da0 >>> objdump: Warning: '/dev/da0' is not an ordinary file >>> >>> >> >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" >> >> > From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 07:02:24 2010 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 0B19710656C0 for ; Fri, 27 Aug 2010 07:02:24 +0000 (UTC) (envelope-from kc5vdj.freebsd@gmail.com) Received: from mail-iw0-f196.google.com (mail-iw0-f196.google.com [209.85.214.196]) by mx1.freebsd.org (Postfix) with ESMTP id B84AA8FC1D for ; Fri, 27 Aug 2010 07:02:23 +0000 (UTC) Received: by iwn7 with SMTP id 7so74848iwn.7 for ; Fri, 27 Aug 2010 00:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Wb6RC4bfPq/67M+CjqNFkjd8SOgQk/n5DkD6D7m+aeg=; b=EZkmbAB7+2WxF6mBc8f9TVNKGEJm6GbwS5tZrZwGToHzM2t7ZmkPOvohIZ0K7WL3ay pCNaRR5zvnoM8OR3f9mhgOLc1+ZIXJXlG1WSzVAjzDHrZpLb5rYV8KcBZBEjDgFXFkKK St1AqtrmNvd6MJICUMR+1QxYKSloqbHUm2Isk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=MiWuDeNf9196W5hXM0t2fbZRNLWy5SNePqN8i7otjWXL7TWP/1hk8OqLNtFBBkov/m +mLcYYIbLmOOxV0JePeVonNJP5rzPadbrmaSOdmcNw98c55rnmHzAg/URxZAkhGXOV30 g0etrFx2/GOAdQ1B3cuQXrNW/pJculaEq+wOo= Received: by 10.231.174.84 with SMTP id s20mr642528ibz.94.1282891815704; Thu, 26 Aug 2010 23:50:15 -0700 (PDT) Received: from orb.electron-tube.net (71-217-215-181.cdrr.qwest.net [71.217.215.181]) by mx.google.com with ESMTPS id e8sm3382882ibb.2.2010.08.26.23.50.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Aug 2010 23:50:14 -0700 (PDT) Message-ID: <4C776025.8000609@gmail.com> Date: Fri, 27 Aug 2010 01:50:13 -0500 From: Jim Bryant User-Agent: Thunderbird 2.0.0.24 (X11/20100731) MIME-Version: 1.0 To: Aryeh Friedman References: <4C7726F0.10001@erdgeist.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Dirk Engling Subject: Re: disassembler 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, 27 Aug 2010 07:02:24 -0000 umm, dude.... you writing a boot sector virus or something? funny though.... http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/boot-boot0.html given your skill and goals are questionable, you can find it in the source tree yourself. Aryeh Friedman wrote: > On Thu, Aug 26, 2010 at 11:36 PM, Aryeh Friedman > wrote: > >> On Thu, Aug 26, 2010 at 10:46 PM, Dirk Engling wrote: >> >>> On 27.08.10 04:17, Aryeh Friedman wrote: >>> >>> >>>> Is there a disassembler in the base system if not what is a good >>>> option from ports? >>>> >>> Try objdump -d, >>> >>> erdgeist >>> >>> >> flosoft# objdump -d /dev/da0 >> objdump: Warning: '/dev/da0' is not an ordinary file >> >> > _______________________________________________ > 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 Aug 27 07:45:49 2010 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 8031910656C8 for ; Fri, 27 Aug 2010 07:45:49 +0000 (UTC) (envelope-from scdbackup@gmx.net) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id EBC728FC17 for ; Fri, 27 Aug 2010 07:45:48 +0000 (UTC) Received: (qmail invoked by alias); 27 Aug 2010 07:19:08 -0000 Received: from 165.126.46.212.adsl.ncore.de (HELO 192.168.2.69) [212.46.126.165] by mail.gmx.net (mp071) with SMTP; 27 Aug 2010 09:19:08 +0200 X-Authenticated: #2145628 X-Provags-ID: V01U2FsdGVkX19BXKhruzxBqOhiA2J+1O0CKwscTpD/JBNrCxz8S0 V/bhrEDrVk1tYb Date: Fri, 27 Aug 2010 09:18:52 +0200 From: "Thomas Schmitt" To: freebsd-hackers@FreeBSD.org References: <4C771653.1060004@FreeBSD.org> In-Reply-To: <4C771653.1060004@FreeBSD.org> Message-Id: <95330659210611@192.168.2.69> X-Y-GMX-Trusted: 0 Cc: dougb@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 07:45:49 -0000 Hi, > Primary partitions: > Windows XP, FreeBSD 9-current, FreeBSD 7-stable > Extended partition: > FAT32 data volume, Ubuntu Linux > menuentry "FreeBSD 9-Current amd64" { > set root=(hd0,3) > chainloader +1 > } Did you already try : set root=(hd0,3,a) freebsd /boot/loader I have a machine with primary partitions FreeBSD, FreeBSD, Solaris, and on extended partition Debian Lenny 5.01 Booting is done by the GRUB2 1.98 which came with Debian. In Debian's /boot/grub/grub.cfg i have these entries (which all work for me): ------------------------------------------------ menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64, eSATA 1.5Gbps" { set root=(hd0,5) search --fs-uuid --set 5badec4b-751e-47e1-a3c5-f8555d680cc4 linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=5badec4b-751e-47e1-a3c5-f8555d680cc4 ro initrd /boot/initrd.img-ts } menuentry "FreeBSD-8.0 STABLE on Partition 1" { set root=(hd0,1,a) freebsd /boot/loader } menuentry "FreeBSD-8.0 RELEASE on Partition 2" { set root=(hd0,2,a) freebsd /boot/loader } menuentry "Solaris snv 134 on Partition 3" { set root=(hd0,3) chainloader +1 } ------------------------------------------------ Despite fat warnings # DO NOT EDIT THIS FILE it is well recommended by GRUB2 developers to do experiments directly in /boot/grub/grub.cfg and to fiddle with the generator scripts only later. This removes one potential level of error. Just do _not_ run update-grub while the changes are not yet in the scripts. ------------------------------------------------ A general method to boot systems before they get in reach of GRUB2 is: - Install the desired system - Boot rescue system (in my case RIP Linux CD). - Backup to removable media the "invisible" blocks which sit before the start of the first partition dd if=/dev/sda of=... bs=512 count=31 (Address /dev/sda depends on the booted rescue system. Number 31 was learned from the partitioning tool. Maybe it suffices to copy just the first block of /dev/sda.) To boot a particular system: - Boot rescue system - Copy backuped blocks to disk dd if=... of=/dev/sda bs=512 count=31 - Reboot will bring up the originally installed boot loader of the desired system. I did this with FreeBSD and Solaris before i found the necessary GRUB2 menu examples. Have a nice day :) Thomas From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 08:27:41 2010 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 D920A1065698 for ; Fri, 27 Aug 2010 08:27:41 +0000 (UTC) (envelope-from kc5vdj.freebsd@gmail.com) Received: from mail-iw0-f196.google.com (mail-iw0-f196.google.com [209.85.214.196]) by mx1.freebsd.org (Postfix) with ESMTP id 96A3C8FC13 for ; Fri, 27 Aug 2010 08:27:41 +0000 (UTC) Received: by iwn7 with SMTP id 7so84110iwn.7 for ; Fri, 27 Aug 2010 01:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=uRjrpBcGVYERgvA9jt8b4WXDoWDKH2Zegkgr3yeX8+c=; b=Qv30SPzHpJ1MVMWDFICO//bAKZLSpKGuVfZALY321eQtIy2olDXf2EGOj21Odmx8LX YWFsZd7RQyfc4fkf+ahGeUnymVvTFs6pWqD7AkdQrgfy3ufKcvsJxLEnHUq5/HeMgARg s4jpmr58bnHCreBA1J5r8aA46myuT1pX9/HTA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=sa5mVEAnClTMwZ8CoCO1s5x/uUeFRVp8XsctXU3FsJyMtCUgHKjkai+m2vQOtYlRYR IBDTUNE5t+NzM79fKvHuI2uqXmJU2SYUIp1CM3+EclQeeiK2Y1LnLUlUIZ4hQ++iUSKB cGCM/9JbSLlR4fUEe02FW5kva2ky68vw1g/50= Received: by 10.231.177.25 with SMTP id bg25mr706946ibb.154.1282897660074; Fri, 27 Aug 2010 01:27:40 -0700 (PDT) Received: from orb.electron-tube.net (71-217-215-181.cdrr.qwest.net [71.217.215.181]) by mx.google.com with ESMTPS id r3sm3478298ibk.1.2010.08.27.01.27.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Aug 2010 01:27:39 -0700 (PDT) Message-ID: <4C7776FA.5070601@gmail.com> Date: Fri, 27 Aug 2010 03:27:38 -0500 From: Jim Bryant User-Agent: Thunderbird 2.0.0.24 (X11/20100731) MIME-Version: 1.0 To: Aryeh Friedman References: <4C7726F0.10001@erdgeist.org> <4C776025.8000609@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Dirk Engling Subject: Re: disassembler 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, 27 Aug 2010 08:27:41 -0000 ah, ok. if it's a flash drive, the data may be toast. depends on how many dead cells there are. best of luck to you. Aryeh Friedman wrote: > No the issue is a drive that has roughly 10 years of work on it died > and I was asked to see if it is readable/reviable... I already know > the format of the MBR but I need to also read the code to see if > something is wakey (I have written MBR's {with inline assemble in GCC) > for an OS I am working on but never disambled one) > > On Fri, Aug 27, 2010 at 2:50 AM, Jim Bryant wrote: > >> umm, dude.... >> >> you writing a boot sector virus or something? >> >> funny though.... >> >> http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/boot-boot0.html >> >> given your skill and goals are questionable, you can find it in the source >> tree yourself. >> >> Aryeh Friedman wrote: >> >>> On Thu, Aug 26, 2010 at 11:36 PM, Aryeh Friedman >>> wrote: >>> >>> >>>> On Thu, Aug 26, 2010 at 10:46 PM, Dirk Engling >>>> wrote: >>>> >>>> >>>>> On 27.08.10 04:17, Aryeh Friedman wrote: >>>>> >>>>> >>>>> >>>>>> Is there a disassembler in the base system if not what is a good >>>>>> option from ports? >>>>>> >>>>>> >>>>> Try objdump -d, >>>>> >>>>> erdgeist >>>>> >>>>> >>>>> >>>> flosoft# objdump -d /dev/da0 >>>> objdump: Warning: '/dev/da0' is not an ordinary file >>>> >>>> >>>> >>> _______________________________________________ >>> 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 Aug 27 08:31:54 2010 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 5028210656AC for ; Fri, 27 Aug 2010 08:31:54 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 137778FC14 for ; Fri, 27 Aug 2010 08:31:52 +0000 (UTC) Received: by iwn36 with SMTP id 36so2722543iwn.13 for ; Fri, 27 Aug 2010 01:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=lZ67w+HMx4Gzd2la3cZznUw046mzwYTu/aEl68MwbCY=; b=eNLDDnjCI7inaLf76vVOJO+nmOyHKZdji6E88rBtsMNEUtMmBfGb5jGiQbven6g1sB mIMqt1wAUKPcCFv8/vWzEY3Pk113ZUhvY6yapsAhoV4xwbw52TqpKZCQjCath9guour2 HWfrRNVajh9AISDHzoD+PKRCMBgURlouo4v3A= 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:content-transfer-encoding; b=UlhnxXmqos/cRdWi3cpfRlcLm3SXEVpZHTnZPiQgvIeu+bbGczj4DbgOaGBea85SPD FCRHysb7s6Jo76yOcaVDJ8mSp2nUjT6f+clPVmR/ONhlbyZWYUau8YFyg6Ujv2hJbb2x BU9FXsENKxxhoMuEoqpUVCqBJkt/arK3/mH9U= MIME-Version: 1.0 Received: by 10.231.184.71 with SMTP id cj7mr733358ibb.159.1282897911491; Fri, 27 Aug 2010 01:31:51 -0700 (PDT) Received: by 10.231.184.223 with HTTP; Fri, 27 Aug 2010 01:31:51 -0700 (PDT) In-Reply-To: <4C7776FA.5070601@gmail.com> References: <4C7726F0.10001@erdgeist.org> <4C776025.8000609@gmail.com> <4C7776FA.5070601@gmail.com> Date: Fri, 27 Aug 2010 04:31:51 -0400 Message-ID: From: Aryeh Friedman To: Jim Bryant , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: disassembler 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, 27 Aug 2010 08:31:54 -0000 I should of said USB drive I just think of all USB drives as "flash" drives... it is a Lacie external drive On Fri, Aug 27, 2010 at 4:27 AM, Jim Bryant wrot= e: > ah, ok. > > if it's a flash drive, the data may be toast. =A0depends on how many dead > cells there are. > > best of luck to you. > > Aryeh Friedman wrote: >> >> No the issue is a drive that has roughly 10 years of work on it died >> and I was asked to see if it is readable/reviable... I already know >> the format of the MBR but I need to also read the code to see if >> something is wakey (I have written MBR's {with inline assemble in GCC) >> for an OS I am working on but never disambled one) >> >> On Fri, Aug 27, 2010 at 2:50 AM, Jim Bryant >> wrote: >> >>> >>> umm, dude.... >>> >>> you writing a boot sector virus or something? >>> >>> funny though.... >>> >>> >>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/boot-boo= t0.html >>> >>> given your skill and goals are questionable, you can find it in the >>> source >>> tree yourself. >>> >>> Aryeh Friedman wrote: >>> >>>> >>>> On Thu, Aug 26, 2010 at 11:36 PM, Aryeh Friedman >>>> wrote: >>>> >>>> >>>>> >>>>> On Thu, Aug 26, 2010 at 10:46 PM, Dirk Engling >>>>> wrote: >>>>> >>>>> >>>>>> >>>>>> On 27.08.10 04:17, Aryeh Friedman wrote: >>>>>> >>>>>> >>>>>> >>>>>>> >>>>>>> Is there a disassembler in the base system if not what is a good >>>>>>> option from ports? >>>>>>> >>>>>>> >>>>>> >>>>>> Try objdump -d, >>>>>> >>>>>> =A0erdgeist >>>>>> >>>>>> >>>>>> >>>>> >>>>> flosoft# objdump -d /dev/da0 >>>>> objdump: Warning: '/dev/da0' is not an ordinary file >>>>> >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> 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 Aug 27 08:42:29 2010 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 ECEDC1065696 for ; Fri, 27 Aug 2010 08:42:29 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 752868FC1A for ; Fri, 27 Aug 2010 08:42:29 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=A9i2abt5RTkKnggEwMfGtMsecE7KHeOxIgKEeBb2Lvo= c=1 sm=1 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=i0QcCXJJrt8ueKhABZAA:9 a=jgg34Gwsg-8TtivDp53w7fBLYzcA:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 11919650; Fri, 27 Aug 2010 10:32:19 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Fri, 27 Aug 2010 10:28:26 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <4C7776FA.5070601@gmail.com> In-Reply-To: <4C7776FA.5070601@gmail.com> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008271028.26529.hselasky@c2i.net> Cc: Dirk Engling , Aryeh Friedman , Jim Bryant Subject: Re: disassembler 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, 27 Aug 2010 08:42:30 -0000 On Friday 27 August 2010 10:27:38 Jim Bryant wrote: > ah, ok. > > if it's a flash drive, the data may be toast. depends on how many dead > cells there are. > Hi, dd if=/dev/da0 of=/root/temp.mbr bs=512 count=1 Then use objcopy to convert /root/temp.mbr into something that objdump can read, and it should disassemble it for you :-) You might want to look at photorec in ports too. Good luck. --HPS From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 10:06:56 2010 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 D6ADE106566B for ; Fri, 27 Aug 2010 10:06:56 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7F08FC0C for ; Fri, 27 Aug 2010 10:06:55 +0000 (UTC) Received: by bwz20 with SMTP id 20so2136372bwz.13 for ; Fri, 27 Aug 2010 03:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=HnjPOXtRBGIc3GyayY5lsWND1VUqTRU8zBjpi7Ep49Y=; b=PtZJzDZi6oGYgELorFZKpU3puR48oevPU0MGxeGmtB1fIz1a5avMsI6WMTs2GsBNT/ 9lEW16I3J74zoe+th8lV15gS0Q2RCsSjwNiPvdOTRHy6BmjrkXK4VAM3c0qzWB2TN036 VNK9m8p1JSTSWVx/iqcIXPf8UNu9ukU/U0iSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=KDrMinKGoIFvfpNuE0hnI6Sah9OgtSLtURn+tX2JUE/ThZ/lBq/IdyxCUhIThQZjwv IbZ83G3rvdqbW5iQKGXXEq+oSsBp7sP+wzkV5Hx3sifkmW9/irwNl+mtupAikNIzhGcE 9uqDXPo7KmsUs7RoRXHnvu2/ZkNmw5W9LrxKA= Received: by 10.204.153.10 with SMTP id i10mr324611bkw.1.1282901818361; Fri, 27 Aug 2010 02:36:58 -0700 (PDT) Received: from ernst.jennejohn.org (p578E1FD9.dip.t-dialin.net [87.142.31.217]) by mx.google.com with ESMTPS id 24sm2427583bkr.19.2010.08.27.02.36.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Aug 2010 02:36:57 -0700 (PDT) Date: Fri, 27 Aug 2010 11:36:55 +0200 From: Gary Jennejohn To: Aryeh Friedman Message-ID: <20100827113655.78d8973b@ernst.jennejohn.org> In-Reply-To: References: <4C7726F0.10001@erdgeist.org> <4C776025.8000609@gmail.com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: disassembler X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 10:06:57 -0000 On Fri, 27 Aug 2010 02:53:53 -0400 Aryeh Friedman wrote: > No the issue is a drive that has roughly 10 years of work on it died > and I was asked to see if it is readable/reviable... I already know > the format of the MBR but I need to also read the code to see if > something is wakey (I have written MBR's {with inline assemble in GCC) > for an OS I am working on but never disambled one) > > On Fri, Aug 27, 2010 at 2:50 AM, Jim Bryant wrote: > > umm, dude.... > > > > you writing a boot sector virus or something? > > > > funny though.... > > > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/boot-boot0.html > > > > given your skill and goals are questionable, you can find it in the source > > tree yourself. > > > > Aryeh Friedman wrote: > >> > >> On Thu, Aug 26, 2010 at 11:36 PM, Aryeh Friedman > >> wrote: > >> > >>> > >>> On Thu, Aug 26, 2010 at 10:46 PM, Dirk Engling > >>> wrote: > >>> > >>>> > >>>> On 27.08.10 04:17, Aryeh Friedman wrote: > >>>> > >>>> > >>>>> > >>>>> Is there a disassembler in the base system if not what is a good > >>>>> option from ports? > >>>>> > >>>> > >>>> Try objdump -d, > >>>> > >>>> __erdgeist > >>>> > >>>> > >>> > >>> flosoft# objdump -d /dev/da0 > >>> objdump: Warning: '/dev/da0' is not an ordinary file There are quite a few diassemblers under ports but I doubt they're designed to work on raw disks. If you just want to save the data then why not plug the disk into a different box and save them? -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 09:17:16 2010 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 256D11065670; Fri, 27 Aug 2010 09:17:16 +0000 (UTC) (envelope-from talon@lpthe.jussieu.fr) Received: from smtpfb2-g21.free.fr (smtpfb2-g21.free.fr [212.27.42.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE668FC08; Fri, 27 Aug 2010 09:17:13 +0000 (UTC) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by smtpfb2-g21.free.fr (Postfix) with ESMTP id 6DAE2D19D21; Fri, 27 Aug 2010 10:58:10 +0200 (CEST) Received: from stgebois-1-82-227-32-26.fbx.proxad.net (unknown [82.227.32.26]) by smtp2-g21.free.fr (Postfix) with ESMTP id 861184B0085; Fri, 27 Aug 2010 10:58:02 +0200 (CEST) Received: by stgebois-1-82-227-32-26.fbx.proxad.net (Postfix, from userid 1000) id 0B84B28266; Fri, 27 Aug 2010 10:58:00 +0200 (CEST) Date: Fri, 27 Aug 2010 10:58:00 +0200 From: Michel Talon To: Doug Barton Message-ID: <20100827085800.GA4411@lpthe.jussieu.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Mailman-Approved-At: Fri, 27 Aug 2010 11:12:33 +0000 Cc: freebsd-hackers@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 09:17:16 -0000 Doug Barton wrote: > On 8/26/2010 5:13 PM, Alex Goncharov wrote: > > ,--- You/Doug (Thu, 26 Aug 2010 16:47:39 -0700) ----* > > | Windows and the *1st* FreeBSD partition just fine, but if I try to > > boot > > | the 2nd FreeBSD partition grub just boots the first one again. > > > > Are you using a chainloader? > > What you posted below seems like grub 1 syntax. The latest Ubuntu comes > with grub 2. Here is what I have in /etc/grub.d/40_custom (after the > required bits): > menuentry "FreeBSD 9-Current amd64" { > set root=(hd0,3) > chainloader +1 > } > menuentry "FreeBSD 7-Stable i386" { > set root=(hd0,3) > chainloader +1 > } I don't have your exact problem, but i am sharing my laptop disk between Windows, FreeBSD and Ubuntu and i have noted that grub2 which comes with Ubuntu Lucid can directly boot /boot/loader un in UFS2 partition, son i suspect this could also solve your problem, rather than chainloading. Here is the syntax: ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply # type the # menu entries you want to add after this comment. Be careful not to # change # the 'exec tail' line above. menuentry "FreeBSD (on /dev/sda4)" { insmod ufs2 set root='(hd0,4,a)' kfreebsd /boot/loader } ### END /etc/grub.d/40_custom ### Since i have played with grub a little, here are some other adaptations: ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=cyan/blue set menu_color_highlight=white/blue ### END /etc/grub.d/05_debian_theme ### to get more attractive colors (for my taste) and in /etc/grub.d/00_header to get native screen resolution for the laptop screen: if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=1280x800 <--------- insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that # don't # understand terminal_output terminal gfxterm fi fi Of course run update-grub afterwards. I have also seen in plymouth Ubuntu documentation that one can set gfxpayload=keep just after set gfxmode but it doesn't work for me. -- Michel Talon From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 11:38:07 2010 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 A02051065675 for ; Fri, 27 Aug 2010 11:38:07 +0000 (UTC) (envelope-from scdbackup@gmx.net) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mx1.freebsd.org (Postfix) with SMTP id F12A18FC24 for ; Fri, 27 Aug 2010 11:38:06 +0000 (UTC) Received: (qmail invoked by alias); 27 Aug 2010 11:38:05 -0000 Received: from 165.126.46.212.adsl.ncore.de (HELO 192.168.2.69) [212.46.126.165] by mail.gmx.net (mp048) with SMTP; 27 Aug 2010 13:38:05 +0200 X-Authenticated: #2145628 X-Provags-ID: V01U2FsdGVkX19r04Iz4CFr920z2n74hBvYPbQCytwYV0d5+iuz4b LCdeJgLF1OnroJ Date: Fri, 27 Aug 2010 13:37:49 +0200 From: "Thomas Schmitt" To: freebsd-hackers@FreeBSD.org References: <20100827085800.GA4411@lpthe.jussieu.fr> In-Reply-To: <20100827085800.GA4411@lpthe.jussieu.fr> Message-Id: <9533216496289@192.168.2.69> X-Y-GMX-Trusted: 0 Cc: Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 11:38:07 -0000 Hi, Michel Talon wrote: > menuentry "FreeBSD (on /dev/sda4)" { > insmod ufs2 > set root='(hd0,4,a)' > kfreebsd /boot/loader > } wheras i wrote: > Booting is done by the GRUB2 1.98 > menuentry "FreeBSD-8.0 STABLE on Partition 1" { > set root=(hd0,1,a) > freebsd /boot/loader > } Michel seems to be more right than me. My GRUB2 is actually 1.96, not 1.98. I find traces of documentation for "freebsd". In GRUB2 1.98 is see in docs/grub.cfg these examples: ------------------------------------------------ # For booting FreeBSD menuentry "FreeBSD (or GNU/kFreeBSD), direct boot" { set root=(hd0,1,a) kfreebsd /boot/kernel/kernel kfreebsd_loadenv /boot/device.hints kfreebsd_module /boot/splash.bmp type=splash_image_data set kFreeBSD.vfs.root.mountfrom=ufs:ad0s1a } menuentry "FreeBSD (or GNU/kFreeBSD), via /boot/loader" { set root=(hd0,1,a) kfreebsd /boot/loader } ------------------------------------------------ So the command obviously has changed from "freebsd" to "kfreebsd". Have a nice day :) Thomas From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 13:37:46 2010 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 106FD1065697 for ; Fri, 27 Aug 2010 13:37:46 +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 D20A18FC08 for ; Fri, 27 Aug 2010 13:37:45 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 53AF546B2D; Fri, 27 Aug 2010 09:37:45 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7305C8A03C; Fri, 27 Aug 2010 09:37:44 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 27 Aug 2010 09:32:36 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008270932.36795.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 27 Aug 2010 09:37:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Dirk Engling , Aryeh Friedman Subject: Re: disassembler 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, 27 Aug 2010 13:37:46 -0000 On Thursday, August 26, 2010 11:42:25 pm Aryeh Friedman wrote: > On Thu, Aug 26, 2010 at 11:36 PM, Aryeh Friedman > wrote: > > On Thu, Aug 26, 2010 at 10:46 PM, Dirk Engling wrote: > >> On 27.08.10 04:17, Aryeh Friedman wrote: > >> > >>> Is there a disassembler in the base system if not what is a good > >>> option from ports? > >> > >> Try objdump -d, > >> > >> erdgeist > >> > > > > flosoft# objdump -d /dev/da0 > > objdump: Warning: '/dev/da0' is not an ordinary file For a raw file of x86 instructions use ndisasm from the 'nasm' port. Note that it assumes 16-bit code by default, but you can use ndisasm -U to parse 32-bit instructions instead. For a typical MBR boot loader, plain ndisasm should work fine: # ndisasm /dev/twed0 00000000 FC cld 00000001 31C0 xor ax,ax 00000003 8EC0 mov es,ax 00000005 8ED8 mov ds,ax 00000007 8ED0 mov ss,ax 00000009 BC007C mov sp,0x7c00 0000000C BE1A7C mov si,0x7c1a 0000000F BF1A06 mov di,0x61a 00000012 B9E601 mov cx,0x1e6 00000015 F3A4 rep movsb 00000017 E9008A jmp word 0x8a1a 0000001A 31F6 xor si,si ... etc. I would dd the first sector of your disk off to a file and run ndisasm on that though rather than on the live disk. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 16:04:58 2010 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 AF76310656AE for ; Fri, 27 Aug 2010 16:04:58 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4998FC20 for ; Fri, 27 Aug 2010 16:04:58 +0000 (UTC) Received: (qmail 29527 invoked by uid 399); 27 Aug 2010 16:04:57 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 27 Aug 2010 16:04:57 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C77E228.7000209@FreeBSD.org> Date: Fri, 27 Aug 2010 09:04:56 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Michel Talon References: <20100827085800.GA4411@lpthe.jussieu.fr> In-Reply-To: <20100827085800.GA4411@lpthe.jussieu.fr> X-Enigmail-Version: 1.1.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Is there a boot manager that can handle this? 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, 27 Aug 2010 16:04:58 -0000 On 08/27/2010 01:58 AM, Michel Talon wrote: > menuentry "FreeBSD (on /dev/sda4)" { > insmod ufs2 > set root='(hd0,4,a)' > kfreebsd /boot/loader > } We have a winner! Using 2 of these entries and switching the 4 to a 3 for the 1st one I can now boot both of my FreeBSD partitions from grub. Very happy, Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 17:20:03 2010 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 01D3910656C0 for ; Fri, 27 Aug 2010 17:20:03 +0000 (UTC) (envelope-from rink@gloom.codethulu.net) Received: from mx1.codethulu.net (mail.codethulu.net [77.243.236.173]) by mx1.freebsd.org (Postfix) with ESMTP id AD1728FC1F for ; Fri, 27 Aug 2010 17:20:02 +0000 (UTC) Received: from anathema.codethulu.net (mail.codethulu.net [77.243.236.173]) by mx1.codethulu.net (Postfix) with ESMTP id 73B2E3781F77; Fri, 27 Aug 2010 19:04:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at codethulu.net Received: from mx1.codethulu.net ([77.243.236.173]) by anathema.codethulu.net (anathema.codethulu.net [77.243.236.173]) (amavisd-new, port 10024) with ESMTP id nJlLtWShMeLo; Fri, 27 Aug 2010 19:04:21 +0200 (CEST) Received: from gloom.codethulu.net (mail.codethulu.net [77.243.236.173]) by mx1.codethulu.net (Postfix) with ESMTP id D05113781F7A; Fri, 27 Aug 2010 19:04:21 +0200 (CEST) Received: by gloom.codethulu.net (Postfix, from userid 1000) id CD4DC6D455; Fri, 27 Aug 2010 19:04:21 +0200 (CEST) Date: Fri, 27 Aug 2010 19:04:21 +0200 From: Rink Springer To: Gary Jennejohn Message-ID: <20100827170421.GA37467@rink.nu> References: <4C7726F0.10001@erdgeist.org> <4C776025.8000609@gmail.com> <20100827113655.78d8973b@ernst.jennejohn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100827113655.78d8973b@ernst.jennejohn.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, Aryeh Friedman Subject: Re: disassembler 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, 27 Aug 2010 17:20:03 -0000 On Fri, Aug 27, 2010 at 11:36:55AM +0200, Gary Jennejohn wrote: > There are quite a few diassemblers under ports but I doubt they're > designed to work on raw disks. ndisasm should work nicely; it's in the devel/nasm port. Regards, -- Rink P.W. Springer - http://rink.nu "The power of accurate observation is commonly called cynicism by those who have not got it." - George Bernard Shaw From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 20:35:11 2010 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 AE16A106566B; Fri, 27 Aug 2010 20:35:11 +0000 (UTC) (envelope-from pebu3op@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1140F8FC08; Fri, 27 Aug 2010 20:35:10 +0000 (UTC) Received: by bwz20 with SMTP id 20so2667382bwz.13 for ; Fri, 27 Aug 2010 13:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:reply-to:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=CAfDdKH9Buvenv8kmh8OGfYmTNddK3saT86MN0rEzrk=; b=Ue9WLDMKoUgLCIYPTsQTyZBm6wDmlX2X5oq5nffVCGoDl8VloCnJQSDwUjE8+oEnGd n7YZdkPgWvzcBPV2iW6lnzy6PzTfHOU7JPqxcLs8ZJD7JnZAHr4xo/xrZmWHNj+RRFNm rqXgasn0IXi5+mDicDs89DDhAkc5bxsjSyZtU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to :mime-version:content-type:content-disposition:user-agent; b=UB1v+TiW0H+vYI3hOOLEsyeO6kB3X3GkZsAYZWXGsIvwn/xAk4JtLOcw7kdpiNDXXK pYtFKECj72sK0g0+HMTSiNuN3/La3ZmhkAnlKCyuLcopjL/qTpjuPYDICmmZBd/NilR6 5XAt/OLhsqEgdCuWWJze+ZjOTWc16F7FvDwyU= Received: by 10.204.54.193 with SMTP id r1mr871423bkg.123.1282939904117; Fri, 27 Aug 2010 13:11:44 -0700 (PDT) Received: from debmaster-laptop ([130.149.220.119]) by mx.google.com with ESMTPS id y2sm2844233bkx.20.2010.08.27.13.11.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Aug 2010 13:11:43 -0700 (PDT) Date: Fri, 27 Aug 2010 22:11:41 +0200 From: Alexander Fiveg To: doc@FreeBSD.org, freebsd-hackers@freebsd.org Message-ID: <20100827201140.GA2812@debmaster-laptop> Mail-Followup-To: doc@FreeBSD.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Fiveg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 20:35:11 -0000 Hi, from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using GDB": "... (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 ... " Actually I couldn't debug my modules using .ko-file. Moreover, I've find out that .ko files do not contain sections with debugging info. With .kld-file debugging works out. Do I something incorrectly or the info in the Developers Book is outdated? regards, Alex -- Alexander Fiveg Key fingerprint = ECBB 747C 919D 78F5 E8EC 7DBC 8B46 376D 107B CCAA From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 21:28:08 2010 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 D70661065670 for ; Fri, 27 Aug 2010 21:28:08 +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 EED9A8FC13 for ; Fri, 27 Aug 2010 21:28:07 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA24927; Sat, 28 Aug 2010 00:28:06 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Op6T0-0003T0-7M; Sat, 28 Aug 2010 00:28:06 +0300 Message-ID: <4C782DE5.2030904@icyb.net.ua> Date: Sat, 28 Aug 2010 00:28:05 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: doc@FreeBSD.org, freebsd-hackers@FreeBSD.org References: <20100827201140.GA2812@debmaster-laptop> In-Reply-To: <20100827201140.GA2812@debmaster-laptop> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: Debugging Loadable Modules Using GDB 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, 27 Aug 2010 21:28:08 -0000 on 27/08/2010 23:11 Alexander Fiveg said the following: > Hi, > from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using > GDB": > "... > (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 > ... > " > Actually I couldn't debug my modules using .ko-file. Moreover, I've find out that .ko files do not contain sections with debugging info. With .kld-file debugging works out. Do I something incorrectly or the info in the Developers Book is outdated? I think the latter. .ko.symbols should work too [see relation between add-*symbol*-file and .ko.*symbols* ? :-) ] -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 27 21:49:34 2010 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 7F21E10656B0 for ; Fri, 27 Aug 2010 21:49:34 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0599E8FC19 for ; Fri, 27 Aug 2010 21:49:33 +0000 (UTC) Received: by qwg5 with SMTP id 5so3558142qwg.13 for ; Fri, 27 Aug 2010 14:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=iLiTEytXkfEuS2WvUBkV9Get3wqngE6MdXonG0anCHQ=; b=k0tvoXV/X4Prmg7E7+js+ecluluwZHKCq1bF59+9AoWzSsdznOsHkxea0ZxotRIwZh 00EDinPRNqTFkYyrIm+6JMFw0l+EtoQFfAMd+gNrIRVQp8GcfBdQwv01rqIQ5FY0JMOY 3mbhpOTieAdQIYbpz2Yxi0Jp1FNSp6ogCDF5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=dprtl1kW3e1FNbbRwZhguivky3Gje2Ldzl9LLGuAH2GrpVI7hJ0h15yN/IxQEgoscj ih1MjzAm6GzJ7/cUZd2vccKviVA8OiTcStdfrkhKJiDQ2pXaD0yGVlIvv8oyNRtVgTSU tyGhBw1kFKkOqbRFXiEOlEPiHdi8DzYadkRV8= MIME-Version: 1.0 Received: by 10.220.179.7 with SMTP id bo7mr2459144vcb.2.1282945771095; Fri, 27 Aug 2010 14:49:31 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.220.66.227 with HTTP; Fri, 27 Aug 2010 14:49:31 -0700 (PDT) In-Reply-To: <4C718C60.2010205@icyb.net.ua> References: <4C718C60.2010205@icyb.net.ua> Date: Fri, 27 Aug 2010 14:49:31 -0700 X-Google-Sender-Auth: QWwim_NQcLF7XfuduhsHq-CoabQ Message-ID: From: Artem Belevich To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Jeff Roberson , "Robert N. M. Watson" Subject: Re: uma: zone fragmentation 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, 27 Aug 2010 21:49:34 -0000 On Sun, Aug 22, 2010 at 1:45 PM, Andriy Gapon wrote: > Unfortunately I don't have any conclusive results to report. > The numbers seem to be better with the patch, but they are changing all t= he time > depending on system usage. > I couldn't think of any good test that would reflect real-world usage pat= terns, > which I believe to be not entirely random. I do see measurable improvement on my system. Without this change my ARC would grow up to ~5200M and would oscillate pretty close to that number. With your patch applied ARC reaches ~5900M. In both cases I end up with ~7000M worth of wired memory. So, in normal case we have about 1800M of memory lost to fragmentation and your patch reduces that amount down to ~1100M which is a noticeable improvement. On a side note -- how hard would that be to voluntairly drain uma zones used by ARC? When I enable vfs.zfs.zio.use_uma I see that there's a lot of memory there listed as 'free' which could be used for something else. In absolute terms it's large-item zones that seem to waste memory in my case. In my case there are ~1000 free items on rarely used ~100K-sized zones. That memory will be released when pagedaemon wakes up, but the same event would also back-pressure the ARC. With ZIO UMA allocator my ARC size never grows above ~4800M -- and that's *with* your patch applied. Without the patch it was even worse. My guess is that if we'd manually drain those zones the memory would find better use elsewhere. For instance as ARC data. --Artem On Sun, Aug 22, 2010 at 1:45 PM, Andriy Gapon wrote: > > It seems that with inclusion of ZFS, which is a significant UMA user even= when > it is not used for ARC, zone fragmentation becomes an issue. > For example, on my systems with 4GB of RAM I routinely observe several hu= ndred > megabytes in free items after zone draining (via lowmem event). > > I wrote a one-liner (quite long line though) for post-processing vmstat -= z > output and here's an example: > $ vmstat -z | sed -e 's/ /_/' -e 's/:_* / /' -e 's/,//g' | tail +3 | awk = 'BEGIN > { total =3D 0; } { total +=3D $2 * $5; print $2 * $5, $1, $4, $5, $2;} EN= D { print > total, "total"; }' | sort -n | tail -10 > 6771456 256 7749 26451 256 > 10710144 128 173499 83673 128 > 13400424 VM_OBJECT 33055 62039 216 > 17189568 zfs_znode_cache 33259 48834 352 > 19983840 VNODE 33455 41633 480 > 30936464 arc_buf_hdr_t 145387 148733 208 > 57030400 dmu_buf_impl_t 82816 254600 224 > 57619296 dnode_t 78811 73494 784 > 62067712 512 71050 121226 512 > 302164776 total > > When UMA is used for ARC, then "wasted" memory grows above 1GB effectevil= y > making that setup unusable for me. > > I see that in OpenSolaris they developed a few measures to (try to) preve= nt > fragmentation and perform defragmentation. > > First, they keep their equivalent of partial slab list sorted by number o= f used > items thus trying to fill up the most used slab. > Second, they allow to set a 'move' callback for a zone and have a special > monitoring thread that tries to compact slabs when zone fragmentation goe= s above > certain limit. > The details can be found here (lengthy comment at the beginning and links= in it): > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/= os/kmem.c > > Not sure if we would want to implement anything like or some alternative,= but > zone fragmentation seems to have become an issue, at least for ZFS. > > I am testing the following primitive patch that tries to "lazily sort" (o= r > pseudo sort) slab partial list. =A0Linked list is not the kind of data st= ructure > that's easy to keep sorted in efficient manner. > > diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c > index 2dcd14f..ed07ecb 100644 > --- a/sys/vm/uma_core.c > +++ b/sys/vm/uma_core.c > @@ -2727,14 +2727,26 @@ zone_free_item(uma_zone_t zone, void *item, void = *udata, > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0MPASS(keg =3D=3D slab->us_keg); > > - =A0 =A0 =A0 /* Do we need to remove from any lists? */ > + =A0 =A0 =A0 /* Move to the appropriate list or re-queue further from th= e head. */ > =A0 =A0 =A0 =A0if (slab->us_freecount+1 =3D=3D keg->uk_ipers) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Partial -> free. */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LIST_REMOVE(slab, us_link); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LIST_INSERT_HEAD(&keg->uk_free_slab, slab,= us_link); > =A0 =A0 =A0 =A0} else if (slab->us_freecount =3D=3D 0) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Full -> partial. */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LIST_REMOVE(slab, us_link); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LIST_INSERT_HEAD(&keg->uk_part_slab, slab,= us_link); > =A0 =A0 =A0 =A0} > + =A0 =A0 =A0 else { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Partial -> partial. */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 uma_slab_t tmp; > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 tmp =3D LIST_NEXT(slab, us_link); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (tmp !=3D NULL && slab->us_freecount > t= mp->us_freecount) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 LIST_REMOVE(slab, us_link); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 LIST_INSERT_AFTER(tmp, slab= , us_link); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > + =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0/* Slab management stuff */ > =A0 =A0 =A0 =A0freei =3D ((unsigned long)item - (unsigned long)slab->us_d= ata) > > > Unfortunately I don't have any conclusive results to report. > The numbers seem to be better with the patch, but they are changing all t= he time > depending on system usage. > I couldn't think of any good test that would reflect real-world usage pat= terns, > which I believe to be not entirely random. > > -- > Andriy Gapon > _______________________________________________ > 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 Sat Aug 28 09:34:39 2010 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 87C8C1065673; Sat, 28 Aug 2010 09:34:39 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from mx0.deglitch.com (backbone.deglitch.com [78.110.53.255]) by mx1.freebsd.org (Postfix) with ESMTP id 42BEF8FC13; Sat, 28 Aug 2010 09:34:38 +0000 (UTC) Received: from localhost (89-178-223-44.broadband.corbina.ru [89.178.223.44]) by mx0.deglitch.com (Postfix) with ESMTPA id BF3D98FC4E; Sat, 28 Aug 2010 13:09:22 +0400 (MSD) Date: Sat, 28 Aug 2010 13:09:12 +0400 From: Ilya Bakulin To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Message-ID: <20100828130912.48205a47@kibab.com> In-Reply-To: <86wrry1hwv.fsf@ds4.des.no> References: <86wrry1hwv.fsf@ds4.des.no> Organization: Deglitch Networks X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/qUbCQjWoMz1j6l62yJ8_JcN"; protocol="application/pgp-signature" Cc: geom@freebsd.org, hackers@freebsd.org Subject: Re: Support for WD Advanced Format disks 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, 28 Aug 2010 09:34:39 -0000 --Sig_/qUbCQjWoMz1j6l62yJ8_JcN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, 10 Aug 2010 19:44:48 +0200 Dag-Erling Sm=C3=B8rgrav wrote: > Right now, I have two requests. The first is that people who have > Advanced Format disks run a program I wrote that measures the > performance of aligned and misaligned writes of different sizes. >=20 > % svn co http://svn.freebsd.org/base/user/des/phybs > % cd phybs > % make > % ./phybs -w /dev/adN >=20 I've just bought WD15EARS, it is 1.5 TB WD Green drive, according to the la= bel it uses Advanced Format. I plan to use it as a backup solution with SAT= A-USB convertor. But first I decided to conduct the test you want. So I've = installed this drive into my home PC. Connection type is pure SATA, without= convertors. I've created misaligned 10G-partition: kibab-desktop# gpart create -s GPT ad7 ad7 created kibab-desktop# gpart add -t freebsd-ufs -s 10G ad7 ad7p1 added kibab-desktop# gpart show ad7 =3D> 34 2930277101 ad7 GPT (1.4T) 34 20971520 1 freebsd-ufs (10G) 20971554 2909305581 - free - (1.4T) Right now I'm running phybs -w /dev/ad7p1 Please write me what additional tests should I conduct. I may delay feeding= this disk with data for a while, if it will be useful to obtain some impor= tant numbers for you and FreeBSD community. --=20 Regards, Ilya Bakulin http://kibab.com xmpp://kibab612@jabber.ru --Sig_/qUbCQjWoMz1j6l62yJ8_JcN Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkx40kYACgkQo9vlj1oadwgb/QCgv0iiM/8cDIJTa4upMHYstv5x rdYAoMoFxqufB6iJrSriRFBVAhsy4bwG =9aP/ -----END PGP SIGNATURE----- --Sig_/qUbCQjWoMz1j6l62yJ8_JcN-- From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 14:16:25 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id EBE541065675; Sat, 28 Aug 2010 14:16:25 +0000 (UTC) Date: Sat, 28 Aug 2010 14:16:25 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20100828141625.GA69240@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: tiny patch to prevent head from closing pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 14:16:26 -0000 hi there, i just had subversion complain about a broken pipe while piping its output through awk straight to head [1]. i decided to add a switch to head which will tell it to never close a pipe unless the input has stopped [2]. of course this will produce massive overhead, but some people might find this behaviour usefull. here's a simple benchmark: `time hd test_file | head`: => hd test_file 0,00s user 0,00s system 89% cpu 0,004 total head 0,00s user 0,00s system 55% cpu 0,004 total vs. `time hd test_file | head -k`: => hd test_file 3,28s user 0,03s system 95% cpu 3,465 total head -k 0,04s user 0,02s system 1% cpu 3,465 total test_file was created using: `dd if=/dev/random bs=1m count=5 of=test_file` there's probably a much more efficient way of discarding the input without closing the pipe unless the input ceased. it's just a 5 minute hack in order to see if people find the idea useful or not. ;) cheers. alex [1] `http://people.freebsd.org/~arundel/scripts/whodid2.sh ls` [1] http://people.freebsd.org/~arundel/patches/head.diff -- a13x From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 14:45:32 2010 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 67D131065694 for ; Sat, 28 Aug 2010 14:45:32 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9178FC16 for ; Sat, 28 Aug 2010 14:45:31 +0000 (UTC) Received: by pwi8 with SMTP id 8so1811306pwi.13 for ; Sat, 28 Aug 2010 07:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=2U2FMVUxfUtmB7X1kIwAD7tBbjFOQxf3s87DRO5UnbQ=; b=nl3svFAZ+xT3qlnSDLqDTdll4zWs51vCLhlkOWaB/hPv6nEqni3iWPxJA9VUvNV6YC MPNs2y6XpqxLB8bG/UKW/9yJKvzr4Ls9hbXjkWC7L+LZbA7wQbPlRy7ut3b7PO9X2cMZ z3pbzobWkg0y2uB0R8pgzJm+6M1PPHzvxJKfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=mVToOx3Pu+aeKR3+/D4AiMFHU3EmgU1NA8yDbyoFBBoMiZEq32P0RRjauwV434ga7z dWLUKMGoATgidoxrKrgnGVQ5ifT+7khvsvHiJe7P6xLK68pBHMWSTVg/KirOajcFgkqX 0AMur2LB14TuIK9bTNgNs5YeLKXQFFhpUj1g0= Received: by 10.115.107.7 with SMTP id j7mr2186482wam.107.1283006731447; Sat, 28 Aug 2010 07:45:31 -0700 (PDT) Received: from localhost ([120.50.40.184]) by mx.google.com with ESMTPS id k23sm9165678waf.5.2010.08.28.07.45.27 (version=SSLv3 cipher=RC4-MD5); Sat, 28 Aug 2010 07:45:30 -0700 (PDT) From: Anonymous To: Alexander Best References: <20100828141625.GA69240@freebsd.org> Date: Sat, 28 Aug 2010 18:42:29 +0400 In-Reply-To: <20100828141625.GA69240@freebsd.org> (Alexander Best's message of "Sat, 28 Aug 2010 14:16:25 +0000") Message-ID: <86aao694tm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org Subject: Re: tiny patch to prevent head from closing pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 14:45:32 -0000 Alexander Best writes: > hi there, > > i just had subversion complain about a broken pipe while piping its output > through awk straight to head [1]. i decided to add a switch to head which will > tell it to never close a pipe unless the input has stopped [2]. You can do same with sh(1), e.g. $ svn log | (IFS=; while read li; do [ $((i+=1)) -le 10 ] && echo "$li"; done) versus $ svn log | (IFS=; while read li && [ $((i+=1)) -le 10 ]; do echo "$li"; done) ... svn: Write error: Broken pipe But I think subversion should > there's probably a much more efficient way of discarding the input without > closing the pipe unless the input ceased. it's just a 5 minute hack in order to > see if people find the idea useful or not. ;) Can you give an example of usefulness that does not involve subversion? From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 14:58:23 2010 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 736961065694; Sat, 28 Aug 2010 14:58:23 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id D4C558FC0C; Sat, 28 Aug 2010 14:58:22 +0000 (UTC) Received: by gyg4 with SMTP id 4so1751345gyg.13 for ; Sat, 28 Aug 2010 07:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=RTbvtGaTmyCnwmFyesN8p16VJBKRAIoPiJxdbwfoHWo=; b=jZI/LdLZbhgbA3OU7SV5k9T9cqAO1Auotyee2u9dDB6tayHOUObtg/RY7H9RXwOeoO nArp/s+Tjvr9GKcKstzlwW5Aoqgk3SRzZ0qEqLfyZUqbFkCbi3B6B+apUGAnMwn9cwTO d+4JrSOfNXeYrLsG+o9WQlFL3ohWz+ooTG5Mk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=v4xFR7+xGMSGBphYBlxBTdRtZM2uJnPA2ulWAE7kCjMASutJ/qPp4g2qyiDXBSe6WG EwkOzonZUIeU/TiBOZZgw2Y99rg1tJCLdDRt90vkVND93iU7SgLUgw7RzgnGwpre1rRe JS2XS+FEBXTLrnE/L8+v3WTARbaRCwogGhX00= Received: by 10.151.77.8 with SMTP id e8mr3317834ybl.224.1283007442537; Sat, 28 Aug 2010 07:57:22 -0700 (PDT) Received: from localhost (tor-exit-proxy2-readme.formlessnetworking.net [208.53.142.38]) by mx.google.com with ESMTPS id q25sm5318839ybk.6.2010.08.28.07.57.20 (version=SSLv3 cipher=RC4-MD5); Sat, 28 Aug 2010 07:57:21 -0700 (PDT) From: Anonymous To: Alexander Best References: <20100828141625.GA69240@freebsd.org> <86aao694tm.fsf@gmail.com> Date: Sat, 28 Aug 2010 18:54:27 +0400 In-Reply-To: <86aao694tm.fsf@gmail.com> (Anonymous's message of "Sat, 28 Aug 2010 18:42:29 +0400") Message-ID: <86mxs67pp8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org Subject: Re: tiny patch to prevent head from closing pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 14:58:23 -0000 Anonymous writes: > Alexander Best writes: > >> hi there, >> >> i just had subversion complain about a broken pipe while piping its output >> through awk straight to head [1]. i decided to add a switch to head which will >> tell it to never close a pipe unless the input has stopped [2]. > > You can do same with sh(1), e.g. > > $ svn log | (IFS=; while read li; do [ $((i+=1)) -le 10 ] && echo "$li"; done) Hmm, draining pipe with cat(1) would be more efficient $ svn log | (IFS=; while read li && [ $((i+=1)) -le 10 ]; do echo "$li"; done; cat >/dev/null) From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 15:51:03 2010 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 BA7F1106566B; Sat, 28 Aug 2010 15:51:03 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from mx0.deglitch.com (backbone.deglitch.com [78.110.53.255]) by mx1.freebsd.org (Postfix) with ESMTP id 74EBC8FC15; Sat, 28 Aug 2010 15:50:59 +0000 (UTC) Received: from localhost (89-178-223-44.broadband.corbina.ru [89.178.223.44]) by mx0.deglitch.com (Postfix) with ESMTPA id B54988FC53; Sat, 28 Aug 2010 19:50:27 +0400 (MSD) Date: Sat, 28 Aug 2010 19:50:24 +0400 From: Ilya Bakulin Message-ID: <20100828195024.3d671a76@kibab.com> In-Reply-To: <20100828130912.48205a47@kibab.com> References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> Organization: Deglitch Networks X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/1tkeDJKIRhJAOzIOcxqbVjm"; protocol="application/pgp-signature" Cc: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= , hackers@freebsd.org, geom@freebsd.org Subject: Re: Support for WD Advanced Format disks 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, 28 Aug 2010 15:51:03 -0000 --Sig_/1tkeDJKIRhJAOzIOcxqbVjm Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 28 Aug 2010 13:09:12 +0400 Ilya Bakulin wrote: > Right now I'm running phybs -w /dev/ad7p1 Well, phybs finished. Results: kibab-desktop# ./phybs -w /dev/ad7p1 count size offset step msec tps kBps 131072 1024 0 4096 3098125 0 42 131072 1024 512 4096 3100047 0 42 65536 2048 0 8192 1505809 0 87 65536 2048 512 8192 1505179 0 87 65536 2048 1024 8192 1506127 0 87 32768 4096 0 16384 1522343 1 86 32768 4096 512 16384 1521017 1 86 32768 4096 1024 16384 1523748 1 86 32768 4096 2048 16384 1522853 1 86 16384 8192 0 32768 890911 3 147 16384 8192 512 32768 892026 3 146 16384 8192 1024 32768 890699 3 147 16384 8192 2048 32768 891862 3 146 16384 8192 4096 32768 889903 3 147 Obviously 34-sectors offset is bad for phybs. Write requests are NEVER get = aligned. I have recreated partition as follows: kibab-desktop# gpart delete -i 1 ad7 ad7p1 deleted kibab-desktop# gpart add -t freebsd-ufs -s 10G -b 63 ad7 ad7p1 added kibab-desktop# gpart show ad7 =3D> 34 2930277101 ad7 GPT (1.4T) 34 29 - free - (15K) 63 20971520 1 freebsd-ufs (10G) 20971583 2909305552 - free - (1.4T) So, we have ad7p1 which is still misaligned, but if write request will star= t at offset=3D512, it will be aligned properly. Let's test as follows: kibab-desktop# ./phybs -l 4096 -w /dev/ad7p1 count size offset step msec tps kBps 32768 4096 0 16384 1520609 1 86 32768 4096 512 16384 17898 151 7323 32768 4096 1024 16384 1524899 1 85 :-) Aligned writes are 86 times faster than misaligned!!! --=20 Regards, Ilya Bakulin http://kibab.com xmpp://kibab612@jabber.ru --Sig_/1tkeDJKIRhJAOzIOcxqbVjm Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkx5MEUACgkQo9vlj1oadwhRAACgqRCXTcKsfesxaMxPjO/Hs9E4 iV8AmwQWE3Gs0EHsyJj6CAtoq4QgbP2L =WxjB -----END PGP SIGNATURE----- --Sig_/1tkeDJKIRhJAOzIOcxqbVjm-- From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 16:01:29 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 5ED5410656AB; Sat, 28 Aug 2010 16:01:29 +0000 (UTC) Date: Sat, 28 Aug 2010 16:01:29 +0000 From: Alexander Best To: Anonymous Message-ID: <20100828160129.GA88842@freebsd.org> References: <20100828141625.GA69240@freebsd.org> <86aao694tm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86aao694tm.fsf@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: tiny patch to prevent head from closing pipes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 16:01:29 -0000 On Sat Aug 28 10, Anonymous wrote: > Alexander Best writes: > > > hi there, > > > > i just had subversion complain about a broken pipe while piping its output > > through awk straight to head [1]. i decided to add a switch to head which will > > tell it to never close a pipe unless the input has stopped [2]. > > You can do same with sh(1), e.g. > > $ svn log | (IFS=; while read li; do [ $((i+=1)) -le 10 ] && echo "$li"; done) > > versus > > $ svn log | (IFS=; while read li && [ $((i+=1)) -le 10 ]; do echo "$li"; done) > ... > svn: Write error: Broken pipe > > > But I think subversion should > > > there's probably a much more efficient way of discarding the input without > > closing the pipe unless the input ceased. it's just a 5 minute hack in order to > > see if people find the idea useful or not. ;) > > Can you give an example of usefulness that does not involve subversion? no, but this should be valid for all applications which return an error if the pipe gets closed by the receiving end. of course it's possible to implement the features to head i added in form of a sh(1) script. i understand that your point is, that there is already a way of keeping the pipe open and that the unix philosophy states that no two programs should share the same functionality. on the other hand you don't really need head and tail at all then, because their functionality could also be implemented in form of a script. ;) i hope you get my point. cheers. alex -- a13x From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 16:30:06 2010 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 BCA7A106566C for ; Sat, 28 Aug 2010 16:30:06 +0000 (UTC) (envelope-from tdamas@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 670EA8FC1F for ; Sat, 28 Aug 2010 16:30:06 +0000 (UTC) Received: by vws7 with SMTP id 7so4462298vws.13 for ; Sat, 28 Aug 2010 09:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=GYCo8qXXFu4t7aUqLFylm06zHmImhwWufx8qxvZKjjI=; b=Ei7lD+J37dWW+R6vaTaxKoYquTmu0HMO+Z/0FXCROM78QNMD3UDJr10gGsBfb+/4zF VYi91ocHqPDdCtsgx5CIDC0zscpX+DTVnpSFB12nMtKkcK+0OaNJTV3bWpaTBycRG7wg sm/WbfT480VEp6RfjjUoAGD4+Q0dq2/BZS+DY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=bdyYrQ3lNr8bCiWhHKEvns/pVrEByC1McakZGIL/Q+I0WkVFNCtbmJJbmrDEWMFeoM 4sO+WBFU5NLRG1LVKIQgoo0HaMO0RYlXTxn8v7id+q6olarlfvFwX1/SQdO8l+ddmo6m YaopHNmFTxhGVOBzgrhoWRnQmcicmAs3xsgyM= Received: by 10.220.158.9 with SMTP id d9mr1367782vcx.109.1283011569166; Sat, 28 Aug 2010 09:06:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.58.195 with HTTP; Sat, 28 Aug 2010 09:05:49 -0700 (PDT) In-Reply-To: <20100828195024.3d671a76@kibab.com> References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> From: Thiago Damas Date: Sat, 28 Aug 2010 13:05:49 -0300 Message-ID: To: Ilya Bakulin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= , hackers@freebsd.org, geom@freebsd.org Subject: Re: Support for WD Advanced Format disks 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, 28 Aug 2010 16:30:06 -0000 You read: "ATA 4K sector issues" http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html 2010/8/28 Ilya Bakulin : > On Sat, 28 Aug 2010 13:09:12 +0400 > Ilya Bakulin wrote: > >> Right now I'm running phybs -w /dev/ad7p1 > > Well, phybs finished. > Results: > kibab-desktop# ./phybs -w /dev/ad7p1 > =A0 count =A0 =A0size =A0offset =A0 =A0step =A0 =A0 =A0 =A0msec =A0 =A0 t= ps =A0 =A0kBps > > =A0131072 =A0 =A01024 =A0 =A0 =A0 0 =A0 =A04096 =A0 =A0 3098125 =A0 =A0 = =A0 0 =A0 =A0 =A042 > =A0131072 =A0 =A01024 =A0 =A0 512 =A0 =A04096 =A0 =A0 3100047 =A0 =A0 =A0= 0 =A0 =A0 =A042 > > =A0 65536 =A0 =A02048 =A0 =A0 =A0 0 =A0 =A08192 =A0 =A0 1505809 =A0 =A0 = =A0 0 =A0 =A0 =A087 > =A0 65536 =A0 =A02048 =A0 =A0 512 =A0 =A08192 =A0 =A0 1505179 =A0 =A0 =A0= 0 =A0 =A0 =A087 > =A0 65536 =A0 =A02048 =A0 =A01024 =A0 =A08192 =A0 =A0 1506127 =A0 =A0 =A0= 0 =A0 =A0 =A087 > > =A0 32768 =A0 =A04096 =A0 =A0 =A0 0 =A0 16384 =A0 =A0 1522343 =A0 =A0 =A0= 1 =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A0 512 =A0 16384 =A0 =A0 1521017 =A0 =A0 =A0 1= =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A01024 =A0 16384 =A0 =A0 1523748 =A0 =A0 =A0 1= =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A02048 =A0 16384 =A0 =A0 1522853 =A0 =A0 =A0 1= =A0 =A0 =A086 > > =A0 16384 =A0 =A08192 =A0 =A0 =A0 0 =A0 32768 =A0 =A0 =A0890911 =A0 =A0 = =A0 3 =A0 =A0 147 > =A0 16384 =A0 =A08192 =A0 =A0 512 =A0 32768 =A0 =A0 =A0892026 =A0 =A0 =A0= 3 =A0 =A0 146 > =A0 16384 =A0 =A08192 =A0 =A01024 =A0 32768 =A0 =A0 =A0890699 =A0 =A0 =A0= 3 =A0 =A0 147 > =A0 16384 =A0 =A08192 =A0 =A02048 =A0 32768 =A0 =A0 =A0891862 =A0 =A0 =A0= 3 =A0 =A0 146 > =A0 16384 =A0 =A08192 =A0 =A04096 =A0 32768 =A0 =A0 =A0889903 =A0 =A0 =A0= 3 =A0 =A0 147 > > Obviously 34-sectors offset is bad for phybs. Write requests are NEVER ge= t aligned. > I have recreated partition as follows: > > kibab-desktop# gpart delete -i 1 ad7 > ad7p1 deleted > kibab-desktop# gpart add -t freebsd-ufs -s 10G -b 63 ad7 > ad7p1 added > kibab-desktop# gpart show ad7 > =3D> =A0 =A0 =A0 =A034 =A02930277101 =A0ad7 =A0GPT =A0(1.4T) > =A0 =A0 =A0 =A0 =A034 =A0 =A0 =A0 =A0 =A029 =A0 =A0 =A0 - free - =A0(15K) > =A0 =A0 =A0 =A0 =A063 =A0 =A020971520 =A0 =A01 =A0freebsd-ufs =A0(10G) > =A0 =A020971583 =A02909305552 =A0 =A0 =A0 - free - =A0(1.4T) > > So, we have ad7p1 which is still misaligned, but if write request will st= art at offset=3D512, it will be aligned properly. > Let's test as follows: > > kibab-desktop# ./phybs -l 4096 -w /dev/ad7p1 > =A0 count =A0 =A0size =A0offset =A0 =A0step =A0 =A0 =A0 =A0msec =A0 =A0 t= ps =A0 =A0kBps > > =A0 32768 =A0 =A04096 =A0 =A0 =A0 0 =A0 16384 =A0 =A0 1520609 =A0 =A0 =A0= 1 =A0 =A0 =A086 > =A0 32768 =A0 =A04096 =A0 =A0 512 =A0 16384 =A0 =A0 =A0 17898 =A0 =A0 151= =A0 =A07323 > =A0 32768 =A0 =A04096 =A0 =A01024 =A0 16384 =A0 =A0 1524899 =A0 =A0 =A0 1= =A0 =A0 =A085 > > :-) Aligned writes are 86 times faster than misaligned!!! > -- > Regards, > Ilya Bakulin > http://kibab.com > xmpp://kibab612@jabber.ru > From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 16:44:50 2010 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 E560E1065698; Sat, 28 Aug 2010 16:44:49 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from mx0.deglitch.com (backbone.deglitch.com [78.110.53.255]) by mx1.freebsd.org (Postfix) with ESMTP id 665438FC08; Sat, 28 Aug 2010 16:44:49 +0000 (UTC) Received: from localhost (89-178-223-44.broadband.corbina.ru [89.178.223.44]) by mx0.deglitch.com (Postfix) with ESMTPA id 025988FC54; Sat, 28 Aug 2010 20:44:17 +0400 (MSD) Date: Sat, 28 Aug 2010 20:44:15 +0400 From: Ilya Bakulin To: Ilya Bakulin Message-ID: <20100828204415.6875b4ec@kibab.com> In-Reply-To: <20100828195024.3d671a76@kibab.com> References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> Organization: Deglitch Networks X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/BdfqYI0uU8cc17g4kHzNjJi"; protocol="application/pgp-signature" Cc: Dag-Erling =?UTF-8?Q?Sm=C3=B8rgrav?= , hackers@freebsd.org, geom@freebsd.org Subject: Re: Support for WD Advanced Format disks 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, 28 Aug 2010 16:44:50 -0000 --Sig_/BdfqYI0uU8cc17g4kHzNjJi Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 28 Aug 2010 19:50:24 +0400 Ilya Bakulin wrote: > On Sat, 28 Aug 2010 13:09:12 +0400 > Ilya Bakulin wrote: >=20 > > Right now I'm running phybs -w /dev/ad7p1 >=20 > Well, phybs finished. I feel like a flooder today :-) I've created gnop provider on top of the existing ad7p1: kibab-desktop# gnop create -o 512 -S 4096 ad7p1 So, ad7p1.nop is shifted by 512 bytes and resides right on the beginning of= the physical sector. And it has 4096 "sector" size. Running phybs: kibab-desktop# ./phybs -w /dev/ad7p1.nop=20 count size offset step msec tps kBps 16384 8192 0 32768 11222 311 11679 16384 8192 4096 32768 11836 295 11073 8192 16384 0 65536 17432 223 7518 8192 16384 4096 65536 18148 214 7222 8192 16384 8192 65536 17811 218 7358 4096 32768 0 131072 20800 196 6301 4096 32768 4096 131072 12651 323 10360 4096 32768 8192 131072 15040 272 8714 4096 32768 16384 131072 15970 256 8206 2048 65536 0 262144 8005 255 16372 2048 65536 4096 262144 8152 251 16077 2048 65536 8192 262144 7636 268 17163 2048 65536 16384 262144 9372 218 13985 2048 65536 32768 262144 9356 218 14008 For some reason, phybs begins with sector size 8192... I expected it to beg= in with 4096... Let's force 4096: kibab-desktop# ./phybs -l 4096 -w /dev/ad7p1.nop count size offset step msec tps kBps 32768 4096 0 16384 15621 173 8390 16384 8192 0 32768 11331 308 11566 16384 8192 4096 32768 13045 268 10047 8192 16384 0 65536 28344 137 4624 8192 16384 4096 65536 22540 172 5815 8192 16384 8192 65536 24530 158 5343 4096 32768 0 131072 16221 252 8080 4096 32768 4096 131072 13986 292 9371 4096 32768 8192 131072 14736 277 8894 4096 32768 16384 131072 14370 285 9121 Perfomance is excellent! Notice, that for two subsequent phybs invocations there is big difference i= n timings for the same parameters. For example, writing with block size=3D16384 at offset=3D0: 1st run: 7518 kBps, 2nd run: 4624 kBps. This tells us that we cannot really compare these numbers with each other. = The most important, however, is that they are significantly higher than mis= aligned writes. So using gnop is really a good solution. --=20 Regards, Ilya Bakulin http://kibab.com xmpp://kibab612@jabber.ru --Sig_/BdfqYI0uU8cc17g4kHzNjJi Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkx5POUACgkQo9vlj1oadwiXNwCePsEZ6oCjeXfcqk16J85RbSx4 VXMAnRv4OkbREMvAvxtaaEPe0X5LnXU3 =92hH -----END PGP SIGNATURE----- --Sig_/BdfqYI0uU8cc17g4kHzNjJi-- From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 28 23:23:40 2010 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 6AF0E10656A7; Sat, 28 Aug 2010 23:23:40 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by mx1.freebsd.org (Postfix) with ESMTP id DAF158FC0C; Sat, 28 Aug 2010 23:23:39 +0000 (UTC) X-AuditID: 1209190c-b7c9cae00000753f-0a-4c7996f4aead Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-1.mit.edu (Symantec Brightmail Gateway) with SMTP id 92.69.30015.4F6997C4; Sat, 28 Aug 2010 19:08:36 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id o7SN8a3S004037; Sat, 28 Aug 2010 19:08:36 -0400 Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o7SN8Yvs007791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 28 Aug 2010 19:08:35 -0400 (EDT) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id o7SN8YV6011409; Sat, 28 Aug 2010 19:08:34 -0400 (EDT) Date: Sat, 28 Aug 2010 19:08:34 -0400 (EDT) From: Benjamin Kaduk To: kientzle@freebsd.org, kaiw@freebsd.org Message-ID: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Brightmail-Tracker: AAAAAA== Cc: freebsd-hackers@freebsd.org Subject: ar(1) format_decimal failure is fatal? 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, 28 Aug 2010 23:23:40 -0000 Hi all, I've been working on fixing the OpenAFS network filesystem client for FreeBSD, and it's at the point where I want to use the lazy man's filesystem stress test: buildworld. However, quite early in the process, I get the following error: >>> stage 1.1: legacy release compatibility shims [...] ===> tools/build (obj,includes,depend,all,install) [...] building static egacy library ar: fatal: Numeric user ID too large *** Error code 70 This error appears to be coming from lib/libarchive/archive_write_set_format_ar.c , which seems to only have provisions for outputting a user ID in AR_uid_size = 6 columns. Now, AFS user IDs are not tied to unix IDs; there is a separate protection server whose "pts" IDs are used for access control; these pts IDs are tied to kerberos authentication. In this case, I was authenticated as daemon/freebuild.mit.edu@ATHENA.MIT.EDU, with pts ID 33554737, which needs 8 columns to display. It looks like this macro was so defined in version 1.1 of that file, with commit message "'ar' format support for libarchive, contributed by Kai Wang.". This doesn't make it terribly clear whether the 'ar' format mandates this length, or if it is an implementation decision, so I get to ask: what reasoning (if any) was behind this choice? Would anything break if it was bumped up to a larger size? Are there other options for a workaround in my AFS environment? Thanks for your thoughts, Ben Kaduk