From owner-freebsd-current@FreeBSD.ORG Wed Mar 14 14:48:54 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2F9C16A402 for ; Wed, 14 Mar 2007 14:48:54 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B84D013C489 for ; Wed, 14 Mar 2007 14:48:54 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 4FB7946EFA; Wed, 14 Mar 2007 09:48:54 -0500 (EST) Date: Wed, 14 Mar 2007 15:48:54 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <45F706A2.5020106@elischer.org> Message-ID: <20070314154728.Y47292@fledge.watson.org> References: <45F388D4.2080900@elischer.org> <45F45172.8070601@elischer.org> <86r6rt6z27.fsf@dwp.des.no> <45F706A2.5020106@elischer.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-348664937-1173883734=:47292" Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , FreeBSD Current Subject: Re: netstat wierdness? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 14:48:55 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-348664937-1173883734=:47292 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 13 Mar 2007, Julian Elischer wrote: > Dag-Erling Sm=F8rgrav wrote: >> Julian Elischer writes: >>> answering myself.. comes from having options LOCK_PROFILING in my kerne= l.=20 >>> adding the same to /etc/make.conf and recompiling netstat and libkvm=20 >>> helped. (not sure if both are needed) >>=20 >> This is very bad. LOCK_PROFILING should have no visible effect on=20 >> userland. That is precisely what xinpcb, xunpcb, xtcpcb etc. are for: t= o=20 >> isolate userland from kernel structures. They should not contain any lo= cks=20 >> or anything else which would be affected by LOCK_PROFILING or other kern= el=20 >> options. > > sockstat actually told me that all those were the wrong size, so apparent= ly=20 > they change size too.(!?) > > I haven't gone to look at their definition yet, but as you say, it sounds= =20 > like something was done wrong. The x* structures in netinet are not correctly implemented, and do incorpor= ate=20 kernel data structures. I've been meaning to fix that for ages, but haven'= t=20 had time. In the mean time, we should continue to avoid having the size of= =20 kernel data structures vary with kernel options. This is also important so= =20 that you can use /dev/kmem on core dumps, etc, so while fixing the x*=20 structures for netinet is important, it doesn't eliminate the need to avoid= =20 variable data structure sizes. Robert N M Watson Computer Laboratory University of Cambridge --0-348664937-1173883734=:47292--