kernel thread as real threads..

Daniel Eischen deischen at
Fri Jan 20 11:25:08 PST 2006

Julian or Scott wrote:

> > For KSE, threads are just a figment of the imagination of the kernel.
> > A thread that
> > the kernel sees has no specific correlation to a thread that exists in
> > an application.
> > Trying to associate stats with these threads is absolultely
> > meaningless.  The
> > processing time accumulated for a particular thread that the kernel
> > sees could well
> > be the aggregate of a number of user threads, and those user threads
> > are likely migrating
> > between the kernel threads.  That's the whole point of M:N threading
> > =-)  Saying that
> > thread 1 did X amount of work and thread 2 did Y amount of work simply
> > has no meaning,
> > other than that the parent process did X+Y amount of work.

The stats are kernel stats, not userland stats.  I see no
harm in showing (or keeping track of) stats for threads
that are M:N.  It doesn't matter what kernel thread the
userland threads run on, or whether they migrate or not,
at least not for purpose of showing stats for kernel

When you look at the output of 'ps', 'top', or whatever,
you just have to realize it is the view as seen by the


More information about the freebsd-current mailing list