From owner-freebsd-current@FreeBSD.ORG  Fri Jan 20 09:52:25 2006
Return-Path: <owner-freebsd-current@FreeBSD.ORG>
X-Original-To: current@freebsd.org
Delivered-To: freebsd-current@FreeBSD.ORG
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 58B5516A420;
	Fri, 20 Jan 2006 09:52:25 +0000 (GMT)
	(envelope-from kris@obsecurity.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 576F043D69;
	Fri, 20 Jan 2006 09:52:19 +0000 (GMT)
	(envelope-from kris@obsecurity.org)
Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196])
	by elvis.mu.org (Postfix) with ESMTP id 28D271A3C1C;
	Fri, 20 Jan 2006 01:52:19 -0800 (PST)
Received: by obsecurity.dyndns.org (Postfix, from userid 1000)
	id 85BA954A48; Fri, 20 Jan 2006 04:52:15 -0500 (EST)
Date: Fri, 20 Jan 2006 04:52:15 -0500
From: Kris Kennaway <kris@obsecurity.org>
To: Scott Long <scottl@samsco.org>
Message-ID: <20060120095214.GA11088@xor.obsecurity.org>
References: <43D05151.5070409@elischer.org>
	<20060120030105.GA5286@xor.obsecurity.org>
	<43D0715A.7020302@elischer.org>
	<20060120061955.GA8687@xor.obsecurity.org>
	<20060120085226.GQ83922@FreeBSD.org> <43D0AB26.5070407@samsco.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy"
Content-Disposition: inline
In-Reply-To: <43D0AB26.5070407@samsco.org>
User-Agent: Mutt/1.4.2.1i
Cc: current@freebsd.org, Gleb Smirnoff <glebius@freebsd.org>,
	Julian Elischer <julian@elischer.org>, Kris Kennaway <kris@obsecurity.org>
Subject: Re: kernel thread as real threads..
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
	<freebsd-current.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
	<mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current>
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>,
	<mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Jan 2006 09:52:25 -0000


--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 20, 2006 at 02:19:34AM -0700, Scott Long wrote:
> Gleb Smirnoff wrote:
>=20
> >On Fri, Jan 20, 2006 at 01:19:55AM -0500, Kris Kennaway wrote:
> >K> > the example I showed was the 'ps' from ddb which of course doesn't=
=20
> >show K> > any stats anyhow.
> >K>=20
> >K> Yeah, I know that, but they're also not displayed in ps(1) or top(1),
> >K> etc.
> >
> >And this is a serious issue, that is present in our last releases. If a
> >was a newbie installing FreeBSD for first time, this fact will hurt my
> >impression about operating system most.
> >
>=20
> For KSE, threads are just a figment of the imagination of the kernel.  A=
=20
> thread that
> the kernel sees has no specific correlation to a thread that exists in=20
> an application.
> Trying to associate stats with these threads is absolultely meaningless.=
=20
>  The
> processing time accumulated for a particular thread that the kernel sees=
=20
> could well
> be the aggregate of a number of user threads, and those user threads are=
=20
> likely migrating
> between the kernel threads.  That's the whole point of M:N threading=20
> =3D-)  Saying that
> thread 1 did X amount of work and thread 2 did Y amount of work simply=20
> has no meaning,
> other than that the parent process did X+Y amount of work.

Correct me if I'm wrong, but the stats aren't accounted to the parent
process either.  I'm pretty sure I've seen situations where a thread
was using a lot of CPU, but if you believe top(1) then every process
in the system is idle (except for the fact that the system is 0%
idle).  In this situation there's no way to tell which threaded
process is using resources.

Kris
--gBBFr7Ir9EOA20Yy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFD0LLOWry0BWjoQKURAuIwAJ9pBRtJkEMSX4Qu+ItEc+Ciaf7N7wCePhm/
C2btEc7vjioDM+6sqjoMNhw=
=xfCy
-----END PGP SIGNATURE-----

--gBBFr7Ir9EOA20Yy--