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

2015-03-14 Thread Borislav Petkov
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_in

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

2015-03-13 Thread Oleg Nesterov
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_xst