public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eCos Interrupt timing
@ 2005-06-24 12:59 e.coullien
  2005-06-24 13:18 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: e.coullien @ 2005-06-24 12:59 UTC (permalink / raw)
  To: ecos-discuss, ecos-patches




Hello,

We try to understand what ecos is doing when receiving an interrupt.
We modified temporally the file vector.S to trace on a logic output a signal
that represent how long is the interrupt time process
In this file, we set the signal before the context saving and we unset it just
before the context restoring
Then on the oscilloscope, we see that the signal is set at every tick system and
it is unset  500us (for a tick of 1ms) later.
During this time, The Decrementer ISR is executed (100 us) then interrupt_end().
It seems most of the time is spent in cyg_scheduler::unlock().
We don't understand what does ecos during these 400us (500-100).
Does somebody have an idea ?

Thanks,

Emmanuel Coullien



NOTE : CE COURRIER ELECTRONIQUE EST DESTINE EXCLUSIVEMENT AU(X) DESTINATAIRE(S) MENTIONNE(S) CI-DESSUS ET PEUT CONTENIR DES INFORMATIONS PRIVILEGIEES, CONFIDENTIELLES ET/OU ET/OU NON SOUMISES A DIVULGATION AUX TERMES DES LOIS APPLICABLES .  SI VOUS AVEZ RECU CE MESSAGE PAR ERREUR , OU S'IL NE VOUS EST PAS DESTINE, VEUILLEZ  LES SIGNALER IMMEDIATEMENT A L'EXPEDITEUR ET EFFACER CE COURRIER ELECTRONIQUE.

NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law.  If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] eCos Interrupt timing
  2005-06-24 12:59 [ECOS] eCos Interrupt timing e.coullien
@ 2005-06-24 13:18 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2005-06-24 13:18 UTC (permalink / raw)
  To: e.coullien; +Cc: ecos-discuss

On Fri, Jun 24, 2005 at 02:59:07PM +0200, e.coullien@faiveley.com wrote:
> 
> 
> 
> Hello,
> 
> We try to understand what ecos is doing when receiving an interrupt.
> We modified temporally the file vector.S to trace on a logic output a signal
> that represent how long is the interrupt time process
> In this file, we set the signal before the context saving and we unset it just
> before the context restoring
> Then on the oscilloscope, we see that the signal is set at every tick system and
> it is unset  500us (for a tick of 1ms) later.
> During this time, The Decrementer ISR is executed (100 us) then interrupt_end().
> It seems most of the time is spent in cyg_scheduler::unlock().
> We don't understand what does ecos during these 400us (500-100).

It does all the interesting things....

If the unlock causes the schedular lock to become 0 unlock_inner() is
called. When this is called it means the schedular is in a consistent
state and can do some real work. If there are any pending DSR they are
called. So for the timer ISR the timer DSR will be called. These DSRs
may result in a higher priority thread becoming runnable, or the
current thread might no longer be runnable. So after the DSRs are run
it then decides if another thread should be run. If so it will setup
the context to be restored so that the new thread is restored, not the
one that was interrupted. Any ASRs which are queued may also be
called.

Plus there is various checking done if you have it enabled. Things
like stack checking etc.

The code is quite well commented, so just read it to find out what is
going on.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-24 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-24 12:59 [ECOS] eCos Interrupt timing e.coullien
2005-06-24 13:18 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).