All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nikita V. Youshchenko" <yoush@cs.msu.su>
To: linux-kernel@vger.kernel.org
Cc: Alexander Kaliadin <akaliadin@mvista.com>
Subject: [rt-preempt / powerpc] Looks like tick_sched_timer() is a major latency source
Date: Tue, 23 Jun 2009 20:55:11 +0400	[thread overview]
Message-ID: <200906232055.12412@zigzag.lvk.cs.msu.su> (raw)

Hi

I was trying to get minimum possible in-kernel latencies on a freescale 
8360 CPU based board (powerpc arch). There is a project where <30 us worst 
case latency is required, and question was - is it possible to use 
linux+preempt-rt (which is preferred for a number of reason) or not.

I used 2.6.29.5-rt21 kernel, which, for my best knowledge, was the 
last "release" of preempt-rt at the moment when I started.

I used 8360's Generic Timer Module to both to generate interrupts and to 
measure lanencies. GTM timers continue to count after firing an interrupt, 
so latency may be measured my reading current timer value and comparing 
that with the value at which interrupt was generated. I believe this 
method is both simple and accurate.

The result is:

- average latency up to IRQF_NODELAY interrupt header is 2-3 us, even on a 
system with high i/o and cpu load. To generate load, I used a flood ping 
and several 'while true; do true; done' cpu-eaters.

- but worst-case latency is BAD. I occasionally got >50 us even on idle 
system.

I tried hard to identify the latency source, and at some moment discovered 
tick_sched_timer() from kernel/time/tick-sched.c. This routine is called 
from timer interrupt with hardware interrupts disabled, and may execute 
for 50 us and more.

Could someone please comment on this?
Is it possible to move (part of) tick_sched_timer() call tree out of 
hardware-interrupts-disabled context without breaking things?

Nikita

Please CC: reply to my e-mail address. Thanks.

             reply	other threads:[~2009-06-23 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 16:55 Nikita V. Youshchenko [this message]
2009-06-23 19:11 ` [rt-preempt / powerpc] Looks like tick_sched_timer() is a major latency source Thomas Gleixner
2009-06-23 20:01   ` Nikita V. Youshchenko

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=200906232055.12412@zigzag.lvk.cs.msu.su \
    --to=yoush@cs.msu.su \
    --cc=akaliadin@mvista.com \
    --cc=linux-kernel@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 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.