From: Jan Kiszka <jan.kiszka@domain.hid>
To: Steven Seeger <steve@domain.hid>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] no-brainer issue found, but not solved
Date: Tue, 21 Feb 2006 19:36:33 +0100 [thread overview]
Message-ID: <43FB5DB1.2000703@domain.hid> (raw)
In-Reply-To: <C02098C9.24B1%steve@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2341 bytes --]
Steven Seeger wrote:
> Here are the routines in question:
>
> low priority:
>
> for(;;) {
> /* regular rf watchdogs */
> outb(0x45, 0x????);
> outb(0x6a, 0x????);
> outb(0x7e, 0x????);
>
> outb(0, 0x????); //patient watchdog
> outb(0, 0x????); //fault led
>
> flip_reg_bits(WRFPC, 0x????); //flash yellow led
>
> ????_flip_spi_bits(HV_STATUS_CONTROL, HV_WDOG_STROBE_MONITOR);
>
> rt_task_wait_period();
> }
>
> high priority:
>
> for(;;) {
> if(motor_move) {
> syslog(LOG_INFO, "about to lock up");
> for(int i=0; i<100000000; i++);
This loop is always executed in secondary mode. This means it /may/ run
at the original high prio of that thread if syslog() did not trigger a
Linux reschedule, and it will run at prio 0 if syslog did so. This
depends on the arrival of Linux IRQs or the need of syslog to block on
some other Linux process.
Again, if you want RT for sure after a Linux call, use explicit mode
switching.
> motor_move=0;
> }
>
> rt_task_wait_period();
> }
>
> All function calls contain only inb or outb, no system calls. If I comment
> out the syslog call in the high priority thread, the yellow LED stops
> flashing completely. Otherwise, it flashes every second, with the
> periodicity of the higher priority thread.
>
> I have another problem, too:
>
> Using the same yellow LED flashing thread, if I start up a LOWER priority
> task like this, I can see jitter on my LED strobe line on the scope once a
Also as rt-thread?
> second. Why would the lower priority thread making a system call affect the
> higher priority one?
>
> for(;;) {
> syslog(LOG_INFO, "sleeping 1");
> sleep(1);
> }
Something seems to be broken, but it is hard to analyse remotely if in
the test setup or the system.
Please replace your LED thread in this scenario with the latency test
tool, running at the same frequency. Collect the worst-case data. If
they show quirks as well, consider applying the tracer patch and catch
the abnormal jitters via "latency -f". You can tune the number if
backtrace_points in /proc/ipipe/tracer until you get a significant time
interval into the trace.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-02-21 18:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-21 17:38 [Xenomai-help] no-brainer issue found, but not solved Steven Seeger
2006-02-21 17:57 ` Jan Kiszka
2006-02-21 18:15 ` Steven Seeger
2006-02-21 18:36 ` Jan Kiszka [this message]
2006-02-21 21:20 ` Jeroen Van den Keybus
2006-02-22 14:21 ` Steven Seeger
2006-02-22 15:00 ` Jan Kiszka
2006-02-24 9:01 ` Philippe Gerum
2006-02-24 14:00 ` Steven Seeger
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=43FB5DB1.2000703@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=steve@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.