lkml.org 
[lkml]   [2015]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 04/11] x86,fpu: defer FPU restore until return to userspace
On 01/13, Rik van Riel wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 01/13/2015 12:11 PM, Oleg Nesterov wrote:
> > On 01/11, riel@redhat.com wrote:
> >>
> >> Defer restoring the FPU state, if so desired, until the task
> >> returns to userspace.
> >
> > And I have another concern.
> >
> > Afaocs with this patch the idle threads will run with TIF_LOAD_FPU
> > set but without fpu.has_fpu.
> >
> > This is fine by itself, but this (performance-wise) breaks
> > kernel_fpu_begin() if use_eager_fpu() == T. Please see the
> > changelog in 5187b28ff08249ab8a162e8 and note that this patch cc's
> > @stable.
> >
> > Yes, yes, even if I am right we should blame kernel_fpu_begin() and
> > other eager_fpu oddities. I tried to start the cleanups/fixes in
> > this area some time ago, but they were ignored.
>
> I suppose we could make kernel_fpu_begin() explicitly point
> the cpu's fpu pointer at a special value to indicate that
> we are in the middle of a kernel_fpu_begin() / kernel_fpu_end()
> session, and should not use the FPU from interrupt context
> right now.

Not sure I understand...

But yes, I think we need the per-cpu "in_kernel_fpu" and irq_fpu_usable()
must die. Please look at http://marc.info/?l=linux-kernel&m=14096628660929

Until then imo this series should try to ensure that kernel_fpu_begin/end
will work if interrupted thread is idle task.

Oleg.



\
 
 \ /
  Last update: 2015-01-13 19:41    [W:0.086 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site