Subject: Re: tsleep
To: Mirian Crzig Lennox <firstname.lastname@example.org>
From: Jason Thorpe <email@example.com>
Date: 07/06/1999 11:08:31
On 06 Jul 1999 11:47:43 -0400
Mirian Crzig Lennox <firstname.lastname@example.org> wrote:
> > Having that string available is *really nice* sometimes, as it indicates
> > where the code is blocked, even though each thread may be blocked on a
> > unique wchan value.
> Understood... but it seems you could still save some memory by
> replacing the string parameter with a symbol address (*in addition to*
> the actual wchan address). Why maintain (effectively) two distinct
> symbol tables in kernel memory?
Um... It's NOT "two distinct symbol tables".
Take, for example, the case of the lock manager... You might sleep on
a lock strucutre... but what thing is the process trying to lock? Could
be a vnode lock, a map lock, a foo lock, a bar lock, etc.
The wchan string pointed to by the lock strucutre (initialized by
something else to e.g. "vmmaplk") gives you more information.
Note that the compiler optimizes constant strings down to a single
instance, in most cases, and passes references to it, rather than
having multiple copies of a constant string.
-- Jason R. Thorpe <email@example.com>