[RFC] Event timers on MIPS

Alexander Motin mav at FreeBSD.org
Tue Jul 27 15:16:25 UTC 2010


Alexander Motin wrote:
> Jayachandran C. wrote:
>> On Tue, Jul 27, 2010 at 6:04 PM, Alexander Motin <mav at freebsd.org> wrote:
>>> Jayachandran C. wrote:
>>>> Also, with just the count/compare, I get these print on early mutiuser bootup.
>>>> ---
>>>> calcru: runtime went backwards from 85936878 usec to 236488 usec for
>>>> pid 1286 (rpcbind)
>>>> calcru: runtime went backwards from 7158742 usec to 19700 usec for pid
>>>> 1285 (nfsiod 0)
>>>> calcru: runtime went backwards from 111005442 usec to 305474 usec for
>>>> pid 1257 (syslogd)
>>>> calcru: runtime went backwards from 10740196 usec to 29555 usec for
>>>> pid 1048 (devd)
>>>> --
>>>> Did not get much time to investigate, any idea what the cause  can be?
>>> I think it can easily be result of broken tick_ticker().
>> I'm planning to check-in the attached patch for mips/rmi, I think
>> mips/mips would need something similar.
> 
> Looks fine. Does it help?

Sorry, after looked again, I've got one question. Why this:

+	DPCPU_SET(counter_upper, t_upper);
+	DPCPU_SET(counter_lower_last, t_lower_last);

was moved out of the critical section? Due to the per-CPU nature of this
function it probably always called inside critical section, so there is
no problem I think. But IMHO either critical section calls there are
unneeded, or above sets and mips_rd_count() worth moving inside of it.

-- 
Alexander Motin


More information about the freebsd-mips mailing list