Port-amd64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cpu_switchto
On Wed, May 27, 2015 at 03:54:03PM +0200, Joerg Sonnenberger wrote:
> On Wed, May 27, 2015 at 03:08:36PM +0200, deco33000%yandex.com@localhost wrote:
> > If we know we didn't use the fpu, why save the state ?
>
> As I said, supporting lazy FPU context switches itself comes with a
> price. That has to be weighted with the probability if actual lazy
> switching and compared against the potential time saving. For x86_64, it
> is just not worth the hassle.
Hmmm... I thought x86/amd64 did lazy save. There is all the code to take
the 'fp state invalid' interrupt and save restore the state, possibly
with an IPI.
Interestingly since syscalls are function calls and all the sse2 (I
think) and certainly all the avx regs are caller saved the kernel
could set the 'regs unused' flag so that xsave/xrestor will not
save them and restore 0.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index