Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jul 2010 22:34:36 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        "Jayachandran C." <c.jayachandran@gmail.com>
Cc:        Neel Natu <neel@freebsd.org>, freebsd-mips@freebsd.org
Subject:   Re: [RFC] Event timers on MIPS
Message-ID:  <4C4205CC.6080700@FreeBSD.org>
In-Reply-To: <AANLkTik8_NGm7nKYXT1d1E4Vj6vYQPWHnnLDi78YnvQD@mail.gmail.com>
References:  <4C41A248.8090605@FreeBSD.org>	<AANLkTilKYw4UqmfEee9zHGosEDzy4hiFob1d8R9jcB25@mail.gmail.com>	<4C41B4CF.6080409@FreeBSD.org> <AANLkTik8_NGm7nKYXT1d1E4Vj6vYQPWHnnLDi78YnvQD@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jayachandran C. wrote:
> On XLR we would like to use the count/compare which is faster but less
> accurate on all cpus - we can have upto 32 cpus now.  We also have a
> PIC which can provide a better timestamp and timer interrupts.  This
> PIC timestamp can be read from all CPUs but the timer interrupt can be
> delivered to just one CPU at a time.  I think this is how we ended up
> with the current implementation, but any suggestions on how to improve
> this is welcome.

I would prefer to not mix the things.

I think:
 - PIC timestamp looks like the best candidate for system timecounter.
 - per-CPU counters could be registered as per-CPU timecounters with
set_cputicker() - the main criteria there is a speed.
 - 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.
 - both PIC timer and per-CPU comparators should be independently
registered as eventtimers - it is better to have two of them to from
accounting correctness PoV, and it will allow user to experiment which
one he likes more.
 - if there is any other timer hardware - it also should be registered -
it will give additional flexibility.

PS: I've managed to run MALTA kernel with patch under gxemul. It works,
except time is not going right. But I suppose it is emulator problem, as
original kernel works the same.

-- 
Alexander Motin



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