Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2007 11:11:31 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Updated rusage patch
Message-ID:  <20070531110004.H1221@besplex.bde.org>
In-Reply-To: <465E189C.4000609@elischer.org>
References:  <20070529105856.L661@10.0.0.1> <200705291456.38515.jhb@freebsd.org> <20070529121653.P661@10.0.0.1> <20070530065423.H93410@delplex.bde.org> <20070529141342.D661@10.0.0.1> <20070530125553.G12128@besplex.bde.org> <20070529201255.X661@10.0.0.1> <20070529220936.W661@10.0.0.1> <20070530201618.T13220@besplex.bde.org> <20070530115752.F661@10.0.0.1> <20070531091419.S826@besplex.bde.org> <465E189C.4000609@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 May 2007, Julian Elischer wrote:

> Bruce Evans wrote:
>
>> - RELENG_4: statclock() uses splhigh() but not interrupt atomicity.
>>             exit1() uses no locking and thus races with statclock().
>>   above: statclock() still uses sched_lock but not interrupt atomicity.
>
>
> sched_lock blocks interrupts
>
>>          exit1() uses no locking and thus races with statclock().
             ^^^^^^^^^^^^^^^^^^^^^^^

exit1() uses no locking and is thus unaffected by sched_lock.  More
precisely, it uses mounds of locking, but at the point that it races
with statclock() it holds only PROC_LOCK(p).  It acquires sched_lock
for the first time much later.

Bruce



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