From: Registrierungen <regist@bmwedler.de>
To: xenomai@xenomai.org
Subject: [Xenomai] Alchemy periodic task and timer overruns
Date: Mon, 30 Nov 2015 11:57:49 +0100 [thread overview]
Message-ID: <565C2BAD.2040909@bmwedler.de> (raw)
Hello,
i've got a problem using the periodic tasks.
I am using the alchemy tasks running 10kHz and i get a lot of (up ~
10) timer overruns / sek calling rt_task_wait_period. (each overrung
has an amount of 1 ).
I extracted the task to a test program. In this example he is doing
nothing between the rt_task_wait_period calls.
Ironically i get more (up ~ 100) timer overruns / sek calling
rt_task_wait_period.
I am running a AMD-G Series, x86_64 with SMP.
I tested on xenomai 3rc2 and xenomai 3.0.1 (with optimized kernel,
following the documentation) with same results.
Any idea, what is going wrong?
How can i find out where is the problem?
--Source--
using namespace std;
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#include <bitset>
#include <sys/io.h>
#include <task.h>
#define Timing_10000Hz 100000
#define Timing_1000Hz 1000000
#define Timing_100Hz 10000000
#define Timing_10Hz 100000000
#define Timing_1Hz 1000000000
void TestTaskDispatcher(void *arg) {
unsigned long No;
rt_task_set_periodic(NULL, TM_NOW, Timing_10000Hz);
while (1)
{
int err = rt_task_wait_period(&No);
if (err)
rt_printf("Error on rt_task_wait_period %d %s %d\n",err,
strerror(-err), No);
rt_task_wait_period(NULL);
}
}
int main(int argc, char *argv[])
{
RT_TASK TestTask;
cpu_set_t aCPU;
CPU_ZERO(&aCPU);
CPU_SET(0, &aCPU);
rt_task_create(&TestTask,"TestTask",0,99,0);
rt_task_set_affinity(&TestTask,&aCPU);
rt_task_start(&TestTask, &TestTaskDispatcher, 0);
pause();
}
-- Makefile--
prefix := $(shell xeno-config --prefix)
ifeq ($(prefix),)
$(error Please add <xeno-install-path>/bin to your PATH variable)
FLAGS=-ggdb -Wall -O2 -lpthread -I/usr/xenomai/include
-L/usr/xenomai/lib -lnative -Xlinker -rpath -Xlinker /usr/xenomai/lib
-lmuparser -L/usr/local/lib -I/usr/include/libxml2
CC = g++
else
CFLAGS := $(shell xeno-config --skin alchemy --cflags)
LDFLAGS := $(shell xeno-config --skin alchemy --ldflags)
FLAGS := $(CFLAGS) $(LDFLAGS) -O2 -ggdb
CC := g++
endif
all: rtprocess
rtprocess: rtprocess.cpp $(MODS) $(GLOBS)
$(CC) -o /Entwicklung/Runtime/rttest rttest.cpp $(FLAGS)
------
regards,
Sascha
next reply other threads:[~2015-11-30 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 10:57 Registrierungen [this message]
2015-11-30 12:09 ` [Xenomai] Alchemy periodic task and timer overruns Gilles Chanteperdrix
2015-11-30 15:46 ` Philippe Gerum
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=565C2BAD.2040909@bmwedler.de \
--to=regist@bmwedler.de \
--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.