• Mike Galbraith's avatar
    sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs · a166e4b1
    Mike Galbraith authored
    commit f8e617f4 upstream.
    
    To fully take advantage of MWAIT, apparently the CLFLUSH instruction needs
    another quirk on certain CPUs: proper barriers around it on certain machines.
    
    On a Q6600 SMP system, pipe-test scheduling performance, cross core,
    improves significantly:
    
      3.8.13                   487.2 KHz    1.000
      3.13.0-master            415.5 KHz     .852
      3.13.0-master+           415.2 KHz     .852     + restore mwait_idle
      3.13.0-master++          488.5 KHz    1.002     + restore mwait_idle + IPI fix
    
    Since X86_BUG_CLFLUSH_MONITOR is already a quirk, don't create a separate
    quirk for the extra smp_mb()s.
    Signed-off-by: default avatarMike Galbraith <bitbucket@online.de>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Ian Malone <ibmalone@gmail.com>
    Cc: Josh Boyer <jwboyer@redhat.com>
    Cc: Len Brown <len.brown@intel.com>
    Cc: Len Brown <lenb@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/1390061684.5566.4.camel@marge.simpson.net
    [ Ported to recent kernel, added comments about the quirk. ]
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    a166e4b1
process.c 11.7 KB