lkml.org 
[lkml]   [2014]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Make math_state_restore() save and restore the interrupt flag
    On Sat, 1 Feb 2014, Linus Torvalds wrote:

    > We could do that with the whole "task_work" thing (or perhaps just
    > do_notify_resume(), especially after merging the "don't necessarily
    > return with iret" patch I sent out earlier), with additionally making
    > sure that scheduling does the right thing wrt a "currently dirty math
    > state due to kernel use".
    >
    > The advantage of that would be that we really could do a *lot* of FP
    > math very cheaply in the kernel, because we'd pay the overhead of
    > kernel_fpu_begin/end() just once (well, the "end" part would be just
    > setting the bit that we now have dirty state, the cost would be in the
    > return-to-user-space-and-restore-fp-state part).
    >
    > Comments? That would be much more invasive than just changing
    > __kernel_fpu_end(), but would bring in possibly quite noticeable
    > advantages under loads that use the FP/vector resources in the kernel.
    >
    This would be very good and it needs to work in interrupt context
    (softirq) also, and when we interrupt idle task. It's with networking we
    can really hit kernel_fpu_begin()/end() millions of times per second and
    there's really only need to do it once per interrupt. This is actually
    similar what I was doing (in do_softirq)) when I noticed eagerfpu was
    broken and now Nate's bug AFAICS happens there as well.

    Pekka


    \
     
     \ /
      Last update: 2014-02-02 10:21    [W:2.295 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site