rusage breakdown and cpu limits.

Bruce Evans brde at optusnet.com.au
Wed May 30 06:36:16 UTC 2007


On Tue, 29 May 2007, Jeff Roberson wrote:

> On Wed, 30 May 2007, Bruce Evans wrote:
>
>> On Tue, 29 May 2007, Jeff Roberson wrote:
>>> The thing that will protect mi_switch() is not process global.  I want to 
>>> keep process global locks out of mi_switch() or we reduce concurrency for 
>>> multi-threaded applications.
>> 
>> This became clearer with patches and would have been clearer with
>> (smaller) diffs in mail -- mi_switch() still needs locking but it isn't
>> sched locking.
>
> Hopefully you see the value in my approach now?  I don't think it's turning 
> out so badly, except for some details which need refining.  It certainly make 
> mi_switch() and statclock() cleaner.  And hopefully we can remove more code 
> from ast() and mi_switch() by changing the cpu limits.

Yes, it shows promise.  I like the possibility of fixing the stats for
other CPUs in calcru() in a general way.  The aggregation points also
give a good place to fix the scaling by the cputick frequency.  The
cputick frequency may be variable, so the current frequency should not
be used to scale all previously recorded ticks.

Bruce


More information about the freebsd-arch mailing list