* [Xenomai-core] RTDM timerbench problems
@ 2006-01-04 16:21 Stelian Pop
2006-01-04 16:49 ` Jan Kiszka
2006-01-04 17:19 ` Gilles Chanteperdrix
0 siblings, 2 replies; 5+ messages in thread
From: Stelian Pop @ 2006-01-04 16:21 UTC (permalink / raw)
To: xenomai-core
Hi,
I'm trying to use the xeno_timerbench as a replacement to the old 2.0
klatency module and I encounter some problems.
This is on my in-progress ARM Xenomai port. User space latency and old
klatency work great (my board has some hardware latency problems though
- latencies can be as high as 500 us..). This in on a 2.6.14.5 kernel
using the latest ipipe patch and the latest SVN trunk xenomai.
Note that I never used the RTDM skin until now, so the problem could be
as well in the core RTDM code.
1) When compiled statically into the kernel, it does not work at all:
# /usr/xenomai/testsuite/latency/latency -p 10000 -t 1
== Sampling period: 10000 us
== Test mode: in-kernel periodic task
latency: failed to open benchmark device, code -19
(modprobe xeno_timerbench?)
2) When loaded as a module, it does work in -t 2 mode (kernel timer
handler):
# /usr/xenomai/testsuite/latency/latency -p 10000 -t 2
== Sampling period: 10000 us
== Test mode: in-kernel timer handler
warming up...
RTT| 00:00:01 (in-kernel timer handler, 10000 us period)
RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
RTD| 6000| 14640| 72000| 0| 6000| 72000
RTD| 7000| 15060| 65000| 0| 6000| 72000
RTD| 7000| 15470| 72000| 0| 6000| 72000
---|------------|------------|------------|--------|-------------------------
RTS| 6000| 15056| 72000| 0| 00:00:03/00:00:03
But in -t 1 mode (kernel periodic task) it hangs hard just after the warming period:
# /usr/xenomai/testsuite/latency/latency -p 10000 -t 1
== Sampling period: 10000 us
== Test mode: in-kernel periodic task
warming up...
Before hanging, sometimes it just prints:
Unable to handle kernel NULL pointer dereference at virtual address 0000004d
Sometimes the oops is more complete (note that sometimes it also hangs in the middle of
the printout):
Unable to handle kernel NULL pointer dereference at virtual address 0000004d
pgd = c0004000
[0000004d] *pgd=00000000
Internal error: Oops: 817 [#1]
Modules linked in: xeno_timerbench
CPU: 0
PC is at xnpod_schedule+0x6b4/0x7f0
LR is at xnpod_schedule+0x54c/0x7f0
pc : [<c0056cc4>] lr : [<c0056b5c>] Not tainted
sp : c7d41830 ip : c79e8044 fp : c7d41860
r10: c0283c2c r9 : c0282
Does this rings a bell to someone ?
Thanks.
Stelian.
--
Stelian Pop <stelian.pop@domain.hid>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] RTDM timerbench problems
2006-01-04 16:21 [Xenomai-core] RTDM timerbench problems Stelian Pop
@ 2006-01-04 16:49 ` Jan Kiszka
2006-01-04 17:10 ` Stelian Pop
2006-01-04 17:19 ` Gilles Chanteperdrix
1 sibling, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2006-01-04 16:49 UTC (permalink / raw)
To: Stelian Pop; +Cc: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 3533 bytes --]
Stelian Pop wrote:
> Hi,
>
> I'm trying to use the xeno_timerbench as a replacement to the old 2.0
> klatency module and I encounter some problems.
>
> This is on my in-progress ARM Xenomai port. User space latency and old
> klatency work great (my board has some hardware latency problems though
> - latencies can be as high as 500 us..). This in on a 2.6.14.5 kernel
> using the latest ipipe patch and the latest SVN trunk xenomai.
>
> Note that I never used the RTDM skin until now, so the problem could be
> as well in the core RTDM code.
Almost impossible - there are no bugs! ;)
>
> 1) When compiled statically into the kernel, it does not work at all:
> # /usr/xenomai/testsuite/latency/latency -p 10000 -t 1
> == Sampling period: 10000 us
> == Test mode: in-kernel periodic task
> latency: failed to open benchmark device, code -19
> (modprobe xeno_timerbench?)
>
> 2) When loaded as a module, it does work in -t 2 mode (kernel timer
> handler):
> # /usr/xenomai/testsuite/latency/latency -p 10000 -t 2
> == Sampling period: 10000 us
> == Test mode: in-kernel timer handler
> warming up...
> RTT| 00:00:01 (in-kernel timer handler, 10000 us period)
> RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
> RTD| 6000| 14640| 72000| 0| 6000| 72000
> RTD| 7000| 15060| 65000| 0| 6000| 72000
> RTD| 7000| 15470| 72000| 0| 6000| 72000
> ---|------------|------------|------------|--------|-------------------------
> RTS| 6000| 15056| 72000| 0| 00:00:03/00:00:03
>
> But in -t 1 mode (kernel periodic task) it hangs hard just after the warming period:
>
> # /usr/xenomai/testsuite/latency/latency -p 10000 -t 1
> == Sampling period: 10000 us
> == Test mode: in-kernel periodic task
> warming up...
>
> Before hanging, sometimes it just prints:
> Unable to handle kernel NULL pointer dereference at virtual address 0000004d
>
> Sometimes the oops is more complete (note that sometimes it also hangs in the middle of
> the printout):
> Unable to handle kernel NULL pointer dereference at virtual address 0000004d
> pgd = c0004000
> [0000004d] *pgd=00000000
> Internal error: Oops: 817 [#1]
> Modules linked in: xeno_timerbench
> CPU: 0
> PC is at xnpod_schedule+0x6b4/0x7f0
> LR is at xnpod_schedule+0x54c/0x7f0
> pc : [<c0056cc4>] lr : [<c0056b5c>] Not tainted
> sp : c7d41830 ip : c79e8044 fp : c7d41860
> r10: c0283c2c r9 : c0282
>
> Does this rings a bell to someone ?
Well, seriously, I don't believe it's a RTDM-related issue as the
invocation of the timer-handler and the kernel-task tests are quite
similar. The former works, the latter fails inside the scheduler, this
rather indicates some issue in the arch-specific part of the scheduler
(the timer test runs in IRQ-context).
Did you test some RTDM or native kernel-only timed-task before? With
RTDM this can be as trivial as this one:
#include <rtdm/rtdm_driver.h>
rtdm_task_t heartbeat_task;
int end = 0;
#define HEARTBEAT_PERIOD 100000000 /* 100 ms */
void heartbeat(void *cookie)
{
while (!end) {
rtdm_task_wait_period();
rtdm_printk("I'm alive.");
}
}
int init_module(void)
{
return rtdm_task_init(&heartbeat_task, "heartbeat", heartbeat, NULL,
99, HEARTBEAT_PERIOD);
}
void cleanup_module(void)
{
end = 1;
rtdm_task_join_nrt(&heartbeat_task, 100);
}
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] RTDM timerbench problems
2006-01-04 16:49 ` Jan Kiszka
@ 2006-01-04 17:10 ` Stelian Pop
0 siblings, 0 replies; 5+ messages in thread
From: Stelian Pop @ 2006-01-04 17:10 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
Le mercredi 04 janvier 2006 à 17:49 +0100, Jan Kiszka a écrit :
> Stelian Pop wrote:
> > Hi,
> >
> 88> I'm trying to use the xeno_timerbench as a replacement to the old 2.0
> > klatency module and I encounter some problems.
> >
> > This is on my in-progress ARM Xenomai port. User space latency and old
> > klatency work great (my board has some hardware latency problems though
> > - latencies can be as high as 500 us..). This in on a 2.6.14.5 kernel
> > using the latest ipipe patch and the latest SVN trunk xenomai.
> >
> > Note that I never used the RTDM skin until now, so the problem could be
> > as well in the core RTDM code.
>
> Almost impossible - there are no bugs! ;)
there is no spoon either :)
> Well, seriously, I don't believe it's a RTDM-related issue as the
> invocation of the timer-handler and the kernel-task tests are quite
> similar. The former works, the latter fails inside the scheduler, this
> rather indicates some issue in the arch-specific part of the scheduler
> (the timer test runs in IRQ-context).
>
> Did you test some RTDM or native kernel-only timed-task before? With
> RTDM this can be as trivial as this one:
As I said in the previous post, the old klatency works.
As for your rtdm example:
# insmod test-rtdm.ko
test_rtdm: module license 'unspecified' taints kernel.
# I'm alive.I'm alive.I'm alive.I'm alive.I'm alive.I'm alive.I'm
alive.I'm alive.I'm alive.I'm alive.I'm alive.I'm alive.I'm alive.I'm
alive.I'm alive.I'm alive.
seems to work fine too (and I'm even able to rmmod the module).
Stelian.
--
Stelian Pop <stelian.pop@domain.hid>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] RTDM timerbench problems
2006-01-04 16:21 [Xenomai-core] RTDM timerbench problems Stelian Pop
2006-01-04 16:49 ` Jan Kiszka
@ 2006-01-04 17:19 ` Gilles Chanteperdrix
2006-01-04 17:28 ` Stelian Pop
1 sibling, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2006-01-04 17:19 UTC (permalink / raw)
To: xenomai-core
Stelian Pop wrote:
> Before hanging, sometimes it just prints:
> Unable to handle kernel NULL pointer dereference at virtual address 0000004d
>
> Sometimes the oops is more complete (note that sometimes it also hangs in the middle of
> the printout):
> Unable to handle kernel NULL pointer dereference at virtual address 0000004d
> pgd = c0004000
> [0000004d] *pgd=00000000
> Internal error: Oops: 817 [#1]
> Modules linked in: xeno_timerbench
> CPU: 0
> PC is at xnpod_schedule+0x6b4/0x7f0
> LR is at xnpod_schedule+0x54c/0x7f0
> pc : [<c0056cc4>] lr : [<c0056b5c>] Not tainted
> sp : c7d41830 ip : c79e8044 fp : c7d41860
> r10: c0283c2c r9 : c0282
>
> Does this rings a bell to someone ?
Not much, but two remarks:
- last summer, there use to be such a problem on x86 because of some
wrong FPU switch. So, is FPU enabled ? Are you compiling latency with
-msoft-float ?
When announcing the ARM Adeos port, you told us that not all
exceptions were trapped by the Adeos patch. If one of the FPU
exceptions is not trapped, it would explain why we do not get the
usual message "Invalid use of FPU at ..." before the oops.
- as far as I know, xnpod_schedule never recurses, so, there is little
chance for PC and LR to be both in xnpod_schedule. If I am not wrong,
it means that you will have to have a look at the disassembly (sorry)
and see in really what functions the bugs happen. Sometimes the -r and
-S option of objdump help...
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] RTDM timerbench problems
2006-01-04 17:19 ` Gilles Chanteperdrix
@ 2006-01-04 17:28 ` Stelian Pop
0 siblings, 0 replies; 5+ messages in thread
From: Stelian Pop @ 2006-01-04 17:28 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai-core
Le mercredi 04 janvier 2006 à 18:19 +0100, Gilles Chanteperdrix a
écrit :
> Stelian Pop wrote:
> > Before hanging, sometimes it just prints:
> > Unable to handle kernel NULL pointer dereference at virtual address 0000004d
> >
> > Sometimes the oops is more complete (note that sometimes it also hangs in the middle of
> > the printout):
> > Unable to handle kernel NULL pointer dereference at virtual address 0000004d
> > pgd = c0004000
> > [0000004d] *pgd=00000000
> > Internal error: Oops: 817 [#1]
> > Modules linked in: xeno_timerbench
> > CPU: 0
> > PC is at xnpod_schedule+0x6b4/0x7f0
> > LR is at xnpod_schedule+0x54c/0x7f0
> > pc : [<c0056cc4>] lr : [<c0056b5c>] Not tainted
> > sp : c7d41830 ip : c79e8044 fp : c7d41860
> > r10: c0283c2c r9 : c0282
> >
> > Does this rings a bell to someone ?
>
> Not much, but two remarks:
> - last summer, there use to be such a problem on x86 because of some
> wrong FPU switch. So, is FPU enabled ? Are you compiling latency with
> -msoft-float ?
Yes, everything is soft float.
> When announcing the ARM Adeos port, you told us that not all
> exceptions were trapped by the Adeos patch. If one of the FPU
> exceptions is not trapped, it would explain why we do not get the
> usual message "Invalid use of FPU at ..." before the oops.
Time has passed and the exceptions are now trapped.
> - as far as I know, xnpod_schedule never recurses, so, there is little
> chance for PC and LR to be both in xnpod_schedule. If I am not wrong,
> it means that you will have to have a look at the disassembly (sorry)
> and see in really what functions the bugs happen. Sometimes the -r and
> -S option of objdump help...
I'll take a look.
Stelian.
--
Stelian Pop <stelian.pop@domain.hid>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-04 17:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04 16:21 [Xenomai-core] RTDM timerbench problems Stelian Pop
2006-01-04 16:49 ` Jan Kiszka
2006-01-04 17:10 ` Stelian Pop
2006-01-04 17:19 ` Gilles Chanteperdrix
2006-01-04 17:28 ` Stelian Pop
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.