All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michel Rinaldi <automation.03@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problems with rt_task_create and rt_task_join
Date: Mon, 24 Jan 2011 15:05:10 +0100 (CET)	[thread overview]
Message-ID: <28136729.01295877908562.JavaMail.SYSTEM@PC-MRINALDI> (raw)
In-Reply-To: <4D3B2C93.70005@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 3567 bytes --]


> A reason for the service being so slow the first time it is called may 
> be the on-demand libraries loading. But for this to take a long time, 
> the native skin library would have to be stored on a really slow storage 
> device, or compressed and the processor you are using being a really 
> slow one. Anyway, you do not tell us on what architecture you get this 
> issue? What processor are you using? Where is the library stored? 
> 
> -- 
> Gilles. 

Hi to all, and thank you for your support. 

First of all, I'm running Xenomai on an Intel Celeron M 600MHz CPU with 512 MB RAM. 
This embedded PC has its storage unit onto a 2GB compact flash, connected to motherboard via ATA interface. 
Xenomai libraries are into default /usr/xenomai path, and seems not compressed. 
Linux distro is Ubuntu 10.04. Attached to this message there's my vanilla kernel configuration. 

I tried to check all Xenomai calls, they return no errors. 
rt_intr_wait() call returns -EIDRM only when interrupt object was deleted, no errors otherwise. 

I checked /proc/<pid>/maps to see if libraries are loaded correctly, and all seems to be OK. 

To deeply explain my software, some Xenomai syscalls are done into shared objects thata are loaded dinamically at runtime with dlopen()-dlclose() calls. Particularly, I launch my application, and at a certain time I dinamically load into my app an external piece of software contained into a shared object. 
This piece of software creates a rt task with rt_task_shadow() and contains a function that creates an IRQ handler: to do this, latter function calls rt_intr_create(), rt_task_create() and rt_task_start(). 
Next, I attach to my app another shared object that also creates a rt task with rt_task_shadow(). 
Then, if I call my function that creates IRQ handler into first loaded object (where function to create IRQ was contained), execution time is quick. 
Instead, if I call this function from latter shared object loaded, execution was horribly long (at least 500ms). 
These behaviours are independent from the fact that it is or not the first rt_task_create() into application. 
Could be this an issue related to dynamic loading? 

Another strange behaviour that I observed is that if I create IRQ handling thread not as joinable, if my call sequence is: 

rt_intr_delete(&myIntrHandler); 
rt_task_delete(&myIntrTask); 

I still see task into /proc/xenomai/sched (with X state), and rt_printf() strings subsequent to rt_task_delete() that are into same function don't appear. 
It seems to be that rt_task_delete() call destroys calling task instead target task. 

Instead, If sequence call is: 

rt_intr_delete(&myIntrHandler); 
rt_task_sleep(1000000000); 
rt_task_delete(&myIntrTask); 

I don't see at all task into /proc/xenomai/sched, and rt_printf() strings subsequent to rt_task_delete() was printed normally. 
Note that these calls are done when an object was dinamically unloaded with dlclose(). 

One more question, on rt_task_join(): manual says that the joined task must have been created by the same process that wants to join it: into this assertion, process means "a task" (then, a PID) or "a process composed by tasks"? I think the former. 
And if the process that calls rt_task_join() is not the same, could this cause the function doesn't returns? 

Finally, if this can help, I also observed these messages into dmesg: 
Clocksource tsc unstable (delta = 2636104979 ns) 
Switching to clocksource pit 
They appears when rt_task_create() is slow. 

Thank you in advance for your precious help. 
Regards 
Mauro 


[-- Attachment #2: Type: text/html, Size: 4150 bytes --]

  reply	other threads:[~2011-01-24 14:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <14515395.201295629170328.JavaMail.SYSTEM@PC-MRINALDI>
2011-01-21 17:01 ` [Xenomai-help] Problems with rt_task_create and rt_task_join Michel Rinaldi
2011-01-21 17:11   ` Philippe Gerum
2011-01-22 14:26     ` Mauro
2011-01-22 19:14   ` Gilles Chanteperdrix
2011-01-24 14:05     ` Michel Rinaldi [this message]
2011-01-24 14:27       ` Gilles Chanteperdrix
     [not found] <24653571.21295878006500.JavaMail.SYSTEM@PC-MRINALDI>
2011-01-24 14:07 ` Michel Rinaldi
     [not found] <22536578.91295887083468.JavaMail.SYSTEM@PC-MRINALDI>
2011-01-24 16:39 ` Michel Rinaldi
2011-01-24 16:44   ` Gilles Chanteperdrix
2011-01-24 16:54     ` Gilles Chanteperdrix
     [not found] <20964580.81295961364859.JavaMail.SYSTEM@PC-MRINALDI>
2011-01-25 13:17 ` Michel Rinaldi
2011-01-25 13:26   ` Gilles Chanteperdrix
     [not found] <11269195.111296118370328.JavaMail.SYSTEM@PC-MRINALDI>
2011-01-27  8:58 ` Michel Rinaldi
2011-01-27 13:36   ` Gilles Chanteperdrix
     [not found] <29582899.21296203622078.JavaMail.SYSTEM@PC-MRINALDI>
2011-01-28  8:34 ` Michel Rinaldi
2011-01-28 17:43   ` Gilles Chanteperdrix
     [not found] <21381658.41297350790328.JavaMail.SYSTEM@pc-msalvini>
2011-02-10 15:20 ` Mauro Salvini
2011-02-10 16:14   ` Gilles Chanteperdrix
     [not found] <8701358.01297411757328.JavaMail.SYSTEM@pc-msalvini>
2011-02-11  8:10 ` Mauro Salvini
2011-02-11  9:56   ` 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=28136729.01295877908562.JavaMail.SYSTEM@PC-MRINALDI \
    --to=automation.03@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.