git: kernel - Permanently fix FP bug - completely remove lazy heuristic

Matthew Dillon dillon at crater.dragonflybsd.org
Fri May 3 13:31:31 PDT 2019


commit 007800820798c81c84e1f9bdd8c316c9224d680b
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri May 3 13:24:13 2019 -0700

    kernel - Permanently fix FP bug - completely remove lazy heuristic
    
    * Remove the FP lazy heuristic.  When the FP unit is being used by a
      thread, it will now *always* be actively saved and restored on
      context switch.
    
      This means that if a process uses the FP unit at all, its context
      switches (to another thread) will active save/restore the state forever
      more.
    
    * This fixes a known hardware bug on Intel CPUs that we thought was fixed
      before (by not saving The FP context from thread A from the DNA interrupt
      on thread B)...  but it turns out it wasn't.
    
      We could tickle the bug on Intel CPUs by forcing synth to regenerate
      its flavor index over and over again.  This regeneration fork/exec's
      about 60,000 make's, sequencing concurrently on all cores, and usually
      hits the bug in less than 5 minutes.
    
    * We no longer support lazy FP restores, period.  This is like the fourth
      time I've tried to deal with this, so now its time to give up and not
      use lazy restoration at all, ever again.

Summary of changes:
 sys/platform/pc64/x86_64/genassym.c |  2 --
 sys/platform/pc64/x86_64/npx.c      | 27 ---------------------------
 sys/platform/pc64/x86_64/swtch.s    |  5 ++---
 sys/sys/thread.h                    |  3 +--
 4 files changed, 3 insertions(+), 34 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/007800820798c81c84e1f9bdd8c316c9224d680b


-- 
DragonFly BSD source repository


More information about the Commits mailing list