Date: Tue, 27 Jul 2010 21:10:41 +0530 From: "Jayachandran C." <c.jayachandran@gmail.com> To: Alexander Motin <mav@freebsd.org> Cc: Randall Stewart <rrs@freebsd.org>, Neel Natu <neel@freebsd.org>, freebsd-mips@freebsd.org Subject: Re: [RFC] Event timers on MIPS Message-ID: <AANLkTi=Nu3pzE38w5FszstYxEwx4sduje54ThpiXacny@mail.gmail.com> In-Reply-To: <4C4EF842.5020103@FreeBSD.org> References: <4C41A248.8090605@FreeBSD.org> <AANLkTilKYw4UqmfEee9zHGosEDzy4hiFob1d8R9jcB25@mail.gmail.com> <4C41B4CF.6080409@FreeBSD.org> <AANLkTik8_NGm7nKYXT1d1E4Vj6vYQPWHnnLDi78YnvQD@mail.gmail.com> <4C4205CC.6080700@FreeBSD.org> <AANLkTikUpqLeogkqxqWzzejp=7FstHX2wVRWNrYoWGCp@mail.gmail.com> <4C4ED247.80701@FreeBSD.org> <AANLkTiktMt87V5jXV0%2BnagHjpfTkBQ8Fu6CK7HqNXff3@mail.gmail.com> <4C4EF398.1050507@FreeBSD.org> <4C4EF842.5020103@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 27, 2010 at 8:46 PM, Alexander Motin <mav@freebsd.org> wrote: > Alexander Motin wrote: >> Jayachandran C. wrote: >>> On Tue, Jul 27, 2010 at 6:04 PM, Alexander Motin <mav@freebsd.org> wrot= e: >>>> Jayachandran C. wrote: >>>>> Also, with just the count/compare, I get these print on early mutiuse= r 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 pi= d >>>>> 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 =A0can = 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: > > + =A0 =A0 =A0 DPCPU_SET(counter_upper, t_upper); > + =A0 =A0 =A0 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. I missed the critical section, I will move the DPCPU_SET and into the critical section, since it is an obvious mistake I introduced. There is a critical_enter/exit in cpu_intr too, with mips_rd_count() outsid= e.. Thanks, JC.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=Nu3pzE38w5FszstYxEwx4sduje54ThpiXacny>