All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Jeroen Van den Keybus <jeroen.vandenkeybus@domain.hid>
Cc: Xenomai-core@domain.hid
Subject: Re: [Xenomai-core] Long execution time inside __ipipe_unstall_iret_root()
Date: Mon, 12 Nov 2007 18:58:53 +0100	[thread overview]
Message-ID: <4738945D.2030503@domain.hid> (raw)
In-Reply-To: <fd6a47a90711120936m6c8eb691na49fae868b803470@domain.hid>

[Save the CCs!]

Jeroen Van den Keybus wrote:
>> Indeed, 300 us are too long. Maybe long DMA bursts on your PCI bus? Can
>> you exclude certain devices from your load to check for this (no hardisk
>> load e.g., use nfs instead, then no network load, etc.)?
> 
> 
> I already tried setting PCI latency timers of everything except my card to
> e.g. 0x08. No difference though.
> 
>>> What you say is that between tracepoint 0x27 and 0x29, we may have
>> entered
>>> userland. But where does this happen, given that point 0x28 is not
>> executed
>>> ?
>> Nope, user land is entered _after_ 0x29 (you need to read the numbers
>> with an offset of one: the delay is between
>> __ipipe_unstall_iret_root+0xb6 and _ipipe_handle_irq+0xe).
> 
> 
> Ah!  Now I see. So basically I would have some user space code that is doing
> something that would delay my interrupts considerably, irrespective of the
> fact that IRQs are enabled.
> 
> I once tried a WBINVD in a user space task and it has a really devastating
> effect on RT (basically locks the CPU for 200us). If there was a way of
> preventing this kind of instructions...
> 

Ouch, this shouldn't be allowed in user space! WBINVD is a privileged
instruction. Do we leak privileges to user land??? Please check if your
execution mode (privilege ring) is correct there.

But indeed, wbinvd is devastating if you can execute it, causing
typically around 300 us latencies, at worst even milliseconds
(cache-size and state dependent)!

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


  parent reply	other threads:[~2007-11-12 17:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 15:39 [Xenomai-core] Long execution time inside __ipipe_unstall_iret_root() Jeroen Van den Keybus
2007-11-12 16:47 ` Jan Kiszka
2007-11-12 17:11   ` Jeroen Van den Keybus
2007-11-12 17:25     ` Jan Kiszka
     [not found]       ` <fd6a47a90711120936m6c8eb691na49fae868b803470@domain.hid>
2007-11-12 17:58         ` Jan Kiszka [this message]
2007-11-12 18:10           ` Jeroen Van den Keybus
2007-11-12 18:27             ` Jan Kiszka

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=4738945D.2030503@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=Xenomai-core@domain.hid \
    --cc=jeroen.vandenkeybus@domain.hid \
    /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.