Subject: Re: keeping the process start time in core at all times...
To: matthew green <mrg@eterna.com.au>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 12/01/2002 17:30:00
On Mon, Dec 02, 2002 at 11:29:34AM +1100, matthew green wrote:
>    
>    > I damn near fixed this in my own source tree but I've been too lazy to
>    > maintain the changes (and I'm also still not exactly sure how/why it
>    > went away and whether or not it can be restored without actually moving
>    > p_start from struct pstats).
>    
>    It went away when ps was changed to use sysctl() calls to fetch all
>    the data.  
>    
>    That said, I have heard lots of people who mentioned that they miss the
>    start time being displayed by ps.  The stats part of the U is either 224
>    bytes on a 32bit arch or 448 bytes on a 64bit arch - I think that's too
>    big to add to struct proc, but adding just the start time is something
>    I'd be for...
> 
> 
> the thing is that on a machine that _hasn't paged out anything_
> i lose the start times as well.  where the hell are they if
> they're not paged out such that ps(1) still can't find them?


this is because even though no uarea pages are paged out,
some processes are "swapped out".  the latter just means that
the uarea is unwired, so accessing it requires using (eg.) kcopy().

personally, I'd think it would be fine if the sysctl doodad that
ps uses would just kcopy() out whatever uarea info it wants when
P_INMEM is clear.

-Chuck