This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Will register window mechanism slow down the execution of ecos program for SPARC?
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- Cc: "Ecos-Discuss" <ecos-discuss at sources dot redhat dot com>
- Date: 10 Oct 2002 19:45:39 +0100
- Subject: Re: [ECOS] Will register window mechanism slow down the execution of ecos program for SPARC?
- References: <BDEPKKELILOKGOAOMONOIEEBCAAA.jameshq@liv.ac.uk>
"Qiang Huang" <jameshq@liverpool.ac.uk> writes:
> Hi all:
> I just wonder about whether the register windows will slow down the
> execution of ecos program.
> In sparc each time for context switching the old thread context will be
> saved this includes all the regiter windows(because this is done by an
> register window overflow trap), even not all register windows have been
> already used, consider a situation that just 2 register windows are used but
> 8 register windows are saved(6 of those are not used).
I am not a SPARC expert but I believe that only register windows that
have been used generate a trap and get saved. Unused windows are
skipped - the save instruction has no effect.
> also when restoring
> all register windows will be restored (done by register window underflow
> trap).
Only one window is restored in the context switch. Any others will be
restored as a result of the call returns.
> Also this happens when a seperate interrupt stack is used. The
> purpose of introducing register window is to speed up the calling to an
> subfunction, but now in ecos it seems to be an shortcoming compared to other
> target without register window for subfunction calling in the context
> switching and restoring. maybe I got it wrong then sorry about this. Thanks
> a lot.
>
SPARC was designed to increase single threaded throughput at the
expense of context switch latency. While it is just about acceptable
for bandwidth-oriented systems like Solaris, it is fatal for real time
performance.
The SPARC architecture, or anything else that implements a similar
windowing system, is a bad choice for embedded work.
--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss