Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2006 04:52:15 -0500
From:      Kris Kennaway <kris@obsecurity.org>
To:        Scott Long <scottl@samsco.org>
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..
Message-ID:  <20060120095214.GA11088@xor.obsecurity.org>
In-Reply-To: <43D0AB26.5070407@samsco.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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060120095214.GA11088>