linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Bauer <hannes_bauer@aon.at>
To: linux-rt-users@vger.kernel.org
Subject: Re: sched_clock for arm
Date: Tue, 03 May 2011 09:13:01 +0200 (CEST)	[thread overview]
Message-ID: <1304406781.4dbfaafd47710@webmail.aon.at> (raw)
In-Reply-To: <1304003318.4db982f68a671@webmail.aon.at>

Does nobody have any idea about that topic?

At the moment im using that implementation and it seems to work unless i am using cyclcitest with -i < 1000.
However when i \"cat /proc/timer_list\" i sometimes get \"active timers\" that expire before \"next_event\", which seems somhow odd to me. The difference in that values is about 1 ms which should be easily be able to handle by the highres timer...

> Hello everybody!

Again i am a little bit confused - sorry!

For the lpc2478 board (arm7tdmi-s), with Patrice Kadionik\\\'s help, I implemented a clocksource and clock event source to achieve hrtimer resolution. I realised i have to implement a sched_clock function too, in order to achieve better scheduling resolution. I took some examples from the arch/arm directory, where totally different solution exist. Very few using a cnt32_to_63() functions, others only clocksource_cyc2ns().
Is it ok to implement a sched_clock with only clocksource_cyc2ns() with a 72MHz 32bit counter, since it wraps somehow often?
It seems the newest preempt-release announced by Thomas Gleixner a few weeks ago has a new arm sched_clock support provided by Russel King, but I am using 2.6.33.7.2-rt30, where those features are not built in and i cannot update the kernel yet
I found a conversation initiated by Johannes Stezenbach (http://ns.spinics.net/lists/arm-kernel/msg86383.html) having the same toopic, but actually no specific answer to that question was posted.

So is it enough to use clocksource_cyc2ns(), or do I have use something else, and if yould you please point out some code that does exactly what needs to be done for arm architecture.

At the moment my implemetations looks as following:

   unsigned long long notrace sched_clock(void)
   {
   return clocksource_cyc2ns(pit_clk.read(&pit_clk),pit_clk.mult,pit_clk.shift);
   }

I would post the code as example here in order to give people a better 

Thank you again and kind regards
Johannes Bauer
--
To unsubscribe from this list: send the line \"unsubscribe linux-rt-users\" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



      reply	other threads:[~2011-05-03  7:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 10:47 Fwd: Re: preempt-rt amd uClibc Johannes Bauer
2011-04-20 12:00 ` Patrice Kadionik
2011-04-28 15:08   ` sched_clock for arm Johannes Bauer
2011-05-03  7:13     ` Johannes Bauer [this message]

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=1304406781.4dbfaafd47710@webmail.aon.at \
    --to=hannes_bauer@aon.at \
    --cc=linux-rt-users@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).