svn commit: r205025 - user/jmallett/octeon/sys/mips/mips

John Baldwin john at baldwin.cx
Fri Mar 12 17:45:27 UTC 2010


On Thursday 11 March 2010 03:32:29 pm Juli Mallett wrote:
> Author: jmallett
> Date: Thu Mar 11 20:32:28 2010
> New Revision: 205025
> URL: http://svn.freebsd.org/changeset/base/205025
> 
> Log:
>   I don't know that a critical section is required here, but if it is we
>  really don't want to get interrupted between reading the counter and
>  calculating the ticks.

In practice I think cputicks are only queried while holding a spin lock (so 
interrupts are disabled).  Part of the comment before this is wrong as the 
cputicks are completely divorced from the timecounter code, so the tc code 
handling wrapping doesn't help any.  However, if there is a way to use a 
single instruction to read all 64-bits of the ticker on mips64, it would 
probably be best to add a mips64-specific ticker method and use that for 
set_cputicker() instead of this one.

-- 
John Baldwin


More information about the svn-src-user mailing list