Re: [PATCH v2 4/4] x86/fpu: don't abuse drop_init_fpu() in flush_thread()

Borislav Petkov
2015-03-14T10:56:37Z

On Fri, Mar 13, 2015 at 06:30:30PM +0100, Oleg Nesterov wrote:
> flush_thread() -> drop_init_fpu() is suboptimal and confusing. It does
> drop_fpu() or restore_init_xstate() depending on !use_eager_fpu(). But
> flush_thread() too checks eagerfpu right after that, and if it is true
> then restore_init_xstate() just burns CPU for no reason. We are going to
> load init_xstate_buf again after we set used_math/user_has_fpu, until
> then the FPU state can't survive after switch_to().
>
> Remove it, and change the "if (!use_eager_fpu())" to call drop_fpu().
> While at it, clean up the tsk/current usage.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Thanks, applied.

Did a trivial cleanup ontop, see reply to this message.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--