[coyotos-dev] Optional floating state

Jonathan S. Shapiro shap at eros-os.org
Thu Jan 26 01:41:51 EST 2006


On Wed, 2006-01-25 at 21:58 -0500, Sandro Magi wrote:
> David Hopwood wrote:
> > I don't see why there have to be twice as many kernel entries. Just use
> > the heuristic that if a domain used FP (or vector) registers on its last
> > execution between context switches, it probably will on its current execution.
> > This loses the advantage of not having conditional transfers concerning FP
> > in the gate path, but it retains the other advantages. The accuracy of this
> > heuristic should be measured, but I suspect it is accurate enough to avoid
> > incurring any significant performance penalty.
> 
> It seems that the above degenerates to always loading the floating point 
> context for processes that have used FP at least once. Under what 
> conditions would the "load FP context" flag get cleared?

It is natural to clear it whenever you decache the process. This is done
by the ager and also by the checkpoint mechanism.

In practice, applications that use floating point once use it forever.
If they have stopped using the FPU, they are about to exit anyway.

> The only condition I can think of is if the process loses it's DIB slot, 
> and then reacquires one.

Yes, or in EROS terms, its process cache entry. This occurs under both
the conditions that I mentioned.

> Using the above heuristic you may also incur another cache miss on every 
> context switch because the extra context is held separately from the 
> regular context.

More like another 60 cache misses. The amount of data in the SSE2/SSE3
engine is surprising.


shap



More information about the coyotos-dev mailing list