From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 08:28:01 2012 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 5B9A01065670 for ; Sun, 27 May 2012 08:28:01 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id DC7DB8FC1B for ; Sun, 27 May 2012 08:28:00 +0000 (UTC) Received: from [188.174.50.77] (helo=localhost.my.domain) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SYYpK-0004Dq-Oi; Sun, 27 May 2012 10:27:51 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.4/8.14.3) with ESMTP id q4R8Rnpu002627; Sun, 27 May 2012 10:27:49 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.4/8.14.3/Submit) id q4R8Rjeq002626; Sun, 27 May 2012 10:27:45 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sun, 27 May 2012 10:27:45 +0200 From: Matthias Apitz To: Wojciech Puchar Message-ID: <20120527082745.GA2591@tinyCurrent> References: <4fb7dfd6.736a980a.186d.ffff902f@mx.google.com> <20120519180901.GA1264@tiny> <20120525183006.GA1259@tiny> <20120525225839.GA7347@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.50.77 Cc: freebsd-hackers@freebsd.org, rozhuk.im@gmail.com Subject: Re: proper newfs options for SSD disk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 May 2012 08:28:02 -0000 El día Saturday, May 26, 2012 a las 04:01:54PM +0200, Wojciech Puchar escribió: > >> Why? Your laptop have most probably slow CPU and it will make everything > >> too slow if you make everything encrypted. > > > > I'd suggest some experiments - create a largish RAMdisk with and without > > GELI and see how the performance compares (this will be a lot faster than > > converting your SSD as well as saving a full-SSD erase/write cycle). > > right. DO TESTs. > > mdconfig -a -t swap -s512m -u 0 > dd if=/dev/zero of=/dev/md0 bs=128k count=4k > dd if=/dev/md0 of=/dev/null bs=128k count=4k > > geli init -s 2048 /dev/md0 > geli attach /dev/md0 > dd if=/dev/md0.eli of=/dev/null bs=128k count=4k (*) > dd if=/dev/zero of=/dev/md0.eli bs=128k count=4k (*) > geli detach /dev/md0 > mdconfig -d -u 0 I did the same tests with my laptop Acer Aspire One D250 and the small netbook EeePC 900: Acer Aspire One D250: $ dmesg | fgrep CPU: CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.22-MHz 686-class CPU) # mdconfig -a -t swap -s512m -u 0 # dd if=/dev/zero of=/dev/md0 bs=128k count=4k 536870912 bytes transferred in 2.252701 secs (238323196 bytes/sec) # dd if=/dev/md0 of=/dev/null bs=128k count=4k 536870912 bytes transferred in 1.355759 secs (395992908 bytes/sec) # geli init -s 2048 /dev/md0 Enter new passphrase: ... # geli attach /dev/md0 Enter passphrase: # dd if=/dev/md0.eli of=/dev/null bs=128k count=4k 536868864 bytes transferred in 40.844322 secs (13144272 bytes/sec) # dd if=/dev/zero of=/dev/md0.eli bs=128k count=4k 536868864 bytes transferred in 43.093812 secs (12458143 bytes/sec) # geli detach /dev/md0 # mdconfig -d -u 0 EeePC 900 # dmesg | fgrep CPU: CPU: Intel(R) Celeron(R) M processor 900MHz (900.11-MHz 686-class CPU) # mdconfig -a -t swap -s512m -u 1 # dd if=/dev/zero of=/dev/md1 bs=128k count=4k 536870912 bytes transferred in 2.072289 secs (259071449 bytes/sec) # dd if=/dev/md1 of=/dev/null bs=128k count=4k 536870912 bytes transferred in 1.439256 secs (373019761 bytes/sec) # # geli init -s 2048 /dev/md1 Enter new passphrase: Reenter new passphrase: ... # geli attach /dev/md1 Enter passphrase: # dd if=/dev/md1.eli of=/dev/null bs=128k count=4k 536868864 bytes transferred in 35.093015 secs (15298454 bytes/sec) # dd if=/dev/zero of=/dev/md1.eli bs=128k count=4k 536868864 bytes transferred in 38.044995 secs (14111419 bytes/sec) # geli detach /dev/md1 # mdconfig -d -u 1 As you can see the EeePC with it's Intel Celeron CPU of only 900 MHz is even faster then the Acer with Atom CPU; BTW: On the EeePC I run 10-CURRENT, KDE 3.5.10 and never encounter performance issues while reading, writing etc. Concerning your hint installing the systen on the second SSD of around 16 GByte (marketing GBytes :-)), the BIOS by itself is unable to boot from; one has to go (by pressing ESC) to the boot menu to pick it up as current boot device; any idea how this could be changed? Thanks matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.unixarea.de/ UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5 From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 16:46:30 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 787D4106564A; Sun, 27 May 2012 16:46:30 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 0FBAF8FC08; Sun, 27 May 2012 16:46:30 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id q4RGkN3r073725; Sun, 27 May 2012 09:46:24 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4FC25A5F.4020401@rawbw.com> Date: Sun, 27 May 2012 09:46:23 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120516 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexey Dokuchaev Subject: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 May 2012 16:46:30 -0000 After the recent system upgrade that brought nvidia-driver-295.49 my system began to malfunction. Xorg randomly freezes and gets to 100% CPU (in kde4), switching back from the black terminal takes 30 seconds, some windows don't repaint while windows effects are on, etc. Switching back to 295.05.09 from Feb 11, 2012 fixed the problem. 9400GT I can't believe this is only my problem. I think the version should be rolled back until the problem is fixed. Yuri From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 17:01:43 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCEF41065670; Sun, 27 May 2012 17:01:43 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 755B68FC14; Sun, 27 May 2012 17:01:43 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.5/8.14.5) with ESMTP id q4RH1gbA002338; Sun, 27 May 2012 10:01:42 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.5/8.14.5/Submit) id q4RH1gCg002337; Sun, 27 May 2012 10:01:42 -0700 (PDT) (envelope-from david) Date: Sun, 27 May 2012 10:01:42 -0700 From: David Wolfskill To: Yuri Message-ID: <20120527170142.GD1509@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , Yuri , freebsd-hackers@freebsd.org, Alexey Dokuchaev References: <4FC25A5F.4020401@rawbw.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bajzpZikUji1w+G9" Content-Disposition: inline In-Reply-To: <4FC25A5F.4020401@rawbw.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, Alexey Dokuchaev Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 May 2012 17:01:43 -0000 --bajzpZikUji1w+G9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 27, 2012 at 09:46:23AM -0700, Yuri wrote: > After the recent system upgrade that brought nvidia-driver-295.49 my=20 > system began to malfunction. > ... > 9400GT >=20 > I can't believe this is only my problem. I think the version should be=20 > rolled back until the problem is fixed. > ... First: I have been using nvidia-driver-295.49 since 11 May, and I have not observed the above at all. Indeed; I've been happy with the update. I am running FreeBSD/i386; I run stable/8, stable/9, and head (on different slices), updated daily. (As of this morning, running each at r236141. I also update all installed ports daily ("portmaster -da --index").) Since I use a common /usr/local, I build my ports under stable/8, though I rebuild x11/nvidia-driver each time I rebuild the kernel (usually, 3x/day), and that is built under the OS I'm running at the time. My graphics card is identified as: NVIDIA GPU Quadro FX 770M (G96GL). Recently, I "cloned" my stable/9 slice & rebuilt it using clang, and everything still works Just Fine -- including x11/nvidia-driver. So, at least in my case, I respectfully disagree with the assessment in the Subject. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --bajzpZikUji1w+G9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/CXfUACgkQmprOCmdXAD24mwCfYFDfDaGEEPBkw5o0M/grpBLX tawAmwc+EqWh3bWBgO7wPI/d0bfMiX8L =bel8 -----END PGP SIGNATURE----- --bajzpZikUji1w+G9-- From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 17:05:22 2012 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 42F7D106564A; Sun, 27 May 2012 17:05:22 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0268FC1A; Sun, 27 May 2012 17:05:21 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id q4RH5Gwf076689; Sun, 27 May 2012 10:05:17 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4FC25ECC.2060400@rawbw.com> Date: Sun, 27 May 2012 10:05:16 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120516 Thunderbird/12.0.1 MIME-Version: 1.0 To: David Wolfskill , freebsd-hackers@freebsd.org, Alexey Dokuchaev References: <4FC25A5F.4020401@rawbw.com> <20120527170142.GD1509@albert.catwhisker.org> In-Reply-To: <20120527170142.GD1509@albert.catwhisker.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 May 2012 17:05:22 -0000 On 05/27/2012 10:01, David Wolfskill wrote: > So, at least in my case, I respectfully disagree with the assessment in > the Subject. i386 is one difference (I use amd64) FX 770M is another difference (I use 9400GT) I also have everything updated with the similar portmaster command. Yuri From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 18:15:11 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E33A106566C for ; Sun, 27 May 2012 18:15:11 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 40AD58FC19 for ; Sun, 27 May 2012 18:15:11 +0000 (UTC) Received: from [127.0.0.1] (squeeze.lan.rachie.is-a-geek.net [192.168.2.30]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id A738F7E874 for ; Sun, 27 May 2012 10:15:04 -0800 (AKDT) Message-ID: <4FC26F26.6000907@acsalaska.net> Date: Sun, 27 May 2012 20:15:02 +0200 From: Mel Flynn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Activating libssp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 May 2012 18:15:11 -0000 Hi, for a port, I'm seeing: #ifdef _FORTIFY_SOURCE ... #endif I did a bit of reading (http://wiki.debian.org/Hardening) for example, searching through /usr/share/mk/* /usr/include/libssp, /usr/src/gnu/libssp. However, it's not clear to me, where the magic is that pulls in the libssp library that is in /lib. Also - it seems to be part of gcc, so does that mean on systems without gcc, that this library is not available or does clang have a variant? I do see -fstack-protector is added to CFLAGS by default, so I'm thinking there's some magic somewhere, but I'm just missing the docs that tell me "if you add foo to CFLAGS then bar will happen, unless baz". -- Mel From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 20:08:50 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id DCFE9106566C; Sun, 27 May 2012 20:08:50 +0000 (UTC) Date: Sun, 27 May 2012 20:08:50 +0000 From: Alexey Dokuchaev To: Yuri Message-ID: <20120527200850.GA63911@FreeBSD.org> References: <4FC25A5F.4020401@rawbw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4FC25A5F.4020401@rawbw.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@FreeBSD.org Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 May 2012 20:08:50 -0000 On Sun, May 27, 2012 at 09:46:23AM -0700, Yuri wrote: > After the recent system upgrade that brought nvidia-driver-295.49 my > system began to malfunction. > Xorg randomly freezes and gets to 100% CPU (in kde4), switching back > from the black terminal takes 30 seconds, some windows don't repaint > while windows effects are on, etc. > Switching back to 295.05.09 from Feb 11, 2012 fixed the problem. Perhaps you can try asking on official nVidia FreeBSD forum: http://www.nvnews.net/vbulletin/forumdisplay.php?f=47 Also, there seems to be new version available, 295.53. Can you try it out that report back to us if it remedies your problems? ./danfe From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 23:33:40 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D1C7106564A; Sun, 27 May 2012 23:33:40 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from m2.gritton.org (gritton.org [199.192.164.235]) by mx1.freebsd.org (Postfix) with ESMTP id CBCA38FC14; Sun, 27 May 2012 23:33:39 +0000 (UTC) Received: from glorfindel.gritton.org (c-174-52-130-208.hsd1.ut.comcast.net [174.52.130.208]) (authenticated bits=0) by m2.gritton.org (8.14.5/8.14.5) with ESMTP id q4RNXWET011012; Sun, 27 May 2012 17:33:33 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <4FC2B9CA.5090301@FreeBSD.org> Date: Sun, 27 May 2012 17:33:30 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.24) Gecko/20120129 Thunderbird/3.1.16 MIME-Version: 1.0 To: sbruno@FreeBSD.org References: <1337964514.8951.2.camel@powernoodle-l7.corp.yahoo.com> In-Reply-To: <1337964514.8951.2.camel@powernoodle-l7.corp.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers , Sean Bruno Subject: Re: [jail] Allowing root privledged users to renice X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 May 2012 23:33:40 -0000 On 05/25/12 10:48, Sean Bruno wrote: > I've been toying with the idea of letting jails renice processes ... how > dangerous and/or stupid is this idea? > > ==== //depot/yahoo/ybsd_9/src/sys/kern/kern_jail.c#5 - > /home/seanbru/ybsd_9/src/sys/kern/kern_jail.c ==== > 270a271,275 > + int jail_allow_renice = 0; > + SYSCTL_INT(_security_jail, OID_AUTO, allow_renice, CTLFLAG_RW, > +&jail_allow_renice, 0, > + "Prison root can renice processes"); > > 3857a3863,3865 > + case PRIV_SCHED_SETPRIORITY: > + if (!jail_allow_renice) > + return (EPERM); Considering they can only renice their own stuff, and could always just start a new process anyway, I see very little reason to deny this. - Jamie From owner-freebsd-hackers@FreeBSD.ORG Sun May 27 23:50:34 2012 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 A712C1065673 for ; Sun, 27 May 2012 23:50:34 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 55C578FC19 for ; Sun, 27 May 2012 23:50:34 +0000 (UTC) Received: by vcbfy7 with SMTP id fy7so1559784vcb.13 for ; Sun, 27 May 2012 16:50:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:user-agent:references:in-reply-to :x-kmail-markup:mime-version:content-type:content-transfer-encoding :message-id:x-gm-message-state; bh=4WoyjLpkkAWcamfyoK1JsATYHqmEunQ5cB847mCSrKs=; b=akwZRYKXTUR3DMjZiC3sM6aRjPfdVC+NbLwnE7NsJsOVqRKAaZKBGY9o/d+FUnfb5V uVNbeDzE61kUAN9UGizrSE0Rt1iqSDxQ3qmRUvcwXGs6AYJovBSf8WQ37rn1gdhoMEOR Hi9Sdzvt9ZBY7K9IEkhaSkaldbAFjniskntsVy76tv4kcGFx5WKtCYcZsK1Do0iinFzK cAHwA3RjJ/RfvrxDeP/4ZK7rf2lzGk3iQRqO/uqiTecQuGvdfj9JTt9gBEuSmtG5X1aw U2jXPPp4SDp+G6jNSFbmBCoT1BSiKH1oNSg7jaj4Xk7sTXhFKyxO1S+BckU1NEaxlEaE WL4Q== Received: by 10.52.90.199 with SMTP id by7mr5662430vdb.30.1338162633770; Sun, 27 May 2012 16:50:33 -0700 (PDT) Received: from papi.localnet ([187.113.168.45]) by mx.google.com with ESMTPS id d20sm16212112vde.20.2012.05.27.16.50.32 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 27 May 2012 16:50:33 -0700 (PDT) From: Mario Lobo To: freebsd-hackers@freebsd.org Date: Sun, 27 May 2012 20:50:59 -0300 User-Agent: KMail/1.13.7 (FreeBSD/8.2-STABLE; KDE/4.7.4; amd64; ; ) References: <4FC25A5F.4020401@rawbw.com> <20120527170142.GD1509@albert.catwhisker.org> <4FC25ECC.2060400@rawbw.com> In-Reply-To: <4FC25ECC.2060400@rawbw.com> X-KMail-Markup: true MIME-Version: 1.0 Message-Id: <201205272051.00016.lobo@bsd.com.br> X-Gm-Message-State: ALoCoQmFhJmVeeAoFesct4pGFPjNCjWplxlCPvL7NHrBaFGyxaP/61wOIbPygdInZ5XTrxVNRgAT Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 May 2012 23:50:34 -0000 On Sunday 27 May 2012 14:05:16 Yuri wrote: > On 05/27/2012 10:01, David Wolfskill wrote: > > So, at least in my case, I respectfully disagree with the assessment in > > the Subject. > > i386 is one difference (I use amd64) > FX 770M is another difference (I use 9400GT) > I also have everything updated with the similar portmaster command. > > Yuri I use 8-STABLE amd64 with 295.40/9800GT and been using it since I can remember. Except for some quircks with early VirtualBox versions, I have NEVER had a problem with ANY version of the driver I've used. -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since 2.2.8 [not Pro-Audio.... YET!!] (99% winblows FREE) From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 03:06:22 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0D53106566B for ; Mon, 28 May 2012 03:06:22 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 497EB8FC08 for ; Mon, 28 May 2012 03:06:22 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:content-type :content-transfer-encoding; q=dns; s=sweb; b=IlhUR7Z2p/QwlHKc4jU pirHLQhMydRiQdOqM7lwd1dYUFPMzFFmORaJyLgMtGOuOnR5SWKAQV7Bfqulogot JIcasWDc+Fs6m87AB/+lr1pXbbr4Xn9B7SHWv4vBG2kttDIxbyX+KWQ1o15xaD79 9PpE/ivqm3t2kNU0u1qv4iDw= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:content-type :content-transfer-encoding; s=sweb; bh=LXlgLqLmreSR0iBWOMCotFjMu 0i0sthGH+D9sDlXvW0=; b=c39vgskNXAPPOuciAHI3ZOYXfozJEvtFZjNxE21da YIRxQdU2+goTEf6eOMfUf1XzIaYP5eHzO8xJ1OVC0woVSneuFksXi6Ec5Ch36yNa e2olFxbciJbWBpfL+3yNNfKXHvvXzLBeonEvnbVMKcKe+n+Yba/UMf2jq5BXtW5M AU= Received: (qmail 15696 invoked from network); 27 May 2012 22:06:14 -0500 Received: from unknown (HELO ?10.10.1.87?) (bryan@shatow.net@10.10.1.87) by sweb.xzibition.com with ESMTPA; 27 May 2012 22:06:14 -0500 Message-ID: <4FC2EBA5.8010500@shatow.net> Date: Sun, 27 May 2012 22:06:13 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 1.4.1 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ed@80386.nl, brucec@freebsd.org Subject: script(1) broken on 7.4 - bin/146189 - r207453 fixes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 May 2012 03:06:22 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, As reported in bin/146189, script(1) was returning the wrong exit status sometimes. The PR says that script(1) was broken by r205008/r205635, neither of which are in 7-stable or releng/7.4. Yet it is broken on 7.4. This is easily seen on 7.4: # script -q /dev/null false; echo $? 1 # script -q /dev/null false; echo $? 1 # script -q /dev/null false; echo $? 0 # script -q /dev/null false; echo $? 1 # while true; do script -q /dev/null false && echo $? && break; echo $?; done 1 1 <..snip..> 1 0 r207453 was MFC'd to 8-stable at the time, but not 7-stable, likely due to the changes attributed to causing the issue not having been on 7-stable. I am not entirely sure *how* script(1) broke on 7.4, but I have tested r207453 on 7.4 and found that it Works For Me. FWIW, could someone please MFC this to 7-stable? The reason I ran into this is I am maintaining portupgrade, and working on ports/147242 and ports/131111. Both of which seem to be due to script(1) returning the wrong exit status. 7.x is EoL Feb 2013 [1]. Given that, and that script(1)'s return code cannot be relied on for automated scripts. I am wondering what the thoughts are on putting this patch out as an errata? Regards, Bryan Drewery [1] http://www.freebsd.org/security/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPwuukAAoJEG54KsA8mwz5OqEP/38GQcmgBFRbAsNXtOfYOIO0 aPNQTNBsR6VT52VDDKxU7Ou6zL3RlVoL8A9hxlYSXjLdRLDwP6TUODSyNGlsDbSd +o7LVN8VGEHEEflcM0lYEiQEfOhJFBwqBhvVs6Efm7USKwnumGfTnLnkMTXDzwtb RoTQnJDh8wv219Tg71f/RoBhemY6da0Rr7teOB99q22guIc8ao2fnTTcpvhJtg1b l6WwN9O41MQNy3mniC9B0JdxU4Nl8/KQg1PHQMfUR+Q+L0OPcXXSW20NqzmTT41/ RcC4xINgX/y6OHOt3YcVTIKvclwUKxgPYXrIspfEltnwKHpm3SP+gV0O4MLcYTyQ kZkQSA/vIaVRCNY90jwRFa7Pmxj4u7Fqh2l0Cxh87XC2l2JvUtXm/u+bbegJRWzp M27LUjm6FArvC6SNpn3wEWCaY7J7o8fFLTZTMA2PcU7lKPqalIIdrTcug2eUYSye Wcax2OUfhhnH4Dtc59lb243eMDj//zb3q/wXBhMQFZhZXMcNF6P7lh6Z6edSMMDG Wi71VK+dSJdCeXo179W3jztcj6ZnY+DUvkAnLPdxJR58xgjDTVIPJFogkYEnc+pJ qWELKYh5Z/MAbckAaLWSi4nVmdQve6bBYI0Amgxz8/ilciV1NAkNKZOHPVKaOY/7 4NPnCKV1Uqj6u2tHZYOF =a33b -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 08:47:15 2012 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 081E8106566B; Mon, 28 May 2012 08:47:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 754118FC1E; Mon, 28 May 2012 08:47:14 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4S8kwgh082441; Mon, 28 May 2012 11:46:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q4S8kwON068691; Mon, 28 May 2012 11:46:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4S8kwZa068690; Mon, 28 May 2012 11:46:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 28 May 2012 11:46:58 +0300 From: Konstantin Belousov To: Jamie Gritton Message-ID: <20120528084658.GZ2358@deviant.kiev.zoral.com.ua> References: <1337964514.8951.2.camel@powernoodle-l7.corp.yahoo.com> <4FC2B9CA.5090301@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CY2AhQJ0E7w8+M5j" Content-Disposition: inline In-Reply-To: <4FC2B9CA.5090301@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: FreeBSD Hackers , Sean Bruno Subject: Re: [jail] Allowing root privledged users to renice X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 May 2012 08:47:15 -0000 --CY2AhQJ0E7w8+M5j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 27, 2012 at 05:33:30PM -0600, Jamie Gritton wrote: > On 05/25/12 10:48, Sean Bruno wrote: > >I've been toying with the idea of letting jails renice processes ... how > >dangerous and/or stupid is this idea? > > > >=3D=3D=3D=3D //depot/yahoo/ybsd_9/src/sys/kern/kern_jail.c#5 - > >/home/seanbru/ybsd_9/src/sys/kern/kern_jail.c =3D=3D=3D=3D > >270a271,275 > >+ int jail_allow_renice =3D 0; > >+ SYSCTL_INT(_security_jail, OID_AUTO, allow_renice, CTLFLAG_RW, > >+&jail_allow_renice, 0, > >+ "Prison root can renice processes"); > > > >3857a3863,3865 > >+ case PRIV_SCHED_SETPRIORITY: > >+ if (!jail_allow_renice) > >+ return (EPERM); >=20 > Considering they can only renice their own stuff, and could always just > start a new process anyway, I see very little reason to deny this. But the -niced process affects the whole system. --CY2AhQJ0E7w8+M5j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/DO4EACgkQC3+MBN1Mb4hUEACg1uTGJ6ld42xjYfiRhG2tUXy/ zbQAn3Na32FIgtkUOkotwdqZL6UFP/uW =XD8e -----END PGP SIGNATURE----- --CY2AhQJ0E7w8+M5j-- From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 07:17:05 2012 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 DFBB11065674 for ; Mon, 28 May 2012 07:17:05 +0000 (UTC) (envelope-from pacija@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6ADCB8FC12 for ; Mon, 28 May 2012 07:17:05 +0000 (UTC) Received: by bkvi18 with SMTP id i18so2622686bkv.13 for ; Mon, 28 May 2012 00:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:reply-to:to:content-type:organization:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=Cv/d38eeygxzNfoBX7/BvFKiFHf7tXUJi/43lIU2jFg=; b=ko2PUbcMnz6jBEVdfyDSqJlEUPwxeqqSezcrO6vUxn0HfMxDq2lxofp6Z6ZFdGJ25g tcfHFLgKrak3Yywq1A6MiauFwKcQi40NX4LSxtA7aBZYh2tMbEaybHFzwQziAu8SZls7 Dc1H7tG7PInsdbJqbqyG1devC/ZM6+8s3YUys6HgiLaOOBBT4H6c5sdjiws0IJYBlVZD EjSSrB5Xr4UT5jp5zadU7m1gZXdO/yw6Sak03F8aB6CaT+kBml/B4NGURDNySvU2lSxS +oTCLrk90pzXmuzX6/b3baLy0gdco0iTOZMjP4CP8ONTlA06XWwjMQ766qRutKtBOtU3 JA2A== Received: by 10.204.154.142 with SMTP id o14mr2713681bkw.116.1338189424141; Mon, 28 May 2012 00:17:04 -0700 (PDT) Received: from [10.0.2.15] ([193.53.106.40]) by mx.google.com with ESMTPS id fw10sm12912844bkc.11.2012.05.28.00.17.02 (version=SSLv3 cipher=OTHER); Mon, 28 May 2012 00:17:03 -0700 (PDT) From: pacija To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="us-ascii" Organization: underbottom Date: Mon, 28 May 2012 09:17:01 +0200 Message-ID: <1338189421.1320.11.camel@vault.mimar.rs> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 28 May 2012 11:36:11 +0000 Subject: pxe + nfs + microsoft dhcp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pacija@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2012 07:17:06 -0000 Dear list readers, I am having a problem with pxe loader on FreeBSD 9.0 i386 release. No matter what value I put for DHCP option 017 (Root Path) in Microsoft DHCP server, pxe always sets root path: pxe_open: server path: / I've read src/sys/boot/i386/libi386/pxe.c as instructed in handbook, and i learned there that root path is a failover value which gets set if no valid value is supplied by DHCP server. At first i thought that Microsoft DHCP does not send it but i confirmed with windump it does: -- 15:46:49.505748 IP (tos 0x0, ttl 128, id 6066, offset 0, flags [none], proto: UDP (17), length: 392) dhcp.domain.tld.67 > 255.255.255.255.68: [bad udp cksum 4537!] BOOTP/DHCP, Reply, length 364, xid 0xdcdb5309, Flags [ none ] (0x0000) Your-IP 192.168.218.32 Server-IP dhcp.domain.tld Client-Ethernet-Address 00:19:db:db:53:09 (oui Unknown) file "FreeBSD/install/boot/pxeboot" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 345600 RB Option 59, length 4: 604800 Lease-Time Option 51, length 4: 691200 Server-ID Option 54, length 4: dhcp.domain.tld Default-Gateway Option 3, length 4: gate.domain.tld Domain-Name-Server Option 6, length 4: dhcp.domain.tld Domain-Name Option 15, length 1: "^@" RP Option 17, length 42: "192.168.218.32:/b/tftpboot/FreeBSD/install/^@" BF Option 67, length 29: "FreeBSD/install/boot/pxeboot^@" -- I do not understand code well enough to fix it, or at least send pxeloader static value of /b/tftpboot/FreeBSD/install/, so if someone would instruct me how to do it i would be very grateful. Thank you in advance for your help. From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 15:04:33 2012 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 375EC106564A; Mon, 28 May 2012 15:04:33 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 3942B8FC0A; Mon, 28 May 2012 15:04:32 +0000 (UTC) Received: by wibhj8 with SMTP id hj8so1395315wib.13 for ; Mon, 28 May 2012 08:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=TSLY4zptPklApQicL5xBbdilQOiZPf0yIDg5mDkUxsA=; b=N3lWGDUu1Slxu3WHNOvPewQF1pxouqHdamzQrQIFyyNTo+CwNNeIFL8EG91QxfQgA2 4D/4K/zQ6iHgsJIQ2tEx8c+oIE5dfi7qqGqMXwECoATfaKSN5d/ZougFttd/SXjx8vUy fXk/iyeJ//6A01F5/0qcsvdCR8+oeWJlBoeEP0bnvkpAcT7Vv8DaGi8awPKoH8lpVUJU 0DxEmDk15K34Pbi05ANxQeSu1329V+WvoChtz82hdo5FBneE/S2sbeZ/AXqeFgxerJd2 dK/94Eq+cDqe3Irl/i4QOh/uBiAAxBRSQM8p5GXWwXoCGD9ZPVAQ7OgF1t9SLYOpKO2v BaXg== Received: by 10.216.132.94 with SMTP id n72mr2479685wei.60.1338217471113; Mon, 28 May 2012 08:04:31 -0700 (PDT) Received: from dft-labs.eu (dft-labs.eu. [80.87.128.179]) by mx.google.com with ESMTPS id n11sm34158288wiv.9.2012.05.28.08.04.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 May 2012 08:04:29 -0700 (PDT) Date: Mon, 28 May 2012 17:04:20 +0200 From: Mateusz Guzik To: Julian Elischer Message-ID: <20120528150420.GA15947@dft-labs.eu> References: <1337964514.8951.2.camel@powernoodle-l7.corp.yahoo.com> <8EE125C9-9FA7-495B-A6ED-CF3F7C2E8A3E@lists.zabbadoz.net> <4FBFC029.10401@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FBFC029.10401@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "Bjoern A. Zeeb" , FreeBSD-Jail , FreeBSD Hackers Subject: Re: [jail] Allowing root privledged users to renice X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 May 2012 15:04:33 -0000 On Fri, May 25, 2012 at 10:23:53AM -0700, Julian Elischer wrote: > On 5/25/12 10:04 AM, Bjoern A. Zeeb wrote: > >On 25. May 2012, at 16:48 , Sean Bruno wrote: > > > >>I've been toying with the idea of letting jails renice processes ... how > >>dangerous and/or stupid is this idea? > >> > >>==== //depot/yahoo/ybsd_9/src/sys/kern/kern_jail.c#5 - > >>/home/seanbru/ybsd_9/src/sys/kern/kern_jail.c ==== > >>270a271,275 > >>+ int jail_allow_renice = 0; > >>+ SYSCTL_INT(_security_jail, OID_AUTO, allow_renice, CTLFLAG_RW, > >>+&jail_allow_renice, 0, > >>+ "Prison root can renice processes"); > >> > >>3857a3863,3865 > >>+ case PRIV_SCHED_SETPRIORITY: > >>+ if (!jail_allow_renice) > >>+ return (EPERM); > > > >I think sysctls are a bad idea given jails have per-jail flags these days. > > > >Maybe also only allow re-nicing to be nicer but not less nice? > ^^^^ for sure ! start a jail with it's max priority and the > root within can allow nicer priorities only.. > you can always add priority from teh master (parent) environment outside. > Unless I seriously misunderstood something, that's the case right now. That is, PRIV_SCHED_SETPRIORITY matters only if resulting nice parameter would be lower. -- Mateusz Guzik From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 15:56:00 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EBD3106566C for ; Mon, 28 May 2012 15:56:00 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 525A08FC23 for ; Mon, 28 May 2012 15:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=4RcbzmRgcuYem9tIyhd6QVGGr/M52Xkzo5IZ7MRVULg=; b=PBn/jFyHnxDW0r6uDevPegWZqUFN2TflstFyLhQan9qaacKGuDV314myObZQDrpEBqiP8zSblEQXUyB08ttkC2eatdXRcj9zB7VqGqpC0m4dk9R9HH43A2IZMV5/Z9So; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SZ2IY-00050S-EX for freebsd-hackers@freebsd.org; Mon, 28 May 2012 10:56:00 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1338220552-3288-3287/5/34; Mon, 28 May 2012 15:55:52 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org References: <4FC25A5F.4020401@rawbw.com> Date: Mon, 28 May 2012 10:55:52 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <4FC25A5F.4020401@rawbw.com> User-Agent: Opera Mail/11.64 (FreeBSD) X-SA-Score: -1.5 Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 May 2012 15:56:00 -0000 On Sun, 27 May 2012 11:46:23 -0500, wrote: > After the recent system upgrade that brought nvidia-driver-295.49 my > system began to malfunction. > Xorg randomly freezes and gets to 100% CPU (in kde4), switching back > from the black terminal takes 30 seconds, some windows don't repaint > while windows effects are on, etc. > Switching back to 295.05.09 from Feb 11, 2012 fixed the problem. > > 9400GT > > I can't believe this is only my problem. I think the version should be > rolled back until the problem is fixed. > Hmmm I think this is exactly my problem. My desktop at home is working fine, but it's a 4xx and my work machine is a 9xxx. I honestly thought it was a flash problem because it seems to happen most on pages that have flash content. From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 21:22:46 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A438106566B for ; Mon, 28 May 2012 21:22:46 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [IPv6:2a01:e0c:1:1599::14]) by mx1.freebsd.org (Postfix) with ESMTP id 729E18FC0C for ; Mon, 28 May 2012 21:22:43 +0000 (UTC) Received: from endor.tataz.chchile.org (unknown [82.233.239.98]) by smtp5-g21.free.fr (Postfix) with ESMTP id 00EC5D480AB; Mon, 28 May 2012 23:22:37 +0200 (CEST) Received: from felucia.tataz.chchile.org (felucia.tataz.chchile.org [192.168.1.9]) by endor.tataz.chchile.org (Postfix) with ESMTP id 993CCCF4; Mon, 28 May 2012 23:22:36 +0200 (CEST) Received: by felucia.tataz.chchile.org (Postfix, from userid 1000) id 87490E0BB; Mon, 28 May 2012 21:22:36 +0000 (UTC) Date: Mon, 28 May 2012 23:22:36 +0200 From: Jeremie Le Hen To: Mel Flynn Message-ID: <20120528212236.GC47353@felucia.tataz.chchile.org> Mail-Followup-To: Mel Flynn , FreeBSD Hackers References: <4FC26F26.6000907@acsalaska.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FC26F26.6000907@acsalaska.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Hackers Subject: Re: Activating libssp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 May 2012 21:22:46 -0000 Hi Mel, On Sun, May 27, 2012 at 08:15:02PM +0200, Mel Flynn wrote: > Hi, > > for a port, I'm seeing: > #ifdef _FORTIFY_SOURCE > ... > #endif > > I did a bit of reading (http://wiki.debian.org/Hardening) for example, > searching through /usr/share/mk/* /usr/include/libssp, /usr/src/gnu/libssp. > > However, it's not clear to me, where the magic is that pulls in the > libssp library that is in /lib. > > Also - it seems to be part of gcc, so does that mean on systems without > gcc, that this library is not available or does clang have a variant? gnu/lib/libssp is built for compatibility reasons. See http://svnweb.freebsd.org/base?view=revision&revision=169718 Our libc provides the necessary symbols. http://svnweb.freebsd.org/base/head/lib/libc/sys/stack_protector.c > I do see -fstack-protector is added to CFLAGS by default, so I'm > thinking there's some magic somewhere, but I'm just missing the docs > that tell me "if you add foo to CFLAGS then bar will happen, unless baz". I'm not sure what you mean, but -fstack-protector is documented in GCC documentation, I suppose it's the same for Clang but I didn't check. You can disable it on FreeBSD by setting WITHOUT_SSP in src.conf(5). -- Jeremie Le Hen Men are born free and equal. Later on, they're on their own. Jean Yanne From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 22:42:08 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E52751065672 for ; Mon, 28 May 2012 22:42:07 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9C7158FC14 for ; Mon, 28 May 2012 22:42:07 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EANr+w0+DaFvO/2dsb2JhbABEhTCxPYIXAQEBBAEBASArIAsMDxoCDRkCKQEJJg4HBAEcBIdqC6V/kheBJIl5ggGCBIESA5JygiWBD45ignyBOgcC X-IronPort-AV: E=Sophos;i="4.75,673,1330923600"; d="scan'208";a="173503499" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 28 May 2012 18:42:01 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 6BE4FB3F91; Mon, 28 May 2012 18:42:01 -0400 (EDT) Date: Mon, 28 May 2012 18:42:01 -0400 (EDT) From: Rick Macklem To: pacija@gmail.com Message-ID: <1559609187.982427.1338244921382.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <1338189421.1320.11.camel@vault.mimar.rs> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-hackers@freebsd.org Subject: Re: pxe + nfs + microsoft dhcp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 May 2012 22:42:08 -0000 pacija wrote: ----- Original Message ----- > Dear list readers, > > I am having a problem with pxe loader on FreeBSD 9.0 i386 release. No > matter what value I put for DHCP option 017 (Root Path) in Microsoft > DHCP server, pxe always sets root path: > pxe_open: server path: / > > I've read src/sys/boot/i386/libi386/pxe.c as instructed in handbook, > and > i learned there that root path is a failover value which gets set if > no > valid value is supplied by DHCP server. At first i thought that > Microsoft DHCP does not send it but i confirmed with windump it does: > > -- > 15:46:49.505748 IP (tos 0x0, ttl 128, id 6066, offset 0, flags [none], > proto: UDP > (17), length: 392) dhcp.domain.tld.67 > 255.255.255.255.68: [bad udp > cksum 4537!] > BOOTP/DHCP, Reply, length 364, xid 0xdcdb5309, Flags [ none ] (0x0000) > Your-IP 192.168.218.32 > Server-IP dhcp.domain.tld > Client-Ethernet-Address 00:19:db:db:53:09 (oui Unknown) > file "FreeBSD/install/boot/pxeboot" > Vendor-rfc1048 Extensions > Magic Cookie 0x63825363 > DHCP-Message Option 53, length 1: Offer > Subnet-Mask Option 1, length 4: 255.255.255.0 > RN Option 58, length 4: 345600 > RB Option 59, length 4: 604800 > Lease-Time Option 51, length 4: 691200 > Server-ID Option 54, length 4: dhcp.domain.tld > Default-Gateway Option 3, length 4: gate.domain.tld > Domain-Name-Server Option 6, length 4: dhcp.domain.tld > Domain-Name Option 15, length 1: "^@" > RP Option 17, length 42: > "192.168.218.32:/b/tftpboot/FreeBSD/install/^@" > BF Option 67, length 29: "FreeBSD/install/boot/pxeboot^@" What about getting rid of the "^@" characters at the end of the strings? rick > -- > > I do not understand code well enough to fix it, or at least send > pxeloader static value of /b/tftpboot/FreeBSD/install/, so if someone > would instruct me how to do it i would be very grateful. > > Thank you in advance for your help. > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 06:59:58 2012 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 C3EDB106566B for ; Tue, 29 May 2012 06:59:58 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 6E7AC8FC0A for ; Tue, 29 May 2012 06:59:58 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1SZGH7-000Pza-3o; Tue, 29 May 2012 09:51:25 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 To: Rick Macklem In-reply-to: <1559609187.982427.1338244921382.JavaMail.root@erie.cs.uoguelph.ca> References: <1559609187.982427.1338244921382.JavaMail.root@erie.cs.uoguelph.ca> Comments: In-reply-to Rick Macklem message dated "Mon, 28 May 2012 18:42:01 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 29 May 2012 09:51:25 +0300 From: Daniel Braniss Message-ID: Cc: pacija@gmail.com, freebsd-hackers@freebsd.org Subject: Re: pxe + nfs + microsoft dhcp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 May 2012 06:59:58 -0000 > pacija wrote: > > ----- Original Message ----- > > Dear list readers, > > > > I am having a problem with pxe loader on FreeBSD 9.0 i386 release. No > > matter what value I put for DHCP option 017 (Root Path) in Microsoft > > DHCP server, pxe always sets root path: > > pxe_open: server path: / > > > > I've read src/sys/boot/i386/libi386/pxe.c as instructed in handbook, > > and > > i learned there that root path is a failover value which gets set if > > no > > valid value is supplied by DHCP server. At first i thought that > > Microsoft DHCP does not send it but i confirmed with windump it does: > > > > -- > > 15:46:49.505748 IP (tos 0x0, ttl 128, id 6066, offset 0, flags [none], > > proto: UDP > > (17), length: 392) dhcp.domain.tld.67 > 255.255.255.255.68: [bad udp > > cksum 4537!] > > BOOTP/DHCP, Reply, length 364, xid 0xdcdb5309, Flags [ none ] (0x0000) > > Your-IP 192.168.218.32 > > Server-IP dhcp.domain.tld > > Client-Ethernet-Address 00:19:db:db:53:09 (oui Unknown) > > file "FreeBSD/install/boot/pxeboot" > > Vendor-rfc1048 Extensions > > Magic Cookie 0x63825363 > > DHCP-Message Option 53, length 1: Offer > > Subnet-Mask Option 1, length 4: 255.255.255.0 > > RN Option 58, length 4: 345600 > > RB Option 59, length 4: 604800 > > Lease-Time Option 51, length 4: 691200 > > Server-ID Option 54, length 4: dhcp.domain.tld > > Default-Gateway Option 3, length 4: gate.domain.tld > > Domain-Name-Server Option 6, length 4: dhcp.domain.tld > > Domain-Name Option 15, length 1: "^@" > > RP Option 17, length 42: > > "192.168.218.32:/b/tftpboot/FreeBSD/install/^@" > > BF Option 67, length 29: "FreeBSD/install/boot/pxeboot^@" > What about getting rid of the "^@" characters at the end of > the strings? the ^@ seems to have been added by windump, but check this out: the length of the root-path 192.168.218.32:/b/tftpboot/FreeBSD/install/ is 43!, not 42 as shown, and the ^@ (NULL) is the 44th! on the other hand, FreeBSD/install/boot/pxeboot is 28! can you make available the raw data (cab) of the entire transaction, including the request for the boot files? danny From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 09:08:12 2012 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 B547D106566B for ; Tue, 29 May 2012 09:08:12 +0000 (UTC) (envelope-from pacija@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 275FC8FC12 for ; Tue, 29 May 2012 09:08:11 +0000 (UTC) Received: by bkvi18 with SMTP id i18so3723021bkv.13 for ; Tue, 29 May 2012 02:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :organization:date:message-id:mime-version:x-mailer; bh=np9IvMh7Om9n7C2wAkqBqUAK6JwX7McsqyHB3hyHXZQ=; b=IRSuGjOWrEJDW2JKcBYT+Fy43CJ62ugdYKNVkww4TN2k9BVNITFGj3DjDEkQo4luMh 0FRQQey1TF0d8ZJMN8c3wdgATGQf04aABChZSMoCPpxcjLRPdbequ7h1UGty60y13aKm 85YNh0EvnV6hTzrtI65NyH1qn8tg4NmFt3G6Pq/6uMha1TPqL1443emmDbMAaSZt+8Dn r04/jgbTjEq+at9LIsFrMnINrZkZ9qM5y2ElGLK2srWxsXqsuNkB9vVXk14UznB3cudJ GmRDBHsrRsAiVB/Omha7IL61BqghPfO3yTSWcYTbVGtWUoo42aEsFejlfLwnCrwSqmHv NLJg== Received: by 10.204.152.22 with SMTP id e22mr5308233bkw.8.1338282490807; Tue, 29 May 2012 02:08:10 -0700 (PDT) Received: from [10.0.2.15] ([193.53.106.40]) by mx.google.com with ESMTPS id m2sm16942196bkm.2.2012.05.29.02.08.07 (version=SSLv3 cipher=OTHER); Tue, 29 May 2012 02:08:07 -0700 (PDT) From: pacija To: Daniel Braniss In-Reply-To: References: <1559609187.982427.1338244921382.JavaMail.root@erie.cs.uoguelph.ca> Content-Type: multipart/mixed; boundary="=-etjkwQYOTmf8U9KY0eW8" Organization: underbottom Date: Tue, 29 May 2012 11:08:04 +0200 Message-ID: <1338282484.1278.6.camel@vault.mimar.rs> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Rick Macklem Subject: Re: pxe + nfs + microsoft dhcp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pacija@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 09:08:12 -0000 --=-etjkwQYOTmf8U9KY0eW8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > > pacija wrote: > > > > ----- Original Message ----- > > > Dear list readers, > > > > > > I am having a problem with pxe loader on FreeBSD 9.0 i386 release. No > > > matter what value I put for DHCP option 017 (Root Path) in Microsoft > > > DHCP server, pxe always sets root path: > > > pxe_open: server path: / > > > > > > I've read src/sys/boot/i386/libi386/pxe.c as instructed in handbook, > > > and > > > i learned there that root path is a failover value which gets set if > > > no > > > valid value is supplied by DHCP server. At first i thought that > > > Microsoft DHCP does not send it but i confirmed with windump it does: > > > > > > -- > > > 15:46:49.505748 IP (tos 0x0, ttl 128, id 6066, offset 0, flags [none], > > > proto: UDP > > > (17), length: 392) dhcp.domain.tld.67 > 255.255.255.255.68: [bad udp > > > cksum 4537!] > > > BOOTP/DHCP, Reply, length 364, xid 0xdcdb5309, Flags [ none ] (0x0000) > > > Your-IP 192.168.218.32 > > > Server-IP dhcp.domain.tld > > > Client-Ethernet-Address 00:19:db:db:53:09 (oui Unknown) > > > file "FreeBSD/install/boot/pxeboot" > > > Vendor-rfc1048 Extensions > > > Magic Cookie 0x63825363 > > > DHCP-Message Option 53, length 1: Offer > > > Subnet-Mask Option 1, length 4: 255.255.255.0 > > > RN Option 58, length 4: 345600 > > > RB Option 59, length 4: 604800 > > > Lease-Time Option 51, length 4: 691200 > > > Server-ID Option 54, length 4: dhcp.domain.tld > > > Default-Gateway Option 3, length 4: gate.domain.tld > > > Domain-Name-Server Option 6, length 4: dhcp.domain.tld > > > Domain-Name Option 15, length 1: "^@" > > > RP Option 17, length 42: > > > "192.168.218.32:/b/tftpboot/FreeBSD/install/^@" > > > BF Option 67, length 29: "FreeBSD/install/boot/pxeboot^@" > > What about getting rid of the "^@" characters at the end of > > the strings? > > the ^@ seems to have been added by windump, but check this out: > the length of the root-path > 192.168.218.32:/b/tftpboot/FreeBSD/install/ > is 43!, not 42 as shown, and the ^@ (NULL) is the 44th! > on the other hand, > FreeBSD/install/boot/pxeboot > is 28! > > can you make available the raw data (cab) of the entire transaction, including > the request for the boot files? > > danny > > Hi Danny, thank you for looking into it. I did the dump catching ip broadcasts (attached file), hope that is the correct one: windump -nvvv -s 0 -w pxedump.cab ip broadcast I would like to try to get rid of "^@" characters but i am going to need instruction what exactly do in need to do in order to accomplish it. Regards, --=-etjkwQYOTmf8U9KY0eW8-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 09:32:53 2012 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 F2DCA1065672 for ; Tue, 29 May 2012 09:32:52 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id A2C2B8FC12 for ; Tue, 29 May 2012 09:32:52 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1SZInK-0004RG-IF; Tue, 29 May 2012 12:32:50 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 To: pacija@gmail.com In-reply-to: <1338282484.1278.6.camel@vault.mimar.rs> References: <1559609187.982427.1338244921382.JavaMail.root@erie.cs.uoguelph.ca> <1338282484.1278.6.camel@vault.mimar.rs> Comments: In-reply-to pacija message dated "Tue, 29 May 2012 11:08:04 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 29 May 2012 12:32:50 +0300 From: Daniel Braniss Message-ID: Cc: freebsd-hackers@freebsd.org, Rick Macklem Subject: Re: pxe + nfs + microsoft dhcp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 May 2012 09:32:53 -0000 > > --=-etjkwQYOTmf8U9KY0eW8 > Content-Type: text/plain; charset="us-ascii" > Content-Transfer-Encoding: 7bit > > > > pacija wrote: > > > > > > ----- Original Message ----- > > > > Dear list readers, > > > > > > > > I am having a problem with pxe loader on FreeBSD 9.0 i386 release. No > > > > matter what value I put for DHCP option 017 (Root Path) in Microsoft > > > > DHCP server, pxe always sets root path: > > > > pxe_open: server path: / > > > > > > > > I've read src/sys/boot/i386/libi386/pxe.c as instructed in handbook, > > > > and > > > > i learned there that root path is a failover value which gets set if > > > > no > > > > valid value is supplied by DHCP server. At first i thought that > > > > Microsoft DHCP does not send it but i confirmed with windump it does: > > > > > > > > -- > > > > 15:46:49.505748 IP (tos 0x0, ttl 128, id 6066, offset 0, flags [none], > > > > proto: UDP > > > > (17), length: 392) dhcp.domain.tld.67 > 255.255.255.255.68: [bad udp > > > > cksum 4537!] > > > > BOOTP/DHCP, Reply, length 364, xid 0xdcdb5309, Flags [ none ] (0x0000) > > > > Your-IP 192.168.218.32 > > > > Server-IP dhcp.domain.tld > > > > Client-Ethernet-Address 00:19:db:db:53:09 (oui Unknown) > > > > file "FreeBSD/install/boot/pxeboot" > > > > Vendor-rfc1048 Extensions > > > > Magic Cookie 0x63825363 > > > > DHCP-Message Option 53, length 1: Offer > > > > Subnet-Mask Option 1, length 4: 255.255.255.0 > > > > RN Option 58, length 4: 345600 > > > > RB Option 59, length 4: 604800 > > > > Lease-Time Option 51, length 4: 691200 > > > > Server-ID Option 54, length 4: dhcp.domain.tld > > > > Default-Gateway Option 3, length 4: gate.domain.tld > > > > Domain-Name-Server Option 6, length 4: dhcp.domain.tld > > > > Domain-Name Option 15, length 1: "^@" > > > > RP Option 17, length 42: > > > > "192.168.218.32:/b/tftpboot/FreeBSD/install/^@" > > > > BF Option 67, length 29: "FreeBSD/install/boot/pxeboot^@" > > > What about getting rid of the "^@" characters at the end of > > > the strings? > > > > the ^@ seems to have been added by windump, but check this out: > > the length of the root-path > > 192.168.218.32:/b/tftpboot/FreeBSD/install/ > > is 43!, not 42 as shown, and the ^@ (NULL) is the 44th! > > on the other hand, > > FreeBSD/install/boot/pxeboot > > is 28! > > > > can you make available the raw data (cab) of the entire transaction, including > > the request for the boot files? > > > > danny > > > > > > Hi Danny, > > thank you for looking into it. > > I did the dump catching ip broadcasts (attached file), hope that is the > correct one: > > windump -nvvv -s 0 -w pxedump.cab ip broadcast > > I would like to try to get rid of "^@" characters but i am going to need > instruction what exactly do in need to do in order to accomplish it. the ^@ is a MS off-by-one error, but is irrelevant. the last DHCP ACKdoes not contain the root path, hence pxeboot is going for /. I don't know about ms dhcp, but there should be an option like isc-dhcp has (default dhcp-parameter-request-list): ... match if substring (option vendor-class-identifier, 0, 7) = "PXEClient"; # removing windows specific options to save space for FreeBSD; default dhcp-parameter-request-list 1, 3, 6, 12, 15, 17, 23, 28, 29, 31, 33, 40, 41, 42, 144, 150, 208, 209, 210, 211, 230, 60, 43; notice that 17 is in there danny From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 12:54:11 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 557241065673 for ; Tue, 29 May 2012 12:54:11 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 1C44C8FC1A for ; Tue, 29 May 2012 12:54:11 +0000 (UTC) Received: from [127.0.0.1] (squeeze.lan.rachie.is-a-geek.net [192.168.2.30]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 805B67E851 for ; Tue, 29 May 2012 04:54:09 -0800 (AKDT) Message-ID: <4FC4C6EE.2020601@acsalaska.net> Date: Tue, 29 May 2012 14:54:06 +0200 From: Mel Flynn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FC26F26.6000907@acsalaska.net> <20120528212236.GC47353@felucia.tataz.chchile.org> In-Reply-To: <20120528212236.GC47353@felucia.tataz.chchile.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Activating libssp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 May 2012 12:54:11 -0000 On 28-5-2012 23:22, Jeremie Le Hen wrote: > Hi Mel, > > On Sun, May 27, 2012 at 08:15:02PM +0200, Mel Flynn wrote: >> Hi, >> >> for a port, I'm seeing: >> #ifdef _FORTIFY_SOURCE >> ... >> #endif >> >> I did a bit of reading (http://wiki.debian.org/Hardening) for example, >> searching through /usr/share/mk/* /usr/include/libssp, /usr/src/gnu/libssp. >> >> However, it's not clear to me, where the magic is that pulls in the >> libssp library that is in /lib. >> >> Also - it seems to be part of gcc, so does that mean on systems without >> gcc, that this library is not available or does clang have a variant? > > gnu/lib/libssp is built for compatibility reasons. See > http://svnweb.freebsd.org/base?view=revision&revision=169718 This clarifies a bit about the existence of libssp as a shared lib. Thanks. > Our libc provides the necessary symbols. > http://svnweb.freebsd.org/base/head/lib/libc/sys/stack_protector.c > >> I do see -fstack-protector is added to CFLAGS by default, so I'm >> thinking there's some magic somewhere, but I'm just missing the docs >> that tell me "if you add foo to CFLAGS then bar will happen, unless baz". > > I'm not sure what you mean, but -fstack-protector is documented in GCC > documentation, I suppose it's the same for Clang but I didn't check. > You can disable it on FreeBSD by setting WITHOUT_SSP in src.conf(5). Right, I wasn't very clear with that, so let me clarify: - _FORTIFY_SOURCE is used in /usr/include/ssp/ssp.h - There is a shared library /lib/libssp.so - In the sources of the software there is no mention of ssp.h or -lssp - In the sources of the software there are conditionals based on _FORTIFY_SOURCE being defined. So, for me as port maintainer, it looks as though adding -D_FORTIFY_SOURCE=2 does absolutely nothing for the software, unless I also #include and add -lssp to LDFLAGS, unless there's some magic in libc or the compiler that activates bits and overrides the definitions for the symbols. Based on the commit message, I assume that adding _FORTIFY_SOURCE to CFLAGS does nothing, as the actual setting of this flag is compiled into libc. And -fstack-protector tells the compiler to activate the stack protector callbacks that are again, implemented in libc. Without this, they won't be activated. Does this sound correct? As a side note, the code in question does not apply to FreeBSD at all as we have no __FD_SETSIZE symbol anywhere that I can find: #ifndef _FORTIFY_SOURCE #include #undef __FD_SETSIZE #define __FD_SETSIZE 8192 #endif so I'm patching that to read FD_SETSIZE or add -DFD_SETSIZE=8192 to CFLAGS (not sure which I'll use yet). -- Mel From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 14:53:51 2012 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 CAD11106566B for ; Tue, 29 May 2012 14:53:51 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 59B198FC17 for ; Tue, 29 May 2012 14:53:51 +0000 (UTC) Received: by werg1 with SMTP id g1so3437078wer.13 for ; Tue, 29 May 2012 07:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=GXZAatE0OSWvWI2PbobwGsdgMZiecOHdphvwmAYHUks=; b=kYt5Sdpy93eCzQqg14DVnrcS+ZWvlc/NiONAYJIV9kuM4MT7Rs/fbvdYhPKRAu4OTJ RZJTTJP4C2dmX9FzOzYTxBzlg5KD8785xLhJZHZo6DXmcsbG0soyLQ07ZGIfJcFYHynA QzZIrZ+i3JgmMoSjA1n9lSslNbZghkw7eaLJc4MqzvDIOKbkx+6O+bREOvB42wXOYhwU hJ8d7NZJ/rqZEz8yLaCTQxdc/316HOhgPrBN8bQlHV5G/HnKJelA54FpO1mm6EuV7CK8 G3EKpaYWX59hQrCxmMh/qJE5HTS2JvNrkwN0qWkQeFzGWq4++WZjHHR8yxd+YdA64ZyL 9GFA== MIME-Version: 1.0 Received: by 10.216.212.1 with SMTP id x1mr7871847weo.143.1338303230483; Tue, 29 May 2012 07:53:50 -0700 (PDT) Received: by 10.180.146.37 with HTTP; Tue, 29 May 2012 07:53:50 -0700 (PDT) Date: Tue, 29 May 2012 10:53:50 -0400 Message-ID: From: vasanth rao naik sabavat To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 14:53:51 -0000 Hi, In case of a Multicore cpu system running a multithreaded process. For protocol control blocks there is no protection provided in the FreeBSD 9. For example, udp_close() and udp_send() access the inp before taking the lock. Couldn't this cause the inp inconsistency on a multithreaded process running on multicore cpu system? Say, If the two threads of a process are concurrently executing socket send and socket close say on a udp connection (this can happen in case of poorly written user code.). udp_close() will access the inp on one cpu and udp_send() will access the inp on another cpu. it is possible that udp_close() gets the locks first and free's the inp before udp_send() has a chance to run? Am I missing anything? Thanks, Vasanth From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 20:08:24 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77B75106566C; Tue, 29 May 2012 20:08:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 48BC78FC18; Tue, 29 May 2012 20:08:24 +0000 (UTC) Received: by dadv36 with SMTP id v36so6152299dad.13 for ; Tue, 29 May 2012 13:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=SVTqjfinZA/WF1kSabt/HuWRzL04RXBKe8uYSlaZZw0=; b=VKgb1Lnt92R3M992ag41Bc28EdZ+PKL8Fs6MmBxlqla+a/3LliwYU5hFBdLLMRhXn0 DBNLY3x+Zm9XDRrKo7WI31Bm+pGzmB/EECBgypQajkBzWXuTIY6d+U5MUiO8CK84/gOQ dYPswJwIULa7aRs5VQ6Qi29ViO0SnIQKLrqm2VTgJTq1QT5ttgewHyE7exwseMClR24z ECd4lyUq2An7K6n2G8l1bEh1Dydh3/JbrSsxVFtXrUAOHFKzViJ3VSnwfOxeYdBXvhoS Kr5xKWVv/rbz5XzZPyxgG+4so5ZE5FtAvtR4r5X6QFd+KjGO1Y5I5ITBqEA8pr+cUlV+ Hknw== MIME-Version: 1.0 Received: by 10.68.211.170 with SMTP id nd10mr17472569pbc.68.1338322103861; Tue, 29 May 2012 13:08:23 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Tue, 29 May 2012 13:08:23 -0700 (PDT) Date: Tue, 29 May 2012 13:08:23 -0700 X-Google-Sender-Auth: oXmgbPQDJUrbhZTmVPtlV_SY_rA Message-ID: From: Adrian Chadd To: Alexander Motin , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 May 2012 20:08:24 -0000 Hi Alexander and others, I've been tinkering with ath(4) IO scheduling and taskqueues. In order to get proper "in order" TX IO occuring, I've placed ath_start() into a taskqueue so now whenever ath_start() is called, it just schedules a taskqueue entry to run. However, performance is worse. :-) Here's a schedgraph trace. http://people.freebsd.org/~adrian/ath/ktr.4-ath-iperf-using-taskqueue-for-tx.ktr.gz I've thrown this through schedgraph.py on stable/9 and I've found some rather annoying behaviour. It seems that the ath0 taskqueue stays in the "runq add" state for quite a long time (1.5ms and longer) because something else is going on on CPU #0. I'm very confused about what's going on. I'd like a hand trying to figure out why the schedgraph output is the way it is. Thanks! Adrian From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 20:12:26 2012 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 A54581065672; Tue, 29 May 2012 20:12:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7213B8FC0A; Tue, 29 May 2012 20:12:26 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so6734401pbb.13 for ; Tue, 29 May 2012 13:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=/EWi5BJhxYVkOE5e2LzsgnFYYNAiGW2swVsF18PezSw=; b=bHVE6gcSbZxgHOpnvG7KUjxMcSW0pWnz5dVlRM9bGhY6SgCplcPK424oXX7JA93l26 7bZH3Xm78ok64ofRpTWuHPMGGWiieyNSUbYydzmA/IsL2KFSLc7PJmuOkvNN9JO4oMXO w+FDu2Ef+1BdsNgIu7wTl47jd9y/GO9+NQUcdz/ws8PwG+Yt70oP0kHYk2lVAEO+FF4/ zDzxJMRQ3qRpi5UFAfUBP7MsgwSjrD4eFT6ENDVXxjpJ2dTq0ctJxzSGZXIBuPkKUjBG xaqnmWs5hgxvLFfktiGHMGu6+AOb/yhEdmkObCbnGFdJVOCZRzdJ/1728tS+ZE9SVUdM U2aA== MIME-Version: 1.0 Received: by 10.68.234.35 with SMTP id ub3mr41839432pbc.8.1338322345339; Tue, 29 May 2012 13:12:25 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Tue, 29 May 2012 13:12:25 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 May 2012 13:12:25 -0700 X-Google-Sender-Auth: pcZ68Vhml3etV_DYARtpLXwtGc0 Message-ID: From: Adrian Chadd To: Alexander Motin , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 May 2012 20:12:26 -0000 .. also, if you take a look at the ktr output, the CPU timers between CPU 0 and CPU 1 are slightly different. schedgraph complains quite loudly. :-) Is that acceptable/possible? Adrian From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 20:12:32 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3CF91065670; Tue, 29 May 2012 20:12:31 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7B07B8FC0C; Tue, 29 May 2012 20:12:31 +0000 (UTC) Received: by vcbfy7 with SMTP id fy7so2979551vcb.13 for ; Tue, 29 May 2012 13:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9wx9a97tDqgm/CysCycPzTZfzi9jpmsiGC8XdoASotY=; b=IWP/iP3vIU2f/EylC+iiAKtY3GT5E2SM+58R/6U+vuymrg6MKDqsMaE7lgf8tjTTc+ Ww9SfVeADv9mSmm3fDyB0KrsDApsXubqPNXM15tK+oG8YaHJvKXUuMNVhc6LodqVUHUO 2ukYYlahJqwLiGf1zAgnc1ZX0muXFvKzhBv8OcPQCDtwOGTf2vsep/0dEEODZYxXQ7RB EWdCp1pxWhgJpK8dGKBqs7rtjRwMeh+ed25SR8ncKdPS7N/DBENjqVcHotlEUS6n+8Xn ZK4Q/lhoblabhRUfH+jqlJSL/YpLJ/UggjIymaGCrOqkv5SUQ0bThgiuMf3ygjedlMUc iQcQ== MIME-Version: 1.0 Received: by 10.220.221.7 with SMTP id ia7mr14446354vcb.31.1338322350497; Tue, 29 May 2012 13:12:30 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.99.11 with HTTP; Tue, 29 May 2012 13:12:26 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 May 2012 21:12:26 +0100 X-Google-Sender-Auth: vA7ejcEJW7BNQ27A7TIVV8TOqpI Message-ID: From: Attilio Rao To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 29 May 2012 20:12:32 -0000 2012/5/29 Adrian Chadd : > Hi Alexander and others, > > I've been tinkering with ath(4) IO scheduling and taskqueues. In order > to get proper "in order" TX IO occuring, I've placed ath_start() into > a taskqueue so now whenever ath_start() is called, it just schedules a > taskqueue entry to run. > > However, performance is worse. :-) > > Here's a schedgraph trace. > > http://people.freebsd.org/~adrian/ath/ktr.4-ath-iperf-using-taskqueue-for-tx.ktr.gz > > I've thrown this through schedgraph.py on stable/9 and I've found some > rather annoying behaviour. It seems that the ath0 taskqueue stays in > the "runq add" state for quite a long time (1.5ms and longer) because > something else is going on on CPU #0. > > I'm very confused about what's going on. I'd like a hand trying to > figure out why the schedgraph output is the way it is. What I would usually do for this cases, is to patch your kernel with more KTR traces (handmade class, add a fictious KTR class after KTR_BUF) in the interested code paths to log why your task is not really scheduled. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 20:20:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69202106564A for ; Tue, 29 May 2012 20:20:17 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id EB83D8FC0A for ; Tue, 29 May 2012 20:20:16 +0000 (UTC) Received: by werg1 with SMTP id g1so3742911wer.13 for ; Tue, 29 May 2012 13:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=uOniq/MIOqgLAJhwVD47uqCiDCy87Xa8pO80D7lEc+g=; b=QOQOhAPRBrktsbWUAsOLOcIXkCW9/FzEL3wEVvUqwOgteyhUNK2fdSI52njxWucJ9q C8enSwO9Z5AwW9aORqgYIqw36aQpVg4wT36//ylKS7zbHqNST7INK4r8IRXWbd6j5AT1 B9+xbC+9CPj77jY8w5x+ths+7RIPqgYyyItVBzi/+NVTDcq27CoXIn8QaTInOtWDKIaJ 2G8ZRMGXH5uf+jcQdt0P0ssXJWecslWZvW+UgV8oUzZ3eI1sdnDX4+kafSx9dJersx7U Io1DHF0Ji2zSP3FTtli6xPCMZ8rWyYgSIz6j1hmuWtCwuNewvqVNhY0xt+65wjG/Q6pw NL9Q== MIME-Version: 1.0 Received: by 10.216.206.164 with SMTP id l36mr8406567weo.154.1338322809905; Tue, 29 May 2012 13:20:09 -0700 (PDT) Received: by 10.180.146.37 with HTTP; Tue, 29 May 2012 13:20:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 May 2012 16:20:09 -0400 Message-ID: From: vasanth rao naik sabavat To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 20:20:17 -0000 Can somebody please reply to this email. basically, can udp_detach() and udp_send() execute simultaneously for a process with multiple threads? if yes, then inp reference in udp_send() will be stale if udp_detach() free's the inp? Thanks, Vasanth On Tue, May 29, 2012 at 10:53 AM, vasanth rao naik sabavat < vasanth.raonaik@gmail.com> wrote: > Hi, > > In case of a Multicore cpu system running a multithreaded process. > > For protocol control blocks there is no protection provided in the FreeBSD > 9. For example, udp_close() and udp_send() access the inp before taking the > lock. Couldn't this cause the inp inconsistency on a multithreaded process > running on multicore cpu system? > > Say, If the two threads of a process are concurrently executing socket > send and socket close say on a udp connection (this can happen in case of > poorly written user code.). > udp_close() will access the inp on one cpu and udp_send() will access the > inp on another cpu. it is possible that udp_close() gets the locks first > and free's the inp before udp_send() has a chance to run? > > Am I missing anything? > > Thanks, > Vasanth > > > > > From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 21:04:53 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BA43106566B for ; Tue, 29 May 2012 21:04:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 604C38FC14 for ; Tue, 29 May 2012 21:04:53 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 0C9F246B09; Tue, 29 May 2012 17:04:53 -0400 (EDT) Date: Tue, 29 May 2012 22:04:52 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: vasanth rao naik sabavat In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 21:04:53 -0000 On Tue, 29 May 2012, vasanth rao naik sabavat wrote: > In case of a Multicore cpu system running a multithreaded process. > > For protocol control blocks there is no protection provided in the FreeBSD > 9. For example, udp_close() and udp_send() access the inp before taking the > lock. Couldn't this cause the inp inconsistency on a multithreaded process > running on multicore cpu system? > > Say, If the two threads of a process are concurrently executing socket send > and socket close say on a udp connection (this can happen in case of poorly > written user code.). udp_close() will access the inp on one cpu and > udp_send() will access the inp on another cpu. it is possible that > udp_close() gets the locks first and free's the inp before udp_send() has a > chance to run? > > Am I missing anything? The life cycle here is complicated and there is some subtlety. The simple answer to your question is that udp_abort() and udp_close() don't free the inpcb -- that occurs in udp_detach(), which is called only when the reference count on the socket hits 0, which can't happen while udp_send() is in flight, as the caller owns a reference maintaining the stability of the socket. Take a look at the comment at the top of uipc_socket.c for more detailed coverage of socket life cycles; for UDP, inpcbs are around for the entirely life cycle of the socket, so it is always safe to follow so->so_pcb if you hold a valid socket reference (either borrowed from a process's file descriptor, or held). For TCP, things are more complex. Robert From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 21:06:11 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 723071065674 for ; Tue, 29 May 2012 21:06:11 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 490C98FC0C for ; Tue, 29 May 2012 21:06:11 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 0336346B2A; Tue, 29 May 2012 17:06:11 -0400 (EDT) Date: Tue, 29 May 2012 22:06:10 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: vasanth rao naik sabavat In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 21:06:11 -0000 On Tue, 29 May 2012, vasanth rao naik sabavat wrote: > Can somebody please reply to this email. > > basically, can udp_detach() and udp_send() execute simultaneously for a > process with multiple threads? if yes, then inp reference in udp_send() will > be stale if udp_detach() free's the inp? You are confusing application-level close() with an actual close in the socket implementation. The socket will remain allocated as long as there are consumers using it, which is ensured through a reference count on the socket, regardless of close(). That isn't to say that there aren't bugs -- this stuff is pretty complex -- but the life cycle and synchronisation models around sockets should prevent the scenario you are describing from occurring. Robert > > Thanks, > Vasanth > > > > On Tue, May 29, 2012 at 10:53 AM, vasanth rao naik sabavat < > vasanth.raonaik@gmail.com> wrote: > >> Hi, >> >> In case of a Multicore cpu system running a multithreaded process. >> >> For protocol control blocks there is no protection provided in the FreeBSD >> 9. For example, udp_close() and udp_send() access the inp before taking the >> lock. Couldn't this cause the inp inconsistency on a multithreaded process >> running on multicore cpu system? >> >> Say, If the two threads of a process are concurrently executing socket >> send and socket close say on a udp connection (this can happen in case of >> poorly written user code.). >> udp_close() will access the inp on one cpu and udp_send() will access the >> inp on another cpu. it is possible that udp_close() gets the locks first >> and free's the inp before udp_send() has a chance to run? >> >> Am I missing anything? >> >> Thanks, >> Vasanth >> >> >> >> >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 22:06:16 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D328106564A; Tue, 29 May 2012 22:06:16 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id B87B48FC0A; Tue, 29 May 2012 22:06:15 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so2571762wib.13 for ; Tue, 29 May 2012 15:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8YNYLBysEGOp0xb8FZ6vMb1rrPncGs7LmuL6z/L9xbs=; b=UnbmM8tpTHdfslUYnsZa4CUr4jiCmeyxlGlJ9T6UPthwYwIyYyGk5OVIjaoMPuVk4C WQI12D++Q4ih5cIHb1vJNk6o/y+sh4FbhdCMrdc1NLvYCdMfF32B+12oDuy+ay0TVxEu ZMfFbFAIm6ukY/A2LmGpUwDJ4qa5RjVCDIpIz+vXa+/+aUX+mDCJOxXIVEaUvSLW14Ee 31axMxoC9k0UZmbsVRltYfNqFzBlruK81U5cNpDOnSjonOGNAInZbJLsdF/PH3EP0/Pb hubX7L+pmn5ecix/d0GlkPpnpkxSsLoSf07hcgVrNtwNDsOE3cDhI1Wpvj+0oNRXIxW8 NZlg== MIME-Version: 1.0 Received: by 10.216.139.73 with SMTP id b51mr9041541wej.72.1338329174734; Tue, 29 May 2012 15:06:14 -0700 (PDT) Received: by 10.180.146.37 with HTTP; Tue, 29 May 2012 15:06:14 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 May 2012 18:06:14 -0400 Message-ID: From: vasanth rao naik sabavat To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 22:06:16 -0000 Hello Robert, My main concern is about the protocol control block "inp", a reference in the socket structure. the udp_detach() free'es the inp but there is a potential for other thread running udp_* functions to get hold of the reference? Also, sofree() calls SOCK_UNLOCK() which potentially may allow other thread of the same process to enter into the udp_* functions? I am not sure if that is ever possible. Thanks, Vasanth On Tue, May 29, 2012 at 5:06 PM, Robert Watson wrote: > > On Tue, 29 May 2012, vasanth rao naik sabavat wrote: > > Can somebody please reply to this email. >> >> basically, can udp_detach() and udp_send() execute simultaneously for a >> process with multiple threads? if yes, then inp reference in udp_send() >> will be stale if udp_detach() free's the inp? >> > > You are confusing application-level close() with an actual close in the > socket implementation. The socket will remain allocated as long as there > are consumers using it, which is ensured through a reference count on the > socket, regardless of close(). That isn't to say that there aren't bugs -- > this stuff is pretty complex -- but the life cycle and synchronisation > models around sockets should prevent the scenario you are describing from > occurring. > > Robert > > >> Thanks, >> Vasanth >> >> >> >> On Tue, May 29, 2012 at 10:53 AM, vasanth rao naik sabavat < >> vasanth.raonaik@gmail.com> wrote: >> >> Hi, >>> >>> In case of a Multicore cpu system running a multithreaded process. >>> >>> For protocol control blocks there is no protection provided in the >>> FreeBSD >>> 9. For example, udp_close() and udp_send() access the inp before taking >>> the >>> lock. Couldn't this cause the inp inconsistency on a multithreaded >>> process >>> running on multicore cpu system? >>> >>> Say, If the two threads of a process are concurrently executing socket >>> send and socket close say on a udp connection (this can happen in case of >>> poorly written user code.). >>> udp_close() will access the inp on one cpu and udp_send() will access the >>> inp on another cpu. it is possible that udp_close() gets the locks first >>> and free's the inp before udp_send() has a chance to run? >>> >>> Am I missing anything? >>> >>> Thanks, >>> Vasanth >>> >>> >>> >>> >>> >>> ______________________________**_________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/**mailman/listinfo/freebsd-**hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@** >> freebsd.org " >> >> From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 23:13:59 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 416641065672 for ; Tue, 29 May 2012 23:13:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E233A8FC0C for ; Tue, 29 May 2012 23:13:58 +0000 (UTC) Received: from [192.168.5.76] (unknown [64.134.67.0]) by cyrus.watson.org (Postfix) with ESMTPSA id 4727346B06; Tue, 29 May 2012 19:13:58 -0400 (EDT) References: In-Reply-To: Mime-Version: 1.0 (1.0) Message-Id: X-Mailer: iPad Mail (9B206) From: "Robert N. M. Watson" Date: Tue, 29 May 2012 19:14:51 -0400 To: vasanth rao naik sabavat Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-hackers@freebsd.org" Subject: Re: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 23:13:59 -0000 On 29 May 2012, at 18:06, vasanth rao naik sabavat wrote: > My main concern is about the protocol control block "inp", a reference in t= he socket structure. the udp_detach() free'es the inp but there is a potenti= al for other thread running udp_* functions to get hold of the reference? Al= so, sofree() calls SOCK_UNLOCK() which potentially may allow other thread of= the same process to enter into the udp_* functions? I am not sure if that i= s ever possible. Hi Vasanth: Are you chasing a bug, or is this a more intellectual exercise in understand= ing the stack? The scenario you are describing should be prevented by the so= cket-layer reference model and so should not occur unless a bug is manifesti= ng. I am happy to answer questions about the model, but if you are running i= nto problems it might be easier if I gave more directed advice about how to t= rack problem. When a socket system call takes place on a UDP socket, several data structur= es are involved, each with its own life cycle and reference model. Most of t= he time, calls like send() use a per-system call counted reference to the fi= le descriptor to ensure valid access down the stack through the socket and i= npcb code -- this works because the file descriptor owns a reference to the s= ocket, and the socket owns a reference to the inpcb. udp_detach is called on= ly when the reference count on the socket reaches zero, so the references do= wn the stack held by invoking threads should prevent udp_detach from being i= nvoked while they are running. The right way to view stability here is via t= he reference model, not the locking model: locks come and go as data is proc= essed and packets move around, but it is the reference counts that prevent f= reeing of the sockt and hence inpcb. The perspective is slightly different l= ooking "up" from the input side, where we sometimes do use locks to ensure s= tability, but that is rarely the case in the down path. In UDP, unlike with T= CP, socket close can only be initiated from the down path, not the up path. If you haven't already read the large comment at the top of uipc_socket.c on= the socket life cycle, it would be a good idea to do so, as it lays out som= e of the principles at play here. Robert > Thanks, > Vasanth >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > On Tue, May 29, 2012 at 5:06 PM, Robert Watson wrote= : >=20 > On Tue, 29 May 2012, vasanth rao naik sabavat wrote: >=20 > Can somebody please reply to this email. >=20 > basically, can udp_detach() and udp_send() execute simultaneously for a pr= ocess with multiple threads? if yes, then inp reference in udp_send() will b= e stale if udp_detach() free's the inp? >=20 > You are confusing application-level close() with an actual close in the so= cket implementation. The socket will remain allocated as long as there are c= onsumers using it, which is ensured through a reference count on the socket,= regardless of close(). That isn't to say that there aren't bugs -- this st= uff is pretty complex -- but the life cycle and synchronisation models aroun= d sockets should prevent the scenario you are describing from occurring. >=20 > Robert >=20 >=20 > Thanks, > Vasanth >=20 >=20 >=20 > On Tue, May 29, 2012 at 10:53 AM, vasanth rao naik sabavat < > vasanth.raonaik@gmail.com> wrote: >=20 > Hi, >=20 > In case of a Multicore cpu system running a multithreaded process. >=20 > For protocol control blocks there is no protection provided in the FreeBSD= > 9. For example, udp_close() and udp_send() access the inp before taking th= e > lock. Couldn't this cause the inp inconsistency on a multithreaded process= > running on multicore cpu system? >=20 > Say, If the two threads of a process are concurrently executing socket > send and socket close say on a udp connection (this can happen in case of > poorly written user code.). > udp_close() will access the inp on one cpu and udp_send() will access the > inp on another cpu. it is possible that udp_close() gets the locks first > and free's the inp before udp_send() has a chance to run? >=20 > Am I missing anything? >=20 > Thanks, > Vasanth >=20 >=20 >=20 >=20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"= >=20 >=20 From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 01:09:04 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13810106564A; Wed, 30 May 2012 01:09:04 +0000 (UTC) (envelope-from vasanth.raonaik@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5F3E48FC08; Wed, 30 May 2012 01:09:03 +0000 (UTC) Received: by werg1 with SMTP id g1so3910784wer.13 for ; Tue, 29 May 2012 18:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=k7thmdx28FrfsxVYR1ICXhljQQGXeqG0P+C/rjKvQ7I=; b=Y7aaq09p6wg6KgNc8Fp1MLwsh2IXvLtPTeEaUVw/mHgDFB/ZyHjiA1CwIFZd5L4yog HcSM9lKGnCDJzTLK+9fsqDBQEfm95IghnVdnUxkaJtBTqSAVUee129ZqDdsGw5m/znK7 m7PZWXW4TpLS6DxwW/dTsKmR3/ptQNZvAKuh30DKUWfGBUMZUQq4GoGf0b8Xcynp7TzD p1gdDH1EiN78f77oHYi8mDqml20Uu++1HG9rmzh94sBlX0Orvl6knRwQq2Gq455mddiO N1xCXju7dp6wmDXDW9PEOvVWohmZFjn4DMidnEi0NNxgj7aEKY9X5soNsvjjOwl3mHcU XZzg== MIME-Version: 1.0 Received: by 10.216.208.151 with SMTP id q23mr9095849weo.20.1338340141948; Tue, 29 May 2012 18:09:01 -0700 (PDT) Received: by 10.180.146.37 with HTTP; Tue, 29 May 2012 18:09:01 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 May 2012 21:09:01 -0400 Message-ID: From: vasanth rao naik sabavat To: "Robert N. M. Watson" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-hackers@freebsd.org" Subject: Re: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 01:09:04 -0000 Hi Robert, I am trying to understand the socket <--> protocol layer as part of our project. I was trying to understand why the sotoinpcb() is called before taking any locks. Also, I am trying to understand scenario of a multi-threaded process trying to do socket operations simultaneously on a multicore cpu. I have gone through the socket life cycle comments in the code and gave good understanding of the socket life cycle. Thank you for the reference. Thanks, Vasanth On Tue, May 29, 2012 at 7:14 PM, Robert N. M. Watson wrote: > On 29 May 2012, at 18:06, vasanth rao naik sabavat < > vasanth.raonaik@gmail.com> wrote: > > My main concern is about the protocol control block "inp", a reference in > the socket structure. the udp_detach() free'es the inp but there is a > potential for other thread running udp_* functions to get hold of the > reference? Also, sofree() calls SOCK_UNLOCK() which potentially may allow > other thread of the same process to enter into the udp_* functions? I am > not sure if that is ever possible. > > > Hi Vasanth: > > Are you chasing a bug, or is this a more intellectual exercise in > understanding the stack? The scenario you are describing should be > prevented by the socket-layer reference model and so should not occur > unless a bug is manifesting. I am happy to answer questions about the > model, but if you are running into problems it might be easier if I gave > more directed advice about how to track problem. > > When a socket system call takes place on a UDP socket, several data > structures are involved, each with its own life cycle and reference model. > Most of the time, calls like send() use a per-system call counted reference > to the file descriptor to ensure valid access down the stack through the > socket and inpcb code -- this works because the file descriptor owns a > reference to the socket, and the socket owns a reference to the inpcb. > udp_detach is called only when the reference count on the socket reaches > zero, so the references down the stack held by invoking threads should > prevent udp_detach from being invoked while they are running. The right way > to view stability here is via the reference model, not the locking model: > locks come and go as data is processed and packets move around, but it is > the reference counts that prevent freeing of the sockt and hence inpcb. The > perspective is slightly different looking "up" from the input side, where > we sometimes do use locks to ensure stability, but that is rarely the case > in the down path. In UDP, unlike with TCP, socket close can only be > initiated from the down path, not the up path. > > If you haven't already read the large comment at the top of uipc_socket.c > on the socket life cycle, it would be a good idea to do so, as it lays out > some of the principles at play here. > > Robert > > Thanks, > Vasanth > > > > > > > > > > > > > > > > > > > > On Tue, May 29, 2012 at 5:06 PM, Robert Watson wrote: > >> >> On Tue, 29 May 2012, vasanth rao naik sabavat wrote: >> >> Can somebody please reply to this email. >>> >>> basically, can udp_detach() and udp_send() execute simultaneously for a >>> process with multiple threads? if yes, then inp reference in udp_send() >>> will be stale if udp_detach() free's the inp? >>> >> >> You are confusing application-level close() with an actual close in the >> socket implementation. The socket will remain allocated as long as there >> are consumers using it, which is ensured through a reference count on the >> socket, regardless of close(). That isn't to say that there aren't bugs -- >> this stuff is pretty complex -- but the life cycle and synchronisation >> models around sockets should prevent the scenario you are describing from >> occurring. >> >> Robert >> >> >>> Thanks, >>> Vasanth >>> >>> >>> >>> On Tue, May 29, 2012 at 10:53 AM, vasanth rao naik sabavat < >>> vasanth.raonaik@gmail.com> wrote: >>> >>> Hi, >>>> >>>> In case of a Multicore cpu system running a multithreaded process. >>>> >>>> For protocol control blocks there is no protection provided in the >>>> FreeBSD >>>> 9. For example, udp_close() and udp_send() access the inp before taking >>>> the >>>> lock. Couldn't this cause the inp inconsistency on a multithreaded >>>> process >>>> running on multicore cpu system? >>>> >>>> Say, If the two threads of a process are concurrently executing socket >>>> send and socket close say on a udp connection (this can happen in case >>>> of >>>> poorly written user code.). >>>> udp_close() will access the inp on one cpu and udp_send() will access >>>> the >>>> inp on another cpu. it is possible that udp_close() gets the locks first >>>> and free's the inp before udp_send() has a chance to run? >>>> >>>> Am I missing anything? >>>> >>>> Thanks, >>>> Vasanth >>>> >>>> >>>> >>>> >>>> >>>> ______________________________**_________________ >>> freebsd-hackers@freebsd.org mailing list >>> http://lists.freebsd.org/**mailman/listinfo/freebsd-**hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@** >>> freebsd.org " >>> >>> > From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 01:17:02 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14BDD1065674 for ; Wed, 30 May 2012 01:17:02 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 68DA08FC16 for ; Wed, 30 May 2012 01:17:01 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; q=dns; s=sweb; b=Eow1EPogxHdlvPHnnNXVpOjCwwhzkLcO 6ogAAI7LM4WX52tAm8XD8mR7mFRe+tWWsxTwdsHRfjI5EaSBOinAna8OXmsaQ5bb wWnq+X1JRH+ek1wxXoXzaScYf3KmDDWo6LirLgD/G/MXvEAUPDr5yrbQ4LaPmdT9 6jd8D3IQZBY= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; s=sweb; bh=w19nN9KRFbzcsVDS4aTuiVK8Lxa5GUaFTW7bOv wMXDQ=; b=B7iWP9meBX1+SZxl0bv0gLcMobTdJmGb3IRmwErAGW/l/rignEoFwH Ge01yJDPC1Gmj9fwsphKeKyPH03tgcvIz6irm8Phw5UrKi4dKBz+BXRkph/3BZmQ hh1M9R7W6YiN8tEXnv7s0RFkjh7Sxjofjq56u1xln8sTjQgqPKlB8= Received: (qmail 94258 invoked from network); 29 May 2012 20:16:59 -0500 Received: from unknown (HELO ?10.10.1.87?) (bryan@shatow.net@10.10.1.87) by sweb.xzibition.com with ESMTPA; 29 May 2012 20:16:59 -0500 Message-ID: <4FC57507.8070008@shatow.net> Date: Tue, 29 May 2012 20:16:55 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FC2EBA5.8010500@shatow.net> In-Reply-To: <4FC2EBA5.8010500@shatow.net> X-Enigmail-Version: 1.4.1 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig25950D3E0AFAE1F9752655F5" Cc: ed@80386.nl, brucec@freebsd.org Subject: Re: script(1) broken on 7.4 - bin/146189 - r207453 fixes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 01:17:02 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig25950D3E0AFAE1F9752655F5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 5/27/2012 10:06 PM, Bryan Drewery wrote: > Hi, >=20 > As reported in bin/146189, script(1) was returning the wrong exit statu= s > sometimes. >=20 > The PR says that script(1) was broken by r205008/r205635, neither of > which are in 7-stable or releng/7.4. Yet it is broken on 7.4. >=20 > This is easily seen on 7.4: >=20 > # script -q /dev/null false; echo $? > 1 > # script -q /dev/null false; echo $? > 1 > # script -q /dev/null false; echo $? > 0 > # script -q /dev/null false; echo $? > 1 > # while true; do script -q /dev/null false && echo $? && break; ech= o > $?; done > 1 > 1 > <..snip..> > 1 > 0 >=20 > r207453 was MFC'd to 8-stable at the time, but not 7-stable, likely due= > to the changes attributed to causing the issue not having been on 7-sta= ble. >=20 > I am not entirely sure *how* script(1) broke on 7.4, but I have tested > r207453 on 7.4 and found that it Works For Me. >=20 > FWIW, could someone please MFC this to 7-stable? >=20 > The reason I ran into this is I am maintaining portupgrade, and working= > on ports/147242 and ports/131111. Both of which seem to be due to > script(1) returning the wrong exit status. >=20 > 7.x is EoL Feb 2013 [1]. Given that, and that script(1)'s return code > cannot be relied on for automated scripts. I am wondering what the > thoughts are on putting this patch out as an errata? >=20 > Regards, > Bryan Drewery >=20 > [1] http://www.freebsd.org/security/ >=20 It was reported to me that this is broken at least as far back as 4.7. I think the changes attributed in bin/146189 just made it come to light quicker. Still would be nice if this was MFC'd to 7-STABLE. Regards, Bryan Drewery --------------enig25950D3E0AFAE1F9752655F5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPxXUHAAoJEG54KsA8mwz5Y5kP/icZXFJi5synZtWyIlSd29j1 kJ03FTPhwTUzbB6H+7glLmvJMgfQZl2NNPmu29RJBYRqWt8Wcbv8VxLxH2emCRJf MBmZu95gF8JEk31sU0igB+Gp0SPLuoWMoUaesr0UrKqeazvlxGY52HlUvZs5JJLU C4jQE9ymLjAnN4wshAAaM4BlNcu8hHQZ8tQZGxJhiz/f1BmSBBVUiAS2NJMfU+SV SINN1mv5zL3TPzudRy4tX/cD3RdCwYxQvRtDRae4Rpd7yOfa3Ggyb+rvPbY7TaSw gTQ5Tc5P6ytixw+0olHH2aPqf7YUgO2FvwWJvEOnJPGAMfOfHs3EdmwTVgWA+Rj6 9q1XzWQYsBBEUr9UPOyiUoMoGhLXo4B68z8Y//mF/oQxh2zKi2amGtL973KR/gkh NU+LPfVsBRYHONEL+UKFosTOQxTiNXGuUGE6jY0uKAKdn+YX8TczT/tB5Xx2Dw1r 9aZdaWUmF/ReR3ePJQf/IKZE4HFcQW6fEVtFEt5a1fN4ThRxBhb2WaCwmph9an9D /UPiAUpwA8i3jqKyKNjT7nU+xEAOCfVQl8xgPQaspR6rzt4PBmSq66swVdDnGA+a wOapOPB3rfV9apIzyAAvZXrY/u455ERSkdVgt/shJoJKSFBDZljTPtl4PL4gZgq3 KL35QOOAczhR2Y145M00 =WdNF -----END PGP SIGNATURE----- --------------enig25950D3E0AFAE1F9752655F5-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 01:43:45 2012 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 C1C0A106564A for ; Wed, 30 May 2012 01:43:45 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 76DA48FC18 for ; Wed, 30 May 2012 01:43:45 +0000 (UTC) Received: from [10.175.134.213] (173-13-112-142-NewEngland.hfc.comcastbusiness.net [173.13.112.142]) by cyrus.watson.org (Postfix) with ESMTPSA id 415DC46B17; Tue, 29 May 2012 21:43:43 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: "Robert N. M. Watson" In-Reply-To: Date: Tue, 29 May 2012 21:43:40 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <02692B7F-02AD-49A5-A3D5-C92F03E7147C@freebsd.org> References: To: vasanth rao naik sabavat X-Mailer: Apple Mail (2.1257) Cc: "freebsd-hackers@freebsd.org" Subject: Re: SMP: protocol control block protection for a multithreaded process (ex: udp). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 01:43:45 -0000 On 29 May 2012, at 21:09, vasanth rao naik sabavat wrote: > I am trying to understand the socket <--> protocol layer as part of = our project. I was trying to understand why the sotoinpcb() is called = before taking any locks. Also, I am trying to understand scenario of a = multi-threaded process trying to do socket operations simultaneously on = a multicore cpu. >=20 > I have gone through the socket life cycle comments in the code and = gave good understanding of the socket life cycle. Thank you for the = reference. Hi Vasanth: Historically, the so->so_pcb pointer in BSD was protected by spl's, and = could only be followed safely while at an elevated spl (probably splnet = -- details forgotten at this point!). In FreeBSD 6.x, I made a substantial revisions to the semantics of the = socket<->pcb relationship in order to reduce the amount of = synchronisation required. Among other things, I made it so that the = validity of the so->so_pcb pointer is entirely defined by the protocol, = and also made it so that all protocols could safely follow so->so_pcb = without locks held, by virtue of the reference model. This trades off = slightly greater memory use (inpcbs are always allocated for sockets, = even after they have closed) for reduced synchronisation overhead + = improved stability (due to reduced complexity). The socket life cycle = ensures that no access to so->so_pcb occurs before pru_attach() has = returned, and also ensures that no socket access will occur from the = moment pru_detach() is called. As pru_attach() and pru_detach() are = responsible for allocating and freeing pcb state, this means that all = other pru_method() calls can safely dereference so_pcb in all protocols. Synchronisation is required to use the socket, but the nature of the = synchronisation depends on the protocol, and different protocols use = quite different locking strategies (e.g., netnatm vs unix domain sockets = vs IPv4/IPv6). There are similar reference concerns in the other = direction, which among other things allow TCP to hold a reference on the = socket it represents until it's done with it, regardless of API-layer = close operations. We universally place protocol locks before = socket-layer locks in the lock order so that calls into the socket layer = are safe from the protocol while holding locks required to stabilise = pcbs -- this means that socket locks can't be held over calls down the = stack, mandating a stronger reference model. None of this precludes bugs, of course, but the design is fairly = coherent. The area of greatest weakness in synchronisation in the = network stack is actually in the socket state machine (so_state and = friends), where the stack is unclear whether the protocol or the socket = layer is driving the state machine. I've been gradually pushing in the = direction of the protocol driving state transitions, since that allows = atomicity between layers due to protocol locks being held over socket = locks when calling into the socket layer from the protocol. Robert= From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 07:20:03 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5F441065673 for ; Wed, 30 May 2012 07:20:03 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [IPv6:2a01:e0c:1:1599::14]) by mx1.freebsd.org (Postfix) with ESMTP id 17DC08FC1E for ; Wed, 30 May 2012 07:20:01 +0000 (UTC) Received: from endor.tataz.chchile.org (unknown [82.233.239.98]) by smtp5-g21.free.fr (Postfix) with ESMTP id 4B4B7D480AE; Wed, 30 May 2012 09:19:54 +0200 (CEST) Received: from felucia.tataz.chchile.org (felucia.tataz.chchile.org [192.168.1.9]) by endor.tataz.chchile.org (Postfix) with ESMTP id E960CEC; Wed, 30 May 2012 09:19:53 +0200 (CEST) Received: by felucia.tataz.chchile.org (Postfix, from userid 1000) id D58E1EF1B; Wed, 30 May 2012 07:19:53 +0000 (UTC) Date: Wed, 30 May 2012 09:19:53 +0200 From: Jeremie Le Hen To: Mel Flynn Message-ID: <20120530071953.GD47353@felucia.tataz.chchile.org> Mail-Followup-To: Mel Flynn , freebsd-hackers@freebsd.org References: <4FC26F26.6000907@acsalaska.net> <20120528212236.GC47353@felucia.tataz.chchile.org> <4FC4C6EE.2020601@acsalaska.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FC4C6EE.2020601@acsalaska.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: Activating libssp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 07:20:03 -0000 Mel, On Tue, May 29, 2012 at 02:54:06PM +0200, Mel Flynn wrote: > On 28-5-2012 23:22, Jeremie Le Hen wrote: > > > > I'm not sure what you mean, but -fstack-protector is documented in GCC > > documentation, I suppose it's the same for Clang but I didn't check. > > You can disable it on FreeBSD by setting WITHOUT_SSP in src.conf(5). > > Right, I wasn't very clear with that, so let me clarify: > - _FORTIFY_SOURCE is used in /usr/include/ssp/ssp.h > - There is a shared library /lib/libssp.so > - In the sources of the software there is no mention of ssp.h or -lssp > - In the sources of the software there are conditionals based on > _FORTIFY_SOURCE being defined. > > So, for me as port maintainer, it looks as though adding > -D_FORTIFY_SOURCE=2 does absolutely nothing for the software, unless I > also #include and add -lssp to LDFLAGS, unless there's some > magic in libc or the compiler that activates bits and overrides the > definitions for the symbols. > Based on the commit message, I assume that adding _FORTIFY_SOURCE to > CFLAGS does nothing, as the actual setting of this flag is compiled into > libc. > And -fstack-protector tells the compiler to activate the stack protector > callbacks that are again, implemented in libc. Without this, they won't > be activated. Does this sound correct? This is correct. The only way to activate SSP is to use -fstack-protector (or -fstack-protector-all). In the near future I intend to add a knob to enable this on all ports (at least on all which honor our CFLAGS), but this requires a patch to the base system which, in turn, requires an exp run before being committed (requested in PR 168010). So I would advice you not wasting your time to enable SSP on a per-port basis unless you have a strong need for it. Simply ensure that it honors CFLAGS and hopefully this will be turned on before the end of summer. -- Jeremie Le Hen Men are born free and equal. Later on, they're on their own. Jean Yanne From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 15:58:14 2012 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 F05AB106567D; Wed, 30 May 2012 15:58:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id C46808FC1A; Wed, 30 May 2012 15:58:14 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 35BB7B99A; Wed, 30 May 2012 11:58:14 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 30 May 2012 11:06:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205301106.13885.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 30 May 2012 11:58:14 -0400 (EDT) Cc: Mark Felder , dene@ilovedene.com, freebsd-questions@freebsd.org, Adrian Chadd Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 15:58:15 -0000 On Thursday, May 24, 2012 9:47:46 am Mark Felder wrote: > On Wed, 23 May 2012 17:30:40 -0500, Adrian Chadd > wrote: > > > Hi, > > > > can you please, -please- file a PR? And place all of the above > > information in it so we don't lose it? > > > > I'd be glad to post a PR and assist in helping to get it permanently > fixed. I certainly don't want this data to get lost and honestly our > business uses FreeBSD on VMWare so much that we really need a permanent > fix as much as anyone else :-) > > The reason I've hesitated to post a PR so far is that I didn't have any > truly useful or concrete evidence of where the problem lies. After Dane > Foster contacted me and told me he could recreate the crash on demand with > his workload it was easier to narrow things down. The suggestion that it > was an interrupts issue (by possibly Bjoern Zeeb?) and Dane's discovery > that his crashes ceased when em0 and mpt0 share an IRQ, but em0 is > completely unused was starting to prove there is some strong evidence here > in favor of the interrupts issue. > > Dane, what's the status on your end? Has your fix still been successful? > Is it also stable if you simply set hint.mpt.0.msi_enable="1" ? Hmm, so the set of ps output you have from DDB shows a lot of runnable processes and swi6 (Giant taskq) as the only running thread (all consistent with your hang). (And that is from your Ctrl-Alt-Esc) Do you only have one CPU in this VM? If not, do you know which threads the other CPUs were running (e.g. do you have ps7.png, etc.)? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 15:58:15 2012 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 ED815106566C; Wed, 30 May 2012 15:58:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id C29C28FC1C; Wed, 30 May 2012 15:58:15 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2B8ECB9BC; Wed, 30 May 2012 11:58:15 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 30 May 2012 11:24:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205301124.52597.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 30 May 2012 11:58:15 -0400 (EDT) Cc: Adrian Chadd , Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 15:58:16 -0000 On Tuesday, May 29, 2012 4:08:23 pm Adrian Chadd wrote: > Hi Alexander and others, > > I've been tinkering with ath(4) IO scheduling and taskqueues. In order > to get proper "in order" TX IO occuring, I've placed ath_start() into > a taskqueue so now whenever ath_start() is called, it just schedules a > taskqueue entry to run. > > However, performance is worse. :-) > > Here's a schedgraph trace. > > http://people.freebsd.org/~adrian/ath/ktr.4-ath-iperf-using-taskqueue-for- tx.ktr.gz > > I've thrown this through schedgraph.py on stable/9 and I've found some > rather annoying behaviour. It seems that the ath0 taskqueue stays in > the "runq add" state for quite a long time (1.5ms and longer) because > something else is going on on CPU #0. > > I'm very confused about what's going on. I'd like a hand trying to > figure out why the schedgraph output is the way it is. > > Thanks! As mentioned on IRC, you need to disable powerd and set machdep.idle=spin and get new traces. Right now your traces show multiple things executing on a single CPU. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 16:07:59 2012 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 6084C106566B; Wed, 30 May 2012 16:07:59 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 24CA48FC0A; Wed, 30 May 2012 16:07:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=aR23yNHVIaZq/dck6tuEGfyQz7gAcWTqmFbU0ahM2VU=; b=XbqjHuZ2hWiubOQcM33bA4tQ+C/RSm15FOi2YgvhnFpLlprk5eSvokvsbhIqxR0JSIuz6lOYhvZ/0AQc7hPLfL6dzDFsRl8vcaq6O36ufEI5tqqbVGWZxIXGNNrUNQ/7; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SZlRF-000CDN-Ff; Wed, 30 May 2012 11:07:58 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1338394070-26372-26371/5/6; Wed, 30 May 2012 16:07:50 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, John Baldwin References: <201205301106.13885.jhb@freebsd.org> Date: Wed, 30 May 2012 11:07:50 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201205301106.13885.jhb@freebsd.org> User-Agent: Opera Mail/11.64 (FreeBSD) X-SA-Score: -1.5 Cc: Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 16:07:59 -0000 On Wed, 30 May 2012 10:06:13 -0500, John Baldwin wrote: > > Do you only have one CPU in this VM? If not, do you know which threads > the other CPUs were running (e.g. do you have ps7.png, etc.)? correct, only one CPU in the VM From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 17:44:47 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A7A91065676 for ; Wed, 30 May 2012 17:44:47 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id DAB428FC1D for ; Wed, 30 May 2012 17:44:46 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q4UHicQo017477; Wed, 30 May 2012 19:44:38 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q4UHibxw017474; Wed, 30 May 2012 19:44:38 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Wed, 30 May 2012 19:44:37 +0200 (CEST) From: Wojciech Puchar To: Matthias Apitz In-Reply-To: <20120527082745.GA2591@tinyCurrent> Message-ID: References: <4fb7dfd6.736a980a.186d.ffff902f@mx.google.com> <20120519180901.GA1264@tiny> <20120525183006.GA1259@tiny> <20120525225839.GA7347@server.rulingia.com> <20120527082745.GA2591@tinyCurrent> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Wed, 30 May 2012 19:44:39 +0200 (CEST) Cc: freebsd-hackers@freebsd.org, rozhuk.im@gmail.com Subject: Re: proper newfs options for SSD disk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 17:44:47 -0000 > ... > # geli attach /dev/md1 > Enter passphrase: > # dd if=/dev/md1.eli of=/dev/null bs=128k count=4k > 536868864 bytes transferred in 35.093015 secs (15298454 bytes/sec) > # dd if=/dev/zero of=/dev/md1.eli bs=128k count=4k > 536868864 bytes transferred in 38.044995 secs (14111419 bytes/sec) > # geli detach /dev/md1 > # mdconfig -d -u 1 > > As you can see the EeePC with it's Intel Celeron CPU of only 900 MHz is > even faster then the Acer with Atom CPU; yes this is normal. Intel Atom have low IPC, but high IPJ (instruction per joule, still low compared to ARM). Yet - if you have hyperthreading it is actually not bad in IPC too with 2 threads. I generally think intel atom is great x86 processor as you simply do not need more power for PERSONAL computer. > BTW: On the EeePC I run 10-CURRENT, KDE 3.5.10 and never encounter > performance issues while reading, writing etc. right. It is normal. Even KDE is not that really that CPU bound, but still useless. > Concerning your hint installing the systen on the second SSD of around > 16 GByte (marketing GBytes :-)), the BIOS by itself is unable to boot right. 16 billion bytes. A simple marketing trick to cheat you for 7.6% > from; one has to go (by pressing ESC) to the boot menu to pick it up as > current boot device; any idea how this could be changed? boot from 4GB. just put /boot here and add vfs.root.mountfrom="ufs:XXX" where XXX is your root filesystem device name with "/dev/" stripped do not forget to bsdlabel -B your.4GB.SSD WARNING: you must have proper disklabel with a: partition containing UFS with /boot. But you may have a partition equal to whole disk a: 117231408 0 4.2BSD 0 0 0 c: 117231408 0 unused 0 0 # "raw" part, don't edit and it is absolutely OK, UFS do not overwrite first few sectors as it is reserved for it. And PLEASE DO NOT make this stupid MSDOS style slices. It is not just unneeded but introduces mess and only mess. just have /dev/ad0a not /dev/ad0s1a From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 17:45:17 2012 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 5F33D1065670 for ; Wed, 30 May 2012 17:45:17 +0000 (UTC) (envelope-from graudeejs@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id CBCA68FC18 for ; Wed, 30 May 2012 17:45:16 +0000 (UTC) Received: by lbon10 with SMTP id n10so251140lbo.13 for ; Wed, 30 May 2012 10:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=BzL9rzqaT6GxiXhpX+Hr84D02F1dyCS5ca81hsImdQQ=; b=v6zB+u9Qg/QqsQNRI6xvU5UpsXydm2/auGSUMa7AFTZQqBOzqzcUcsDd4ct04Jnlqc S58DX7dehHYTJPtnvcoZaDjYPo1yfkm5jt6B9K+eMguNMZpvgUV8Su92HwpQdMG9hBtC 5FUY1JcKB84kY06Gw2968d2WHkQ0IUq1hC7qGpoKVPxVTTHXaokcfIdnbWIKW9OV9j7W xoH4EJAar3a5tIZfPk6edLImUJ/aPz7Zz0jsgJTuq6X1E6CEPYL15g64sjpl+r9Ga9Cz ZsKOSzs9pve+EbDRYOx7IO7XEE3KtuHDfX87BgX09nCW2DaHIulSg85QCTz6dKkun8/z vv+A== Received: by 10.112.45.168 with SMTP id o8mr7119783lbm.88.1338399915558; Wed, 30 May 2012 10:45:15 -0700 (PDT) Received: from desktop.pc (mpe-11-35.mpe.lv. [83.241.11.35]) by mx.google.com with ESMTPS id er3sm496053lbb.16.2012.05.30.10.45.14 (version=SSLv3 cipher=OTHER); Wed, 30 May 2012 10:45:15 -0700 (PDT) Date: Wed, 30 May 2012 20:45:02 +0300 From: Aldis Berjoza Cc: freebsd-hackers@freebsd.org Message-ID: <20120530204502.5cab974c@desktop.pc> In-Reply-To: References: X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/l76VqbAK71twJnJWtoJzBN9"; protocol="application/pgp-signature" Subject: Re: TeXLive merge into FreeBSD ports tree - FreeBSD project idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 17:45:17 -0000 --Sig_/l76VqbAK71twJnJWtoJzBN9 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 26 May 2012 22:45:37 +1200 Sam Lin wrote: > Hi FreeBSD fellows, >=20 > Those who are using LaTeX on FreeBSD must know that tetex has been > discontinued years ago and that TeXLive is now recommended, however > TeXLive has never been merged in the ports tree on FreeBSD and that > tetex is still used on FreeBSD ports. Although there have been some > "customized" work so that FreeBSD users can install and use TeXLive > on FreeBSD machine (for example, > http://code.google.com/p/freebsd-texlive/wiki/Installing), this is > quite confusing and may still cause conflict on the system side when > using or maintaining it. >=20 > There has also been years of gossips that a Japanese developer Hiroki > Sato (hrs@freebsd) has been working on this matter for the last years > and therefore the FreeBSD admin panel don't want anyone else to work > on this and merge it into the ports tree. >=20 > I actually contacted Hiroki Sato in the beginning of last year (2011) > regarding this, and in his reply he said that there had been several > technical issues but most of them had been solved and almost ready to > merge into the port tree, and that he was planning to go forward > after the 8.2/7.4 releases (one or two weeks later from that time > stage) are out. However, more than a year has passed since then and > still nothing happened. I tried to contact him several times after > that (email, tweet, etc) but haven't heard anything back from him at > all. >=20 > Is TeXLive really going to be merged into the FreeBSD ports tree as > Hiroki Sato mentioned previously? Or is this just a myth?? >=20 > I am now thinking that this should be put into the "FreeBSD Project > ideas List" [http://wiki.freebsd.org/IdeasPage]. >=20 > Regards, > Sam > Hey, Sam! I which TeXLive would be merged in FreeBSD ports. Romain is doing great job maintaining it. And it work, And it work now. In fact it works for more than a year. --=20 Aldis Berjoza --Sig_/l76VqbAK71twJnJWtoJzBN9 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPxlyoAAoJECrA2xnMujn6PIIH/A9mmeMnl1ArAsfBFMtwZUng gay/dt6sWfUINysMw2Z/TvMSKfuJq2XOQ6ORq+x5x9D3oD3F21XsmnumXUAJ5EgX HZMQFV7xWwhCGo2Oz7XDHMX5sNx9O58jaeDOrKeIs7LVGXtZFgtgLc9tAKfwDG2c BvtIF4qxBI9R5YDzlX9yY7hx4BwYw3moxPtIYXB0ayCwR1DOwAi4nC4u2AZRutc5 CrSHWHPIr4gYkt2L8f+q9CUbsmy9XA7ZRLnQJlHalkCJ/vELP1VRw1J1pJmRBOol 9ZXhKPTecgLamo6Woi6yZO+8YnfcvsarMC7+EqB6W4wixNAv22mvlBn84q1ARQg= =5L8A -----END PGP SIGNATURE----- --Sig_/l76VqbAK71twJnJWtoJzBN9-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 18:35:28 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07264106564A for ; Wed, 30 May 2012 18:35:28 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id AF39C8FC21 for ; Wed, 30 May 2012 18:35:27 +0000 (UTC) Received: from [89.204.138.111] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SZnjs-0005qA-IY; Wed, 30 May 2012 20:35:21 +0200 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id q4UIZHN4001337; Wed, 30 May 2012 20:35:17 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id q4UIZFaA001336; Wed, 30 May 2012 20:35:15 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Wed, 30 May 2012 20:35:15 +0200 From: Matthias Apitz To: Wojciech Puchar Message-ID: <20120530183514.GA1315@tiny> References: <4fb7dfd6.736a980a.186d.ffff902f@mx.google.com> <20120519180901.GA1264@tiny> <20120525183006.GA1259@tiny> <20120525225839.GA7347@server.rulingia.com> <20120527082745.GA2591@tinyCurrent> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.204.138.111 Cc: freebsd-hackers@freebsd.org, rozhuk.im@gmail.com Subject: Re: proper newfs options for SSD disk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 18:35:28 -0000 El día Wednesday, May 30, 2012 a las 07:44:37PM +0200, Wojciech Puchar escribió: > > Concerning your hint installing the systen on the second SSD of around > > 16 GByte (marketing GBytes :-)), the BIOS by itself is unable to boot > right. 16 billion bytes. > > A simple marketing trick to cheat you for 7.6% I think, it's only 7.3% $ bc (16*1024*1024*1024-16000000000)/16000000000*100 7.300 but it's just to cheat you; and nobody cares about 1179869184 bytes, more then 1 billion of bytes :-( matthias -- Matthias Apitz e - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5 From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 19:27:12 2012 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 887101065673 for ; Wed, 30 May 2012 19:27:12 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0801F8FC0A for ; Wed, 30 May 2012 19:27:11 +0000 (UTC) Received: by lbon10 with SMTP id n10so347435lbo.13 for ; Wed, 30 May 2012 12:27:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=e37uyayx4lQl8JFLsv2jsxNaXIrWX1Bx2IVGQhJ/sQY=; b=f7p9lkjh/kND46wpavtx/9UWd3xrhcU1pg+k3PyaEXJ+18ev1qxRHIxtUaUegj78S5 AsSzz/umganSe9WIQ/NWxMCkuQyw0UlrKhMZytxjIsVoUrHWEUroqzOv1+EYN/FxonxS LWW70uqhCASq3pmNBF/bhuzIp/fOxNYCr1z2bwiQojxYKeusaFJZJLIuoVJOGBvaftr5 amaPGfXF1TqXT/tnRsSvwMgYjvYRyTkUqA9XeJV+PZXuxRq9dcaeNoKTeuHxyqAsZCQy fzGOfTkqfBKOpVnpCokNgZi2+/wPxq31EuPJ0xDwylocrGUynXVTvVvRbPZUAdJUQgjY jEWw== Received: by 10.152.48.6 with SMTP id h6mr16897810lan.30.1338406030675; Wed, 30 May 2012 12:27:10 -0700 (PDT) Received: from zont-osx.local (ppp95-165-153-34.pppoe.spdop.ru. [95.165.153.34]) by mx.google.com with ESMTPS id k4sm761341lbb.12.2012.05.30.12.27.08 (version=SSLv3 cipher=OTHER); Wed, 30 May 2012 12:27:09 -0700 (PDT) Message-ID: <4FC6748B.5030708@zonov.org> Date: Wed, 30 May 2012 23:27:07 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmxVTiEKQLCGKI5wcRHdkjiMaJLrreH3YHIUemLzhcm5YslkfqK7Ko71CGmUHcknn9Pwc22 Subject: usertime stale at about 371k seconds X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 19:27:12 -0000 Hi, I have long running process for which `ps -o usertime -p $pid' shows always the same time - 6190:07.65, `ps -o cputime -p $pid' for the same process continue to grow and now it's 21538:53.61. It looks like overflow in resource usage code or something. Any ideas? -- Andrey Zonov From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 19:36:15 2012 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 1CD1B106564A for ; Wed, 30 May 2012 19:36:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E5E5B8FC08 for ; Wed, 30 May 2012 19:36:14 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 41BC2B96D; Wed, 30 May 2012 15:36:14 -0400 (EDT) From: John Baldwin To: Mark Felder Date: Wed, 30 May 2012 13:17:07 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201205301106.13885.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205301317.07345.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 30 May 2012 15:36:14 -0400 (EDT) Cc: freebsd-hackers@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 19:36:15 -0000 On Wednesday, May 30, 2012 12:07:50 pm Mark Felder wrote: > On Wed, 30 May 2012 10:06:13 -0500, John Baldwin wrote: > > > > > Do you only have one CPU in this VM? If not, do you know which threads > > the other CPUs were running (e.g. do you have ps7.png, etc.)? > > correct, only one CPU in the VM Humm, can you test it with 2 CPUs? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 19:56:09 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D01C5106566B; Wed, 30 May 2012 19:56:09 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 91DF68FC14; Wed, 30 May 2012 19:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=hpqHKxJDKjjR3YhhCWUCrRGRN6/9Vh0QVK0TvPbB5ZQ=; b=EkrLLSkXnXYA3VZ2Qt+YNaweEXtCpaYyFXL/gO5ugb8CjwtHHKazTjVF/ZooLYm1LC4jYmFW3wpgL0t49ge2ewmQN3ByUumZoXO6FB3XYACgUssiXZ7c9U/L76SQ8JRO; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SZp04-000Mnl-Hc; Wed, 30 May 2012 14:56:09 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1338407762-26372-26371/5/9; Wed, 30 May 2012 19:56:02 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org References: <201205301106.13885.jhb@freebsd.org> <201205301317.07345.jhb@freebsd.org> Date: Wed, 30 May 2012 14:56:02 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201205301317.07345.jhb@freebsd.org> User-Agent: Opera Mail/11.64 (FreeBSD) X-SA-Score: -1.5 Cc: Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 19:56:09 -0000 On Wed, 30 May 2012 12:17:07 -0500, John Baldwin wrote: > > Humm, can you test it with 2 CPUs? > We primarily only run with 1 CPU. We have seen it crash on multiple CPU VMs. Also, Dane Foster appeared to have been using multiple CPUs in his video transcoding VMs. Unfortunately I can't give you more information at the moment. I'm working with Dane to compile easy to follow steps that recreate this failure. I have not been successful in getting this to crash on demand in my environment, but Dane has so we're trying to recreate his. From owner-freebsd-hackers@FreeBSD.ORG Wed May 30 22:02:16 2012 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 34EE51065675; Wed, 30 May 2012 22:02:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id EF79E8FC17; Wed, 30 May 2012 22:02:15 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so596665pbb.13 for ; Wed, 30 May 2012 15:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LXWEaczS6hyhNcXYMgCJvzT+tzLlQ2nblE43JL8WGns=; b=HT4khL+J7A/XLUlo/bNuHy6a9SY1j4ZE3ImNTK/bG9nn3HNliyPbzCvDP4L3i/eRIQ /vzWJ4UC8flIxHjHUr8WJiD2Q66ARW5rnDjaWDAdCALRAn/uLKXN+NhaLRPwiZWfCnnk drClhdEP12UDwO1kjA8HsajeF/ZcwlC1E8Pqj29BYWCNzlWlNL4LIUkn5WLH4NISZ/oJ ZWuGRShGCUnx0jfbpaK5bPd1yAdmpn5i9ezEPnbdXqSYjPNJc62u13IFlGDlWulJkpMa MnTIIYeYphBiZXr2tgvVQhxP8j2zV5XTPt8WacarvhbMqOjfxARCHyBLXt2+TrO4muk5 SayQ== MIME-Version: 1.0 Received: by 10.68.129.167 with SMTP id nx7mr4209063pbb.80.1338415335700; Wed, 30 May 2012 15:02:15 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Wed, 30 May 2012 15:02:15 -0700 (PDT) In-Reply-To: <201205301124.52597.jhb@freebsd.org> References: <201205301124.52597.jhb@freebsd.org> Date: Wed, 30 May 2012 15:02:15 -0700 X-Google-Sender-Auth: nOdiSPU0P16ziyFeY7NMHBM5jKo Message-ID: From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 30 May 2012 22:02:16 -0000 Hi, I've re-run the test with powerd and sleep state stuff disabled - lo and behold, UDP tests are now up around 240-250MBit, what I'd expect for this 2 stream 11n device. So why is it that I lose roughly 80MBit of throughput with powerd and C2/C3 enabled, when there's plenty of CPU going around? The NIC certainly isn't going to sleep (I've not even added that code.) Adrian From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 05:29:14 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43D4C1065672 for ; Thu, 31 May 2012 05:29:14 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id A1A7F8FC14 for ; Thu, 31 May 2012 05:29:13 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q4V5T7KF033134; Thu, 31 May 2012 07:29:07 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q4V5T7Bj033131; Thu, 31 May 2012 07:29:07 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Thu, 31 May 2012 07:29:07 +0200 (CEST) From: Wojciech Puchar To: Matthias Apitz In-Reply-To: <20120530183514.GA1315@tiny> Message-ID: References: <4fb7dfd6.736a980a.186d.ffff902f@mx.google.com> <20120519180901.GA1264@tiny> <20120525183006.GA1259@tiny> <20120525225839.GA7347@server.rulingia.com> <20120527082745.GA2591@tinyCurrent> <20120530183514.GA1315@tiny> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Thu, 31 May 2012 07:29:07 +0200 (CEST) Cc: freebsd-hackers@freebsd.org, rozhuk.im@gmail.com Subject: Re: proper newfs options for SSD disk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 05:29:14 -0000 >>> Concerning your hint installing the systen on the second SSD of around >>> 16 GByte (marketing GBytes :-)), the BIOS by itself is unable to boot >> right. 16 billion bytes. >> >> A simple marketing trick to cheat you for 7.6% > > I think, it's only 7.3% > > $ bc > (16*1024*1024*1024-16000000000)/16000000000*100 > 7.300 > thanks. > but it's just to cheat you; and nobody cares about 1179869184 bytes, more > then 1 billion of bytes :-( i do. From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 06:32:21 2012 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 57D21106566B; Thu, 31 May 2012 06:32:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1B9C88FC0C; Thu, 31 May 2012 06:32:21 +0000 (UTC) Received: by dadv36 with SMTP id v36so890446dad.13 for ; Wed, 30 May 2012 23:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=m5/ZdKfjBCyr6zFGmXVa3mbIITyvJtvzxABPfD2XhGU=; b=AogplOWON7FraE+PNh8UiQL3079YWZ7DhYcmpPpDtLPRh4tye6kKz4gGY/BPLBskTC xLf+rmDYMqmZy+lkDxfs7cTCjGOczTr3AC218LwOEiYGLX1X79bqdrip5o/2qiU2JO+Y uNZszWDHM8a1K0cIBeVkRaFLu5bXb51GcZtyDWtNL3XiqgDH3gsmseXWjRxSGTBLoxgT nl1K/IPvzVNAOzl0NeJpAFfZJLYsD3kEpl6H1tU4lRt73+KktUwNev0dOGjsvYV94lVE E8C0azW8UzQf66HvGyrGVcmiW0eWxMIa5S63kXrem6AZpKEGrjW4AVXLJ6DG+qxvQGM0 rJ6A== MIME-Version: 1.0 Received: by 10.68.129.167 with SMTP id nx7mr2812406pbb.80.1338445940709; Wed, 30 May 2012 23:32:20 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Wed, 30 May 2012 23:32:20 -0700 (PDT) In-Reply-To: References: <201205301124.52597.jhb@freebsd.org> Date: Wed, 30 May 2012 23:32:20 -0700 X-Google-Sender-Auth: _7OitZ47Wig4D9uh6k7GyMCi2bU Message-ID: From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 06:32:21 -0000 Hi, Here's a trace with powerd/sleep states disabled, but I haven't set machdep.idle=spin. I'll try it with that in a sec. http://people.freebsd.org/~adrian/ath/ktr-notaskq-1.out.gz The entries are still out of whack in places, but it doesn't look like it's necessarily due to out of sync TSCs.. Adrian From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 07:34:47 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E5241065672 for ; Thu, 31 May 2012 07:34:47 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id A48F98FC08 for ; Thu, 31 May 2012 07:34:46 +0000 (UTC) Received: by lbon10 with SMTP id n10so791664lbo.13 for ; Thu, 31 May 2012 00:34:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:x-gm-message-state; bh=YFtVv9FdjLidQWzGwoR2choqGVIsDo9hz5ZwpZa4zUE=; b=BsMFGnxJHCeQyzNXlGsYyKErMRoPu6Y3iPmTw6J+q8BOiIUOOXdQilMFljBDL04eXM wqr3mJ8oqmHsSGLSIu6vXdOkvQXkgLryqy8fkOBC+790frY2rObpCirKoY9uvODVuQ1Q Ib6Tg0CG4/8G8dIixdaL7UCdBg7OaKs9ULTm+FdmnpaujMPazSZfUowrB+14Buu8MfUU G4Wkz3nAox4+fNB2APKAwcefe+V9MFD0gkMVrIAwqzeGyJgG5P2g04Z25p08JF2QQOYB SRuHK69uXw4zt1sw6Qnb/RCnrM8Y0YIuj3Xsu+reJ742CG1S8B08eGfykybGYMBhkhDH 19Iw== Received: by 10.152.146.67 with SMTP id ta3mr18585930lab.27.1338449685374; Thu, 31 May 2012 00:34:45 -0700 (PDT) Received: from zont-osx.local (ppp95-165-153-34.pppoe.spdop.ru. [95.165.153.34]) by mx.google.com with ESMTPS id k4sm1613521lbb.12.2012.05.31.00.34.44 (version=SSLv3 cipher=OTHER); Thu, 31 May 2012 00:34:44 -0700 (PDT) Message-ID: <4FC71F13.6040008@zonov.org> Date: Thu, 31 May 2012 11:34:43 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FC6748B.5030708@zonov.org> In-Reply-To: <4FC6748B.5030708@zonov.org> Content-Type: multipart/mixed; boundary="------------080506020903050202040100" X-Gm-Message-State: ALoCoQldmD1fPf3k14X6PwaudLHUKSEvZlimAkRC78y7mLxx2B7cuPCo5A3iD4TrmsqHCM/UB5b3 Subject: Re: usertime stale at about 371k seconds X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 07:34:47 -0000 This is a multi-part message in MIME format. --------------080506020903050202040100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 5/30/12 11:27 PM, Andrey Zonov wrote: > Hi, > > I have long running process for which `ps -o usertime -p $pid' shows > always the same time - 6190:07.65, `ps -o cputime -p $pid' for the same > process continue to grow and now it's 21538:53.61. It looks like > overflow in resource usage code or something. > I reproduced that problem with attached program. I ran it with 23 threads on machine with 24 CPUs and after night I see this: $ ps -o usertime,time -p 24134 && sleep 60 && ps -o usertime,time -p 24134 USERTIME TIME 6351:24.74 14977:35.19 USERTIME TIME 6351:24.74 15000:34.53 Per thread user-time counts correct: $ ps -H -o usertime,time -p 24134 USERTIME TIME 0:00.00 0:00.00 652:35.84 652:38.59 652:34.75 652:37.97 652:50.46 652:51.97 652:38.93 652:43.08 652:39.73 652:43.36 652:44.09 652:47.36 652:56.49 652:57.94 652:51.84 652:54.41 652:37.48 652:41.57 652:36.61 652:40.90 652:39.41 652:42.52 653:03.72 653:06.72 652:49.96 652:53.25 652:45.92 652:49.03 652:40.33 652:42.05 652:46.53 652:49.31 652:44.77 652:47.33 653:00.54 653:02.24 652:33.31 652:36.13 652:51.03 652:52.91 652:50.73 652:52.71 652:41.32 652:44.64 652:59.86 653:03.25 (kgdb) p $my->p_rux $14 = {rux_runtime = 2171421985692826, rux_uticks = 114886093, rux_sticks = 8353, rux_iticks = 0, rux_uu = 381084736784, rux_su = 65773652, rux_tu = 904571706136} (kgdb) p $my->p_rux $15 = {rux_runtime = 2191831516209186, rux_uticks = 115966087, rux_sticks = 8444, rux_iticks = 0, rux_uu = 381084736784, rux_su = 66458587, rux_tu = 913099969825} As you can see rux_uu stale, but rux_uticks still ticks. I think the problem is in calcru1(). This expression uu = (tu * ut) / tt overflows. I applied the following patch: Index: /usr/src/sys/kern/kern_resource.c =================================================================== --- /usr/src/sys/kern/kern_resource.c (revision 235394) +++ /usr/src/sys/kern/kern_resource.c (working copy) @@ -885,7 +885,7 @@ calcru1(struct proc *p, struct rusage_ext *ruxp, s struct timeval *sp) { /* {user, system, interrupt, total} {ticks, usec}: */ - uint64_t ut, uu, st, su, it, tt, tu; + uint64_t ut, uu, st, su, it, tt, tu, tmp; ut = ruxp->rux_uticks; st = ruxp->rux_sticks; @@ -909,10 +909,20 @@ calcru1(struct proc *p, struct rusage_ext *ruxp, s * The normal case, time increased. * Enforce monotonicity of bucketed numbers. */ - uu = (tu * ut) / tt; + if (ut == 0) + uu = 0; + else { + tmp = tt / ut; + uu = tmp ? tu / tmp : 0; + } if (uu < ruxp->rux_uu) uu = ruxp->rux_uu; and now ran test again. -- Andrey Zonov --------------080506020903050202040100 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="usertime.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="usertime.c" /* * Andrey Zonov (c) 2012 */ #include #include #include void *func(void *arg); int main(int argc, char **argv) { int i; int threads; int *tid; pthread_t *tds; if (argc != 2) errx(1, "usage: usertime "); threads = atoi(argv[1]); tid = malloc(sizeof(int) * threads); tds = malloc(sizeof(pthread_t) * threads); for (i = 0; i < threads; i++) { tid[i] = i; if (pthread_create(&tds[i], NULL, func, &tid[i]) != 0) err(1, "pthread_create(%d)", i); } for (i = 0; i < threads; i++) if (pthread_join(tds[i], NULL) != 0) err(1, "pthread_join(%d)", i); exit(0); } void * func(void *arg __unused) { int i; #define MAX (1<<20) for (i = 0; i < MAX; i++) { if ((i % (MAX - 1)) == 0) { i = 0; /*usleep(1);*/ } } pthread_exit(NULL); } --------------080506020903050202040100-- From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 08:26:46 2012 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 EBA9C106564A for ; Thu, 31 May 2012 08:26:46 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from h949823.serverkompetenz.net (demig.de [85.214.63.38]) by mx1.freebsd.org (Postfix) with ESMTP id 41B838FC0A for ; Thu, 31 May 2012 08:26:45 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=demig.de; b=C70vGvAMd+N9UZOz9Qjda3OAyl5TqLrETaX9HAxvJfQij0uId0dU/B3OBFNReJ/pghrx7IPaUBpwSKZ6Jz6HK6SmxToO3zSYDppLlHmW79FIUxmiIujMPbSKyozl1Iw6; h=Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:X-Enigmail-Version:Content-Type:Content-Transfer-Encoding:X-Scanned-By; Received: (qmail 29901 invoked from network); 31 May 2012 10:20:03 +0200 Received: from ip-78-94-60-110.unitymediagroup.de (HELO firewall.demig.intra) (78.94.60.110) by demig.de with (DHE-RSA-AES256-SHA encrypted) SMTP; 31 May 2012 10:20:03 +0200 Received: from entw-pr.demig.intra (srv-pr-1 [192.168.148.236]) by firewall.demig.intra (8.14.4/8.14.4) with ESMTP id q4V8Jj8n093858 for ; Thu, 31 May 2012 10:19:45 +0200 (CEST) (envelope-from nkoch@demig.de) Received: from [192.168.148.83] (ws-pr-3a [192.168.148.83]) by entw-pr.demig.intra (8.14.2/8.13.4) with ESMTP id q4V8JjR4019095 for ; Thu, 31 May 2012 10:19:45 +0200 (CEST) (envelope-from nkoch@demig.de) Message-ID: <4FC729A2.30205@demig.de> Date: Thu, 31 May 2012 10:19:46 +0200 From: Norbert Koch User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 192.168.148.235 Subject: bus device/ivars X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 08:26:47 -0000 Hello, I have written a bus device driver which itself is a pci driver. Child devices may allocate resources from my bus device. My bus device does the usual management of resources through the children's ivars. My question is this: The bus device mallocs the children's ivars in bus_add_child and frees the ivars in either bus_detach or bus_child_detached. The children are added in identify methods through BUS_ADD_CHILD. As I understand the code the bus device's bus_child_detached method is called in device_delete_child only if the child device is already attached. So, there seems to be a memory leak if I delete the child device in either identify or probe. My current solution (not tested yet) is to explicitly call BUS_CHILD_DETACHED in the child device's code before calling device_delete_child. Is this the correct way or is there a more elegant/cleaner solution? I expected to find something like a BUS_DELETE_CHILD method. Thank you for any advice, Norbert Koch From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 12:33:29 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EE3B106564A; Thu, 31 May 2012 12:33:29 +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 840F18FC15; Thu, 31 May 2012 12:33:27 +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 PAA01149; Thu, 31 May 2012 15:33:25 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4FC76515.10302@FreeBSD.org> Date: Thu, 31 May 2012 15:33:25 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org References: <201205301124.52597.jhb@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , Alexander Motin , John Baldwin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 12:33:29 -0000 Sorry to hijack this thread, but just recently I've stumbled upon this Linux tool: http://lwn.net/Articles/353295/ perf sched latency seems to be particularly convenient and useful. The idea to track time between a point when a thread is waken up and a point when the thread actually run was quite good. I am sure that something like this could be scripted on top of ktr(4) using the trace points in the schedulers code. schedgraph is very cool, but it seems to lack some auto-analysis capabilities which would highlight the most interesting places. In this vein it might make sense to enable KTR and KTR_SCHED in GENERIC. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 12:48:40 2012 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 B5D98106566C; Thu, 31 May 2012 12:48:40 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 917AA8FC19; Thu, 31 May 2012 12:48:39 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so832541wgb.31 for ; Thu, 31 May 2012 05:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=c64HlroLjC9ej9tejNXwfs18/F4pUGL7yUG0bYbPZxg=; b=DtHpkCYCmW2ON2KQCbyx9TWR0EGxXtNF60AAk1rjWll0CYkKhb0iZvIOoup+k3Ip7V wWdrKmfRMdqhGyiulwpj1pojxaytIk0edgRJxAYbFjddynO3UWBEtc1XSOSrSY3y3ogH jhHYDhWevJ2e/mlRiVL0suL26JdV3p8iQwwtjJMQjKGohDVSACoJ0vJGBLWBIdJX5sun HUfN+O/bTeZz3l/5QbRWHDT+qOROJCjDyPneRPFFbv0cFjPONZtpl7yL/I9/CaPKSwTG 0igiAdP22dMFNrYy82zqREXFn6VNzXHSfwkPNlQwoTvQk5D/GNu7TGogCu344CC0i9rH x5ww== MIME-Version: 1.0 Received: by 10.216.215.221 with SMTP id e71mr13858817wep.132.1338468518619; Thu, 31 May 2012 05:48:38 -0700 (PDT) Received: by 10.180.146.131 with HTTP; Thu, 31 May 2012 05:48:38 -0700 (PDT) In-Reply-To: <4FC76515.10302@FreeBSD.org> References: <201205301124.52597.jhb@freebsd.org> <4FC76515.10302@FreeBSD.org> Date: Thu, 31 May 2012 08:48:38 -0400 Message-ID: From: Ryan Stone To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Adrian Chadd , Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 12:48:40 -0000 On Thu, May 31, 2012 at 8:33 AM, Andriy Gapon wrote: > In this vein it might make sense to enable KTR and KTR_SCHED in GENERIC. KTR_SCHED comes with a performance hit. Besides, with the DTrace sched provider that I committed this month (and MFC'ed yesterday) you can collect schedgraph data with a D script. From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 13:00:23 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2315106566C; Thu, 31 May 2012 13:00:22 +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 EAFD58FC0A; Thu, 31 May 2012 13:00:20 +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 QAA01406; Thu, 31 May 2012 16:00:14 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4FC76B5D.8090003@FreeBSD.org> Date: Thu, 31 May 2012 16:00:13 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Ryan Stone References: <201205301124.52597.jhb@freebsd.org> <4FC76515.10302@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, Adrian Chadd , Alexander Motin , John Baldwin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 13:00:23 -0000 on 31/05/2012 15:48 Ryan Stone said the following: > On Thu, May 31, 2012 at 8:33 AM, Andriy Gapon wrote: >> In this vein it might make sense to enable KTR and KTR_SCHED in GENERIC. > > KTR_SCHED comes with a performance hit. Yep, I realize that. But I hope that it is not too huge for typical users of GENERIC. BTW, by "enable" I actually meant to compile it in, not really activate it. > Besides, with the DTrace > sched provider that I committed this month (and MFC'ed yesterday) you > can collect schedgraph data with a D script. Thank you for the reminder. I am still to try it out. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 13:01:43 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4081106564A; Thu, 31 May 2012 13:01:43 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id AA9248FC0A; Thu, 31 May 2012 13:01:42 +0000 (UTC) Received: by werg1 with SMTP id g1so766810wer.13 for ; Thu, 31 May 2012 06:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=5lZMTRzIQwtSOx2u3LtFzz9TBkyOWfHo9USne1wT2zU=; b=efMUVCoWFWZ/RVr2ZH1Xl2MLGWsDO0PuCS5ZtFf40b7U74XsQlHpaERm6DHAWnRg+5 28DHyQTULr/Ddp3O9iKDMFxe5g41y48rQu/lIThwlenLDwXxBXPhLhdTGyvlZQV6ah/5 8m9txGfDOF3HyqXjnyjgJTcdyciGPkha+qH1xF5YvaftJx9aGTF08xlWbitK4xo8Wrn/ JIbJSqCfVUsKNM95VLACVEAjiFd9Pr0xfXi3lQpjT7OoqSiPQJL8IKZTWH9lXszivC3f C2LpVe742pxk7j3Zsc4FCbjBD7+Sb3P94q4asn65uU4ZFzmiR55E+hwLRt+KxAxjm0LL X7pA== MIME-Version: 1.0 Received: by 10.216.143.105 with SMTP id k83mr12492549wej.99.1338469301507; Thu, 31 May 2012 06:01:41 -0700 (PDT) Received: by 10.180.146.131 with HTTP; Thu, 31 May 2012 06:01:41 -0700 (PDT) In-Reply-To: References: <201205301124.52597.jhb@freebsd.org> <4FC76515.10302@FreeBSD.org> Date: Thu, 31 May 2012 09:01:41 -0400 Message-ID: From: Ryan Stone To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Adrian Chadd , Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 13:01:43 -0000 On Thu, May 31, 2012 at 8:48 AM, Ryan Stone wrote: > KTR_SCHED comes with a performance hit. =A0Besides, with the DTrace > sched provider that I committed this month (and MFC'ed yesterday) you > can collect schedgraph data with a D script. I suppose it would have been helpful to provide a link to the script: http://people.freebsd.org/~rstone/dtrace/schedgraph.d Post-process it with this before feeding it to schedgraph.py: http://people.freebsd.org/~rstone/dtrace/make_ktr From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 13:48:52 2012 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 131F2106564A; Thu, 31 May 2012 13:48:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id C4A558FC14; Thu, 31 May 2012 13:48:51 +0000 (UTC) Received: by dadv36 with SMTP id v36so1414927dad.13 for ; Thu, 31 May 2012 06:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=AU/nt55DWy9vjIFn/rK+42Iks6OY1HwES+TNiOzHI1I=; b=wMyPrAPsJy5Uzwd23bPDgqDxOohqxCpDDRDvVgzGz5sH0pDUYHVfGxJv6okR3hu4V+ 1BGRjow+RJYcI6bmOJXTCEy0cS5Klp6TWXB0xMXsLVZ+DXLNg5N9lZcZFZzuQW+Pvr6A d+3K8Dh2TyfeSe/XRw9cduriadqHMlgoFQNM5j9OObGa5atLpHczOUp/sQmXL50isojV penFwdgeXkRmVLmprCC3HoBHafH1tfxVHCe6AT5oVE5o7VHtDIOejEdd6q6e2G5tjgHE TC8VSyZydyWrfg7Nv2uyJLB2sqv3XgDjCKjFvFknK1g5BRQfJdU3NpB4ChcOXFGUF+lC fJxQ== MIME-Version: 1.0 Received: by 10.68.116.203 with SMTP id jy11mr34094pbb.129.1338472131252; Thu, 31 May 2012 06:48:51 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Thu, 31 May 2012 06:48:51 -0700 (PDT) In-Reply-To: <4FC76515.10302@FreeBSD.org> References: <201205301124.52597.jhb@freebsd.org> <4FC76515.10302@FreeBSD.org> Date: Thu, 31 May 2012 06:48:51 -0700 X-Google-Sender-Auth: I1-1ycKDSl7PAU4n6u_ZVNq6dqw Message-ID: From: Adrian Chadd To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 13:48:52 -0000 Hi, That's cool and one of the things I'm using this to investigate. However, I'm still seeing weird TSC behaviour, which I'd like to finish trying to root cause before moving onto bigger and weirder things. I'm not sure how feasible it'd be to "make" KTR work with power saving modes enabled on these older model CPUs. John/Doug has pointed out later CPUs have P-state invariant TSC counters, which would render all of this moot. Great, but that's not the test hardware I have. :-) Adrian From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 14:44:56 2012 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 66CC01065676; Thu, 31 May 2012 14:44:56 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.29.7]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6528FC16; Thu, 31 May 2012 14:44:56 +0000 (UTC) Received: from [78.35.131.163] (helo=fabiankeil.de) by smtprelay03.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Sa6Wp-0001Ds-1C; Thu, 31 May 2012 16:39:07 +0200 Date: Thu, 31 May 2012 16:37:31 +0200 From: Fabian Keil To: Ryan Stone Message-ID: <20120531163731.364570cc@fabiankeil.de> In-Reply-To: References: <201205301124.52597.jhb@freebsd.org> <4FC76515.10302@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/M00K5jFEA+EC6022.Owc6_o"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: freebsd-hackers@freebsd.org, Chadd , Alexander Motin , Andriy Gapon , Adrian Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 14:44:56 -0000 --Sig_/M00K5jFEA+EC6022.Owc6_o Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Ryan Stone wrote: > On Thu, May 31, 2012 at 8:33 AM, Andriy Gapon wrote: > > In this vein it might make sense to enable KTR and KTR_SCHED in GENERIC. >=20 > KTR_SCHED comes with a performance hit. Besides, with the DTrace > sched provider that I committed this month (and MFC'ed yesterday) you > can collect schedgraph data with a D script. Unfortunately DTrace's timestamp itself doesn't always work reliably on FreeBSD, and schedgraph.d depends on it. On my system DTrace's timestamp seems to work with kern.timecounter.hardware=3DHPET and dev.cpu.0.cx_lowest=3DC2 (or C1) but seems to tick much too slow with dev.cpu.0.cx_lowest=3DC3: http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026710.html Fabian --Sig_/M00K5jFEA+EC6022.Owc6_o Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/Hgi8ACgkQBYqIVf93VJ1VqACfc790jb3gnNNlbhkKXCfpld/z BQMAoMxGyFltcoHgCIMI2Hb+QxzLHk30 =CYkW -----END PGP SIGNATURE----- --Sig_/M00K5jFEA+EC6022.Owc6_o-- From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 14:48:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBE07106566C; Thu, 31 May 2012 14:48:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 75D658FC1D; Thu, 31 May 2012 14:48:49 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 85873B96E; Thu, 31 May 2012 10:48:48 -0400 (EDT) From: John Baldwin To: Mark Felder Date: Thu, 31 May 2012 10:48:45 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201205301317.07345.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205311048.45813.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 10:48:48 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 14:48:49 -0000 On Wednesday, May 30, 2012 3:56:02 pm Mark Felder wrote: > On Wed, 30 May 2012 12:17:07 -0500, John Baldwin wrote: > > > > > Humm, can you test it with 2 CPUs? > > > > We primarily only run with 1 CPU. We have seen it crash on multiple CPU > VMs. Also, Dane Foster appeared to have been using multiple CPUs in his > video transcoding VMs. > > Unfortunately I can't give you more information at the moment. I'm working > with Dane to compile easy to follow steps that recreate this failure. I > have not been successful in getting this to crash on demand in my > environment, but Dane has so we're trying to recreate his. Ok. It would be really helpful if we could get a crashdump, though I realize that may not be doable. Otherwise, full DDB ps output from a hang would be a good start. Primarily I would want to see what the system is doing and why it isn't running the threads on the run queue. It might also be useful to add KTR_SCHED tracing so we can get the output of that via 'show ktr' from DDB when it hangs. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 15:11:24 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C30CE106564A; Thu, 31 May 2012 15:11:24 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 830AF8FC18; Thu, 31 May 2012 15:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=booLkkYv/+ARJZmxyxTU6ygy89uLJr3ito2uITNWjsM=; b=KIF6PAjOgu3AKTKgZrUOW2jV+3ZXF/hvgaI4/V/SKXOBggbw404nMNV6wNgwn+ScU+b5KHYTo2gHzf9gNkjoXuyYDG1ZpjZsD8pQHl3uuE7HLO3xqspaiMJ+bVfp0v0x; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Sa71x-000OnE-Fg; Thu, 31 May 2012 10:11:24 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1338477071-26372-26371/5/12; Thu, 31 May 2012 15:11:11 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org, freebsd-questions@FreeBSD.org References: <201205301317.07345.jhb@freebsd.org> <201205311048.45813.jhb@freebsd.org> Date: Thu, 31 May 2012 10:11:11 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <201205311048.45813.jhb@freebsd.org> User-Agent: Opera Mail/11.64 (FreeBSD) X-SA-Score: -1.5 Cc: Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 15:11:24 -0000 So when this hang happens, there never is a real panic. It just sits in a state which I describe as like being in a deadlock. How would I go about getting a crashdump if it never panics? Is it possible to do the dump over a network or something because I don't believe it can write through the controller at all. Also, thank you for the KTR_SCHED tip. This is the type of info I was looking for. Unfortunately I've only ever seen this crash once on a kernel with debugging enabled. The machine which is currently prepared to do this work used to crash a few times a week and now it has 70 days uptime... however, it is an example of a machine with mpt0 and em0 sharing an IRQ so I might be able to trigger it using Dane's method. $ vmstat -i interrupt total rate irq1: atkbd0 392 0 irq6: fdc0 9 0 irq14: ata0 34 0 irq18: em0 mpt0 1189748491 218 cpu0: timer 2174263198 400 Total 3364012124 619 I'm doing my best to get you guys the info you need, but this is one heck of a Heisenbug... From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 15:25:06 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CC331065672; Thu, 31 May 2012 15:25:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3925F8FC0A; Thu, 31 May 2012 15:25:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AECB6B911; Thu, 31 May 2012 11:25:05 -0400 (EDT) From: John Baldwin To: Adrian Chadd Date: Thu, 31 May 2012 10:55:27 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201205301124.52597.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205311055.27648.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 11:25:05 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 15:25:06 -0000 On Wednesday, May 30, 2012 6:02:15 pm Adrian Chadd wrote: > Hi, > > I've re-run the test with powerd and sleep state stuff disabled - lo > and behold, UDP tests are now up around 240-250MBit, what I'd expect > for this 2 stream 11n device. > > So why is it that I lose roughly 80MBit of throughput with powerd and > C2/C3 enabled, when there's plenty of CPU going around? The NIC > certainly isn't going to sleep (I've not even added that code.) Why do you not expect that? I would try, btw, just disabling powerd for now and leaving C2/C3 enabled to see if that makes a difference. As to my first question, with powerd enabled and an otherwise idle machine, powerd may very well be running your CPU at some rediculously low speed (like 100 Mhz) pretty much all the time. Do you really think you could push more than 80 MBit with a 100 MHz CPU? Secondly, just having a lot of CPU isn't enough if you don't have it quickly. Latency matters, too. Take a look at your C2/C3 info like so: dev.cpu.0.cx_supported: C1/3 C2/59 C3/93 IIRC, the last number is the number of microseconds the CPU takes to resume from an interrupt. So, on this box (a Core i5), it can take 93 us after an interrupt occurs during C3 before the CPU will get around to executing the first instruction. It might be worse on your machine. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 15:42:23 2012 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 B7C301065680; Thu, 31 May 2012 15:42:23 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D49028FC1C; Thu, 31 May 2012 15:42:22 +0000 (UTC) Received: by bkvi18 with SMTP id i18so1279292bkv.13 for ; Thu, 31 May 2012 08:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=o5Jctvosda/ga2Odtt3Wkf/0CpHFJElqyfPQYGYp1Wo=; b=WSLv2ee2v+2yLvCA0uPCxvdBv7jwNQvhsaiTGC8KIi7iYfsyYngU5hvyNQkVitIakd 38gVaWVHhIcrbA21fU0nWB2wDdI6O9QjwNY4mvfn2ium7NA811hakBYSmhaClo+0iVDb /0lvIfEIXusdz3G2BaPvluHrYl2Z4+At6mjFNj5pwKZnyX6JUJSln6RbgyGaWl9kGhbs cny9CdPNF2yceUuLvoo59ieyhw6e6i4JqtwpALiNWS0uVSaYcsyXwUWL4y/76jaZZaDx /1J5tT0VTCb5TDQlWowvON6T+P4cSfTWtOaogxv3sexplwH03nD4+CsPGMotleAXAfBG Aumg== Received: by 10.204.148.79 with SMTP id o15mr1911147bkv.87.1338478941850; Thu, 31 May 2012 08:42:21 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id fw10sm3802511bkc.11.2012.05.31.08.42.19 (version=SSLv3 cipher=OTHER); Thu, 31 May 2012 08:42:20 -0700 (PDT) Sender: Alexander Motin Message-ID: <4FC7915A.8080801@FreeBSD.org> Date: Thu, 31 May 2012 18:42:18 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120328 Thunderbird/10.0.3 MIME-Version: 1.0 To: Adrian Chadd References: <201205301124.52597.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 15:42:23 -0000 On 05/31/12 01:02, Adrian Chadd wrote: > I've re-run the test with powerd and sleep state stuff disabled - lo > and behold, UDP tests are now up around 240-250MBit, what I'd expect > for this 2 stream 11n device. > > So why is it that I lose roughly 80MBit of throughput with powerd and > C2/C3 enabled, when there's plenty of CPU going around? The NIC > certainly isn't going to sleep (I've not even added that code.) I've seen penalties from both of them myself on latency-sensitive single-threaded disk benchmark: 17K IOPS instead of 30K IOPS without. Problem with powerd was that CPU load during the test was below powerd idle threshold and it decided to drop frequency, that proportionally increased I/O handling latency. powerd can't know that while average CPU load is now, the request handling latency is critical for the test. About C-states, I've noticed on my tests on Core2Duo system that while ACPI reports equal exit latency for C1 and C2 states of 1us there, they are not really equal -- C2 exit is measurably slower. On newer generations of systems (Core i) I've never seen C2 latency reported as 1us, but instead it has much higher values. Having real big value there system should automatically avoid entering those states under the high interrupt rates to not get penalties. But that is all about latency-sensitive test. I am surprised to see such results for the network benchmarks. Handling packets in bursts should hide that latency. Unless you are loosing packets because of some overflows during these delays. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 15:57:59 2012 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 59FB9106573A; Thu, 31 May 2012 15:57:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2D32D8FC20; Thu, 31 May 2012 15:57:59 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7FB70B9B7; Thu, 31 May 2012 11:57:58 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 31 May 2012 11:54:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FC729A2.30205@demig.de> In-Reply-To: <4FC729A2.30205@demig.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201205311154.15062.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 11:57:58 -0400 (EDT) Cc: Norbert Koch , Warner Losh Subject: Re: bus device/ivars X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 15:57:59 -0000 On Thursday, May 31, 2012 4:19:46 am Norbert Koch wrote: > Hello, > > I have written a bus device driver > which itself is a pci driver. Child devices > may allocate resources from my bus device. > > My bus device does the usual > management of resources through > the children's ivars. > > My question is this: > > The bus device mallocs the > children's ivars in bus_add_child > and frees the ivars in either > bus_detach or bus_child_detached. > > The children are added in identify > methods through BUS_ADD_CHILD. > > As I understand the code the bus device's > bus_child_detached method is called > in device_delete_child only if > the child device is already attached. > > So, there seems to be a memory leak if > I delete the child device in either > identify or probe. > > My current solution (not tested yet) is to > explicitly call BUS_CHILD_DETACHED > in the child device's code before > calling device_delete_child. > > Is this the correct way or is > there a more elegant/cleaner solution? > > I expected to find something like a > BUS_DELETE_CHILD method. We should perhaps have a BUS_CHILD_DELETED? I think that would do what you want. We could maybe add a BUS_DELETE_CHILD(), but it would be assymmetric to have device_delete_child() call BUS_DELETE_CHILD() when device_add_child() does not call BUS_ADD_CHILD(). (Instead, BUS_ADD_CHILD() calls device_add_child, which is perhaps wrong.) For now I would change your child code to call a wrapper foo_delete_child() function from your child drivers directly rather than calling device_delete_child(). foo_delete_child() can do its cleanup and then call device_delete_child(). -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 15:58:04 2012 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 D1D0F1065693; Thu, 31 May 2012 15:58:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 06D998FC21; Thu, 31 May 2012 15:58:00 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7C7D3B995; Thu, 31 May 2012 11:57:59 -0400 (EDT) From: John Baldwin To: Mark Felder Date: Thu, 31 May 2012 11:57:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201205311048.45813.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205311157.42909.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 11:57:59 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 15:58:04 -0000 On Thursday, May 31, 2012 11:11:11 am Mark Felder wrote: > So when this hang happens, there never is a real panic. It just sits in a > state which I describe as like being in a deadlock. How would I go about > getting a crashdump if it never panics? Is it possible to do the dump over > a network or something because I don't believe it can write through the > controller at all. You can break into ddb and run 'call doadump'. It should use polled IO, so there is a slight chance of it working. > Also, thank you for the KTR_SCHED tip. This is the type of info I was > looking for. Unfortunately I've only ever seen this crash once on a kernel > with debugging enabled. The machine which is currently prepared to do this > work used to crash a few times a week and now it has 70 days uptime... > however, it is an example of a machine with mpt0 and em0 sharing an IRQ so > I might be able to trigger it using Dane's method. > > $ vmstat -i > interrupt total rate > irq1: atkbd0 392 0 > irq6: fdc0 9 0 > irq14: ata0 34 0 > irq18: em0 mpt0 1189748491 218 > cpu0: timer 2174263198 400 > Total 3364012124 619 > > > I'm doing my best to get you guys the info you need, but this is one heck > of a Heisenbug... Thanks. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 16:28:13 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 592BF106564A; Thu, 31 May 2012 16:28:13 +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 EA2918FC0A; Thu, 31 May 2012 16:28:12 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id q4VGFrIa060641 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 31 May 2012 10:15:55 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201205311154.15062.jhb@freebsd.org> Date: Thu, 31 May 2012 10:15:48 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <2A30119B-0C5E-43A9-9B26-11FCF6685999@bsdimp.com> References: <4FC729A2.30205@demig.de> <201205311154.15062.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 31 May 2012 10:15:55 -0600 (MDT) Cc: Norbert Koch , freebsd-hackers@freebsd.org, Warner Losh Subject: Re: bus device/ivars X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 16:28:13 -0000 On May 31, 2012, at 9:54 AM, John Baldwin wrote: > On Thursday, May 31, 2012 4:19:46 am Norbert Koch wrote: >> Hello, >>=20 >> I have written a bus device driver >> which itself is a pci driver. Child devices >> may allocate resources from my bus device. >>=20 >> My bus device does the usual >> management of resources through >> the children's ivars. >>=20 >> My question is this: >>=20 >> The bus device mallocs the >> children's ivars in bus_add_child >> and frees the ivars in either >> bus_detach or bus_child_detached. >>=20 >> The children are added in identify >> methods through BUS_ADD_CHILD. >>=20 >> As I understand the code the bus device's >> bus_child_detached method is called >> in device_delete_child only if >> the child device is already attached. >>=20 >> So, there seems to be a memory leak if >> I delete the child device in either >> identify or probe. >>=20 >> My current solution (not tested yet) is to >> explicitly call BUS_CHILD_DETACHED >> in the child device's code before >> calling device_delete_child. >>=20 >> Is this the correct way or is >> there a more elegant/cleaner solution? >>=20 >> I expected to find something like a >> BUS_DELETE_CHILD method. >=20 > We should perhaps have a BUS_CHILD_DELETED? I think that would do = what you=20 > want. We could maybe add a BUS_DELETE_CHILD(), but it would be = assymmetric to=20 > have device_delete_child() call BUS_DELETE_CHILD() when = device_add_child()=20 > does not call BUS_ADD_CHILD(). (Instead, BUS_ADD_CHILD() calls=20 > device_add_child, which is perhaps wrong.) >=20 > For now I would change your child code to call a wrapper = foo_delete_child()=20 > function from your child drivers directly rather than calling=20 > device_delete_child(). foo_delete_child() can do its cleanup and = then call=20 > device_delete_child(). We likely should have a BUS_CHILD_DELETED function that can get called = for each class in the stack when a child is deleted so you can remove = the ivars. The ivars should likely stay around when the device is = merely detached. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 18:57:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66B861065673 for ; Thu, 31 May 2012 18:57:49 +0000 (UTC) (envelope-from brandon@ifup.org) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2CAB18FC15 for ; Thu, 31 May 2012 18:57:49 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id C19DE20B6F for ; Thu, 31 May 2012 14:57:47 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute4.internal (MEProxy); Thu, 31 May 2012 14:57:47 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=ifup.org; h=date :from:to:subject:message-id:mime-version:content-type; s=mesmtp; bh=YY8+KQCODKi2zhX2WbKWszGXSQM=; b=mPWBFhQysOW/x+GnD3IyNHjKlBvj El2gGk0aysulNPDBFP51eksaKMMZ2OktHyBDuyQ4+shwHuyHe0Oi1CysOj5xwHsQ wSBc2kWVoPgx0I/Iwcnh2rmvP8uAfbSJh16fR4tkZyRH6FiM5eghw0JQwNKKhPfj rYXGBla8HCb3SJ8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :mime-version:content-type; s=smtpout; bh=YY8+KQCODKi2zhX2WbKWsz GXSQM=; b=hAMX/HySlUXMI9Y2pmsVLpwwGjWfcgr/jAo8lTFlr/71rdrKHT4AC4 LubJCdHTJeO5eAwe9K0QUjgTIjZndAv9amI0fSy0qRh6jRrwehH1U0nbR0lQhjDk l6sGP4a/yV9JXk1CaSVQAAPGoGEK2ZxphJDxusT+ewr8zY59Rx/Pg= X-Sasl-enc: vrzzc4bGbxgJuTGQiukfvSuIclvGoBhlSejkII6EIlKY 1338490667 Received: from localhost (unknown [50.56.129.169]) by mail.messagingengine.com (Postfix) with ESMTPA id 728A98E01FA for ; Thu, 31 May 2012 14:57:47 -0400 (EDT) Date: Thu, 31 May 2012 11:57:44 -0700 From: Brandon Philips To: freebsd-hackers@freebsd.org Message-ID: <20120531185744.GL3724@kam.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: announce: C Conference CFP closing June 7th X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 18:57:49 -0000 Hello- The first ever "C Conference" is happening August 28th, 2012 in San Diego, CA. The target audience are people who implement systems in C. Whether that be new languages, libraries, kernels, daemons or games. A reverse call for papers is up and closes June 7th. Submit talks you would like to give or talks you want to see given. Either way! Early bird tickets are available for $225. If you plan to attend LinuxCon/CloudOpen the following days you can get a package with C Conf and LinuxCon/CloudOpen for $520 (LinuxCon/CloudOpen are $500 alone). http://cconf.org Hope to see you there. Email me if you have any questions! Brandon From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 18:59:44 2012 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 7DA191065670; Thu, 31 May 2012 18:59:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 39ED28FC1F; Thu, 31 May 2012 18:59:44 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 80C44B999; Thu, 31 May 2012 14:59:43 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Thu, 31 May 2012 14:59:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FC729A2.30205@demig.de> <201205311154.15062.jhb@freebsd.org> <2A30119B-0C5E-43A9-9B26-11FCF6685999@bsdimp.com> In-Reply-To: <2A30119B-0C5E-43A9-9B26-11FCF6685999@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205311459.42538.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 14:59:43 -0400 (EDT) Cc: Norbert Koch , freebsd-hackers@freebsd.org, Warner Losh Subject: Re: bus device/ivars X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 18:59:44 -0000 On Thursday, May 31, 2012 12:15:48 pm Warner Losh wrote: > > On May 31, 2012, at 9:54 AM, John Baldwin wrote: > > > On Thursday, May 31, 2012 4:19:46 am Norbert Koch wrote: > >> Hello, > >> > >> I have written a bus device driver > >> which itself is a pci driver. Child devices > >> may allocate resources from my bus device. > >> > >> My bus device does the usual > >> management of resources through > >> the children's ivars. > >> > >> My question is this: > >> > >> The bus device mallocs the > >> children's ivars in bus_add_child > >> and frees the ivars in either > >> bus_detach or bus_child_detached. > >> > >> The children are added in identify > >> methods through BUS_ADD_CHILD. > >> > >> As I understand the code the bus device's > >> bus_child_detached method is called > >> in device_delete_child only if > >> the child device is already attached. > >> > >> So, there seems to be a memory leak if > >> I delete the child device in either > >> identify or probe. > >> > >> My current solution (not tested yet) is to > >> explicitly call BUS_CHILD_DETACHED > >> in the child device's code before > >> calling device_delete_child. > >> > >> Is this the correct way or is > >> there a more elegant/cleaner solution? > >> > >> I expected to find something like a > >> BUS_DELETE_CHILD method. > > > > We should perhaps have a BUS_CHILD_DELETED? I think that would do what you > > want. We could maybe add a BUS_DELETE_CHILD(), but it would be assymmetric to > > have device_delete_child() call BUS_DELETE_CHILD() when device_add_child() > > does not call BUS_ADD_CHILD(). (Instead, BUS_ADD_CHILD() calls > > device_add_child, which is perhaps wrong.) > > > > For now I would change your child code to call a wrapper foo_delete_child() > > function from your child drivers directly rather than calling > > device_delete_child(). foo_delete_child() can do its cleanup and then call > > device_delete_child(). > > We likely should have a BUS_CHILD_DELETED function that can get called for each class in the stack when a child is deleted so you can remove the ivars. The ivars should likely stay around when the device is merely detached. Either that or we redo BUS_ADD_CHILD() such that device_add_child_ordered() invokes it (and it has a default method that does what device_add_child_ordered() does now). We could then mirror that with device_delete_child() and a BUS_DELETE_CHILD(). Here is the simpler fix (I think): Index: kern/subr_bus.c =================================================================== --- kern/subr_bus.c (revision 236313) +++ kern/subr_bus.c (working copy) @@ -1873,6 +1873,8 @@ return (error); if (child->devclass) devclass_delete_device(child->devclass, child); + if (child->parent) + BUS_CHILD_DELETED(dev, child); TAILQ_REMOVE(&dev->children, child, link); TAILQ_REMOVE(&bus_data_devices, child, devlink); kobj_delete((kobj_t) child, M_BUS); Index: kern/bus_if.m =================================================================== --- kern/bus_if.m (revision 236313) +++ kern/bus_if.m (working copy) @@ -160,6 +160,20 @@ }; /** + * @brief Notify a bus that a child was deleted + * + * Called at the beginning of device_delete_child() to allow the parent + * to teardown any bus-specific state for the child. + * + * @param _dev the device whose child is being deleted + * @param _child the child device which is being deleted + */ +METHOD void child_deleted { + device_t _dev; + device_t _child; +}; + +/** * @brief Notify a bus that a child was detached * * Called after the child's DEVICE_DETACH() method to allow the parent -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 19:52:53 2012 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 2D6F6106567B; Thu, 31 May 2012 19:52:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id E45A38FC16; Thu, 31 May 2012 19:52:52 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2074269pbb.13 for ; Thu, 31 May 2012 12:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=fiZQTaWCXfe1s88jC9b66KIJvRUsrDfGvj6I0P5YfEw=; b=GvCBqSZ5kmm8X1fLc8VeYhFw/ft2z9yJ7I/VmtOct5H/Aep6XksGrUVdY0qsNgsKuB k5Wb0kfsMfDJPMrt7rVEsvRN+Nd95NJU86uK2Djvl0zPeQC4k+J2s1viX3nREswG9n+Y RIXxJUHF+5uNB70dbLBse0RXptdPJvuGnnyCwuvZYI+AiXPzE86PjhIoP9ZvoSLglvOo wktpA1tJ9lJfdwmjrRFenwf0+S3qeZdQ41Nh0ZVx0Cx2HEqXIBOv4Sz7QhYleb6bMglJ cbsWC55uscrV1uGeXDDAIV+seR7Mz17+LlEkR3w42RnKulIUuBXe2hOzQu51xYxrqRKa IovQ== MIME-Version: 1.0 Received: by 10.68.223.167 with SMTP id qv7mr2638549pbc.127.1338493972375; Thu, 31 May 2012 12:52:52 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Thu, 31 May 2012 12:52:52 -0700 (PDT) In-Reply-To: <201205311055.27648.jhb@freebsd.org> References: <201205301124.52597.jhb@freebsd.org> <201205311055.27648.jhb@freebsd.org> Date: Thu, 31 May 2012 12:52:52 -0700 X-Google-Sender-Auth: XDE-FPNiRuWondkw1CrpXvl6tds Message-ID: From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 19:52:53 -0000 On 31 May 2012 07:55, John Baldwin wrote: > On Wednesday, May 30, 2012 6:02:15 pm Adrian Chadd wrote: >> Hi, >> >> I've re-run the test with powerd and sleep state stuff disabled - lo >> and behold, UDP tests are now up around 240-250MBit, what I'd expect >> for this 2 stream 11n device. >> >> So why is it that I lose roughly 80MBit of throughput with powerd and >> C2/C3 enabled, when there's plenty of CPU going around? The NIC >> certainly isn't going to sleep (I've not even added that code.) > > Why do you not expect that? =A0I would try, btw, just disabling powerd fo= r now > and leaving C2/C3 enabled to see if that makes a difference. I expected it because I didn't know what else is going on. Thanks to your braindumping in this thread, I now have a much better appreciation for the issues here. :-) > As to my first question, with powerd enabled and an otherwise idle machin= e, > powerd may very well be running your CPU at some rediculously low speed (= like > 100 Mhz) pretty much all the time. =A0Do you really think you could push = more > than 80 MBit with a 100 MHz CPU? This is with the power connected, so powerd seems to leave the CPU at full speed. I'll have to double-check. > Secondly, just having a lot of CPU isn't enough if you don't have it quic= kly. > Latency matters, too. =A0Take a look at your C2/C3 info like so: > > dev.cpu.0.cx_supported: C1/3 C2/59 C3/93 > > IIRC, the last number is the number of microseconds the CPU takes to resu= me > from an interrupt. =A0So, on this box (a Core i5), it can take 93 us afte= r an > interrupt occurs during C3 before the CPU will get around to executing th= e > first instruction. =A0It might be worse on your machine. Ok. I'll check the latency values when I'm back at home. The default bootup too is to use the ACPI idle routine, Even with powerd disabled and sleep limited to C1, I still see the TSC mismatch issues. I've modified my kernel to default to using spin at bootup. I'll see if this fixes the TSC mismatch when doing KTR traces. Thanks, Adrian From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 20:23:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6EEA106564A for ; Thu, 31 May 2012 20:23:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id AA7A08FC15 for ; Thu, 31 May 2012 20:23:17 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2108986pbb.13 for ; Thu, 31 May 2012 13:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=xSoyNrJeAe6SitM56fOLPrI1eWrK37v528006mLPZNY=; b=09Le7kM0JqkL2C/TOw4xubxiSewpjOIGfoqQ6W1WSF1+ORk303JxxIywrusdFXr0+C 6QK7nZ2sjVEIaz7eH3ldXh98Qn78xTZP8TgDTnCGg5OY2GLXY0On5Xr37ymrdYoEZLaF JBCf1kK922GgNJBf86eB2yIZAMa/2yXyILXI8H2WHzaNmPqGVnGJj/cTgxPOo6FpPAs8 I4AWbCqdn0mDr0NMM3pFPSQ0KcPfPKI1S4Fgbi1VAu4vuXw7bXaqMyOTB10cDdVcPIpt oNTUgz4JVxiiKc/b+1+F5c8A5Ckt3vnRVQcdsAh0yoB0OyuwX0LfC1PKinLaJASkRhQ/ sVJg== MIME-Version: 1.0 Received: by 10.68.232.129 with SMTP id to1mr3164852pbc.27.1338495797345; Thu, 31 May 2012 13:23:17 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Thu, 31 May 2012 13:23:17 -0700 (PDT) In-Reply-To: <4FC71F13.6040008@zonov.org> References: <4FC6748B.5030708@zonov.org> <4FC71F13.6040008@zonov.org> Date: Thu, 31 May 2012 13:23:17 -0700 X-Google-Sender-Auth: tMiAsrLlSOfDcBCXwCbksWdKa1g Message-ID: From: Adrian Chadd To: Andrey Zonov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: usertime stale at about 371k seconds X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 31 May 2012 20:23:17 -0000 Hi, Would you please file a PR with all of your work? :-) Thanks, Adrian From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 08:19:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61CC010657A9 for ; Fri, 1 Jun 2012 08:19:49 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id A83DF8FC12 for ; Fri, 1 Jun 2012 08:19:48 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q518JbLq002108 for ; Fri, 1 Jun 2012 10:19:37 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q518JbOq002105 for ; Fri, 1 Jun 2012 10:19:37 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Fri, 1 Jun 2012 10:19:37 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Fri, 01 Jun 2012 10:19:37 +0200 (CEST) Subject: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 08:19:49 -0000 what tool and how can be used to display detailed map what exactly wired memory on my system as it is far way too much (1.5GB out of 4GB RAM). i do run 4 virtualboxes but one have 256MB RAM, the others 192 and when i turn them off wired memory goes down right amount but still it is too much used. From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 12:24:05 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D39C5106564A for ; Fri, 1 Jun 2012 12:24:05 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 89FBA8FC08 for ; Fri, 1 Jun 2012 12:24:05 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SaQtY-0003hc-Gi for freebsd-hackers@freebsd.org; Fri, 01 Jun 2012 14:23:56 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jun 2012 14:23:56 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jun 2012 14:23:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 01 Jun 2012 14:23:42 +0200 Lines: 48 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB7704D04AF6E675191513EF3" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0) Gecko/20120213 Thunderbird/10.0 X-Enigmail-Version: 1.3.5 Subject: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 12:24:05 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB7704D04AF6E675191513EF3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hello, I was wondering how much usage superpages get in real-world systems, and made a small script to parse the output of "procstat -va": http://people.freebsd.org/~ivoras/stuff/spsurvey.py The results from three systems (with the script being run as root) are he= re: http://people.freebsd.org/~ivoras/stuff/spsurvey_desktop.txt http://people.freebsd.org/~ivoras/stuff/spsurvey_mixserver.txt http://people.freebsd.org/~ivoras/stuff/spsurvey_webserver.txt What I get from it is that they are really under-utilized, probably because it's a rare occasion that every single page in a 2 MB region is touched to enable its promotion. The only good case seems to be the third one, with the database accessing the whole memory range a lot, but the statistics which procstat reports is inaccurate: there could be only a single superpage in the whole region and procstat will make the region with the "S" flag. If there's anyone else wishing to run the script and post the results, it could be useful to see. --------------enigB7704D04AF6E675191513EF3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/ItE8ACgkQ/QjVBj3/HSyfIgCfevuhs0GLU6PVm29UO6veZSw+ zI8AnjYX554Y0wyGn9FmCMEnoyU4pO9/ =41xB -----END PGP SIGNATURE----- --------------enigB7704D04AF6E675191513EF3-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 12:35:34 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02268106564A; Fri, 1 Jun 2012 12:35:34 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 669BC8FC19; Fri, 1 Jun 2012 12:35:33 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q51CZUIn036980; Fri, 1 Jun 2012 14:35:30 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q51CZT8t036977; Fri, 1 Jun 2012 14:35:30 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Fri, 1 Jun 2012 14:35:29 +0200 (CEST) From: Wojciech Puchar To: Ivan Voras In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Fri, 01 Jun 2012 14:35:30 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 12:35:34 -0000 > http://people.freebsd.org/~ivoras/stuff/spsurvey.py > > The results from three systems (with the script being run as root) are here: > > http://people.freebsd.org/~ivoras/stuff/spsurvey_desktop.txt > http://people.freebsd.org/~ivoras/stuff/spsurvey_mixserver.txt > http://people.freebsd.org/~ivoras/stuff/spsurvey_webserver.txt your "webserver" is actually database serwer with addons. mixserver - mix of what? My "mixserver" have certainly far different mix of your "mixserver", as i don't use python heavily for example, while use squid, clamav (both fits well in superpages), and don't run large memory postgres process. What is "desktop". A computer sitting on the desk? May run a lot of different programs. Your "desktop" as i can see use KDE bloatware and postgres. As for me, such namings are completely imprecise and such statistics say NOTHING. What REAL knowledge i acquired from your work is that postgres are very well fit for superpage mapping, if large DB buffer is used. Actually - Whenever there are long running processes in the system that allocate and use large memory chunks then superpage promotion will work. My idea - lets do a survey based on PROCESS NAME. this will give a really meaningful information. From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 12:55:30 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11F91106564A for ; Fri, 1 Jun 2012 12:55:30 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id BDC788FC17 for ; Fri, 1 Jun 2012 12:55:29 +0000 (UTC) Received: by ggnm2 with SMTP id m2so2036299ggn.13 for ; Fri, 01 Jun 2012 05:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=myK3ao6v8NodiPx8xBuPN896/+QWJx+LAblTN3qx0nc=; b=01cRA7LOBgDsWeJdp1O2Hq5ZmowAlNz2IZ4rh4ebup2ZtXL/Zx7omwpCYVzQ+5sYbb KYyA3azjaE0lC48S7USzARSCFWNhw9C7AWCLAztMhRu8CMpti1aoLzIglKri/VGd97gF UNjiFRqTnuH2zIsI8/eoKWNO1IgR4uK37sHGd2Xl/BbnqTRTXS3cXI97qIXGzrioG+Wd ckjYK9IvjXj8i5Qepp3NhnxIG28Fre/9Whq3t83rxT7s2qPo+ytrdjiWzS+w5zpHHdOY eZ5UIEOXbwvxlGjHEJSAzouWKGJ0D6HnEI1eRUMoo8JgJ/OnulxWnds3nO/jomudBz0b 5h3A== Received: by 10.101.106.12 with SMTP id i12mr805197anm.35.1338555329007; Fri, 01 Jun 2012 05:55:29 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.101.112.10 with HTTP; Fri, 1 Jun 2012 05:54:48 -0700 (PDT) In-Reply-To: References: From: Ivan Voras Date: Fri, 1 Jun 2012 14:54:48 +0200 X-Google-Sender-Auth: x8k2iF9SLeH6niFmIUPu91AbdD0 Message-ID: To: Wojciech Puchar Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 12:55:30 -0000 On 1 June 2012 14:35, Wojciech Puchar wrote: >> http://people.freebsd.org/~ivoras/stuff/spsurvey.py >> >> The results from three systems (with the script being run as root) are >> here: >> >> http://people.freebsd.org/~ivoras/stuff/spsurvey_desktop.txt >> http://people.freebsd.org/~ivoras/stuff/spsurvey_mixserver.txt >> http://people.freebsd.org/~ivoras/stuff/spsurvey_webserver.txt > > > your "webserver" is actually database serwer with addons. Database + apache + a lot of fairly large FastCGI php processes - which surprisingly don't use superpages. > mixserver - mix of what? PostgreSQL, apache, php, dovecot, spamassasin, python web apps, and a lot of other things - I'm sure you can conclude from the list of processes. > My "mixserver" have certainly far different mix of your "mixserver", as i > don't use python heavily for example, while use squid, clamav (both fits > well in superpages), and don't run large memory postgres process. I'd like to learn more - can you post the results from your own server? > What is "desktop". A computer sitting on the desk? May run a lot of > different programs. > > Your "desktop" as i can see use KDE bloatware and postgres. Yes, except for postgres which is used rarely, it's a fairly typical KDE desktop. > As for me, such namings are completely imprecise and such statistics say > NOTHING. Yes, a survey of three machines means nothing. I'm looking for more data. > My idea - lets do a survey based on PROCESS NAME. > this will give a really meaningful information. If anyone posts more data, I'll analyse it. I'm more worried about the granularity of procstat, where it marks the entire region if a single superpage exists in it - it means any such analysis is only approximate. From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 13:01:36 2012 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 104B71065670 for ; Fri, 1 Jun 2012 13:01:36 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id B82BA8FC15 for ; Fri, 1 Jun 2012 13:01:35 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SaRTx-0007iJ-Be for freebsd-hackers@freebsd.org; Fri, 01 Jun 2012 15:01:33 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jun 2012 15:01:33 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jun 2012 15:01:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 01 Jun 2012 15:01:16 +0200 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig48F908A03C202C5D2DCF86EF" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0) Gecko/20120213 Thunderbird/10.0 In-Reply-To: X-Enigmail-Version: 1.3.5 Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 13:01:36 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig48F908A03C202C5D2DCF86EF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/06/2012 10:19, Wojciech Puchar wrote: > what tool and how can be used to display detailed map what exactly wire= d > memory on my system as it is far way too much (1.5GB out of 4GB RAM). Do you use ZFS? --------------enig48F908A03C202C5D2DCF86EF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/IvRwACgkQ/QjVBj3/HSzvVQCeIXwJUag0W8kyxwYDNUhsYsg3 pAwAoIHRajtwuBSs3YY4uk1Iw7TLyY8j =AsmT -----END PGP SIGNATURE----- --------------enig48F908A03C202C5D2DCF86EF-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 14:26:13 2012 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 C5A141065672 for ; Fri, 1 Jun 2012 14:26:13 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 86D668FC15 for ; Fri, 1 Jun 2012 14:26:13 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa05 [127.0.0.1]) by ltcfislmsgpa05.fnfis.com (8.14.4/8.14.4) with SMTP id q51DYZAV020221; Fri, 1 Jun 2012 08:59:04 -0500 Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa05.fnfis.com with ESMTP id 156xr0844a-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 01 Jun 2012 08:59:04 -0500 Received: from LTCFISWMSGMB21.FNFIS.com ([10.132.99.23]) by LTCFISWMSGHT06.FNFIS.com ([10.132.206.17]) with mapi id 14.02.0283.003; Fri, 1 Jun 2012 08:59:03 -0500 From: "Teske, Devin" To: Wojciech Puchar Thread-Topic: detailed map of WIRED memory under FreeBSD 9 Thread-Index: AQHNP/6z38T0e/gf4UeQvNP8+mN//Q== Date: Fri, 1 Jun 2012 13:59:03 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.14.152.61] Content-Type: text/plain; charset="us-ascii" Content-ID: <093DF13F586D364EBCD674348E56D0AE@fisglobal.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7580, 1.0.260, 0.0.0000 definitions=2012-06-01_02:2012-05-21, 2012-06-01, 1970-01-01 signatures=0 Cc: "" Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 14:26:13 -0000 On Jun 1, 2012, at 1:19 AM, Wojciech Puchar wrote: > what tool and how can be used to display detailed map what exactly wired = memory on my system as it is far way too much (1.5GB out of 4GB RAM). >=20 dmidecode? --=20 Devin > i do run 4 virtualboxes but one have 256MB RAM, the others 192 and when i= turn them off wired memory goes down right amount but still it is too much= used. >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you. From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 14:47:29 2012 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 1CABD1065706 for ; Fri, 1 Jun 2012 14:47:29 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 7524E8FC08 for ; Fri, 1 Jun 2012 14:47:28 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q51ElJfW003145; Fri, 1 Jun 2012 16:47:19 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q51ElIeH003142; Fri, 1 Jun 2012 16:47:19 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Fri, 1 Jun 2012 16:47:18 +0200 (CEST) From: Wojciech Puchar To: "Teske, Devin" In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Fri, 01 Jun 2012 16:47:19 +0200 (CEST) Cc: "" Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 14:47:29 -0000 no it isn't. Problem solved - virtualbox is THAT bad allocates more memory than needed. On Fri, 1 Jun 2012, Teske, Devin wrote: > > > On Jun 1, 2012, at 1:19 AM, Wojciech Puchar wrote: > >> what tool and how can be used to display detailed map what exactly wired memory on my system as it is far way too much (1.5GB out of 4GB RAM). >> > > dmidecode? > > > > -- > Devin > > >> i do run 4 virtualboxes but one have 256MB RAM, the others 192 and when i turn them off wired memory goes down right amount but still it is too much used. >> >> _______________________________________________ >> 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" > > _____________ > The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. > _______________________________________________ > 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 Jun 1 16:01:39 2012 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 BE20F1065740 for ; Fri, 1 Jun 2012 16:01:39 +0000 (UTC) (envelope-from prvs=1499b4e3e3=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7988FC15 for ; Fri, 1 Jun 2012 16:01:39 +0000 (UTC) X-Spam-Processed: mail1.multiplay.co.uk, Fri, 01 Jun 2012 17:01:18 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50020052087.msg for ; Fri, 01 Jun 2012 17:01:18 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=1499b4e3e3=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Message-ID: From: "Steven Hartland" To: Date: Fri, 1 Jun 2012 17:00:20 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: dtrace filename lookups from fd X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 16:01:39 -0000 As a first foray into dtrace I wanted to create a little script which shows the amount of disk read / write activity. Now the DtraceToolkit includes rwsnoop but this uses Solaris specific requests and on looking around it seems like using rwsnoop vn_fullpath may be the way to go. Has anyone done anything similar to this before or has any tips on going about this? Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 19:04:04 2012 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 7556F106564A; Fri, 1 Jun 2012 19:04:04 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id E7F418FC08; Fri, 1 Jun 2012 19:04:03 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.5/8.14.5) with ESMTP id q51J42GV090075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 1 Jun 2012 21:04:02 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Fri, 1 Jun 2012 21:04:02 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Ivan Voras Message-ID: <20120601190402.GQ10094@acme.spoerlein.net> Mail-Followup-To: Ivan Voras , freebsd-hackers@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@FreeBSD.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 19:04:04 -0000 On Fri, 2012-06-01 at 14:23:42 +0200, Ivan Voras wrote: > hello, > > I was wondering how much usage superpages get in real-world systems, and > made a small script to parse the output of "procstat -va": > > http://people.freebsd.org/~ivoras/stuff/spsurvey.py > > The results from three systems (with the script being run as root) are here: > > http://people.freebsd.org/~ivoras/stuff/spsurvey_desktop.txt > http://people.freebsd.org/~ivoras/stuff/spsurvey_mixserver.txt > http://people.freebsd.org/~ivoras/stuff/spsurvey_webserver.txt > > What I get from it is that they are really under-utilized, probably > because it's a rare occasion that every single page in a 2 MB region is > touched to enable its promotion. > > The only good case seems to be the third one, with the database > accessing the whole memory range a lot, but the statistics which > procstat reports is inaccurate: there could be only a single superpage > in the whole region and procstat will make the region with the "S" flag. > > If there's anyone else wishing to run the script and post the results, > it could be useful to see. Here's output of a machine doing basically nothing all day: % fetch -o- http://people.freebsd.org/\~ivoras/stuff/spsurvey.py | sudo python - - 100% of 2035 B 664 kBps last pid: 20460; load averages: 0.04, 0.01, 0.00 up 2+01:35:37 21:01:08 49 processes: 1 running, 48 sleeping Mem: 104M Active, 2079M Inact, 1593M Wired, 34M Cache, 418M Buf, 133M Free Swap: 4096M Total, 1376K Used, 4095M Free Total accounted memory mappings: 1669 MB (427314 pages) Memory in superpages: 12 MB (2 mappings) + pid: 864 (named) start: 802800000 stop: 803000000 (8 MB) tp: df path: + pid: 1002 (slapd) start: 805400000 stop: 805800000 (4 MB) tp: df path: Eligible mappings not promoted: 66 ... Also, what about kernel mappings? With ZFS and stuff there should be more superpages in kernel memory, no? Uli From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 21:25:58 2012 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 A5B3C106566B; Fri, 1 Jun 2012 21:25:58 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id E01708FC0A; Fri, 1 Jun 2012 21:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Cc:Date:References:Subject:To:Content-Type; bh=RJVKIDon7eh99nRabUcuHuIirrTVi1f62b7DOgI6NVE=; b=ZmSB1Z9Mng+rnnitjTLW7rfpjwjQ5CZRLpCUGKL1eiUXyPanoAm/aRY4WrWxHEfyenziyZJQ/0xjcHNe1XKx+ZDnMKsPbBePg2Njvu1zqkRGW+kJvdPnbVoxdxmN579G; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SaZM3-000EQV-T3; Fri, 01 Jun 2012 16:25:57 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1338585949-26372-26371/5/17; Fri, 1 Jun 2012 21:25:49 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org References: Date: Fri, 1 Jun 2012 16:25:49 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.64 (FreeBSD) X-SA-Score: -1.5 Cc: Ivan Voras Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 01 Jun 2012 21:25:58 -0000 [/usr/home/feld]# python spsurvey.py last pid: 54743; load averages: 0.28, 0.26, 0.24 up 18+07:41:02 16:22:45 145 processes: 1 running, 144 sleeping Mem: 828M Active, 845M Inact, 8517M Wired, 174M Cache, 725M Buf, 265M Free Swap: 4096M Total, 88M Used, 4008M Free, 2% Inuse Total accounted memory mappings: 23968 MB (6136043 pages) Memory in superpages: 12941 MB (14 mappings) + pid: 26349 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26351 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26352 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26353 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26374 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26382 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26387 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26388 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 26398 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 44306 (odasrv) start: 801800000 stop: 806000000 (72 MB) tp: df path: + pid: 44318 (odasrv) start: 801800000 stop: 805c00000 (68 MB) tp: df path: + pid: 53549 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 53932 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: + pid: 54515 (postgres) start: 802800000 stop: 8452c6000 (1066 MB) tp: ph path: Eligible mappings not promoted: 413 Yup, seems like Postgres does a good job of using superpages From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 08:15:06 2012 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 35602106564A; Sat, 2 Jun 2012 08:15:06 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id BA3B48FC14; Sat, 2 Jun 2012 08:15:05 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:756c:80e7:ffb9:a0c4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 73D7C4AC1C; Sat, 2 Jun 2012 12:15:04 +0400 (MSK) Date: Sat, 2 Jun 2012 12:14:58 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1073159468.20120602121458@serebryakov.spb.ru> To: Ivan Voras In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jun 2012 08:15:06 -0000 Hello, Ivan. You wrote 1 =D0=B8=D1=8E=D0=BD=D1=8F 2012 =D0=B3., 16:23:42: IV> http://people.freebsd.org/~ivoras/stuff/spsurvey_desktop.txt IV> http://people.freebsd.org/~ivoras/stuff/spsurvey_mixserver.txt IV> http://people.freebsd.org/~ivoras/stuff/spsurvey_webserver.txt Home storage server / torrent box: http://lev.serebryakov.spb.ru/_sklad/sps/spsurvey-home-storage-torrents.t= xt Web/Database/Mail "all-in-one for me and my friends" server: http://lev.serebryakov.spb.ru/_sklad/sps/spsurvey-mixed-web-database-mail= .txt I'm surprised by number of "Eligible mappings not promoted" cases :( --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 08:44:14 2012 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 07B511065673 for ; Sat, 2 Jun 2012 08:44:14 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 483068FC12 for ; Sat, 2 Jun 2012 08:44:12 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q528iBJJ040712 for ; Sat, 2 Jun 2012 10:44:11 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q528iAI3040709 for ; Sat, 2 Jun 2012 10:44:11 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 2 Jun 2012 10:44:10 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 02 Jun 2012 10:44:11 +0200 (CEST) Subject: BHyVe - few questions as i don't catch on idea X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 08:44:14 -0000 i am very happy of such software being done - natively on freebsd. it seems very logic - separate memory for main FreeBSD system and separate for VMs, main FreeBSD system handles I/O. Great but i really don't understand what is the sense to run FreeBSD VM under FreeBSD - and that's what now it does. I don't need virtualization to run FreeBSD instances - it doesn't need it because it is already efficient multiuser and multitasking system. Virtualization is needed to make software and OSes that cannot really be efficiently multiuser and multitasking - to do so, by running multiple instances on the same machine. and as to preserve outdated software "as is". Running one or few instances of windows is prime example. Is this planned in BHyVe? Would be great. I wished before than linux KVM driver could be ported to FreeBSD as it (+qemu itselv) already solves all needs. but i found this port will not be continued. I run virtualbox for now but it is far from efficient in speed and ever worse in usage, as it does everything to make it difficult (UUIDs, XML config files). Compared to this qemu is trivially simple, as well as BHyVe. Xen is completely inefficient as it adds overhead to everything, not just virtualized instances, because domain0 runs in VM too. thanks. From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 08:51:47 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C36B11065673; Sat, 2 Jun 2012 08:51:47 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A94CE8FC15; Sat, 2 Jun 2012 08:51:47 +0000 (UTC) Received: from nibbler-wlan.fritz.box (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q528pjBa006476; Sat, 2 Jun 2012 08:51:46 GMT (envelope-from flo@FreeBSD.org) Message-ID: <4FC9D420.6010203@FreeBSD.org> Date: Sat, 02 Jun 2012 10:51:44 +0200 From: Florian Smeets User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120601 Thunderbird/14.0a2 MIME-Version: 1.0 To: lev@FreeBSD.org References: <1073159468.20120602121458@serebryakov.spb.ru> In-Reply-To: <1073159468.20120602121458@serebryakov.spb.ru> X-Enigmail-Version: 1.5a1pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF8CF77FB67BFE3E162543AF9" Cc: freebsd-hackers@FreeBSD.org, Ivan Voras Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 08:51:47 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF8CF77FB67BFE3E162543AF9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02.06.12 10:14, Lev Serebryakov wrote: > Hello, Ivan. > You wrote 1 =D0=B8=D1=8E=D0=BD=D1=8F 2012 =D0=B3., 16:23:42: >=20 > IV> http://people.freebsd.org/~ivoras/stuff/spsurvey_desktop.txt > IV> http://people.freebsd.org/~ivoras/stuff/spsurvey_mixserver.txt > IV> http://people.freebsd.org/~ivoras/stuff/spsurvey_webserver.txt > Home storage server / torrent box: > http://lev.serebryakov.spb.ru/_sklad/sps/spsurvey-home-storage-torren= ts.txt >=20 > Web/Database/Mail "all-in-one for me and my friends" server: > http://lev.serebryakov.spb.ru/_sklad/sps/spsurvey-mixed-web-database-= mail.txt >=20 > I'm surprised by number of "Eligible mappings not promoted" cases :( >=20 You have to explicitly enable it in mysql: add "large-pages" to the [mysqld] section of my.cnf Total accounted memory mappings: 7775 MB (1990412 pages) Memory in superpages: 5414 MB (3 mappings) pid: 27208 (mysqld) start: 802400000 stop: 816800000 (324 MB) tp: sw pat= h: pid: 27208 (mysqld) start: 816c00000 stop: 945628000 (4842 MB) tp: sw path: pid: 27208 (mysqld) start: 945800000 stop: 955000000 (248 MB) tp: sw pat= h: Florian --------------enigF8CF77FB67BFE3E162543AF9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAk/J1CAACgkQapo8P8lCvwkbDQCfUof0bN9X2TKqe/JYhO+rVgkI UagAnRuGcLuyw8W52zmr46YGunKgp+5Y =+Xa2 -----END PGP SIGNATURE----- --------------enigF8CF77FB67BFE3E162543AF9-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 08:54:33 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE1C4106564A; Sat, 2 Jun 2012 08:54:33 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 3E6418FC1F; Sat, 2 Jun 2012 08:54:32 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q528sUiT040886; Sat, 2 Jun 2012 10:54:31 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q528sU6B040883; Sat, 2 Jun 2012 10:54:30 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 2 Jun 2012 10:54:30 +0200 (CEST) From: Wojciech Puchar To: Florian Smeets In-Reply-To: <4FC9D420.6010203@FreeBSD.org> Message-ID: References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 02 Jun 2012 10:54:31 +0200 (CEST) Cc: freebsd-hackers@freebsd.org, lev@freebsd.org, Ivan Voras Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 08:54:33 -0000 > You have to explicitly enable it in mysql: > > add "large-pages" to the [mysqld] section of my.cnf what actually this option do in mysql? > > Total accounted memory mappings: 7775 MB (1990412 pages) > Memory in superpages: 5414 MB (3 mappings) > pid: 27208 (mysqld) start: 802400000 stop: 816800000 (324 MB) tp: sw path: > pid: 27208 (mysqld) start: 816c00000 stop: 945628000 (4842 MB) tp: sw > path: > pid: 27208 (mysqld) start: 945800000 stop: 955000000 (248 MB) tp: sw path: > > Florian > > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 09:02:08 2012 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 F1769106564A; Sat, 2 Jun 2012 09:02:08 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D31E78FC08; Sat, 2 Jun 2012 09:02:08 +0000 (UTC) Received: from nibbler-wlan.fritz.box (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q52926AV023595; Sat, 2 Jun 2012 09:02:07 GMT (envelope-from flo@FreeBSD.org) Message-ID: <4FC9D68D.60405@FreeBSD.org> Date: Sat, 02 Jun 2012 11:02:05 +0200 From: Florian Smeets User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120601 Thunderbird/14.0a2 MIME-Version: 1.0 To: Wojciech Puchar References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5a1pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1410076917C1F794CF1D20BF" Cc: freebsd-hackers@FreeBSD.org, lev@FreeBSD.org, Ivan Voras Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 09:02:09 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1410076917C1F794CF1D20BF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 02.06.12 10:54, Wojciech Puchar wrote: >> You have to explicitly enable it in mysql: >> >> add "large-pages" to the [mysqld] section of my.cnf >=20 > what actually this option do in mysql? >=20 In my words i would say "It enables mysql to use super-pages/large-pages"= =2E The complete documentation is here https://dev.mysql.com/doc/refman/5.5/en/large-page-support.html Florian --------------enig1410076917C1F794CF1D20BF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAk/J1o4ACgkQapo8P8lCvwnuKQCgi8JTqKAsHOCjXlutsVMENo5o WDQAnA54VgMFP3uh5ZAYiKlv/R6MffhJ =a5cB -----END PGP SIGNATURE----- --------------enig1410076917C1F794CF1D20BF-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 09:56:08 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CDE4106564A for ; Sat, 2 Jun 2012 09:56:08 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 14C8C8FC1B for ; Sat, 2 Jun 2012 09:56:07 +0000 (UTC) Received: by lbon10 with SMTP id n10so2831634lbo.13 for ; Sat, 02 Jun 2012 02:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=MwkydbuFVsNvwKZOQCdz4hSbkMVbFpAVGqOyMPY8KgE=; b=bHdhOAb2eRvEE5zPT04hWI7gNoi3N2im+vQ5KnUwEI3/JS99ySqEXrYDUoa3eJJ7Wk CDNM99N428LeGwplzLeveU/dR6I54trHgUKmN1udd8McREfVyNTTsSDaam+bHBU5CTM9 Xg4eQ+glXB6LytwMwOGgMCGT8qXiknZpQ9wk9cST7P9Y91Q/m3ZxDoZq6ZZINSRrsBRk BQ1DpUzU7dM9pG/29sboaBAI2NXOdZpWguaIN+qijoYadTDwM+RCifIpKKaA75trWHag 7j+oU+f9S9FfR2mDSwWzMALwScOGZL8QvpAwRl6bTvRbUU6W49b/exT/cAnXQSktUM/Z XC9A== Received: by 10.152.145.42 with SMTP id sr10mr6148050lab.16.1338630966734; Sat, 02 Jun 2012 02:56:06 -0700 (PDT) Received: from zont-osx.local (ppp95-165-140-253.pppoe.spdop.ru. [95.165.140.253]) by mx.google.com with ESMTPS id gi19sm7212491lab.16.2012.06.02.02.56.05 (version=SSLv3 cipher=OTHER); Sat, 02 Jun 2012 02:56:06 -0700 (PDT) Message-ID: <4FC9E334.4080702@zonov.org> Date: Sat, 02 Jun 2012 13:56:04 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Wojciech Puchar References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmuF266yKlrdRtu+4XAN1Jz9FX2KaUuh+regRBGQW+mldHjEoYjv91kn9z4c9TUmO2k1yJB Cc: freebsd-hackers@freebsd.org Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 09:56:08 -0000 On 6/1/12 12:19 PM, Wojciech Puchar wrote: > what tool and how can be used to display detailed map what exactly wired > memory on my system as it is far way too much (1.5GB out of 4GB RAM). > I think `vmstat -m' and `vmstat -z' can help you. > i do run 4 virtualboxes but one have 256MB RAM, the others 192 and when > i turn them off wired memory goes down right amount but still it is too > much used. > -- Andrey Zonov From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 10:29:17 2012 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 738C9106566B; Sat, 2 Jun 2012 10:29:17 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id CAFA28FC0C; Sat, 2 Jun 2012 10:29:16 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q52ATErU043384; Sat, 2 Jun 2012 12:29:14 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q52ATEcX043381; Sat, 2 Jun 2012 12:29:14 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 2 Jun 2012 12:29:14 +0200 (CEST) From: Wojciech Puchar To: Florian Smeets In-Reply-To: <4FC9D68D.60405@FreeBSD.org> Message-ID: References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> <4FC9D68D.60405@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 02 Jun 2012 12:29:14 +0200 (CEST) Cc: freebsd-hackers@FreeBSD.org, lev@FreeBSD.org, Ivan Voras Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 10:29:17 -0000 >> > > In my words i would say "It enables mysql to use super-pages/large-pages". i asked the question wrong. the right should be "how does it do". Because i am not aware about any user level interface in FreeBSD to explicitly request superpage mapping. > > The complete documentation is here > https://dev.mysql.com/doc/refman/5.5/en/large-page-support.html > > Florian > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 10:29:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 446051065693 for ; Sat, 2 Jun 2012 10:29:55 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id A97738FC18 for ; Sat, 2 Jun 2012 10:29:54 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q52ATqj1043405; Sat, 2 Jun 2012 12:29:52 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q52ATqQR043402; Sat, 2 Jun 2012 12:29:52 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 2 Jun 2012 12:29:52 +0200 (CEST) From: Wojciech Puchar To: Andrey Zonov In-Reply-To: <4FC9E334.4080702@zonov.org> Message-ID: References: <4FC9E334.4080702@zonov.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 02 Jun 2012 12:29:52 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 10:29:55 -0000 >> memory on my system as it is far way too much (1.5GB out of 4GB RAM). >> > > I think `vmstat -m' and `vmstat -z' can help you. yes it helped. thank you. the problem is that it doesn't display what virtualbox (and it's kernel addon) do. > >> i do run 4 virtualboxes but one have 256MB RAM, the others 192 and when >> i turn them off wired memory goes down right amount but still it is too >> much used. >> > > > -- > Andrey Zonov > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 10:49:22 2012 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 B06DE1065672; Sat, 2 Jun 2012 10:49:22 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 40FF78FC25; Sat, 2 Jun 2012 10:49:22 +0000 (UTC) Received: by yhgm50 with SMTP id m50so2632380yhg.13 for ; Sat, 02 Jun 2012 03:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=QCMJu3YgFR2tuAJhZ9+TB8qPM+cHSN6YGa7rnP6MjHM=; b=pjtQsRGK8CLDV0cP/s1XRNPjyUIlF37VZ6W47Nd3+7PnoPd3naVHBizTrjcEt+98zz T6L4hlKuvZBVl99/dTWLImauQdO0vKNiunkZ54MkItK6O0fLihQI7TvMdOc8YEevpncT +U+DQVncPbXxExXFqVTQ57n9NMuxNFJilVZoJOvDbq/hMkZB/RMB6hBKaBKIgQYogHWs rUE/2hqwPTq6+GgDIM73KZ+4i3Xi/6Ugdj5QbAqvAqoBfEoYEMHwl2w+9Po3fjLCd9jb POKL7EZtbZGbBWVfNGT/Up+bm4EFK4SSyevyPuWcYtamCWspMp7oUArbTsUiniDkEAcK 30xA== Received: by 10.236.181.229 with SMTP id l65mr1078093yhm.116.1338634161598; Sat, 02 Jun 2012 03:49:21 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.101.112.10 with HTTP; Sat, 2 Jun 2012 03:48:41 -0700 (PDT) In-Reply-To: References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> <4FC9D68D.60405@FreeBSD.org> From: Ivan Voras Date: Sat, 2 Jun 2012 12:48:41 +0200 X-Google-Sender-Auth: GgNuhwLgLeeXdIT7nqDsn9cqPmA Message-ID: To: Wojciech Puchar Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, Florian Smeets , lev@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 10:49:22 -0000 On 2 June 2012 12:29, Wojciech Puchar wrote: >>> >> >> In my words i would say "It enables mysql to use super-pages/large-pages". > > i asked the question wrong. the right should be "how does it do". Because i > am not aware about any user level interface in FreeBSD to explicitly request > superpage mapping. You are right, there isn't any. The code in mysqld.cc only works if HAVE_SOLARIS_LARGE_PAGES is defined: 3229 #endif /* HAVE_LARGE_PAGES */ 3230 #ifdef HAVE_SOLARIS_LARGE_PAGES 3231 #define LARGE_PAGESIZE (4*1024*1024) /* 4MB */ 3232 #define SUPER_LARGE_PAGESIZE (256*1024*1024) /* 256MB */ 3233 if (opt_large_pages) 3234 { ... 3278 } 3279 #endif /* HAVE_SOLARIS_LARGE_PAGES */ From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 11:18:00 2012 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 05E781065672; Sat, 2 Jun 2012 11:18:00 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5438FC19; Sat, 2 Jun 2012 11:17:58 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q52BHuOB044235; Sat, 2 Jun 2012 13:17:56 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q52BHutp044232; Sat, 2 Jun 2012 13:17:56 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 2 Jun 2012 13:17:56 +0200 (CEST) From: Wojciech Puchar To: Ivan Voras In-Reply-To: Message-ID: References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> <4FC9D68D.60405@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 02 Jun 2012 13:17:56 +0200 (CEST) Cc: freebsd-hackers@freebsd.org, Florian Smeets , lev@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 11:18:00 -0000 >> >> i asked the question wrong. the right should be "how does it do". Because i >> am not aware about any user level interface in FreeBSD to explicitly request >> superpage mapping. > > You are right, there isn't any. true. anyway there should be such interface to freebsd kernel. > > The code in mysqld.cc only works if HAVE_SOLARIS_LARGE_PAGES is defined: > > 3229 #endif /* HAVE_LARGE_PAGES */ > 3230 #ifdef HAVE_SOLARIS_LARGE_PAGES > 3231 #define LARGE_PAGESIZE (4*1024*1024) /* 4MB */ > 3232 #define SUPER_LARGE_PAGESIZE (256*1024*1024) /* 256MB */ > 3233 if (opt_large_pages) > 3234 { > > ... > > 3278 } > 3279 #endif /* HAVE_SOLARIS_LARGE_PAGES */ > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 11:49:22 2012 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 1EE091065672; Sat, 2 Jun 2012 11:49:21 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9EB5C8FC0C; Sat, 2 Jun 2012 11:49:21 +0000 (UTC) Received: from nibbler-wlan.fritz.box (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q52BnIm9046724; Sat, 2 Jun 2012 11:49:20 GMT (envelope-from flo@FreeBSD.org) Message-ID: <4FC9FDBE.6080401@FreeBSD.org> Date: Sat, 02 Jun 2012 13:49:18 +0200 From: Florian Smeets User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120601 Thunderbird/14.0a2 MIME-Version: 1.0 To: Ivan Voras References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> <4FC9D68D.60405@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5a1pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig66878B3AE858439F8C24EAC8" Cc: Wojciech Puchar , lev@FreeBSD.org, freebsd-hackers@FreeBSD.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 11:49:22 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig66878B3AE858439F8C24EAC8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02.06.12 12:48, Ivan Voras wrote: > On 2 June 2012 12:29, Wojciech Puchar = wrote: >>>> >>> >>> In my words i would say "It enables mysql to use super-pages/large-pa= ges". >> >> i asked the question wrong. the right should be "how does it do". Beca= use i >> am not aware about any user level interface in FreeBSD to explicitly r= equest >> superpage mapping. >=20 > You are right, there isn't any. >=20 > The code in mysqld.cc only works if HAVE_SOLARIS_LARGE_PAGES is defined= : >=20 > 3229 #endif /* HAVE_LARGE_PAGES */ > 3230 #ifdef HAVE_SOLARIS_LARGE_PAGES > 3231 #define LARGE_PAGESIZE (4*1024*1024) /* 4MB */ > 3232 #define SUPER_LARGE_PAGESIZE (256*1024*1024) /* 256MB */ > 3233 if (opt_large_pages) > 3234 { >=20 > ... >=20 > 3278 } > 3279 #endif /* HAVE_SOLARIS_LARGE_PAGES */ >=20 As far as i understand it does at least enable usage of pages up to 4MB, perhaps someone should teach mysql about the FreeBSD's limits? If you look at the output i sent, it certainly changes from using no superpage mappings at all to using them to some degree, if you script can be trusted :) Florian --------------enig66878B3AE858439F8C24EAC8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAk/J/b4ACgkQapo8P8lCvwmWPACfWQh4jQ+1YxjrI+gnlxPz4gHf BKYAniiyuZ6mSLFSEPKhAarxyZxhafNo =K5bJ -----END PGP SIGNATURE----- --------------enig66878B3AE858439F8C24EAC8-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 16:20:42 2012 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 F2855106564A for ; Sat, 2 Jun 2012 16:20:42 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 6128C8FC19 for ; Sat, 2 Jun 2012 16:20:42 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q52GKcHk018324; Sat, 2 Jun 2012 18:20:38 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q52GKcUw018321; Sat, 2 Jun 2012 18:20:38 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 2 Jun 2012 18:20:38 +0200 (CEST) From: Wojciech Puchar To: Andrey Zonov In-Reply-To: <4FC9E334.4080702@zonov.org> Message-ID: References: <4FC9E334.4080702@zonov.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 02 Jun 2012 18:20:39 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 16:20:43 -0000 the problem is that these result does not sum up to value of "wired" reported by top. On Sat, 2 Jun 2012, Andrey Zonov wrote: > On 6/1/12 12:19 PM, Wojciech Puchar wrote: >> what tool and how can be used to display detailed map what exactly wired >> memory on my system as it is far way too much (1.5GB out of 4GB RAM). >> > > I think `vmstat -m' and `vmstat -z' can help you. > >> i do run 4 virtualboxes but one have 256MB RAM, the others 192 and when >> i turn them off wired memory goes down right amount but still it is too >> much used. >> > > > -- > Andrey Zonov > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 18:15:43 2012 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 121F81065677 for ; Sat, 2 Jun 2012 18:15:43 +0000 (UTC) (envelope-from e.durso@live.com) Received: from dub0-omc2-s6.dub0.hotmail.com (dub0-omc2-s6.dub0.hotmail.com [157.55.1.145]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8828FC08 for ; Sat, 2 Jun 2012 18:15:42 +0000 (UTC) Received: from DUB116-W41 ([157.55.1.136]) by dub0-omc2-s6.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 2 Jun 2012 11:14:35 -0700 Message-ID: X-Originating-IP: [2.231.157.89] From: enrico d'urso To: Date: Sat, 2 Jun 2012 20:14:34 +0200 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 02 Jun 2012 18:14:35.0000 (UTC) FILETIME=[9088F780:01CD40EB] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: [Hash function Ipv4] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 18:15:43 -0000 Hi=2C I'm looking for an Hash function for Ipv4 addresses. What are good ones? Bye Enrico = From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 20:01:38 2012 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 0BC2D106564A for ; Sat, 2 Jun 2012 20:01:38 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id CC87C8FC08 for ; Sat, 2 Jun 2012 20:01:34 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q52K1RKF023908 for ; Sat, 2 Jun 2012 22:01:28 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q52K1QDD023905 for ; Sat, 2 Jun 2012 22:01:27 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 2 Jun 2012 22:01:26 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 02 Jun 2012 22:01:28 +0200 (CEST) Subject: geli conversion X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 20:01:38 -0000 is it possible to convert geli encrypted device using keyfile to password only? possibly i miss something in manual. thanks. From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 19:01:10 2012 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 1E43A1065672 for ; Sat, 2 Jun 2012 19:01:10 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id CE5948FC12 for ; Sat, 2 Jun 2012 19:01:09 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 9DBC613F68; Sat, 2 Jun 2012 19:01:02 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id q52J10vP012213; Sat, 2 Jun 2012 19:01:02 GMT (envelope-from phk@phk.freebsd.dk) To: "enrico d'urso" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 02 Jun 2012 20:14:34 +0200." Content-Type: text/plain; charset=ISO-8859-1 Date: Sat, 02 Jun 2012 19:01:00 +0000 Message-ID: <12212.1338663660@critter.freebsd.dk> X-Mailman-Approved-At: Sat, 02 Jun 2012 20:40:05 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: [Hash function Ipv4] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 19:01:10 -0000 In message , enrico d'urso writes: > >I'm looking for an Hash function for Ipv4 addresses. > >What are good ones? They are generally very hard to hash well, for all sorts of reasons related to how we use them. One way that used to work reasonably well for me: uint32_t ipv4, h; h = ipv4 % HASH; ipv4 /= HASH; h ^= ipv4 % HASH; h ^= ipv4 / HASH; Where HASH was a prime number near to 2^11 However, I cannot rule out that the good results I saw was a result if RIPE's allocation policy at the time. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 20:38:22 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2840E1065670 for ; Sat, 2 Jun 2012 20:38:22 +0000 (UTC) (envelope-from fk@fabiankeil.de) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.29.7]) by mx1.freebsd.org (Postfix) with ESMTP id D80C48FC0C for ; Sat, 2 Jun 2012 20:38:21 +0000 (UTC) Received: from [78.35.188.47] (helo=fabiankeil.de) by smtprelay03.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Sav5E-0002lK-NG; Sat, 02 Jun 2012 22:38:00 +0200 Date: Sat, 2 Jun 2012 22:37:44 +0200 From: Fabian Keil To: Wojciech Puchar Message-ID: <20120602223744.4a54734e.fk@fabiankeil.de> In-Reply-To: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/MqBd4q_mCssdI1A132SrGWJ"; protocol="application/pgp-signature" X-Df-Sender: MTgwOTA5 X-Mailman-Approved-At: Sat, 02 Jun 2012 20:51:05 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: geli conversion X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 20:38:22 -0000 --Sig_/MqBd4q_mCssdI1A132SrGWJ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Wojciech Puchar wrote: > is it possible to convert geli encrypted device using keyfile to password= =20 > only? > > possibly i miss something in manual. thanks. The geli(8) action you are looking for is called setkey. Fabian --Sig_/MqBd4q_mCssdI1A132SrGWJ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/KeZwACgkQSMVSH78upWM15gCgghUGQpfoIduQgDGmhmYsl2J8 Xa0AnjLyzPWyOVEJY0e1DewkPAa28Yuw =8bIb -----END PGP SIGNATURE----- --Sig_/MqBd4q_mCssdI1A132SrGWJ-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 2 23:34:21 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB935106564A for ; Sat, 2 Jun 2012 23:34:21 +0000 (UTC) (envelope-from bjk@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 793B38FC0A for ; Sat, 2 Jun 2012 23:34:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q52NYLto001916 for ; Sat, 2 Jun 2012 23:34:21 GMT (envelope-from bjk@freebsd.org) Received: from localhost (bjk@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) with ESMTP id q52NYLe8001913 for ; Sat, 2 Jun 2012 23:34:21 GMT (envelope-from bjk@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bjk owned process doing -bs Date: Sat, 2 Jun 2012 23:34:21 +0000 (UTC) From: Benjamin Kaduk To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: namecache documentation and locking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 02 Jun 2012 23:34:21 -0000 Hi all, My colleague recently pointed out to me that I was calling vgone() when I probably wanted to be using cache_purge() (as is done for implementations of this OS-specific function in other BSDs [1]). This caused me to take a look at the namecache functions and find not very much documentation of their use. I see that NetBSD has had a namecache.9 man page since 2001 [2], and their actual code shares its origin from 4.2 BSD with ours ... but our vfs_cache.c is at (CVS) revision 1.181 versus NetBSD's 1.88, and there are at least superficial differences between the two. Is there a summary of the design/implementation somewhere that I could use as a reference, or can someone send one here? I would like to come up with a namecache.9 for FreeBSD's implementation. The particular question which promped my investigation is for the locking around cache_purge(); I was not immediately able to tell from looking at other consumers whether the vnode lock needs to or should be held around such calls. Looking at the implementation of some of the other namecache functions makes it seem that the lock order is vnode lock then namecache lock, which would suggest that holding the vnode lock across cache_purge would be okay, but I would like some confirmation before I use and document it as such. Thanks, Ben Kaduk [1] http://git.openafs.org/?p=openafs.git;a=blob;f=src/afs/FBSD/osi_vm.c;h=072142d7991c0012339fe15eee7a474ac8db4a13;hb=HEAD#l115 http://git.openafs.org/?p=openafs.git;a=blob;f=src/afs/NBSD/osi_vm.c;h=5cc2beb3fa3772a25788205d1deb208a9113ef4e;hb=HEAD#l59 http://git.openafs.org/?p=openafs.git;a=blob;f=src/afs/OBSD/osi_vm.c;h=737b742310d3649ffbcea0f23f059ee761d638d2;hb=HEAD#l57 http://git.openafs.org/?p=openafs.git;a=blob;f=src/afs/DARWIN/osi_vm.c;h=805cb38f0c17c6c83d9abda649b946adddef1c98;hb=HEAD#l51 [2] http://netbsd.gw.com/cgi-bin/man-cgi?namecache++NetBSD-current http://cvsweb.netbsd.org/bsdweb.cgi/src/share/man/man9/namecache.9?only_with_tag=MAIN