All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Ipipe-core patched kernel fails to start when certain platform drivers are enabled
Date: Fri, 1 May 2015 16:30:45 +0200	[thread overview]
Message-ID: <20150501143045.GH1993@hermes.click-hack.org> (raw)
In-Reply-To: <20150501142042.GG24389@csclub.uwaterloo.ca>

On Fri, May 01, 2015 at 10:20:42AM -0400, Lennart Sorensen wrote:
> On Thu, Apr 30, 2015 at 11:34:04PM +0200, Gilles Chanteperdrix wrote:
> > I had tested architected timers on omap5432, and I believe the
> > counter frequency was something like 5 MHz, and a high latency, this
> > looks like a serious regression when omap4 had the global timer
> > running at 500 MHz and a 22ns latency in user-space (including the
> > time to jump to the kernel helper), which is better than the latency
> > I have on an atom N230 where reading the tsc is a dedicated
> > instruction (like architected timers actually).
> 
> Well the omap5 uses the A15 architecture timer.  The omap4 does not
> since the A9 didn't have one.

The point is: the cortex A9 global timer runs at half the processor
frequency, that is 500 MHz for a 1GHz processor: that gives a much
better resolution than a timer with a frequency lower than 10 MHz
you get with a cortex A15. So since the cortex A15 is newer than the
cortex A9, it could be expected to do better or at least be
equivalent, rather than do much worse.

> 
> Now they do have lots of other timers in the chip that can be programmed.
> I wonder if that could be used to make something much better.
> 
> I am pretty sure the omap5432 uses 6.144 MHz just like the am572x was
> supposed to (if it wasn't for the errata that makes it 6.147541
> MHz instead).

Yes, 5MHZ, 6 MHZ, that is the same bad order of magnitude.

> 
> Looking at the manual for the am572x it looks like the general purpose
> timers are only 32 bit and can run at either 32.768 KHz or system clock
> (usually 20 MHz).  That's not much help.

Once again: Xenomai extends 32 bits counter to 64 bits in software.
So, a 32 bits counter running at 20 MHz is still better than the
architected timer running at 6MHz. 6 MHz is so low that by reading
twice the counter in less than 166ns (which is really really doable
on these processors), you could get twice the same value. On cortex
A9, I could read the counter twice in userspace in 22ns, and get
different values. On cortex A9, anything lower than 50 MHz would
not have been sufficient for user-space.

-- 
					    Gilles.


  reply	other threads:[~2015-05-01 14:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 15:53 [Xenomai] Ipipe-core patched kernel fails to start when certain platform drivers are enabled Hongfei Cheng
2015-04-30 16:17 ` Gilles Chanteperdrix
2015-04-30 18:12   ` Hongfei Cheng
2015-04-30 18:14     ` Gilles Chanteperdrix
2015-04-30 18:17       ` Hongfei Cheng
2015-04-30 18:31 ` Gilles Chanteperdrix
2015-04-30 20:04   ` Hongfei Cheng
2015-04-30 20:14     ` Gilles Chanteperdrix
2015-04-30 21:21       ` Lennart Sorensen
2015-04-30 21:27         ` Gilles Chanteperdrix
2015-05-01 13:45           ` Lennart Sorensen
2015-05-01 13:56             ` Gilles Chanteperdrix
2015-05-01 14:36               ` Lennart Sorensen
2015-05-01 14:44                 ` Gilles Chanteperdrix
2015-05-01 15:33                   ` Lennart Sorensen
2015-05-13 17:01                     ` Lennart Sorensen
2015-05-13 17:33                       ` Lennart Sorensen
2015-05-01 14:00             ` Gilles Chanteperdrix
2015-04-30 21:34         ` Gilles Chanteperdrix
2015-05-01 14:20           ` Lennart Sorensen
2015-05-01 14:30             ` Gilles Chanteperdrix [this message]
2015-05-01 15:11               ` Lennart Sorensen
2015-05-01 15:22                 ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150501143045.GH1993@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.