From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 5 05:00:12 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94035106566B; Sun, 5 Dec 2010 05:00:12 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id E7EEB8FC08; Sun, 5 Dec 2010 05:00:11 +0000 (UTC) Received: by wwf26 with SMTP id 26so6682892wwf.31 for ; Sat, 04 Dec 2010 21:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=CiLB7RYC6fJY7usCL9Mo/G5qU3UvOdpeErV3qOgjDrs=; b=mseZX+5lViVcSoxz7a7M1a0hTwqe+dM4SQQMCKhG+ZaOV/BFjc2i/jNJt2axL9dJk5 acNxQxBsDuGT6bKvuhStKcq2DunfJkGnXOtdFiYSqx7+Cge+qfdkwfn4baJzDZ6LpgCP 5GlcnpYQSdHVeVJexMsph/NXaVKn3DpAO/row= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JdP1rB7sTdjgLeY0OsP+/dh+i/XsKrDpvWju+j980mx1p+fU0RqoK/r0picyIz/9Cn UUoaLS50hBDTuBISwwgH/NJiVLiHGxHwODJf3WY5HlSGCQbijhgtap3RfueVdkxiQLC5 CXLuaEDMV8NlHVIRc6zXDDZyjPtyKhDO/YDfo= MIME-Version: 1.0 Received: by 10.216.93.9 with SMTP id k9mr3321925wef.89.1291525210342; Sat, 04 Dec 2010 21:00:10 -0800 (PST) Received: by 10.216.12.80 with HTTP; Sat, 4 Dec 2010 21:00:09 -0800 (PST) In-Reply-To: References: <4CFAA579.1010701@freebsd.org> Date: Sat, 4 Dec 2010 23:00:09 -0600 Message-ID: From: Brandon Gooch To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Artem Belevich Subject: Re: DTrace: Sending ^C while running script produces no output X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 05 Dec 2010 05:00:12 -0000 On Sat, Dec 4, 2010 at 3:27 PM, Brandon Gooch wrote: > On Sat, Dec 4, 2010 at 2:32 PM, Andriy Gapon wrote: >> on 03/12/2010 07:20 Brandon Gooch said the following: >>> I've been tinkering with DTrace a bit, and I've notice something >>> peculiar on each system I've tried it on. >>> >>> Sending ^C from the keyboard in the terminal (console, XTerm, Konsole) >>> produces no output [1]. >> >> Can you ktrace the dtrace process? >> I wonder, could it be that SIGINT from ^C is somehow delivered twice?.. > > I'll give it a shot in just a bit. I think you are correct, see below. > >>> For example, while trying out a one-liner (from >>> http://www.brendangregg.com/DTrace/dtrace_oneliners.txt): >>> >>> brandon@d820:~$ sudo dtrace -n 'syscall:::entry { @num[execname] =3D co= unt(); }' >>> dtrace: description 'syscall:::entry ' matched 514 probes >>> ^C >> >> BTW, sudo might play a role here... =A0Just a thought. > > I could see that for sure. I can't believe I hadn't thought of that > right off the bat, but then again I tested while logged in as root > from the console -- I think :/ > > Human memory is unreliable y'know... You were absolutely on to it -- sudo appears to be the culprit here. I ktrace'd both an attempt using sudo and not using sudo (as root). Snippet of ktrace output when running the aforementioned dtrace command as root, which works as expected: 8804 initial thread PSIG SIGINT caught handler=3D0x80065d0d0 mask=3D0x0 = code=3D0x0 8804 initial thread CALL sigprocmask(SIG_SETMASK,0x7fffffffe06c,0) 8804 initial thread RET sigprocmask 0 8804 initial thread CALL sigreturn(0x7fffffffdc90) 8804 initial thread RET sigreturn JUSTRETURN 8804 initial thread CALL fstat(0x1,0x7fffffffe000) 8804 initial thread STRU struct stat {dev=3D67174144, ino=3D120, mode=3D= crw--w---- , nlink=3D1, uid=3D1001, gid=3D4, rdev=3D120, atime=3D1291504111, stime=3D1= 291504111, ctime=3D 1291504111, birthtime=3D-1, size=3D0, blksize=3D4096, blocks=3D0, flags=3D0= x0 } 8804 initial thread RET fstat 0 8804 initial thread CALL ioctl(0x1,TIOCGETA,0x7fffffffe050) 8804 initial thread RET ioctl 0 8804 initial thread CALL write(0x1,0x8029b6000,0x1) 8804 initial thread GIO fd 1 wrote 1 byte " Snippet of ktrace output when running the aforementioned dtrace command with sudo, which produces no output: 4527 initial thread PSIG SIGINT caught handler=3D0x80065d0d0 mask=3D0x0 = code=3D0x0 4527 initial thread CALL sigprocmask(SIG_SETMASK,0x7fffffffe22c,0) 4527 initial thread RET sigprocmask 0 4527 initial thread CALL sigreturn(0x7fffffffde50) 4527 initial thread RET sigreturn JUSTRETURN 4527 initial thread PSIG SIGINT caught handler=3D0x80065d0d0 mask=3D0x0 = code=3D0x0 4527 initial thread CALL sigprocmask(SIG_SETMASK,0x7fffffffe22c,0) 4527 initial thread RET sigprocmask 0 4527 initial thread CALL sigreturn(0x7fffffffde50) 4527 initial thread RET sigreturn JUSTRETURN 4527 initial thread PSIG SIGINT caught handler=3D0x80065d0d0 mask=3D0x0 = code=3D0x0 4527 initial thread CALL sigprocmask(SIG_SETMASK,0x7fffffffe22c,0) 4527 initial thread RET sigprocmask 0 4527 initial thread CALL sigreturn(0x7fffffffde50) 4527 initial thread RET sigreturn JUSTRETURN 4527 initial thread CALL fstat(0x1,0x7fffffffe1c0) 4527 initial thread STRU struct stat {dev=3D67174144, ino=3D128, mode=3D= crw--w---- , nlink=3D1, uid=3D1001, gid=3D4, rdev=3D128, atime=3D1291523109, stime=3D1= 291523110, ctime=3D 1291523110, birthtime=3D-1, size=3D0, blksize=3D4096, blocks=3D0, flags=3D0= x0 } 4527 initial thread RET fstat 0 4527 initial thread CALL ioctl(0x1,TIOCGETA,0x7fffffffe210) 4527 initial thread RET ioctl 0 4527 initial thread CALL write(0x1,0x8029b6000,0x1) 4527 initial thread GIO fd 1 wrote 1 byte Well, I'm glad to finally get to the bottom of this, and I want to apologize for the noise, but I think this is still a "gotcha" for new DTrace users, and I hope it can be noted somewhere (perhaps the DTrace sections on the FreeBSD wiki). -Brandon From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 6 08:31:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376701065670 for ; Mon, 6 Dec 2010 08:31:31 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ew0-f51.google.com (mail-ew0-f51.google.com [209.85.215.51]) by mx1.freebsd.org (Postfix) with ESMTP id BACAA8FC14 for ; Mon, 6 Dec 2010 08:31:30 +0000 (UTC) Received: by ewy19 with SMTP id 19so8868757ewy.10 for ; Mon, 06 Dec 2010 00:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=D8xvxxeG6r+74OjmuxwdvmvBS3u0sx8W3xshnsXApls=; b=irY6CVBaNXhtkYoSra43jt0RnCtxgU7orPaWPE4Zj6CQPyFgJFRPqNjmq6iVk3LbGg eVTHibHedPpNeLw0IvBqLIgg5Z2LeQPw9Y0FT39zUT7z+WhchRJXfKCx9D1uLfsA22fj 3PcR6dPDeLEwwUBl5sdDrLY0gVqwEfFOrJr7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=sNj8C9QA25sds3H3GQJ2I9I3A9R2ubVPV3jR+zk+X3tiDmnp4cwY1R1n1MwJVuaW/H Bb//2uKdxfvC+21h+xKCY3L1+Ht6Xz1oY+Q44vCwPf2P7pKpgGzWeZmDM7rDBEalY6mP GG4XJttiO9kGERwMAt9TbDVtlle7cmyEWWBF4= MIME-Version: 1.0 Received: by 10.213.10.2 with SMTP id n2mr774239ebn.85.1291624289030; Mon, 06 Dec 2010 00:31:29 -0800 (PST) Received: by 10.213.30.15 with HTTP; Mon, 6 Dec 2010 00:31:28 -0800 (PST) In-Reply-To: <20101206073305.GK78594@e.0x20.net> References: <4CFA284A.2050501@gmx.de> <20101206073305.GK78594@e.0x20.net> Date: Mon, 6 Dec 2010 10:31:28 +0200 Message-ID: From: Marin Atanasov Nikolov To: Lars Engels Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Matthias Andree Subject: Re: [PATCH] Add HISTORY to strlen(3) and strstr(3) man pages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Dec 2010 08:31:31 -0000 On Mon, Dec 6, 2010 at 9:33 AM, Lars Engels wrote: > On Sat, Dec 04, 2010 at 06:00:02PM +0200, Marin Atanasov Nikolov wrote: >> On Sat, Dec 4, 2010 at 1:38 PM, Matthias Andree wrote: >> > Am 04.12.2010 12:33, schrieb Marin Atanasov Nikolov: >> >> Hello, >> >> >> >> Could someone review the attached patches and possibly commit them? >> >> >> >> The patches add HISTORY for the strstr(), strnstr(), strlen() and >> >> strnlen() functions. >> >> >> >> Thanks, >> >> Marin >> > >> > I find it hard to believe the versions especially for strstr and strlen. >> >> You are so right about that :) >> >> That must be one those copy-paste mistakes :) >> >> I've attached the new patches. >> >> Regards, >> Marin > Hi, > It should be "FreeBSD 8.0" not "8.0" like in the other manpages. > .Fx is a FreeBSD macro, so ".Fx 8.0 ." is "FreeBSD 8.0". Or I have misunderstood something? Regards, Marin -- Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/ From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 6 07:33:01 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55D641065670 for ; Mon, 6 Dec 2010 07:33:01 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mx1.freebsd.org (Postfix) with ESMTP id 193358FC16 for ; Mon, 6 Dec 2010 07:33:00 +0000 (UTC) Received: by mail.0x20.net (Postfix, from userid 1002) id 316EA3A601; Mon, 6 Dec 2010 08:33:06 +0100 (CET) Date: Mon, 6 Dec 2010 08:33:06 +0100 From: Lars Engels To: Marin Atanasov Nikolov Message-ID: <20101206073305.GK78594@e.0x20.net> References: <4CFA284A.2050501@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J2pR2RtFp0tAjF3C" Content-Disposition: inline In-Reply-To: X-Editor: VIM - Vi IMproved 7.2 X-Operation-System: FreeBSD 5.5-RELEASE-p19 User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Mon, 06 Dec 2010 12:10:47 +0000 Cc: freebsd-hackers@freebsd.org, Matthias Andree Subject: Re: [PATCH] Add HISTORY to strlen(3) and strstr(3) man pages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Dec 2010 07:33:01 -0000 --J2pR2RtFp0tAjF3C Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 04, 2010 at 06:00:02PM +0200, Marin Atanasov Nikolov wrote: > On Sat, Dec 4, 2010 at 1:38 PM, Matthias Andree = wrote: > > Am 04.12.2010 12:33, schrieb Marin Atanasov Nikolov: > >> Hello, > >> > >> Could someone review the attached patches and possibly commit them? > >> > >> The patches add HISTORY for the strstr(), strnstr(), strlen() and > >> strnlen() functions. > >> > >> Thanks, > >> Marin > > > > I find it hard to believe the versions especially for strstr and strlen. >=20 > You are so right about that :) >=20 > That must be one those copy-paste mistakes :) >=20 > I've attached the new patches. >=20 > Regards, > Marin It should be "FreeBSD 8.0" not "8.0" like in the other manpages. --J2pR2RtFp0tAjF3C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkz8kbEACgkQKc512sD3afiKogCeLndcI0fstEXRZzNBrJXPQSdz BhYAoIsAhNtY+27MZirNmkgRbrGGNKCp =StKB -----END PGP SIGNATURE----- --J2pR2RtFp0tAjF3C-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 6 14:05:57 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BE071065679 for ; Mon, 6 Dec 2010 14:05:57 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mx1.freebsd.org (Postfix) with ESMTP id 353AA8FC08 for ; Mon, 6 Dec 2010 14:05:56 +0000 (UTC) Received: by mail.0x20.net (Postfix, from userid 1002) id 132EF3A581; Mon, 6 Dec 2010 15:06:02 +0100 (CET) Date: Mon, 6 Dec 2010 15:06:02 +0100 From: Lars Engels To: Marin Atanasov Nikolov Message-ID: <20101206140601.GC78594@e.0x20.net> References: <4CFA284A.2050501@gmx.de> <20101206073305.GK78594@e.0x20.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HwnjeXAdSoek43pS" Content-Disposition: inline In-Reply-To: X-Editor: VIM - Vi IMproved 7.2 X-Operation-System: FreeBSD 5.5-RELEASE-p19 User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Mon, 06 Dec 2010 15:09:50 +0000 Cc: freebsd-hackers@freebsd.org, Matthias Andree Subject: Re: [PATCH] Add HISTORY to strlen(3) and strstr(3) man pages X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Dec 2010 14:05:57 -0000 --HwnjeXAdSoek43pS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 06, 2010 at 10:31:28AM +0200, Marin Atanasov Nikolov wrote: > On Mon, Dec 6, 2010 at 9:33 AM, Lars Engels wrote: > > On Sat, Dec 04, 2010 at 06:00:02PM +0200, Marin Atanasov Nikolov wrote: > >> On Sat, Dec 4, 2010 at 1:38 PM, Matthias Andree wrote: > >> > Am 04.12.2010 12:33, schrieb Marin Atanasov Nikolov: > >> >> Hello, > >> >> > >> >> Could someone review the attached patches and possibly commit them? > >> >> > >> >> The patches add HISTORY for the strstr(), strnstr(), strlen() and > >> >> strnlen() functions. > >> >> > >> >> Thanks, > >> >> Marin > >> > > >> > I find it hard to believe the versions especially for strstr and str= len. > >> > >> You are so right about that :) > >> > >> That must be one those copy-paste mistakes :) > >> > >> I've attached the new patches. > >> > >> Regards, > >> Marin > > >=20 > Hi, >=20 > > It should be "FreeBSD 8.0" not "8.0" like in the other manpages. > > >=20 > .Fx is a FreeBSD macro, so ".Fx 8.0 ." is "FreeBSD 8.0". >=20 > Or I have misunderstood something? >=20 > Regards, > Marin Uh, yes. Sorry. :) --HwnjeXAdSoek43pS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkz87ckACgkQKc512sD3afj6pACgu/Yb3PALtB5fVJy4+ZgOqkrP XVEAn1ix2bfSnRyeGIzFWmNoY7vmr3IX =+IwF -----END PGP SIGNATURE----- --HwnjeXAdSoek43pS-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 6 16:18:52 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99AEF106566C; Mon, 6 Dec 2010 16:18:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6D5B48FC12; Mon, 6 Dec 2010 16:18:52 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 24E7B46B03; Mon, 6 Dec 2010 11:18:52 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 508AD8A01D; Mon, 6 Dec 2010 11:18:51 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 6 Dec 2010 09:45:45 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <4CF92186.1010209@freebsd.org> In-Reply-To: <4CF92186.1010209@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201012060945.45604.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 06 Dec 2010 11:18:51 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Andriy Gapon Subject: Re: small dtrace patch for review X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Dec 2010 16:18:52 -0000 On Friday, December 03, 2010 11:57:42 am Andriy Gapon wrote: > > The patch is not about DTrace functionality, but about infrastructure use in one > particular place. > http://people.freebsd.org/~avg/dtrace_gethrtime_init.diff > I believe that sched_pin() is need there to make sure that "host"/base CPU stays > the same for all calls to smp_rendezvous_cpus(). > The pc_cpumask should just be a cosmetic change. Looks good to me. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 6 16:18:53 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFBA21065672; Mon, 6 Dec 2010 16:18:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A14E78FC13; Mon, 6 Dec 2010 16:18:53 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5470E46B2E; Mon, 6 Dec 2010 11:18:53 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8AE8A8A027; Mon, 6 Dec 2010 11:18:52 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 6 Dec 2010 09:48:54 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012060948.54126.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 06 Dec 2010 11:18:52 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: mdf@freebsd.org Subject: Re: coretemp(4)/amdtemp(4) and sysctl nodes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Dec 2010 16:18:53 -0000 On Friday, December 03, 2010 1:05:02 pm mdf@freebsd.org wrote: > There are very few uses in FreeBSD mainline code of > sysctl_remove_oid(), and I was looking at potentially removing them. > However, the use in coretemp/amdtemp has me slightly stumped. > > Each device provides a device_get_sysctl_ctx sysctl_ctx that is > automatically cleaned up when the device goes away. Yet the sysctl > nodes for both amdtemp and coretemp use the context of other devices, > rather than their own. I can't quite figure out why, though the two > are slightly different enough that they may have different reasons. > > For coretmp(4) I don't see how the parent device can be removed first, > since we are a child device. So from my understanding it makes no > sense to have an explicit sysctl_remove_oid() and attach in the > parent's sysctl_ctx. Well, you would want 'kldunload coretemp.ko' to remove the sysctl node even though the parent device is still around. I suspect the same case is true for amdtemp. Probably these drivers should use a separate sysctl context. I'm not sure how the sysctl code handles removing a node that has an active context though. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 6 16:56:55 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119B3106566C for ; Mon, 6 Dec 2010 16:56:55 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id BB1B78FC0C for ; Mon, 6 Dec 2010 16:56:54 +0000 (UTC) Received: by qwj9 with SMTP id 9so6818070qwj.13 for ; Mon, 06 Dec 2010 08:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=XacoOH8RHRAnKUpfQehz4B6fkebIv0UBUuQwQTYYGTQ=; b=NUvXFXiTuseWsMF3M+oWQ0U/R1K1D/i65EVYzW0L0ZopIuAiAMOtXINa6JmdcGtcrl kRlr5zv0H3ApEqvhKCKasMnRfQSNbYRXU+uXkC+HTR7DP9amHRFlyApk9tGEQ3pGjUIm Mxw/+VxK/nN7HPIq9i+UOEfVhKY6zr7r5W3cE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=D+Qd112LOTb5dQghGq/MqbxysyYcD2n9ca0bAAz35kTX47Fe5WNdNA2TuaIGLrgomW LQyXyeIBQcy7/qqtziYzxx260BE4EBJZ2VVI77ivbJAkM7ZxStOjaIvQmjL70Az3hjlY JsqKIhKVRM7RltyuOJydHClu7u6wEStvYIizg= MIME-Version: 1.0 Received: by 10.224.80.198 with SMTP id u6mr4799781qak.113.1291654613502; Mon, 06 Dec 2010 08:56:53 -0800 (PST) Sender: artemb@gmail.com Received: by 10.220.177.195 with HTTP; Mon, 6 Dec 2010 08:56:53 -0800 (PST) Date: Mon, 6 Dec 2010 08:56:53 -0800 X-Google-Sender-Auth: dB93XpywQM_rKEsu9UBhcZzMa-Y Message-ID: From: Artem Belevich To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Review needed. Re: kern/152822: [patch] DTrace: syscall provider for compat/freebsd32 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 06 Dec 2010 16:56:55 -0000 Hi, Could someone review the patch in the PR? It adds DTrace syscall32 provider that allows syscall probing for 32-bit binaries running under emulation. http://www.freebsd.org/cgi/query-pr.cgi?pr=3D152822 Thanks, --Artem ---------- Forwarded message ---------- From: Artem Belevich Date: Fri, Dec 3, 2010 at 9:30 PM Subject: Fwd: kern/152822: [patch] DTrace: syscall provider for compat/free= bsd32 To: Andriy Gapon Andriy, I've submitted a PR with the partial patch included. freebsd32_systrace_args.c will have to be regenerated with "make sysent" If you think it may be useful, feel free to commit it. --Artem ---------- Forwarded message ---------- From: =A0 Date: Fri, Dec 3, 2010 at 9:20 PM Subject: Re: kern/152822: [patch] DTrace: syscall provider for compat/freeb= sd32 To: Artem Belevich Thank you very much for your problem report. It has the internal identification `kern/152822'. The individual assigned to look at your report is: freebsd-bugs. You can access the state of your problem report at any time via this link: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D152822 >Category: =A0 =A0 =A0 kern >Responsible: =A0 =A0freebsd-bugs >Synopsis: =A0 =A0 =A0 [patch] DTrace: syscall provider for compat/freebsd3= 2 >Arrival-Date: =A0 Sat Dec 04 05:20:10 UTC 2010 From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 7 17:58:46 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB815106564A for ; Tue, 7 Dec 2010 17:58:46 +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 1FC348FC0A for ; Tue, 7 Dec 2010 17:58:45 +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 TAA06391 for ; Tue, 07 Dec 2010 19:58:44 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4CFE75D3.4050009@freebsd.org> Date: Tue, 07 Dec 2010 19:58:43 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: atomic_set_xxx(&x, 0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 07 Dec 2010 17:58:46 -0000 $ glimpse atomic_set_ | fgrep -w 0 /usr/src/sys/dev/arcmsr/arcmsr.c: atomic_set_int(&acb->srboutstandingcount, 0); /usr/src/sys/dev/arcmsr/arcmsr.c: atomic_set_int(&acb->srboutstandingcount, 0); /usr/src/sys/dev/jme/if_jme.c: atomic_set_int(&sc->jme_morework, 0); /usr/src/sys/dev/jme/if_jme.c: atomic_set_int(&sc->jme_morework, 0); /usr/src/sys/dev/ale/if_ale.c: atomic_set_int(&sc->ale_morework, 0); /usr/src/sys/mips/rmi/dev/xlr/rge.c: atomic_set_int(&(priv->frin_to_be_sent[i]), 0); /usr/src/sys/dev/drm/drm_irq.c: atomic_set_rel_32(&dev->vblank[i].count, 0); /usr/src/sys/dev/cxgb/ulp/tom/cxgb_tom.c: atomic_set_int(&t->tids_in_use, 0); I wonder if these are all bugs and atomic_store_xxx() was actually intended? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 7 18:02:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90AD31065670; Tue, 7 Dec 2010 18:02:39 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-gw0-f49.google.com (mail-gw0-f49.google.com [74.125.83.49]) by mx1.freebsd.org (Postfix) with ESMTP id 2EBF18FC15; Tue, 7 Dec 2010 18:02:38 +0000 (UTC) Received: by gwj20 with SMTP id 20so183104gwj.36 for ; Tue, 07 Dec 2010 10:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=CRvAgQjaZ0RvhXtsniNAlGZe4HRsERFykfTIKSS5XQQ=; b=b5CHC2z6dhlza6DyJmUWOIwiSCRkO9lkl8odaBJCeX/jJANWCoRVGtfPpKE+Evn/Dd /oMkjzMx6Uz0FxHT2kdABIpG539rw/QKxsjHxv9OLvZ5AH9pFzLS4ivd9KS8fm45QPCf fEUYcIVfWkqPQ0pM9Qyn1YlLWSS610ldFrhMU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=ZXPOtFjedztwDxpI+QP62FEeuH26tq7KinuBuvfrJPOxtitMXg2IbHh6MiPjVhaUM3 hPsaoRwTPpiSDYkEAViBBz4nutBvhHa4ea1t66DD34aEy+HdQ7QJE63vAsMI48j9RICT mpyjfBo4RAqJlY/okt9MZEkgMR23UPha+d0aA= MIME-Version: 1.0 Received: by 10.150.11.5 with SMTP id 5mr2224873ybk.430.1291744958360; Tue, 07 Dec 2010 10:02:38 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.236.109.45 with HTTP; Tue, 7 Dec 2010 10:02:38 -0800 (PST) In-Reply-To: <4CFE75D3.4050009@freebsd.org> References: <4CFE75D3.4050009@freebsd.org> Date: Tue, 7 Dec 2010 19:02:38 +0100 X-Google-Sender-Auth: 7VGc5oKXHh8OAA17iV6XO5eQFR8 Message-ID: From: Attilio Rao To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: atomic_set_xxx(&x, 0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 07 Dec 2010 18:02:39 -0000 2010/12/7 Andriy Gapon : > > $ glimpse atomic_set_ | fgrep -w 0 > /usr/src/sys/dev/arcmsr/arcmsr.c: =C2=A0 =C2=A0 =C2=A0 atomic_set_int(&ac= b->srboutstandingcount, 0); > /usr/src/sys/dev/arcmsr/arcmsr.c: =C2=A0 =C2=A0 =C2=A0 atomic_set_int(&ac= b->srboutstandingcount, 0); > /usr/src/sys/dev/jme/if_jme.c: =C2=A0atomic_set_int(&sc->jme_morework, 0)= ; > /usr/src/sys/dev/jme/if_jme.c: =C2=A0atomic_set_int(&sc->jme_morework, 0)= ; > /usr/src/sys/dev/ale/if_ale.c: =C2=A0atomic_set_int(&sc->ale_morework, 0)= ; > /usr/src/sys/mips/rmi/dev/xlr/rge.c: > atomic_set_int(&(priv->frin_to_be_sent[i]), 0); > /usr/src/sys/dev/drm/drm_irq.c: > atomic_set_rel_32(&dev->vblank[i].count, 0); > /usr/src/sys/dev/cxgb/ulp/tom/cxgb_tom.c: =C2=A0 =C2=A0 =C2=A0 atomic_set= _int(&t->tids_in_use, 0); > > I wonder if these are all bugs and atomic_store_xxx() was actually intend= ed? Besides, we assume store on the int boundary is implicitly atomic on all architectures on FreeBSD then, unless a memory barriers is needed, there is no need to use atomic_* in "store" cases. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 7 21:25:16 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A4FA106564A; Tue, 7 Dec 2010 21:25:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2CAFE8FC19; Tue, 7 Dec 2010 21:25:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B89D746B3B; Tue, 7 Dec 2010 16:25:15 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C818A8A009; Tue, 7 Dec 2010 16:25:14 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 7 Dec 2010 16:24:59 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <4CFE75D3.4050009@freebsd.org> In-Reply-To: <4CFE75D3.4050009@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201012071624.59648.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 07 Dec 2010 16:25:14 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Andriy Gapon Subject: Re: atomic_set_xxx(&x, 0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 07 Dec 2010 21:25:16 -0000 On Tuesday, December 07, 2010 12:58:43 pm Andriy Gapon wrote: > > $ glimpse atomic_set_ | fgrep -w 0 > /usr/src/sys/dev/arcmsr/arcmsr.c: atomic_set_int(&acb->srboutstandingcount, 0); > /usr/src/sys/dev/arcmsr/arcmsr.c: atomic_set_int(&acb->srboutstandingcount, 0); > /usr/src/sys/dev/jme/if_jme.c: atomic_set_int(&sc->jme_morework, 0); > /usr/src/sys/dev/jme/if_jme.c: atomic_set_int(&sc->jme_morework, 0); > /usr/src/sys/dev/ale/if_ale.c: atomic_set_int(&sc->ale_morework, 0); > /usr/src/sys/mips/rmi/dev/xlr/rge.c: > atomic_set_int(&(priv->frin_to_be_sent[i]), 0); > /usr/src/sys/dev/drm/drm_irq.c: > atomic_set_rel_32(&dev->vblank[i].count, 0); > /usr/src/sys/dev/cxgb/ulp/tom/cxgb_tom.c: atomic_set_int(&t->tids_in_use, 0); > > I wonder if these are all bugs and atomic_store_xxx() was actually intended? They are most likely bugs. You can probably ask yongari@ about jme(4) and ale(4) and np@ about cxgb(4). drm_irq looks to want to be an atomic_store_rel(). Not sure who to ask about arcmsr(4). I'm not sure arcmsr(4) really needs the atomic ops at all, but it should be using atomic_fetchadd() and atomic_readandclear() instead of some of the current atomic ops. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 03:55:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F2C3106566B for ; Wed, 8 Dec 2010 03:55:49 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 579AE8FC08 for ; Wed, 8 Dec 2010 03:55:49 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 510491FFC34; Wed, 8 Dec 2010 03:55:48 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 1A19D8457B; Wed, 8 Dec 2010 04:55:48 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: mdf@FreeBSD.org References: Date: Wed, 08 Dec 2010 04:55:47 +0100 In-Reply-To: (mdf@freebsd.org's message of "Fri, 3 Dec 2010 10:05:02 -0800") Message-ID: <86r5dsq5oc.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers Subject: Re: coretemp(4)/amdtemp(4) and sysctl nodes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 03:55:49 -0000 mdf@FreeBSD.org writes: > Each device provides a device_get_sysctl_ctx sysctl_ctx that is > automatically cleaned up when the device goes away. Yet the sysctl > nodes for both amdtemp and coretemp use the context of other devices, > rather than their own. I can't quite figure out why, though the two > are slightly different enough that they may have different reasons. I can't speak for amdtemp, but if coretemp used its own context instead of its parent's context, it would show up as dev.coretemp.X.temperature instead of dev.cpu.Y.temperature, where X is not necessarily equal to Y. Since, as you point out, the coretemp device is a child of the corresponding cpu device, there is no risk of orphaning the temperature OID. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 04:56:02 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16EC61065670 for ; Wed, 8 Dec 2010 04:56:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-iw0-f196.google.com (mail-iw0-f196.google.com [209.85.214.196]) by mx1.freebsd.org (Postfix) with ESMTP id CE1D88FC17 for ; Wed, 8 Dec 2010 04:56:01 +0000 (UTC) Received: by iwn36 with SMTP id 36so298073iwn.7 for ; Tue, 07 Dec 2010 20:56:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=vEk9zq2B2PIogcqF+2rJ9bN01av7j0nLFcggBlhUpuc=; b=FJt09sIAHie/dso8aGdcw4mFcD7LzniZt3CYi92P/GRndFxAoAUnIOZdRAA0EE1a8P ysnv6y0K15McHU/X2HoDb/D1uCM8XSGajk/H/v7KXz81scxPf4Ma5/3KnWCmxWDkLl4a /OFrUsXhT03/tPrqcK+FbX6TFCN+hzZJKBmyw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=hL7L2HSzIKDKDdf+cMPNfy/lQze1GhszEjmM3ZSVh1twdab8JLGDZJjnBXorL5Ab5c SILvEaqo+bjgl5e+0iCAnAiUkDOexIWd+Ma/ppd549mGLVa5gG2OJTCbQ9RI3mTn/QS/ 6rWGKof1GWgLq6KCnU8yc8jBcC40rnLyu/8bo= Received: by 10.42.174.138 with SMTP id v10mr43670icz.91.1291784160074; Tue, 07 Dec 2010 20:56:00 -0800 (PST) Received: from mark-desktop-bsd.mark-home (CPE00044b162033-CM00111ae61918.cpe.net.cable.rogers.com [99.236.163.170]) by mx.google.com with ESMTPS id d21sm166095ibg.9.2010.12.07.20.55.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Dec 2010 20:55:59 -0800 (PST) Date: Tue, 7 Dec 2010 23:58:23 -0500 From: Mark Johnston To: Dag-Erling Sm??rgrav Message-ID: <20101208045823.GB35615@mark-desktop-bsd.mark-home> References: <86r5dsq5oc.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86r5dsq5oc.fsf@ds4.des.no> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: mdf@FreeBSD.org, freebsd-hackers Subject: Re: coretemp(4)/amdtemp(4) and sysctl nodes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 04:56:02 -0000 On Wed, Dec 08, 2010 at 04:55:47AM +0100, Dag-Erling Sm??rgrav wrote: > I can't speak for amdtemp, but if coretemp used its own context instead > of its parent's context, it would show up as dev.coretemp.X.temperature > instead of dev.cpu.Y.temperature, where X is not necessarily equal to Y. Aren't the dev.cpu.X and the coretemp sysctls matched up by the use of SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)) in coretemp's sysctl definition? What does the sysctl context have to do with identifying the parent oid? -Mark From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 11:03:47 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D6151065695; Wed, 8 Dec 2010 11:03:47 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8FB8FC21; Wed, 8 Dec 2010 11:03:46 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 397101FFC33; Wed, 8 Dec 2010 11:03:46 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 191088452F; Wed, 8 Dec 2010 12:03:46 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark Johnston References: <86r5dsq5oc.fsf@ds4.des.no> <20101208045823.GB35615@mark-desktop-bsd.mark-home> Date: Wed, 08 Dec 2010 12:03:45 +0100 In-Reply-To: <20101208045823.GB35615@mark-desktop-bsd.mark-home> (Mark Johnston's message of "Tue, 7 Dec 2010 23:58:23 -0500") Message-ID: <86ipz4plv2.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: mdf@FreeBSD.org, freebsd-hackers Subject: Re: coretemp(4)/amdtemp(4) and sysctl nodes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 11:03:47 -0000 Mark Johnston writes: > Aren't the dev.cpu.X and the coretemp sysctls matched up by the use of > > SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)) > > in coretemp's sysctl definition? What does the sysctl context have to do > with identifying the parent oid? They're intended to go hand in hand. I would have preferred that contexts were actually tied to subtrees, but I had to play the ball I was given. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 22:45:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132CD1065670 for ; Wed, 8 Dec 2010 22:45:31 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail4.sea5.speakeasy.net (mail4.sea5.speakeasy.net [69.17.117.48]) by mx1.freebsd.org (Postfix) with ESMTP id E67528FC0C for ; Wed, 8 Dec 2010 22:45:30 +0000 (UTC) Received: (qmail 20398 invoked from network); 8 Dec 2010 22:18:49 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail4.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 8 Dec 2010 22:18:49 -0000 Message-ID: <4D000448.1050606@telenix.org> Date: Wed, 08 Dec 2010 17:18:48 -0500 From: Chuck Robey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100907 Thunderbird/3.1.2 MIME-Version: 1.0 To: FreeBSD-Hackers Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 22:45:31 -0000 I think, *maybe* that I have located what's been giving me all of those machine lockups. I was all ready to replace the mobo & cpu when I noticed a panic error of being out of open files. The message suggested just adding the ability for more open files, but if it's what I think it is, that would only mean it would take longer to panic, but it would still be tossing panics at me. What I want to see is a list of all Pids and how many open files there are associated with each Pid? And maybe a "ps ax" list, so I can associate an application with a pid. I would set things up so it would do this every 15 minutes, and it might just point me at my real problem here. Any idea what would be the best way to get a list of all openfiles versus each open pid? I would be happy to write up a python script to give me application versus count of open files list, if I could start with that files versus pids thing. From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 22:54:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB6AD106564A for ; Wed, 8 Dec 2010 22:54:58 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 96FBB8FC1F for ; Wed, 8 Dec 2010 22:54:58 +0000 (UTC) Received: by qwj9 with SMTP id 9so1827406qwj.13 for ; Wed, 08 Dec 2010 14:54:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8t1bnXqc5Bvt76jvaC5kzpjDKzucOoQx5hN92unOgnM=; b=az7T5vtvt9FqegSoJg5ytPAnkGVf0iduDCthzOcra1lIXxb+eo/T2WKjYY6l3b0rhd EjbF29cx0UFCuJr1xbXMn8KASPizZqXrQM18nlhZ4/XjRZ1AduAocNo7cvq1vNWnBpAA EL/+X7kAVypKIKT/nZLZXa22vPyZ4q8VLOGwQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=pfhbWwN3azlOaXe21MW5UmKAO7RCrbrukxfNxzG183np3VLwQqxKC/S7TEghUfQK9h Bxu//rJ0SuWQu+H2ojduEFoAc7Z8DgXn+f/EKe4ueelim5400TgNRbqAx3iopORZPRlN HZT4fnfAduRV/NfbHmZbC330bCjYM62dJhuII= MIME-Version: 1.0 Received: by 10.229.248.142 with SMTP id mg14mr7490504qcb.26.1291848897657; Wed, 08 Dec 2010 14:54:57 -0800 (PST) Received: by 10.229.91.135 with HTTP; Wed, 8 Dec 2010 14:54:57 -0800 (PST) In-Reply-To: <4D000448.1050606@telenix.org> References: <4D000448.1050606@telenix.org> Date: Wed, 8 Dec 2010 14:54:57 -0800 Message-ID: From: Matthew Fleming To: Chuck Robey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-Hackers Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 22:54:58 -0000 On Wed, Dec 8, 2010 at 2:18 PM, Chuck Robey wrote: > I think, *maybe* that I have located what's been giving me all of those > machine lockups. =A0I was all ready to replace the mobo & cpu when I noti= ced a > panic error of being out of open files. =A0The message suggested just add= ing > the ability for more open files, but if it's what I think it is, that wou= ld > only mean it would take longer to panic, but it would still be tossing > panics at me. > > What I want to see is a list of all Pids and how many open files there ar= e > associated with each Pid? =A0And maybe a "ps ax" list, so I can associate= an > application with a pid. =A0I would set things up so it would do this ever= y 15 > minutes, and it might just point me at my real problem here. > > Any idea what would be the best way to get a list of all openfiles versus > each open pid? =A0I would be happy to write up a python script to give me > application versus count of open files list, if I could start with that > files versus pids thing. This is what lsof is for. I believe there's one in ports, but I have never tried it. Cheers, matthew From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 23:01:54 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D02106566B for ; Wed, 8 Dec 2010 23:01:54 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 0ECD88FC08 for ; Wed, 8 Dec 2010 23:01:54 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 2AA09E7178; Wed, 8 Dec 2010 23:01:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=n2tHBMHU9xjV 8r57ic0muZEJ3Fo=; b=jjng9MjzumMLUSLB/8VWpRf6eIIoz3h+rH3I8LTCOV86 vglP5yIHvTslUuqEQdaS2aegOOjI7lDut6DqOAXEtFKcCS3g1poZ3sUGXtpc9Jeo Qao3qfYABaktPEFyhUbtiTftKhK+Kji0OY7EmeHvqIJ8zIOmGZvVpeW6x3FXbrU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=IEA0fM ZkTV1HJna6iOkvqbLzO9KkVvhrhFixugySWZXPIdILNF8BZ1YLiq2VNpBpHrvFxY RGIs2xyixqh8YymFeNH90uVQx/PvJG7EDoJzo1HGH1Nh4KllzcE5stz0n2sbLS85 8Q49bjxeCBt2BaFutvdjiw8YdRblBT8XTvgNo= Received: from core.draftnet (client-86-27-21-134.glfd.adsl.virginmedia.com [86.27.21.134]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 2510DE7177; Wed, 8 Dec 2010 23:01:51 +0000 (GMT) Date: Wed, 8 Dec 2010 23:01:39 +0000 From: Bruce Cran To: Matthew Fleming Message-ID: <20101208230139.2097c2e8@core.draftnet> In-Reply-To: References: <4D000448.1050606@telenix.org> X-Mailer: Claws Mail 3.7.7 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD-Hackers , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 23:01:54 -0000 On Wed, 8 Dec 2010 14:54:57 -0800 Matthew Fleming wrote: > This is what lsof is for. I believe there's one in ports, but I have > never tried it. Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 23:31:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C13A1065670 for ; Wed, 8 Dec 2010 23:31:07 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id F0AFA8FC0C for ; Wed, 8 Dec 2010 23:31:06 +0000 (UTC) Received: by wwi17 with SMTP id 17so2785277wwi.1 for ; Wed, 08 Dec 2010 15:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=rH59qED6vJV6wMVI2+gq2R/yy8VRBhWVBLDYcPqAp9A=; b=fSqoQYb/T0HWc4iymRiykix5aC+OMjByq02qMc/dgfOZTC/s93vktpZjisoAht0aKo Dmoc5eMzYFZSHGiw7B1uBcFhCNL8QFhFWdeko1qmDA/9Ivf9kCRH6BQVF94LhcZTNDB2 vNYb+Rb8/YLC0eH2PT23YNQ449saKqbsTJtIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=nOpxLOKU8sdsdTJ8kvzw6YT1nDjWLmSyB567asINOFYDyVsQcaRT0ThVcCalvAz7Kx oyHZvmopR8VXve+D8VdtGVegdcfL3FOtaToWidG0zq2/BL/Pn3QJBxfq0dtcE+ePUJgy JeDO0qzEB7A7tJqk+wdqja7T72JaYx5gGJg/8= Received: by 10.216.180.6 with SMTP id i6mr1223008wem.57.1291851065455; Wed, 08 Dec 2010 15:31:05 -0800 (PST) Received: from localhost ([74.3.165.39]) by mx.google.com with ESMTPS id l51sm575763wer.2.2010.12.08.15.31.02 (version=SSLv3 cipher=RC4-MD5); Wed, 08 Dec 2010 15:31:04 -0800 (PST) From: Anonymous To: Bruce Cran References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> Date: Thu, 09 Dec 2010 02:30:05 +0300 In-Reply-To: <20101208230139.2097c2e8@core.draftnet> (Bruce Cran's message of "Wed, 8 Dec 2010 23:01:39 +0000") Message-ID: <86k4jjg7wi.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: FreeBSD-Hackers , Matthew Fleming , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 23:31:07 -0000 Bruce Cran writes: > On Wed, 8 Dec 2010 14:54:57 -0800 > Matthew Fleming wrote: > >> This is what lsof is for. I believe there's one in ports, but I have >> never tried it. > > Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? procstat(1) can display actual files instead of inodes, e.g. $ procstat -f $(pgrep qemu) PID COMM FD T V FLAGS REF OFFSET PRO NAME 14300 qemu-system-x86_64 cwd v d -------- - - - /home/holo 14300 qemu-system-x86_64 root v d -------- - - - / 14300 qemu-system-x86_64 0 v c rw------ 6 3247126 - /dev/pts/4 14300 qemu-system-x86_64 1 v c rw------ 6 3247126 - /dev/pts/4 14300 qemu-system-x86_64 2 v c rw------ 6 3247126 - /dev/pts/4 14300 qemu-system-x86_64 3 p - rw---n-- 1 0 - - 14300 qemu-system-x86_64 4 p - rw---n-- 1 0 - - 14300 qemu-system-x86_64 5 v r rw--f--- 1 4294967296 - /b/blah.img 14300 qemu-system-x86_64 6 p - rw---n-- 1 0 - - 14300 qemu-system-x86_64 7 p - rw---n-- 1 0 - - 14300 qemu-system-x86_64 8 v r r---f--- 1 283918336 - /b/netbsd-amd64cd-201012060900Z.iso 14300 qemu-system-x86_64 9 s - rw---n-- 1 0 TCP ::.4444 ::.0 14300 qemu-system-x86_64 10 s - rw---n-- 1 0 TCP ::ffff:127.0.0.1.4444 ::ffff:127.0.0.1.26806 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 23:47:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E0381065672 for ; Wed, 8 Dec 2010 23:47:19 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qy0-f177.google.com (mail-qy0-f177.google.com [209.85.216.177]) by mx1.freebsd.org (Postfix) with ESMTP id 3423D8FC13 for ; Wed, 8 Dec 2010 23:47:18 +0000 (UTC) Received: by qyk27 with SMTP id 27so1205212qyk.15 for ; Wed, 08 Dec 2010 15:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eB39hf8cXlwwaZ6jDXx+9Mcaaj3wzThGfZIb0xhYxgE=; b=QUZOV0NgH8HuB8PG66E2jUyNnuiVezV7wPsFQqurOM78Jqcuf8ycxnBwOy7PYMslSJ pqQZ/YIbFEMFi3GSLhEiJR8IsBTNCgblKDHHvZzXwy8JdgiPk0+eUCm3DCjC7HMpABln SyhCkEuBAF2IDfM1C17fbgyKz/KE+Z333xdXc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=XVggXzBkCR61kr2BG4v4B0oJ0T58p7Jx3jMGEOz1P4DtVnlvwj6WsRD54Jg+asdjCQ FHT9IctnUF4+Zztls8GdTsUatwIL/w+uiqH3ot2ye48gLJCVbsR7HMMY3kdZMkugxciX 2LanYyy7rd/gPw6K/TN+C+jF4OWvahfRVubss= MIME-Version: 1.0 Received: by 10.229.248.142 with SMTP id mg14mr7536300qcb.26.1291852038436; Wed, 08 Dec 2010 15:47:18 -0800 (PST) Received: by 10.229.91.135 with HTTP; Wed, 8 Dec 2010 15:47:18 -0800 (PST) In-Reply-To: <20101208230139.2097c2e8@core.draftnet> References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> Date: Wed, 8 Dec 2010 15:47:18 -0800 Message-ID: From: Matthew Fleming To: Bruce Cran Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-Hackers , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 23:47:19 -0000 On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran wrote: > On Wed, 8 Dec 2010 14:54:57 -0800 > Matthew Fleming wrote: > >> This is what lsof is for. =A0I believe there's one in ports, but I have >> never tried it. > > Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? I believe that lsof reports on all open files by all processes, whereas fstat will only report on a specific provided pid. Thanks, matthew From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 23:52:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04501106566B for ; Wed, 8 Dec 2010 23:52:38 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 871128FC0A for ; Wed, 8 Dec 2010 23:52:34 +0000 (UTC) Received: by wyf19 with SMTP id 19so1762512wyf.13 for ; Wed, 08 Dec 2010 15:52:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=BU53yKdmtlaSinGA8hWrq5avXuxE1uRLn8l9VCXM2qc=; b=BdRFNUOAjmolztn6DSeJYRw4F2STYyo70+E6t5tA2H9VSaWnTMEiuDlbakXTWnMtw0 v5Mr1FKzeqKMUCKx8lVG1hzDdAHrN4Cx1OQ2A8XBDhkEsVqBUjOeXF2K1wSg3tf902AB wB0DeMwcBZghk08CYufOkDZEWV767y+RcERuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=J9qHRZPEWH9Lin9glENR75TYv+aLmUlEZraQFyZ/ngO2o71aAQOzMvVk0ek7hvf6uC ofN9qx5PghxCJz8uDD+HSvUN8HrrsAF81icaPYIh3xmJnW66VQTcUiKBF9zoyGkPoWrq p0c7Fv1ilSuTKC6SibV3SGVuVfm3/R/IhTTv8= MIME-Version: 1.0 Received: by 10.216.168.78 with SMTP id j56mr1290784wel.45.1291852354016; Wed, 08 Dec 2010 15:52:34 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Wed, 8 Dec 2010 15:52:33 -0800 (PST) In-Reply-To: References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> Date: Wed, 8 Dec 2010 15:52:33 -0800 X-Google-Sender-Auth: 9GFfIB06aCYIWbmQtgNxFxct01U Message-ID: From: Garrett Cooper To: Matthew Fleming Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Bruce Cran , FreeBSD-Hackers , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 08 Dec 2010 23:52:38 -0000 On Wed, Dec 8, 2010 at 3:47 PM, Matthew Fleming wrote: > On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran wrote: >> On Wed, 8 Dec 2010 14:54:57 -0800 >> Matthew Fleming wrote: >> >>> This is what lsof is for. =A0I believe there's one in ports, but I have >>> never tried it. >> >> Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? > > I believe that lsof reports on all open files by all processes, > whereas fstat will only report on a specific provided pid. lsof prints out all open file descriptors whereas I thought that fstat had to be targeted to specific files / directories / vmcore files / etc. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 00:02:37 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A7B0106564A for ; Thu, 9 Dec 2010 00:02:37 +0000 (UTC) (envelope-from richo@psych0tik.net) Received: from erinyes.site5.com (erinyes.site5.com [74.53.114.10]) by mx1.freebsd.org (Postfix) with ESMTP id E937A8FC13 for ; Thu, 9 Dec 2010 00:02:36 +0000 (UTC) Received: from boxand.lnk.telstra.net ([203.45.130.125] helo=richh-desktop.boxdice.com.au) by erinyes.site5.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1PQSq6-0004Id-0u for freebsd-hackers@freebsd.org; Wed, 08 Dec 2010 16:50:22 -0600 Date: Thu, 9 Dec 2010 09:49:22 +1100 From: richo To: FreeBSD-Hackers Message-ID: <20101208224922.GA14847@richh-desktop.boxdice.com.au> References: <4D000448.1050606@telenix.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <4D000448.1050606@telenix.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - erinyes.site5.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - psych0tik.net X-Source: X-Source-Args: X-Source-Dir: Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 00:02:37 -0000 On 08/12/10 17:18 -0500, Chuck Robey wrote: >What I want to see is a list of all Pids and how many open files >there are associated with each Pid? And maybe a "ps ax" list, so I >can associate an application with a pid. I would set things up so it >would do this every 15 minutes, and it might just point me at my real >Any idea what would be the best way to get a list of all openfiles >versus each open pid? I would be happy to write up a python script >to give me application versus count of open files list, if I could >start with that files versus pids thing. lsof is what you're looking for. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 00:20:47 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62AC91065670 for ; Thu, 9 Dec 2010 00:20:47 +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 A6EC68FC18 for ; Thu, 9 Dec 2010 00:20:46 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id CAA02661; Thu, 09 Dec 2010 02:20:40 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PQUFU-000M3e-Dh; Thu, 09 Dec 2010 02:20:40 +0200 Message-ID: <4D0020D7.5080706@freebsd.org> Date: Thu, 09 Dec 2010 02:20:39 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Matthew Fleming References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Bruce Cran , FreeBSD-Hackers , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 00:20:47 -0000 on 09/12/2010 01:47 Matthew Fleming said the following: > On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran wrote: >> On Wed, 8 Dec 2010 14:54:57 -0800 >> Matthew Fleming wrote: >> >>> This is what lsof is for. I believe there's one in ports, but I have >>> never tried it. >> >> Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? > > I believe that lsof reports on all open files by all processes, > whereas fstat will only report on a specific provided pid. Just try running fstat without any options. Or procstat -a -f. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 00:31:43 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46F2F106564A for ; Thu, 9 Dec 2010 00:31:43 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id C9D098FC14 for ; Thu, 9 Dec 2010 00:31:42 +0000 (UTC) Received: by wwf26 with SMTP id 26so1733319wwf.31 for ; Wed, 08 Dec 2010 16:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=YXqiwU4Ngp2iLi6Rnww4D9stDEzlnEoDvb3ZIqMNyQI=; b=JTuhaV0+Lo4mCoKEoa5a1p2fkUwxK9/3Rn41eP5D0zsDwDjs+JIGPLbDHrBtQjcuFi vwuYXsStI7bbuLybRkMpOROASQ97ly+ZUjejswjYaAy80GTJ0LAaOF59A2h7SixMj5X9 +jL/fXKAg1uQ+fuaYf5dCpQEvs24F65r1aABA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=uo3xFOtnJQVVntTiasB6DU7q1DzAP4mvctU56wXrA6Xkr75A7sdaOT0sLd3fYCxlOZ mSh/cgYdzxoWMdVJ+c+QOeo6b+xntgZtM/cM1SI2GPUzcWkiaXOBjVxqf2+tRLl2khgo ieFrDWyMVo1NFYwpjVnXrpyfWeLax/1sJX8qI= MIME-Version: 1.0 Received: by 10.216.169.148 with SMTP id n20mr1333348wel.30.1291854701637; Wed, 08 Dec 2010 16:31:41 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Wed, 8 Dec 2010 16:31:41 -0800 (PST) In-Reply-To: References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> Date: Wed, 8 Dec 2010 16:31:41 -0800 X-Google-Sender-Auth: AAH2gyIlV6aD52cH1aVBOcC_rHE Message-ID: From: Garrett Cooper To: Matthew Fleming Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Bruce Cran , FreeBSD-Hackers , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 00:31:43 -0000 On Wed, Dec 8, 2010 at 3:52 PM, Garrett Cooper wrote: > On Wed, Dec 8, 2010 at 3:47 PM, Matthew Fleming wrote: >> On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran wrote: >>> On Wed, 8 Dec 2010 14:54:57 -0800 >>> Matthew Fleming wrote: >>> >>>> This is what lsof is for. =A0I believe there's one in ports, but I hav= e >>>> never tried it. >>> >>> Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)= ? >> >> I believe that lsof reports on all open files by all processes, >> whereas fstat will only report on a specific provided pid. > > =A0 =A0lsof prints out all open file descriptors whereas I thought that > fstat had to be targeted to specific files / directories / vmcore > files / etc. Nevermind. As Andriy pointed out in a later post, I was wrong. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 12:42:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83D1E106566C for ; Thu, 9 Dec 2010 12:42:49 +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 C1B3F8FC08 for ; Thu, 9 Dec 2010 12:42:48 +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 OAA14580; Thu, 09 Dec 2010 14:42:41 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4D00CEC1.9080001@freebsd.org> Date: Thu, 09 Dec 2010 14:42:41 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: krad References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> <4D0020D7.5080706@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Bruce Cran , FreeBSD-Hackers , Matthew Fleming , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 12:42:49 -0000 on 09/12/2010 13:49 krad said the following: > > not sure if dtrace is ready for it on freebsd yet, but it certainly can do it on > solaris Greatly depends on what you meant by 'it'. Personally I don;t see how DTrace capabilities in needed for this task. Can you please enlighten me? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 11:49:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A43A1065674 for ; Thu, 9 Dec 2010 11:49:39 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id A5A008FC1A for ; Thu, 9 Dec 2010 11:49:38 +0000 (UTC) Received: by wwi17 with SMTP id 17so3356643wwi.1 for ; Thu, 09 Dec 2010 03:49:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=IOJGUHuntE8MbWPr8Psq2XYeLGIyFI2a1p9hmtAo/mk=; b=ultWNvybNFRgU/IPYBAyBMRBsCah+edffZvvzIzzP7wXWCclJDWwIutGcyD+ARIV98 SaAHHty7VJq/67NfQG9bFaNteyBbzEB7O+kAEsWDf5BOnpxfRDVO7DDqXWqas+kL9S61 NTo32LdkfNXSDGrjUeTLXffgFnw1V66Pz1drU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vbeAKnD719aX717iy7T/LIY3FF1g92B917GEhc8AkFhB9bd5iF6lGO6za54IY9GR3Y YGlYXG2O+ga4UkmcP9b2Z/uByUVWOiqSPSsPaunmRkG+hVQ3veR51yUoT4nNz+bedGrW 96E6dL88DIsa6ZcbEcmmjKHnJGteUhCK0Slw0= MIME-Version: 1.0 Received: by 10.216.158.140 with SMTP id q12mr467001wek.14.1291895377377; Thu, 09 Dec 2010 03:49:37 -0800 (PST) Received: by 10.216.72.198 with HTTP; Thu, 9 Dec 2010 03:49:37 -0800 (PST) In-Reply-To: <4D0020D7.5080706@freebsd.org> References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> <4D0020D7.5080706@freebsd.org> Date: Thu, 9 Dec 2010 11:49:37 +0000 Message-ID: From: krad To: Andriy Gapon X-Mailman-Approved-At: Thu, 09 Dec 2010 13:07:12 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Bruce Cran , FreeBSD-Hackers , Matthew Fleming , Chuck Robey Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 11:49:39 -0000 On 9 December 2010 00:20, Andriy Gapon wrote: > on 09/12/2010 01:47 Matthew Fleming said the following: > > On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran wrote: > >> On Wed, 8 Dec 2010 14:54:57 -0800 > >> Matthew Fleming wrote: > >> > >>> This is what lsof is for. I believe there's one in ports, but I have > >>> never tried it. > >> > >> Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? > > > > I believe that lsof reports on all open files by all processes, > > whereas fstat will only report on a specific provided pid. > > Just try running fstat without any options. > Or procstat -a -f. > > -- > Andriy Gapon > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > not sure if dtrace is ready for it on freebsd yet, but it certainly can do it on solaris From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 20:40:17 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46033106566B for ; Thu, 9 Dec 2010 20:40:17 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail5.sea5.speakeasy.net (mail5.sea5.speakeasy.net [69.17.117.49]) by mx1.freebsd.org (Postfix) with ESMTP id 2203C8FC19 for ; Thu, 9 Dec 2010 20:40:16 +0000 (UTC) Received: (qmail 13065 invoked from network); 9 Dec 2010 20:40:16 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail5.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 9 Dec 2010 20:40:16 -0000 Message-ID: <4D013EB2.5040101@telenix.org> Date: Thu, 09 Dec 2010 15:40:18 -0500 From: Chuck Robey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100907 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4D000448.1050606@telenix.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 20:40:17 -0000 On 12/08/10 17:54, Matthew Fleming wrote: > On Wed, Dec 8, 2010 at 2:18 PM, Chuck Robey wrote: >> I think, *maybe* that I have located what's been giving me all of those >> machine lockups. I was all ready to replace the mobo& cpu when I noticed a >> panic error of being out of open files. The message suggested just adding >> the ability for more open files, but if it's what I think it is, that would >> only mean it would take longer to panic, but it would still be tossing >> panics at me. >> >> What I want to see is a list of all Pids and how many open files there are >> associated with each Pid? And maybe a "ps ax" list, so I can associate an >> application with a pid. I would set things up so it would do this every 15 >> minutes, and it might just point me at my real problem here. >> >> Any idea what would be the best way to get a list of all openfiles versus >> each open pid? I would be happy to write up a python script to give me >> application versus count of open files list, if I could start with that >> files versus pids thing. > > This is what lsof is for. I believe there's one in ports, but I have > never tried it. lsof was perfect, I couldn't remember that app-name, but it turned out I'd already had a copy built. There were 3 candidates for having the most files open: procname Number of open files ======== ==================== firefox 426 thunderbird 1342 enlightenment 2643 Are all of these excessive, or only one of them? Any notion, or any known problem with any of these tree applications? I'm perfectly willing to go on this by any vagrant memories you have hanging about. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 20:55:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ED85106566B for ; Thu, 9 Dec 2010 20:55:07 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.42]) by mx1.freebsd.org (Postfix) with ESMTP id 530078FC15 for ; Thu, 9 Dec 2010 20:55:07 +0000 (UTC) Received: (qmail 6337 invoked from network); 9 Dec 2010 20:55:05 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 9 Dec 2010 20:55:05 -0000 Message-ID: <4D01422C.9080206@telenix.org> Date: Thu, 09 Dec 2010 15:55:08 -0500 From: Chuck Robey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100907 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> <4D0020D7.5080706@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 20:55:07 -0000 On 12/09/10 06:49, krad wrote: > On 9 December 2010 00:20, Andriy Gapon wrote: > >> on 09/12/2010 01:47 Matthew Fleming said the following: >>> On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran wrote: >>>> On Wed, 8 Dec 2010 14:54:57 -0800 >>>> Matthew Fleming wrote: >>>> >>>>> This is what lsof is for. I believe there's one in ports, but I have >>>>> never tried it. >>>> >>>> Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)? >>> >>> I believe that lsof reports on all open files by all processes, >>> whereas fstat will only report on a specific provided pid. >> >> Just try running fstat without any options. >> Or procstat -a -f. Ahh, the procstat -a -f output was more clearly readable than even the suggested lsof. I found that enlightenment was opening 2,672 different /dev/apmNNNN devices. Man apm tells me it's to do with Advanced Power Mgm't, nearly all of these huge lumps of open files. How might I deal with getting these /dev/apmNNNN files to close themselves? Because I have little doubt that I am (at last!!) looking at the reason for my machine lockups. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 23:30:15 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F702106566B for ; Thu, 9 Dec 2010 23:30:15 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f0f:20:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id 38C028FC0C for ; Thu, 9 Dec 2010 23:30:15 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f0f:20:1::5]) by mail.farley.org (8.14.4/8.14.4) with ESMTP id oB9NUDtJ081916; Thu, 9 Dec 2010 17:30:13 -0600 (CST) (envelope-from scf@FreeBSD.org) Date: Thu, 9 Dec 2010 17:30:13 -0600 (CST) From: "Sean C. Farley" To: Chuck Robey In-Reply-To: <4D01422C.9080206@telenix.org> Message-ID: References: <4D000448.1050606@telenix.org> <20101208230139.2097c2e8@core.draftnet> <4D0020D7.5080706@freebsd.org> <4D01422C.9080206@telenix.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Status: No, score=-1.1 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.farley.org Cc: freebsd-hackers@FreeBSD.org Subject: Re: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 09 Dec 2010 23:30:15 -0000 On Thu, 9 Dec 2010, Chuck Robey wrote: > Ahh, the procstat -a -f output was more clearly readable than even the > suggested lsof. I found that enlightenment was opening 2,672 > different /dev/apmNNNN devices. Man apm tells me it's to do with > Advanced Power Mgm't, nearly all of these huge lumps of open files. > How might I deal with getting these /dev/apmNNNN files to close > themselves? Because I have little doubt that I am (at last!!) looking > at the reason for my machine lockups. I think I ran into this long ago. If I recall correctly, you just need to disable the Enlightenment battery/power monitor if running on a system without a battery. Sean -- scf@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 13:41:48 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 407BC106564A for ; Fri, 10 Dec 2010 13:41:48 +0000 (UTC) (envelope-from lev@serebryakov.spb.ru) Received: from ftp.translate.ru (ftp.translate.ru [80.249.188.42]) by mx1.freebsd.org (Postfix) with ESMTP id DF6C38FC12 for ; Fri, 10 Dec 2010 13:41:47 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (89.112.15.178.pppoe.eltel.net [89.112.15.178]) (Authenticated sender: lev@serebryakov.spb.ru) by ftp.translate.ru (Postfix) with ESMTPA id 9562313DF48; Fri, 10 Dec 2010 16:22:57 +0300 (MSK) Date: Fri, 10 Dec 2010 16:22:53 +0300 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <1365605559.20101210162253@serebryakov.spb.ru> To: freebsd-hackers@freebsd.org, freebsd-geom@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 13:41:48 -0000 Hello, Freebsd-geom. I'm digging thought GEOM/IO code and can not find place, where requests from userland to read more than MAXPHYS bytes, is splitted into several "struct bio"? It seems, that these children request are issued one-by-one, not in parallel, am I right? Why? It breaks down parallelism, when underlying GEOM can process several requests simoltaneously? --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 14:45:57 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAD9E106566C for ; Fri, 10 Dec 2010 14:45:57 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by mx1.freebsd.org (Postfix) with ESMTP id 76BF98FC0A for ; Fri, 10 Dec 2010 14:45:57 +0000 (UTC) Received: by fxm19 with SMTP id 19so3530006fxm.36 for ; Fri, 10 Dec 2010 06:45:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=68TVWx4S1jCT0iK6oIsVb2ikeW+YrmxsFvX4HB8EywI=; b=FBvx0O9cbks6q4N33IQVxgAyeGEUofaNfGjJwOOKnLKvgldjleaoW4tNz+D05Mi4qs HEMXq++ijpWgJ7zN6B7zEYwhdjCJ27gEuTIgO5Li3dgHXDFu6lpOkACeNcKOTTRom1J3 V3KGFaEKAAPxjYsD50Sn9hJSTW6znBn6EJc9Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=X7XM7fapB+OS3d27s0KcvqgV4xvQHoNzc4G21EbgWSaNnbSY73lAdI7v6yng44pLlY labf8j6ECvM3He+JwSjZHj9D8pWkfB4M2iiAqd4HgfwAI3ptYIsMpreXR0P33TwZIOa5 LSigEACIaTBQZqksNbugzx99Um+lh08dY+SUw= Received: by 10.223.74.141 with SMTP id u13mr989226faj.62.1291992356350; Fri, 10 Dec 2010 06:45:56 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 21sm919385fav.41.2010.12.10.06.45.53 (version=SSLv3 cipher=RC4-MD5); Fri, 10 Dec 2010 06:45:54 -0800 (PST) Sender: Alexander Motin Message-ID: <4D023D00.10301@FreeBSD.org> Date: Fri, 10 Dec 2010 16:45:20 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Lev Serebryakov References: In-Reply-To: Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 14:45:58 -0000 Lev Serebryakov wrote: > I'm digging thought GEOM/IO code and can not find place, where > requests from userland to read more than MAXPHYS bytes, is splitted > into several "struct bio"? > > It seems, that these children request are issued one-by-one, not in > parallel, am I right? Why? It breaks down parallelism, when > underlying GEOM can process several requests simoltaneously? AFAIK first time requests from user-land broken to MAXPHYS-size pieces by physio() before entering GEOM. Requests are indeed serialized here, I suppose to limit KVA that thread can harvest, but IMHO it could be reconsidered. One more split happens (when needed) at geom_disk module to honor disk driver's maximal I/O size. There is no serialization. Most of ATA/SATA drivers in 8-STABLE support I/O up to at least min(512K, MAXPHYS) - 128K by default. Many SCSI drivers still limited by DFLTPHYS - 64K. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 14:48:27 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AFE31065672; Fri, 10 Dec 2010 14:48:27 +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 728E78FC15; Fri, 10 Dec 2010 14:48:26 +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 QAA09006; Fri, 10 Dec 2010 16:48:24 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4D023DB7.9080509@freebsd.org> Date: Fri, 10 Dec 2010 16:48:23 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Lev Serebryakov References: <1365605559.20101210162253@serebryakov.spb.ru> In-Reply-To: <1365605559.20101210162253@serebryakov.spb.ru> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 14:48:27 -0000 on 10/12/2010 15:22 Lev Serebryakov said the following: > Hello, Freebsd-geom. > > I'm digging thought GEOM/IO code and can not find place, where > requests from userland to read more than MAXPHYS bytes, is splitted > into several "struct bio"? Check out g_disk_start(). The split is done based on disk-specific d_maxsize, not hardcoded MAXPHYS, of course. > It seems, that these children request are issued one-by-one, not in > parallel, am I right? Why? It breaks down parallelism, when > underlying GEOM can process several requests simoltaneously? How do you *issue* the child requests in parallel? Of course, they can *run* in parallel if system configuration permits that and request run time is sufficient for an overlap to happen. Besides, there are no geoms under disk geom, it works on peripheral drivers. But maybe I misunderstood your question and you talked about a different I/O layer or different I/O path. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 15:03:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A9E1065672; Fri, 10 Dec 2010 15:03:31 +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 228A28FC20; Fri, 10 Dec 2010 15:03:29 +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 RAA09219; Fri, 10 Dec 2010 17:03:27 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4D02413F.8020007@freebsd.org> Date: Fri, 10 Dec 2010 17:03:27 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Lev Serebryakov References: <1365605559.20101210162253@serebryakov.spb.ru> <4D023DB7.9080509@freebsd.org> In-Reply-To: <4D023DB7.9080509@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 15:03:31 -0000 on 10/12/2010 16:48 Andriy Gapon said the following: > But maybe I misunderstood your question and you talked about a different I/O layer > or different I/O path. > Oh, probably you talk about physread/physwrite == physio. Indeed, it issues bio-s with max size of si_iosize_max and runs them sequentially. Besides, if uio is really "vectored", then each uio sub-buffer is processed sequentially too. This is probably less fast than running the requests in parallel; plus side could be that less KVA is required for mapping user space buffer (UIO_USERSPACE case) into kernel. Not sure if the latter is much of concern though. The sequential code is simpler too :-) -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 15:26:27 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 123A2106564A; Fri, 10 Dec 2010 15:26:27 +0000 (UTC) (envelope-from lev@serebryakov.spb.ru) Received: from ftp.translate.ru (ftp.translate.ru [80.249.188.42]) by mx1.freebsd.org (Postfix) with ESMTP id C2BAC8FC1E; Fri, 10 Dec 2010 15:26:26 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (89.112.15.178.pppoe.eltel.net [89.112.15.178]) (Authenticated sender: lev@serebryakov.spb.ru) by ftp.translate.ru (Postfix) with ESMTPA id 7A48F13DF48; Fri, 10 Dec 2010 18:26:25 +0300 (MSK) Date: Fri, 10 Dec 2010 18:26:21 +0300 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <242059106.20101210182621@serebryakov.spb.ru> To: Alexander Motin In-Reply-To: <4D023D00.10301@FreeBSD.org> References: <4D023D00.10301@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 15:26:27 -0000 Hello, Alexander. You wrote 10 =E4=E5=EA=E0=E1=F0=FF 2010 =E3., 17:45:20: >> I'm digging thought GEOM/IO code and can not find place, where >> requests from userland to read more than MAXPHYS bytes, is splitted >> into several "struct bio"? >> It seems, that these children request are issued one-by-one, not in >> parallel, am I right? Why? It breaks down parallelism, when >> underlying GEOM can process several requests simoltaneously? > AFAIK first time requests from user-land broken to MAXPHYS-size pieces > by physio() before entering GEOM. Requests are indeed serialized here, I > suppose to limit KVA that thread can harvest, but IMHO it could be > reconsidered. It is good idea, maybe to have GEOM flag for this? For example, any stripe/geom3/geom5 code can process read of series of reads, for example much fater, than sequentially -- if userland want to read big blocks, bigger than stripe size. And small stripe size is bad idea due to high fixed cost of transaction. Now, when application read files on RAID5 with big blocks (say, read() is called with 1Mb buffer), RAID5 geom sees read requests of 128Kb in size, one by one. And with stripe size of 128Kb, it performs as single disk :( I can add pre-read for full-sized reads, but it is not generic solution, and sending BIOs from one (logical/userland) read/write request without awaiting their completion is generic solution. > One more split happens (when needed) at geom_disk module to honor disk > driver's maximal I/O size. There is no serialization. Most of ATA/SATA > drivers in 8-STABLE support I/O up to at least min(512K, MAXPHYS) - 128K > by default. Many SCSI drivers still limited by DFLTPHYS - 64K. Yep, it is what I seen in my investigations. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 15:29:21 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F6041065693; Fri, 10 Dec 2010 15:29:21 +0000 (UTC) (envelope-from lev@serebryakov.spb.ru) Received: from ftp.translate.ru (ftp.translate.ru [80.249.188.42]) by mx1.freebsd.org (Postfix) with ESMTP id 08AD48FC0A; Fri, 10 Dec 2010 15:29:20 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (89.112.15.178.pppoe.eltel.net [89.112.15.178]) (Authenticated sender: lev@serebryakov.spb.ru) by ftp.translate.ru (Postfix) with ESMTPA id 0C22513DF48; Fri, 10 Dec 2010 18:29:20 +0300 (MSK) Date: Fri, 10 Dec 2010 18:29:15 +0300 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <1272967424.20101210182915@serebryakov.spb.ru> To: Andriy Gapon In-Reply-To: <4D02413F.8020007@freebsd.org> References: <1365605559.20101210162253@serebryakov.spb.ru> <4D023DB7.9080509@freebsd.org> <4D02413F.8020007@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 15:29:21 -0000 Hello, Andriy. You wrote 10 =E4=E5=EA=E0=E1=F0=FF 2010 =E3., 18:03:27: > on 10/12/2010 16:48 Andriy Gapon said the following: >> But maybe I misunderstood your question and you talked about a different= I/O layer >> or different I/O path. > Oh, probably you talk about physread/physwrite =3D=3D physio. > Indeed, it issues bio-s with max size of si_iosize_max and runs them sequ= entially. Yep, I'm talking about this case. See my message to Alexander Motin with explanation why I think sequential processing here is not good idea. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 15:42:15 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33ED01065698; Fri, 10 Dec 2010 15:42:15 +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 29FC28FC18; Fri, 10 Dec 2010 15:42:13 +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 RAA09743; Fri, 10 Dec 2010 17:42:12 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4D024A53.7010600@freebsd.org> Date: Fri, 10 Dec 2010 17:42:11 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Alexander Motin References: <4D023D00.10301@FreeBSD.org> In-Reply-To: <4D023D00.10301@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 15:42:15 -0000 on 10/12/2010 16:45 Alexander Motin said the following: > by default. Many SCSI drivers still limited by DFLTPHYS - 64K. Including the cases where MAXBSIZE is abused because it historically has the same value. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 15:58:23 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9174106566B; Fri, 10 Dec 2010 15:58:23 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by mx1.freebsd.org (Postfix) with ESMTP id 058258FC13; Fri, 10 Dec 2010 15:58:22 +0000 (UTC) Received: by fxm19 with SMTP id 19so3607126fxm.36 for ; Fri, 10 Dec 2010 07:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=EefPRGOn/DgtNpamn7o+pb4hHa5uTLz8vnNth6LFd+w=; b=nT6NT2P6ylMrIDvgnqqB9XG+Qc3MRvs+s87Rp5MdE0kYZefgn16tTyIPf+T6UUd16t 68kam707/1ImNbff9axvtm8bPCNYd5eAp1vAe/Q2a+RfTEohz7TncFPzxiqUxglHeAIz qEhf/yC0WSOu8R72g6kaRNpOZ3elAwtYkNTqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=TDzhI5n0SBwWwBiThU+N4pAdxJCmQ5ZxYU81vg9V/wL1tUXJ1qjYpXnJLQMmYI7X4k L7KmhQnsejTMgdKaJG4dWMySAN0u92hJ5meLw0Dj+sPXBPsuby54+vrKsiePRNoiYsIX Yp8P/UDMd5j7VcoubaCXD189bjabGTXh2jS6k= Received: by 10.223.69.140 with SMTP id z12mr1029736fai.142.1291996701972; Fri, 10 Dec 2010 07:58:21 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 21sm951501fav.17.2010.12.10.07.58.20 (version=SSLv3 cipher=RC4-MD5); Fri, 10 Dec 2010 07:58:21 -0800 (PST) Sender: Alexander Motin Message-ID: <4D024DFB.4030902@FreeBSD.org> Date: Fri, 10 Dec 2010 17:57:47 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Andriy Gapon References: <4D023D00.10301@FreeBSD.org> <4D024A53.7010600@freebsd.org> In-Reply-To: <4D024A53.7010600@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Where userland read/write requests, whcih is larger than MAXPHYS, are splitted? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 15:58:23 -0000 Andriy Gapon wrote: > on 10/12/2010 16:45 Alexander Motin said the following: >> by default. Many SCSI drivers still limited by DFLTPHYS - 64K. > > Including the cases where MAXBSIZE is abused because it historically has the same > value. DFLTPHYS automatically assumed by CAM for all SIMs not reporting their maximal I/O size. All drivers using MAXBSIZE most likely will fall into this category, because this functionality was added just at 8.0. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 10 17:14:05 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E792B106564A for ; Fri, 10 Dec 2010 17:14:05 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from lonestar.usenix.org (lonestar.usenix.org [131.106.3.102]) by mx1.freebsd.org (Postfix) with ESMTP id D10058FC0C for ; Fri, 10 Dec 2010 17:14:05 +0000 (UTC) Received: from negroni.usenix.org (negroni.usenix.org [131.106.3.145]) (authenticated bits=0) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id oBAGv5q8007253 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 10 Dec 2010 08:59:31 -0800 (PST) From: Lionel Garth Jones Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 10 Dec 2010 08:59:31 -0800 Message-Id: <397B14DB-FCF7-4A2F-868D-853C5E78939C@usenix.org> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) X-DCC-USENIX-Metrics: lonestar; whitelist X-Spam-Status: No, score=0.7 required=6.0 tests=ALL_TRUSTED, FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lonestar X-Mailman-Approved-At: Fri, 10 Dec 2010 17:34:38 +0000 Subject: USENIX ATC '11 Submission Deadline Approaching X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 10 Dec 2010 17:14:06 -0000 We're writing to remind you that the submissions deadline for the 2011 USENIX Annual Technical Conference (USENIX ATC '11) is just over a month away. Please submit your work by 11:59 p.m. EST on Wednesday, January 12, 2011. http://www.usenix.org/atc11/cfpb/ The USENIX ATC '11 Program Committee seeks high-quality submissions that further the knowledge and understanding of modern computing systems, with an emphasis on implementations and experimental results. We encourage papers that break new ground or present insightful results based on practical experience with computer systems. USENIX ATC has a broad scope, and specific topics of interest include but are not limited to: * Architectural interaction * Cloud computing * Deployment experience * Distributed and parallel systems * Embedded systems * Energy/power management * File and storage systems * Mobile, wireless, and sensor systems * Networking and network services * Operating systems * Reliability, availability, and scalability * Security, privacy, and trust * System and network management and troubleshooting * Usage studies and workload characterization * Virtualization For more details on the submission process, please see the complete Call for Papers at http://www.usenix.org/atc11/cfpb/ We look forward to your submissions. Jason Nieh, Columbia University Carl Waldspurger, VMware USENIX ATC '11 Program Chairs atc11chairs@usenix.org --------------------------------------- Call for Papers 2011 USENIX Annual Technical Conference June 15-17, 2011, in Portland, OR http://www.usenix.org/atc11/cfpb/ Submissions Deadline: January 12, 2011, 11:59 p.m. EST From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 11 19:43:06 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E9EB1065696 for ; Sat, 11 Dec 2010 19:43:06 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 53A198FC08 for ; Sat, 11 Dec 2010 19:43:06 +0000 (UTC) Received: by qwj9 with SMTP id 9so4936581qwj.13 for ; Sat, 11 Dec 2010 11:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=ZvuOfXVjEXTfI31ax7RFg+PHeQQ/PnPWvoY4asJ3w1c=; b=h1OjuvqdE95DH1KYTXdJMDKTtliW7LXLLOHnIRJUX5MjaivdzfUPwkS+0flJR0m3Df AYc3r2WvbVC7776SCOqhk/8CxPdyKQKmE6rkK0Ux0I0DBiFlgXxWnPeQJGussy9jCbNX 9/78wGizqlnda6TqS8BckQy/1LpLQCvM/0p3U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=BpdKdT5M+ptYhxXCCRePA7i76G2ChkE6PxQkx7IWk6vAC7jMskD7vgL5lKpy72aA7m cYJYJ9SnUq46hrVcu8fK8LxhdvZWfArZ4Ikk809eoKGM9/3tqkJvr6XsbRHAZo3ZE6cC ZBw7apcM7tsLdcOV7IxUSYdkaa8asUYSOw7Ug= MIME-Version: 1.0 Received: by 10.229.82.10 with SMTP id z10mr2075900qck.98.1292096585521; Sat, 11 Dec 2010 11:43:05 -0800 (PST) Sender: artemb@gmail.com Received: by 10.220.177.195 with HTTP; Sat, 11 Dec 2010 11:43:05 -0800 (PST) Date: Sat, 11 Dec 2010 11:43:05 -0800 X-Google-Sender-Auth: Sr1UVIoHbHARXS36xMJg33C__rc Message-ID: From: Artem Belevich To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Subject: syscall provider naming convention. Re: kern/152822: [patch] DTrace: syscall provider for compat/freebsd32 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Dec 2010 19:43:06 -0000 Hi, I'm tinkering with DTrace syscall provider for COMPAT_FREEBSD32 and linuxulator binaries and I wonder what would be the best way to name those providers. One option is to create separate provider for each compat variant. E.g. syscall::write/syscall32::write/syscalllnx32::write.. Another to keep provider name as syscall and use 'module' to distinguish between compat variants. E.g. syscall:native:write:/syscall:freebsd32:write:/syscall:linux32:write: I'm leaning towards using 'module' but I would appreciate hackers@ opinion on the best way to proceed. Thanks, --Artem ---------- Forwarded message ---------- From: Andriy Gapon Date: Sat, Dec 11, 2010 at 11:15 AM Subject: Re: kern/152822: [patch] DTrace: syscall provider for compat/freebsd32 To: Artem Belevich Cc: John Baldwin on 11/12/2010 21:07 Artem Belevich said the following: > I wonder if it would make more sense to keep provider as 'syscall' for > all emulations, but set 'module' part to native/compat32/linux32. > > I.e. native write syscall would be specified as syscall:native:write: > and linux32 as syscall:linux32:write: > Wildcard spec like syscall::write: would match all write variants. > > What do you think? Sounds like a very good idea to me! Could you please run it by hackers@ just to see what other people think? Thanks. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 11 20:53:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FF5D106564A for ; Sat, 11 Dec 2010 20:53:49 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id C5D268FC0C for ; Sat, 11 Dec 2010 20:53:48 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3ABB7.dip.t-dialin.net [87.179.171.183]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id D0294844012 for ; Sat, 11 Dec 2010 21:53:44 +0100 (CET) Received: from unknown (IO.Leidinger.net [192.168.2.110]) by outgoing.leidinger.net (Postfix) with ESMTP id EDBDE1C09 for ; Sat, 11 Dec 2010 21:53:41 +0100 (CET) Date: Sat, 11 Dec 2010 21:53:41 +0100 From: Alexander Leidinger To: freebsd-hackers@freebsd.org Message-ID: <20101211215341.0000097c@unknown> In-Reply-To: References: X-Mailer: Claws Mail 3.7.6 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: D0294844012.A6B0C X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1, required 6, autolearn=disabled, ALL_TRUSTED -1.00) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1292705625.77847@NF0Pp/0JGgvjsrNNQd8kBw X-EBL-Spam-Status: No X-Mailman-Approved-At: Sat, 11 Dec 2010 23:05:48 +0000 Subject: Re: syscall provider naming convention. Re: kern/152822: [patch] DTrace: syscall provider for compat/freebsd32 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Dec 2010 20:53:49 -0000 On Sat, 11 Dec 2010 11:43:05 -0800 Artem Belevich wrote: > Hi, > > I'm tinkering with DTrace syscall provider for COMPAT_FREEBSD32 and > linuxulator binaries and I wonder what would be the best way to name > those providers. Maybe a little bit related: do you know about my (unfortunately out-of-date) branch to add dtrace providers to the linuxulator? http://svn.freebsd.org/viewvc/base/user/netchild/linuxulator-dtrace/ If you are interested feel free to borrow things from there. > I'm leaning towards using 'module' but I would appreciate hackers@ > opinion on the best way to proceed. My first thought was that this is a good idea. My second thought was the question if you can make the provided values there compatible enough that a dtrace script is able to cope with it when someone does not uses a specific module but the wirldcard operator. If not I suggest to think again about it. Bye, Alexander.