Re: [RFC PATCH 08/11] x86,fpu: restore user FPU state lazily after __kernel_fpu_end

2015-01-14 Thread Oleg Nesterov
On 01/14, Oleg Nesterov wrote: > > On 01/11, r...@redhat.com wrote: > > > > --- a/arch/x86/kernel/i387.c > > +++ b/arch/x86/kernel/i387.c > > @@ -89,13 +89,11 @@ void __kernel_fpu_end(void) > > if (use_eager_fpu()) { > > /* > > * For eager fpu, most the time,

Re: [RFC PATCH 08/11] x86,fpu: restore user FPU state lazily after __kernel_fpu_end

2015-01-14 Thread Oleg Nesterov
On 01/11, r...@redhat.com wrote: > > --- a/arch/x86/kernel/i387.c > +++ b/arch/x86/kernel/i387.c > @@ -89,13 +89,11 @@ void __kernel_fpu_end(void) > if (use_eager_fpu()) { > /* >* For eager fpu, most the time, tsk_used_math() is true. > - * Restore

Re: [RFC PATCH 08/11] x86,fpu: restore user FPU state lazily after __kernel_fpu_end

2015-01-14 Thread Oleg Nesterov
On 01/14, Oleg Nesterov wrote: On 01/11, r...@redhat.com wrote: --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c @@ -89,13 +89,11 @@ void __kernel_fpu_end(void) if (use_eager_fpu()) { /* * For eager fpu, most the time, tsk_used_math() is true.

Re: [RFC PATCH 08/11] x86,fpu: restore user FPU state lazily after __kernel_fpu_end

2015-01-14 Thread Oleg Nesterov
On 01/11, r...@redhat.com wrote: --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c @@ -89,13 +89,11 @@ void __kernel_fpu_end(void) if (use_eager_fpu()) { /* * For eager fpu, most the time, tsk_used_math() is true. - * Restore the user

[RFC PATCH 08/11] x86,fpu: restore user FPU state lazily after __kernel_fpu_end

2015-01-11 Thread riel
From: Rik van Riel Tasks may have multiple invocations of kernel_fpu_start and kernel_fpu_end in sequence without ever hitting userspace in-between. Delaying the restore of the user FPU state until the task returns to userspace means the kernel only has to save the user FPU state on the first

[RFC PATCH 08/11] x86,fpu: restore user FPU state lazily after __kernel_fpu_end

2015-01-11 Thread riel
From: Rik van Riel r...@redhat.com Tasks may have multiple invocations of kernel_fpu_start and kernel_fpu_end in sequence without ever hitting userspace in-between. Delaying the restore of the user FPU state until the task returns to userspace means the kernel only has to save the user FPU state