From: Roberto Bielli <roberto.bielli@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] porting xenomai on imx25
Date: Wed, 18 Apr 2012 10:44:33 +0200 [thread overview]
Message-ID: <4F8E7EF1.4070205@domain.hid> (raw)
In-Reply-To: <4F882E7B.7010909@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 5320 bytes --]
Hi Gilles,
here find the answers.
sorry for the delay.
Il 13/04/2012 15:47, Gilles Chanteperdrix ha scritto:
> On 04/13/2012 10:44 AM, Roberto Bielli wrote:
>> Hi Gilles,
>>
>> you don't feel like to repeat.
>> I'm trying all the things that you told me and i will do all the missing
>> test that you told me.
> So, what is the result of running your test with unpatched Linux, but
> with CONFIG_HIGH_RES_TIMERS enabled?
the result is the same.
With the base linux application and CONFIG_HIGH_RES_TIMERS all it's ok,
instead with xenomai application the task with less priority halt the
task with higher priority until it sleeps.
I send you my .config file and the test with pthread base.
>
>> And now this is the result of latency that i ran. It seems correct.
> Is it with or without CONFIG_HIGH_RES_TIMERS?
was without CONFIG_HIGH_RES_TIMERS.
Instead this is the test with CONFIG_HIGH_RES_TIMERS
./latency
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT| 00:00:01 (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat
best|--lat worst
RTD| 69.533| 77.458| 123.909| 0| 0| 69.533|
123.909
RTD| 70.571| 77.398| 85.909| 0| 0| 69.533|
123.909
RTD| 70.887| 77.383| 86.511| 0| 0| 69.533|
123.909
RTD| 69.458| 77.428| 86.812| 0| 0| 69.458|
123.909
RTD| 70.330| 77.398| 85.804| 0| 0| 69.458|
123.909
RTD| 70.691| 77.458| 86.195| 0| 0| 69.458|
123.909
RTD| 69.578| 77.428| 89.172| 0| 0| 69.458|
123.909
RTD| 69.548| 77.398| 89.037| 0| 0| 69.458|
123.909
RTD| 70.631| 77.398| 86.270| 0| 0| 69.458|
123.909
RTD| 69.819| 77.443| 86.135| 0| 0| 69.458|
123.909
RTD| 69.609| 77.458| 88.857| 0| 0| 69.458|
123.909
RTD| 70.511| 77.398| 86.300| 0| 0| 69.458|
123.909
RTD| 69.368| 77.368| 85.759| 0| 0| 69.368|
123.909
RTD| 70.045| 77.443| 87.563| 0| 0| 69.368|
123.909
RTD| 70.812| 77.443| 88.315| 0| 0| 69.368|
123.909
RTD| 70.586| 77.398| 84.812| 0| 0| 69.368|
123.909
RTD| 69.548| 77.428| 86.812| 0| 0| 69.368|
123.909
RTD| 70.857| 77.413| 86.270| 0| 0| 69.368|
123.909
RTD| 70.751| 77.413| 90.360| 0| 0| 69.368|
123.909
RTD| 69.548| 77.398| 87.699| 0| 0| 69.368|
123.909
RTD| 70.030| 77.398| 94.300| 0| 0| 69.368|
123.909
RTT| 00:00:22 (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat
best|--lat worst
RTD| 70.751| 77.428| 85.639| 0| 0| 69.368|
123.909
RTD| 65.699| 77.443| 122.586| 0| 0| 65.699|
123.909
RTD| 69.954| 77.428| 86.496| 0| 0| 65.699|
123.909
RTD| 70.556| 77.413| 86.902| 0| 0| 65.699|
123.909
RTD| 70.090| 77.413| 86.240| 0| 0| 65.699|
123.909
RTD| 69.639| 77.533| 162.616| 0| 0| 65.699|
162.616
---|-----------|-----------|-----------|--------|------|-------------------------
RTS| 65.699| 77.413| 162.616| 0| 0|
00:00:28/00:00:28
>
>
--
+------------------------------------------------------------------------------------------------+
Roberto Bielli
Sviluppo Software
Axel S.r.l.
Via Del Cannino, 3
21020 Crosio Della Valle
Varese - Italy
Telefono: +39 0332 949600
Fax: +39 0332 969315
E-mail: roberto.bielli@domain.hid
Web Site: www.axelsw.it
+------------------------------------------------------------------------------------------------+
Si precisa che le informazioni contenute in questo messaggio sono riservate e ad uso esclusivo del destinatario.
Qualora il messaggio in parola Le fosse pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi,
dandocene gentilmente comunicazione. Grazie.
Informativa sul trattamento dei dati personali (D. Lgs. 196/2003).
I dati utilizzati per la spedizione del presente messaggio sono utilizzati da Axel S.r.l., titolare del trattamento,
per l'invio delle comunicazioni dei diversi settori aziendali, non essendo autorizzata la divulgazione a terzi.
Potrete rivolgere alla seguente mail richieste di verifica, rettifica o cancellazione dei Vostri dati: info@domain.hid
This e-mail and any attachments is confidential and may contain privileged information
intended for the addressee(s) only. Dissemination, copying, printing or use by anybody
else is unauthorised. If you are not the intended recipient,
please delete this message and any attachments and advise the sender
by return e-mail.Thank you.
+------------------------------------------------------------------------------------------------+
[-- Attachment #2: testpreemptBase.c --]
[-- Type: text/plain, Size: 2145 bytes --]
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <string.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h> /* for MCL_CURRENT and MCL_FUTURE */
#define GPIO6_ON *Gpio2ValAddr |= 1 << 6
#define GPIO6_OFF *Gpio2ValAddr &= ~(1 << 6);
pthread_t task1;
pthread_t task2;
void CreateRunTask( pthread_t * threadPtr, int prio, void * fnz )
{
pthread_attr_t thread_attr;
struct sched_param sched;
pthread_attr_init(&thread_attr);
pthread_attr_setschedpolicy(&thread_attr, SCHED_RR);
sched.sched_priority = prio;
pthread_attr_setschedparam(&thread_attr, &sched);
pthread_create(threadPtr, &thread_attr, fnz, NULL );
pthread_attr_destroy(&thread_attr);
}
//dati per la gestione memoria mappata
static unsigned long * Gpio2ValAddr = NULL;
volatile int cnt2ms = 0;
volatile int cntmain = 0;
volatile int x;
void funct2ms( void * params )
{
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 2000000;
for(;;)
{
GPIO6_ON;
nanosleep( &ts, NULL );
++ cnt2ms;
GPIO6_OFF;
}
}
void funct10ms( void * params )
{
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 10000000;
for( ;;)
{
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
for( x=0; x < 1000000; x++ );
nanosleep( &ts, NULL );
}
}
int main(int argc, char *argv[])
{
int count = 0;
int traceOn = 0;
int fd, ret;
unsigned long reg, reg1;
int device;
unsigned long memShared=0;
fd = open( "/dev/mem", O_RDWR | O_SYNC );
printf( "FD=%d", fd );
fflush( stdout );
Gpio2ValAddr = (unsigned long *)mmap( NULL, 0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x53FD0000 );
GPIO6_ON;
GPIO6_OFF;
CreateRunTask( &task1, 99, funct2ms );
CreateRunTask( &task2, 1, funct10ms );
while( 1 )
sleep( 1 );
return 0;
}
[-- Attachment #3: .config --]
[-- Type: application/xml, Size: 47137 bytes --]
next prev parent reply other threads:[~2012-04-18 8:44 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 10:42 [Xenomai-core] Xenomai server down Gilles Chanteperdrix
2012-03-06 7:55 ` [Xenomai-core] preemptive doesn't work Roberto Bielli
2012-03-06 9:22 ` Gilles Chanteperdrix
[not found] ` <4F55E390.8090706@domain.hid>
2012-03-06 12:09 ` [Xenomai-help] " Gilles Chanteperdrix
2012-03-06 13:00 ` Roberto Bielli
2012-03-06 13:04 ` Gilles Chanteperdrix
2012-03-06 15:14 ` Roberto Bielli
2012-03-06 15:20 ` Gilles Chanteperdrix
2012-03-06 15:35 ` Roberto Bielli
2012-03-06 16:16 ` Gilles Chanteperdrix
2012-03-07 12:59 ` Roberto Bielli
2012-03-07 13:44 ` Gilles Chanteperdrix
2012-03-07 18:13 ` Roberto Bielli
2012-03-13 10:45 ` [Xenomai-core] Fwd: " Roberto Bielli
2012-03-13 11:44 ` [Xenomai-core] " Gilles Chanteperdrix
2012-03-13 12:10 ` Gilles Chanteperdrix
2012-04-04 9:21 ` Gilles Chanteperdrix
2012-04-04 9:29 ` Roberto Bielli
2012-04-04 9:45 ` Gilles Chanteperdrix
2012-04-06 15:35 ` Roberto Bielli
2012-04-06 15:40 ` Gilles Chanteperdrix
2012-04-06 16:59 ` Roberto Bielli
2012-04-07 22:17 ` Gilles Chanteperdrix
2012-04-10 8:18 ` Roberto Bielli
2012-04-10 8:22 ` Gilles Chanteperdrix
2012-04-10 8:43 ` Roberto Bielli
2012-04-10 8:45 ` Gilles Chanteperdrix
2012-04-10 8:58 ` Roberto Bielli
2012-04-10 9:00 ` Gilles Chanteperdrix
2012-04-10 9:06 ` Gilles Chanteperdrix
2012-04-10 9:11 ` Gilles Chanteperdrix
2012-04-10 9:21 ` Roberto Bielli
2012-04-10 9:27 ` Gilles Chanteperdrix
2012-04-10 9:37 ` Gilles Chanteperdrix
2012-04-10 10:39 ` Roberto Bielli
2012-04-10 11:25 ` Gilles Chanteperdrix
2012-04-10 12:05 ` Roberto Bielli
2012-04-10 12:06 ` Gilles Chanteperdrix
2012-04-10 12:11 ` Roberto Bielli
2012-04-10 12:12 ` Gilles Chanteperdrix
2012-04-10 12:18 ` Roberto Bielli
2012-04-10 11:49 ` Gilles Chanteperdrix
2012-04-10 12:33 ` Roberto Bielli
2012-04-10 12:36 ` Gilles Chanteperdrix
2012-04-10 12:58 ` Roberto Bielli
2012-04-10 15:55 ` Gilles Chanteperdrix
2012-04-10 12:40 ` Gilles Chanteperdrix
2012-04-11 6:59 ` Roberto Bielli
2012-04-11 11:59 ` Gilles Chanteperdrix
2012-04-11 12:10 ` Gilles Chanteperdrix
2012-04-12 10:12 ` Roberto Bielli
2012-04-12 16:58 ` [Xenomai-core] porting xenomai on imx25 Roberto Bielli
2012-04-12 17:40 ` Gilles Chanteperdrix
2012-04-13 8:44 ` Roberto Bielli
2012-04-13 13:47 ` Gilles Chanteperdrix
2012-04-18 8:44 ` Roberto Bielli [this message]
2012-04-18 9:19 ` Gilles Chanteperdrix
2012-04-18 10:28 ` Roberto Bielli
2012-04-18 11:51 ` Gilles Chanteperdrix
2012-04-19 8:52 ` Roberto Bielli
2012-04-19 8:54 ` Gilles Chanteperdrix
2012-04-19 9:01 ` Roberto Bielli
2012-04-19 9:02 ` Gilles Chanteperdrix
2012-04-19 12:11 ` Gilles Chanteperdrix
2012-04-12 17:32 ` [Xenomai-core] preemptive doesn't work Gilles Chanteperdrix
2012-04-10 12:52 ` Gilles Chanteperdrix
2012-04-10 9:19 ` Roberto Bielli
2012-04-10 9:19 ` 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=4F8E7EF1.4070205@domain.hid \
--to=roberto.bielli@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--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.