On Tue, 3 Apr 2001, John Baldwin wrote:

> On 03-Apr-01 Bruce Evans wrote:
> > There are many other possibilities:
> > ...
> > - don't attempt to save the FPU state reentrantly, since this doesn't work
> >   with preemptive context switchiing unless interrupt handlers also save the
> >   state reentrantly, which they shouldn't do because it is too wasteful.
> >   Instead, save the state in the pcb as is already done in copy{in,out}
> >   so that cpu_switch() handles it.  This may be too wasteful too.
> > - as in previous possibility, but avoid switching the entire state.  For
> >   the FPU, the entire state must be switched, but for SSE individual
> >   registers can be saved and restored.  Saving and restoring individual
> >   registers reentrantly would be easy but no longer works for the SMP case.
> >   Switching a subset of the state would not be so easy.
> Hmmmmm.  I think I'm liking the next to last.  Even if there is additional
> overhead, it should still outperform generic_bcopy and friends on the CPU's in
> question, right?

Not clear.  We now have heavyweight context switches that switch the FPU
for every interrupt.  If we make switching the FPU for ithreads fundamental
instead of a just source of bugs, then it will be harder to implement
lightweight context switches for ithreads (context switches won't be
lightweight if they switch the FPU, and we might have to do extra work
to avoid them).  Also, if the FPU is actually used a lot, then it will
have to be switched a lot.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to