[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [f-cpu] Smooth Register backup issues...

> Michael Riepe wrote:
>>On Thu, Nov 13, 2003 at 10:47:53PM +0100, Beat Steiner wrote:
> If we implement this swap story, the crossbar will definitely explode
> or every register having one mux more to pass.
> My idea was to shadow the registers on an interrupt/context change
> (one-way data path)
> and do a SRB from the shadow. The new thread won't have to wait
> for the SRB to partially complete. Locking mechanism might be simplified.
> SRB only accesses shadow registers. Restore could be made as before.
> example SRB as before:
> did not touch r5
> r1 := bla bla
> *** context change ***
> * SRB starts and exec new thread starts
> r5 := bla bla (immediately executed because r5 not locked by SRB --
> great idea)
> r1:= bla bla (having to wait for SRB of r1 to complete if no shadow copy
> is made)
> example SRB with shadow:
> did not touch r5
> r1 := bla bla
> *** context change ***
> * wait for "r1 := bla bla" to complete while starting to fetch new
> instruction stream
> * Shadow registers
> * SRB starts while exec new thread starts
> r5 := bla bla (might start later because we waited above, but only if
> instructions already queued)
> r1 := bla bla (not waiting for SRB of r1 to complete because SRB runs
> from shadow)

I just add that :
- SRB system did not gain many cycles. It gain cycle only on nested
interrupt IF you could alloc a CLB without other trapping problem.
-SRB could be slow : SBR add muxes on the read port of the register bank
which are on the critical data path
- In it handler, you try to put as less code as possible, so 16 registers
could be enought and is smaller than aving the comlete 64 registers bank.

> We loose litle (or nothing if fetching new inscruction stream takes as
> long
> as "r1 := bla bla" to complete) and win much, and we pay for 50% of the
> register transistors sitting idle 99.99% of the time as stated by YG;-).
> Makes only sense if SRB is significantly simplified by shadowing.
> BTW: How many context switches do we expect per second?

Linux is jiffies are about 1kHz. We should try to evaluate network things
(10 us for a paquet ?) but most of the IO are done by DMA.

> Sorry for stirrung up the list with already-discussed topics. Maybe I
> better shut up for a while and
> read the many manuals.

and the archive of the mailling list.

To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/