All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai] x86 Linux with xenomai and i915 graphics stall
@ 2013-01-22 22:23 Daniel M. Drucker, Ph.D.
  2013-01-22 22:27 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel M. Drucker, Ph.D. @ 2013-01-22 22:23 UTC (permalink / raw)
  To: xenomai

Hi Gilles et al.,

> That is unusual, a typical latency on x86 is under 50us (and this is a
> conservative bound). In order to investigate this, enable the I-pipe
> tracer in the kernel configuration and run latency -f. Also set the
> number of backtrace points to a large value, say 1000 or 10000 and post
> the trace here.

Here is the trace before running glxgears. The worst latency is 32us.

https://gist.github.com/raw/4599095/203ce77b2bb8e1b2c797302d33ce1a7b0a18fbac/gistfile1

And here is the trace while running glxgears. The worst latency is 724us.

https://gist.github.com/raw/4599099/27054c46f246999375346ed942f76d0757c4fa0a/gistfile1

Thanks,
Daniel and Andy


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Xenomai] x86 Linux with xenomai and i915 graphics stall
@ 2013-01-21 23:04 A User
  2013-01-21 23:13 ` Gilles Chanteperdrix
  2013-01-22 19:32 ` A User
  0 siblings, 2 replies; 11+ messages in thread
From: A User @ 2013-01-21 23:04 UTC (permalink / raw)
  To: xenomai@xenomai.org

I'm trying to run a Linux/Xenomai system with Ubuntu 12.04 LTS
distro including X Window System on an Intel x86 board.

linux: 3.2.21
xenomai: 2.6.1
i-pipe Patch: 3.2.21-x86-1

At present, the board I am testing is a DFI-Itox CR100-CRM with an i5
CPU, it has Intel HD Graphics 4000, and runs the Linux i915 driver.

Less interesting to you, but useful for me, it has mini-PCIe,
a handful of rs232s, and mini-ITX form factor.

Following the Xenomai x86 config advice, I turn off CONFIG_PCI_MSI

http://www.xenomai.org/index.php/Configuring_x86_kernels#Message_Signaled_Interrupts_.28MSI_and_MSI-X.29

When I build, install, and boot, the X Window system is sluggish on
about 1/4 to 1/2 the boots.  When it is sluggish, graphics will freeze
until I wiggle the mouse.  When this happens, I get this in dmesg,
several times per minute:

[drm:i915_hangcheck_ring_idle] ERROR Hangcheck timer elapsed... render ring idle [waiting on 1403, at 1403], missed IRQ?

Googling suggests that when this bug appeared in the Intel driver,
the code involved MSI:

https://patchwork.kernel.org/patch/879522/

+ if (IS_GEN6(dev))
+ /* allow blitter user interrupt to generate a MSI write from
+ the ISR */
+ I915_WRITE(GEN6_BLITTER_HWSTAM,
+ 0xffffffff & ~GEN6_BLITTER_USER_INTERRUPT);

There are a few hits about GPU stalling on Linux kernel and and Intel
graphics mailings lists when you google for "i915 msi gen6" or
i915_hangcheck_ring_idle (mostly from mid-2011).

I have tried various other hacks to try to work around this problem,
there are bug fix discussion threads that suggest turning off:

  /sys/module/i915/parameters/semaphores
  or
  /sys/modules/i915/parameters/i915_enable_rc6

but these did not work for me.

It seems that for me, if the bug appears, it appears immediately at
boot time, and if it does not appear, it does not appear again until reboot,
but I am not fully sure of this.

When I run with CONFIG_PCI_MSI turned off, I get good Xenomai latency,
but the X Window System is unusable.  With MSI turned on, graphics is
solid, but latency jumps to about 450 usec when I run glxgears
(instead of avg 10 usec, max 50 usec).

I believe that if I want to use X Window system in a recent x86 system
with motherboard graphics, the most popular choice (the only choice?)
is i915.

Do you have any advice on how I can run with i915 and Xenomai with
this hardware and software?

-Andy



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-04-13 13:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22 22:23 [Xenomai] x86 Linux with xenomai and i915 graphics stall Daniel M. Drucker, Ph.D.
2013-01-22 22:27 ` Gilles Chanteperdrix
2013-01-22 22:29   ` Daniel M. Drucker, Ph.D.
2013-01-22 22:47     ` Gilles Chanteperdrix
     [not found]       ` <CAD1EtogPNsGWkA0_puttwFTGMfZ6aW1_1WniND0GRJYRba389Q@mail.gmail.com>
2013-01-24 22:22         ` Daniel M. Drucker, Ph.D.
2013-01-25 11:44           ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2013-01-21 23:04 A User
2013-01-21 23:13 ` Gilles Chanteperdrix
2013-01-22 19:32 ` A User
2013-01-22 19:37   ` Gilles Chanteperdrix
2013-04-13 13:27   ` Gilles Chanteperdrix

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.