Problem of performance with RTEMS 4.6.2 / LEON 2

Manuel Coutinho manuel.coutinho at edisoft.pt
Wed Dec 23 10:55:02 UTC 2009


Hi

>From what I can tell, here is the sequence of events you are getting:

1. Thread stores the current time (t0)
2. Thread calls RTEMS directive
3. RTEMS directive call thread dispatch
4. User Extension stores current time (t1)

And the problem is that t1-t0 can sometimes reach 700 us.

My question would be if you disable interrupts when you to do the call to
the RTEMS directives?

I've noticed that sometimes an interrupt between steps 1. and 4. and the
difference between t1-t0 can be quite large in these cases. However, in
"normal" cases it is quite small.

Try disabling interrupts before you read t0 and enable them after you call
the RTEMS directive.

Another solution would be to check the time "wasted" on interrupts
(timestamp when an interrupt arrives and when it leaves)

Kind regards
Manuel Coutinho
EDISOFT, S.A. 
Rua Quinta dos Medronheiros - Lazarim 
Apartado 382 Monte de Caparica 
2826-801 Caparica Portugal

> -----Original Message-----
> From: rtems-users-bounces at rtems.org [mailto:rtems-users-bounces at rtems.org]
> On Behalf Of DUTOIT Pascal
> Sent: Wednesday, December 23, 2009 10:36 AM
> To: rtems-users at rtems.org
> Subject: Problem of performance with RTEMS 4.6.2 / LEON 2
> 
> Hello,
> 
> Our product uses RTEMS 4.6.2 on LEON 2 (clock : 20 MHz) with a tick of
> 1 ms. In this configuration, a problem of performance appears:
> - when any task uses a RTEMS directive, before calling it, the task
> stores this action in a trace, with a date/time (accuracy:1 µs).
> - then, we have activated the "User Extension Manager" in which we
> connect, for instance, the task context switch managed by RTEMS. We
> store this other information into the same trace (cf.
> USER_EXTENSION_MNGR_Thread_Switch with the current task information).
> 
> By comparing these two dates, we can see what is the amount of µs
> between the RTEMS directive called by the application AND the end of
> the context switch of the current task.
> 
> We noticed this amount can reach more than 700 µs, for each call.
> Some of our tasks are activated each 16 ms. If there are, for example,
> 10 context switchs during a 16 ms cycle, the wasted time can reach 7 ms.
> 
> What could we do to strongly reduce this amount?
> Regards
> 
> PS: Storing a trace costs 10 µs. Therefore, the instrumentation with
> this trace does not disturb the behaviour of the product and of RTEMS.
> 
> 
> ----------------------------------------------------------------
> 
> Ce message electronique et tous les fichiers joints qu'il contient
> (ci-apres "le message") sont confidentiels et destines exclusivement a
> l'usage des destinataires indiques ou des personnes dument habilitees
> a les recevoir a leur place.
> 
> Si vous recevez ce message par erreur, merci de bien vouloir le
> detruire et d'en avertir l'emetteur.
> 
> Toute utilisation de ce message non conforme a sa destination, toute
> diffusion ou toute publication totale ou partielle est interdite sauf
> autorisation expresse de l'emetteur.
> 
> Les idees et opinions exprimees dans ce message sont celles de son
> auteur et ne representent pas necessairement celles de CS
> Communication & Systemes ou de ses filiales.
> 
> Malgre toutes les dispositions prises par CS Communication & Systemes
> et ses filiales pour minimiser les risques de virus, les fichiers
> joints a ce message peuvent contenir des virus qui pourraient
> endommager votre systeme informatique. Il vous appartient d'effectuer
> vos propres controles anti-virus avant d'ouvrir les fichiers joints.
> CS Communication & Systemes et ses filiales declinent toute
> responsabilite pour toute perte ou dommage resultant de l'utilisation
> de ce message et/ou des fichiers joints.
> 
> This e-mail and any file attached hereto (hereinafter 'the e-mail')
> are confidential and intended solely for the use of the adressees
> indicated below or the persons duly entitled to receive them in their
> place.
> 
> If you receive this e-mail in error, please delete it and notify the
> sender.
> 
> Any use of this e-mail not in accordance with its purpose, any
> dissemination or disclosure, either whole or partial, is prohibited,
> unless formally approved by the sender.
> 
> The ideas or opinions expressed in this e-mail are solely those of its
> author and do not necessarily represent those of CS Communication &
> Systeme or its affiliates.
> 
> Despite all the measures taken by CS Communication & Systeme and its
> affiliates in order to minimize the risks of virus, the files attached
> to this e-mail may contain virus which could damage your information
> system. You are responsible for processing your own anti-virus
> checking before opening any file attached hereto. Neither CS
> Communication & Systemes, nor its affiliates, shall be held liable for
> any loss or damage due to the use of this e-mail or any file attached
> hereto.
> 
> 
> 
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users




More information about the users mailing list