All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Peter Pastor <peter.pastor@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] latency spike when starting opengl windows
Date: Sat, 09 Oct 2010 00:20:46 +0200	[thread overview]
Message-ID: <4CAF993E.3080003@domain.hid> (raw)
In-Reply-To: <AANLkTi=6tAnApCNw9hzQUEYR7BcsgDSU3YA5N+xn-uN2@domain.hid>

Peter Pastor wrote:
> Hey there,
> 
> I noticed a spike in the latency over around 600-800microseconds when
> starting an opengl window.
> 
> I have the SMI workaround enabled and also included my device id in the
> 
> /usr/src/xenomai/ksrc/arch/x86/smi.c
> 
> file
> 
> lspci -vvv -nn shows a
> 
> Intel Corporation 82801JIR (ICH10R) LPC Interface Controller [8086:3a16]
> 
> so I added
> 
> {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_1)},

You are using an outdated version of Xenomai, because the two last
releases contained this ID.

> 
> After recompiling the kernel I finally saw
> 
> [    2.443949] Xenomai: SMI-enabled chipset found
> 
> ( I did not see that line before )
> but unfortunately I also saw
> 
> [    2.443957] Xenomai: SMI workaround failed!
> 
> Well, the latency test still showed spikes of about 600-800microsends when
> for example starting or closing glxgears. I am using a nvidia FxQuadro FX
> 4800 and I am using the latest nvidia driver which I downloaded from the
> nvidia homepage (256.53).
> 
> I am running
> Linux xeno_machine 2.6.31.4-ipipe #1 SMP Thu Oct 7 18:13:54 PDT 2010 x86_64
> GNU/Linux
> and Xenomai version is 2.5.2

Needless to say, you need to recompile the nvidia drivers for the
Adeos-patched kernel. Your problem may not be SMIs, but an issue with
the X server you are using.

Just looking at the nvidia driver code, I see nothing wrong (namely,
they use local_irq_save and spin_lock_irqsave, so, they will use the
Adeos versions of these services), though when I see:

#define NV_MAX_ISR_DELAY_US           20000


RM_STATUS NV_API_CALL os_delay_us(NvU32 MicroSeconds)
{
    unsigned long mdelay_safe_msec;
    unsigned long usec;

#ifdef NV_CHECK_DELAY_ACCURACY
    struct timeval tm1, tm2;

    do_gettimeofday(&tm1);
#endif

    if (in_irq() && (MicroSeconds > NV_MAX_ISR_DELAY_US))
        return RM_ERROR;


I understand that these people do not care for latencies lower than
20ms. The Adeos patch will allow Xenomai to preempt this driver code,
but if the opengl libraries does the same thing in user-space there is
nothing we can do. The only thing we can tell you to do is to follow the
advice in the TROUBLESHOOTING guide.

-- 
                                                                Gilles.


  reply	other threads:[~2010-10-08 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08  1:44 [Xenomai-help] latency spike when starting opengl windows Peter Pastor
2010-10-08 22:20 ` Gilles Chanteperdrix [this message]
2010-10-09  8:26 ` 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=4CAF993E.3080003@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=peter.pastor@domain.hid \
    --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.