Updated rusage patch

Bruce Evans brde at optusnet.com.au
Fri Jun 8 08:55:46 UTC 2007


On Thu, 7 Jun 2007, Jeff Roberson wrote:

> On Wed, 6 Jun 2007, Jeff Roberson wrote:

>> 2)  We may lose information between exit1() and thread_exit() due to the 
>> way p_ru is initialized before we're done exiting.  There also seems to be 
>> a race where wait() operates on a process before it's done in thread_exit() 
>> which means wait may return rusage information without the child added in! 
>> The solution will be to fix this race, and then access p_ru directly in 
>> wait().

I haven't looked at the patch or thought much about the problems yet.

A very obvious problem turned up: after killing makeworld with ^C, the
times reported are usually almost 0 (even after running 800+ seconds).
The times are reasonable if makeworld completes or if a simple foreground
process is killed with ^C.  This might be (2).

Bruce


More information about the freebsd-arch mailing list