[Xenial][SRU][PATCH 0/2] #LP1606147 Workaround for monitor bug slows down system

Phidias Chiang phidias.chiang at canonical.com
Tue Jul 26 08:33:15 UTC 2016


We've found a bug on some Apollo Lake system makes it runs very slow.
>From upstream it is caused by following reason:

"Monitored cached line may not wake up from mwait on certain Goldmont
based CPUs. This patch will avoid calling current_set_polling_and_test()
and thereby not set the TIF_ flag. The result is that we'll always send
IPIs for wakeups."


Upstream already provided a workaround[1] to fix this problem. This
patches haven't been merged in latest(v4.7) release but already in

To fix this issue in Xenial it also needs another commit introduces
macros use in the workaround:

commit 970442c599b22ccd644ebfe94d1d303bf6f87c05
Author: Dave Hansen <dave at sr71.net>
Date: Thu Jun 2 17:19:27 2016 -0700

    x86/cpu/intel: Introduce macros for Intel family numbers

This workaround checks CPU families and certain features, so no further
regressions is expected

[1]: https://lkml.org/lkml/2016/7/6/469

Dave Hansen (1):
  x86/cpu/intel: Introduce macros for Intel family numbers

Peter Zijlstra (1):
  UBUNTU: SAUCE: x86/cpu: Add workaround for MONITOR instruction erratum
    on Goldmont based CPUs

 arch/x86/include/asm/cpufeatures.h  |  1 +
 arch/x86/include/asm/intel-family.h | 68 +++++++++++++++++++++++++++++++++++++
 arch/x86/include/asm/mwait.h        |  2 +-
 arch/x86/kernel/cpu/intel.c         |  5 +++
 arch/x86/kernel/process.c           |  2 +-
 5 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 arch/x86/include/asm/intel-family.h


More information about the kernel-team mailing list