All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kurijn Buys <Kurijn.Buys@open.ac.uk>
To: Xenomai@xenomai.org
Subject: [Xenomai] Analogy NI 6052E
Date: Wed, 11 Dec 2013 16:44:58 +0000	[thread overview]
Message-ID: <3F3EA914-853F-49FD-95E2-5148A5CD7440@open.ac.uk> (raw)
In-Reply-To: <52A5E155.2040303@xenomai.org>

Hi,

Now that I got rid if my latency issue, I'm dealing with an Analogy problem. (I repeated my system specs below)

After running analogy_config, The NI card (6052E) seems to attach to the analogy devices:
[  128.594303] Analogy: analogy_ni_pcimio: pcimio_attach: found pci-6052e board
[  128.594358] Analogy: analogy_ni_pcimio: pcimio_attach: found irq 21
and
--  Analogy devices --
| idx | status | driver
|  00 | Linked | analogy_ni_pcimio

But when I try to observe the subdevices with cat /proc/analogy/00-analogy_ni_pcimio
it says "Killed" and the x-server crashes.
Then the kernel log states:
[  138.273837] BUG: unable to handle kernel NULL pointer dereference at 00000001
[  138.273910] IP: [<f85f7a72>] a4l_rdproc_transfer+0x32/0x160 [xeno_analogy]
[  138.273972] *pde = 00000000
[  138.274002] Oops: 0000 [#1] PREEMPT SMP
[  138.274050] Modules linked in: binfmt_misc snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy i915 snd_seq_oss fbcon analogy_ni_pcimio tileblit snd_seq_midi font bitblit snd_rawmidi analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite softcursor snd_seq_midi_event xeno_analogy drm_kms_helper snd_seq drm snd_timer microcode ppdev psmouse snd_seq_device parport_pc serio_raw snd intel_agp i2c_algo_bit video lp intel_gtt agpgart lpc_ich soundcore parport snd_page_alloc e1000e ptp pps_core
[  138.274601] CPU: 0 PID: 1273 Comm: cat Not tainted 3.10.0-xenomai-2.6.3+ #1
[  138.274649] Hardware name: Viglen D945GTP/D945GTP, BIOS NT94510J.86A.3309.2006.0109.1312 01/09/2006
[  138.274707] task: e0e5c060 ti: e0efc000 task.ti: e0efc000
[  138.274746] EIP: 0060:[<f85f7a72>] EFLAGS: 00010246 CPU: 0
[  138.274789] EIP is at a4l_rdproc_transfer+0x32/0x160 [xeno_analogy]
[  138.274831] EAX: 00000000 EBX: e13ffe40 ECX: e0efdeec EDX: f85f896a
[  138.274874] ESI: e13ffe40 EDI: 00000001 EBP: e0efdf00 ESP: e0efdee4
[  138.274916]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  138.274954] CR0: 8005003b CR2: 00000001 CR3: 20d85000 CR4: 000007d0
[  138.274997] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[  138.275039] DR6: ffff0ff0 DR7: 00000400
[  138.275067] I-pipe domain Linux
[  138.275091] Stack:
[  138.275110]  e13ffe40 f85f896a 000000d0 e0e87000 00000000 e13ffe40 00000001 e0efdf40
[  138.276018]  c02cc825 00020000 e0efdf30 09b0b000 e13ffe68 00008000 00000000 e0c6c200
[  138.276018]  e0c6c200 00008000 00000000 00000000 e0c6c200 e0d94600 c02cc730 e0efdf64
[  138.276018] Call Trace:
[  138.276018]  [<c02cc825>] seq_read+0xf5/0x390
[  138.276018]  [<c02cc730>] ? seq_lseek+0x170/0x170
[  138.276018]  [<c02fdc83>] proc_reg_read+0x53/0x90
[  138.276018]  [<c02fdc30>] ? proc_reg_write+0x90/0x90
[  138.276018]  [<c02ae3d7>] vfs_read+0x97/0x110
[  138.276018]  [<c02aed46>] SyS_read+0x56/0x90
[  138.276018]  [<c06d0f4f>] sysenter_do_call+0x12/0x16
[  138.276018] Code: ec 10 e8 12 9a 0d c8 89 d7 89 c3 c7 44 24 04 56 89 5f f8 89 04 24 e8 fe 46 cd c7 c7 44 24 04 6a 89 5f f8 89 1c 24 e8 ee 46 cd c7 <8b> 07 85 c0 0f 84 0c 01 00 00 31 c0 31 f6 eb 5b 8d b6 00 00 00
[  138.276018] EIP: [<f85f7a72>] a4l_rdproc_transfer+0x32/0x160 [xeno_analogy] SS:ESP 0068:e0efdee4
[  138.276018] CR2: 0000000000000001
[  138.320577] ---[ end trace a8594ddaa188276f ]---


It seems to me that this issue is related to this thread: http://www.mail-archive.com/xenomai-help@gna.org/msg10134.html
However, in my case the attach itself seems to work. And I suppose the solution for this thread was an update of the kernel patch, so maybe I'm dealing with a new issue for my specific card..?

I enabled Analogy drivers (as explained here http://www.lara.unb.br/wiki/index.php/Data_Acquisition_Xenomai_Analogy),
and disabled Comedi drivers (Data acquisition support (comedi) ).

I checked the specs of the card with its description in "ni_pcimio.c" and that looks all right for what I understand. (I don't know for these: caldac ai_speed).
I tried booting with pci=routeirq
I tried another PCI connection, even another PC.

My system:
Hardware: Pentium IV (lspci: 3,2GHz, i686, 32,64bit, 2 cpu's), 2Gb RAM
Software: Ubuntu 10.04, kernel&patch 3.10 (but also tried with 2.6.38.8 and 3.8), Xenomai 2.6.3


Thanks!
]{urijn

Op 9-dec.-2013, om 15:27 heeft Gilles Chanteperdrix het volgende geschreven:

On 12/09/2013 04:19 PM, Kurijn Buys wrote:
Op 5-dec.-2013, om 11:09 heeft Gilles Chanteperdrix het volgende geschreven:

On 12/05/2013 01:44 AM, Kurijn Buys wrote:

Op 4-dec.-2013, om 17:43 heeft Philippe Gerum het volgende geschreven:

On 12/04/2013 05:03 PM, Gilles Chanteperdrix wrote:
On 12/04/2013 02:19 PM, Philippe Gerum wrote:
On 12/04/2013 01:00 PM, Gilles Chanteperdrix wrote:
Ok, could you push the branch somewhere so that I can try it?


testing/ipipe-3.8-i915-fix

I could test it, I no longer get high latencies while moving a large
opengl window. So, it looks good.

I've it running as well (with the priority coupling option disabled this time).

The options I asked you to change were meant to eliminate any possible
source for high latencies in case of bug. You can return to a normal
configuration now: re-enable SMP or APIC if you prefer to remain in
single processor mode, disable the I-pipe tracer if you want to avoid
the overhead, and re-enable priority coupling if you prefer to use it.

Re-enabling SMP is fine, but doesn't necessarily seem to improve the latency.
While I'm still having some small pikes, they keep below 60us, so that is fine to me.

If your processor has hyper-threading, you may have much better results
indeed in single processor mode, but enabling APIC and IO/APIC to avoid
the spikes you got when using the legacy PIC.

Experiences on atom processor:
http://www.xenomai.org/~gch/core-3.4-latencies/atom.png

show that disabling hyper-threading divides latency by 2.

--
   Gilles.

-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302).

  parent reply	other threads:[~2013-12-11 16:44 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 11:38 [Xenomai] latency spikes under load Kurijn Buys
2013-12-03 11:54 ` Gilles Chanteperdrix
2013-12-03 12:31 ` Gilles Chanteperdrix
2013-12-03 13:07   ` Kurijn Buys
2013-12-03 13:23     ` Gilles Chanteperdrix
2013-12-03 15:31       ` Kurijn Buys
2013-12-03 15:54         ` Gilles Chanteperdrix
2013-12-03 16:49           ` Kurijn Buys
2013-12-03 18:50             ` Gilles Chanteperdrix
2013-12-04  8:44               ` Philippe Gerum
2013-12-04  8:51                 ` Gilles Chanteperdrix
2013-12-04  9:27                   ` Philippe Gerum
2013-12-04  9:31                     ` Gilles Chanteperdrix
2013-12-04  9:40                       ` Philippe Gerum
2013-12-04  9:51                         ` Gilles Chanteperdrix
2013-12-04 10:29                           ` Philippe Gerum
2013-12-04 10:33                             ` Philippe Gerum
2013-12-04 11:04                               ` Philippe Gerum
2013-12-04 11:10                                 ` Gilles Chanteperdrix
2013-12-04 11:36                                   ` Philippe Gerum
2013-12-04 11:59                                     ` Philippe Gerum
2013-12-04 12:00                                       ` Gilles Chanteperdrix
2013-12-04 13:19                                         ` Philippe Gerum
2013-12-04 16:03                                           ` Gilles Chanteperdrix
2013-12-04 17:43                                             ` Philippe Gerum
2013-12-05  0:44                                               ` Kurijn Buys
2013-12-05 10:28                                                 ` Kurijn Buys
2013-12-05 11:05                                                   ` Philippe Gerum
2013-12-05 11:09                                                 ` Gilles Chanteperdrix
2013-12-09 15:19                                                   ` Kurijn Buys
2013-12-09 15:27                                                     ` Gilles Chanteperdrix
2013-12-11 14:23                                                       ` Kurijn Buys
2013-12-11 14:51                                                         ` Lennart Sorensen
2013-12-11 16:04                                                           ` Tobias Luksch
2013-12-11 17:21                                                             ` Gilles Chanteperdrix
2013-12-11 16:44                                                       ` Kurijn Buys [this message]
2014-03-21 14:33                                                         ` [Xenomai] Analogy NI 6052E Erhart Robert (CC-DA/ESR3)
2014-03-22 16:58                                                           ` Gilles Chanteperdrix

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=3F3EA914-853F-49FD-95E2-5148A5CD7440@open.ac.uk \
    --to=kurijn.buys@open.ac.uk \
    --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.