Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 2010 08:35:43 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        c.jayachandran@gmail.com
Cc:        rrs@FreeBSD.org, mav@FreeBSD.org, neel@FreeBSD.org, freebsd-mips@FreeBSD.org
Subject:   Re: [RFC] Event timers on MIPS
Message-ID:  <20100727.083543.653774248293717664.imp@bsdimp.com>
In-Reply-To: <AANLkTikUpqLeogkqxqWzzejp=7FstHX2wVRWNrYoWGCp@mail.gmail.com>
References:  <AANLkTik8_NGm7nKYXT1d1E4Vj6vYQPWHnnLDi78YnvQD@mail.gmail.com> <4C4205CC.6080700@FreeBSD.org> <AANLkTikUpqLeogkqxqWzzejp=7FstHX2wVRWNrYoWGCp@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <AANLkTikUpqLeogkqxqWzzejp=3D7FstHX2wVRWNrYoWGCp@mail.gmail=
.com>
            "Jayachandran C." <c.jayachandran@gmail.com> writes:
: > I would prefer to not mix the things.
: >
: > I think:
: > =A0- PIC timestamp looks like the best candidate for system timecou=
nter.
: > =A0- per-CPU counters could be registered as per-CPU timecounters w=
ith
: > set_cputicker() - the main criteria there is a speed.
: > =A0- if per-CPU counters are synchronized between CPUs - they could=
 be
: > registered as alternative timecounter for people who wish fastest
: > timecounting; if they are not - they are useless in that role.
: > =A0- both PIC timer and per-CPU comparators should be independently=

: > registered as eventtimers - it is better to have two of them to fro=
m
: > accounting correctness PoV, and it will allow user to experiment wh=
ich
: > one he likes more.
: > =A0- if there is any other timer hardware - it also should be regis=
tered -
: > it will give additional flexibility.
: =

: The per-cpu count/compare counters are not synchronized on XLR.

The Octeon processors have a register to force them to be
synchronized.  Once synchronized, except for some weird debug
scenarios, they stay synchronized.

Does the XLR advanced the count counters at the same rate on all the
core at the same time?

: So your suggestion would be to add a PIC based clock which calls
: tc_init() and et_register(), and to leave the set_cputicker() to be
: the count/compare?
: =

: 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  can be=
?

Is this multicore?

Warner



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