public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/15] x86/xsaves: Optimize xstate context switch by xsaves/xrstors
@ 2014-05-26 17:01 Fenghua Yu
  2014-05-26 17:01 ` [PATCH 01/15] x86/xsaves: Detect xsaves/xrstors feature Fenghua Yu
                   ` (15 more replies)
  0 siblings, 16 replies; 21+ messages in thread
From: Fenghua Yu @ 2014-05-26 17:01 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Asit K Mallick
  Cc: linux-kernel, x86, Fenghua Yu

From: Fenghua Yu <fenghua.yu@intel.com>

With ever growing extended state registers (xstate) on x86 processors, kernel
needs to cope with issue of growing memory space occupied by xstate. The xsave
area is holding more and more xstate registers, growing from legacy FP and
SSE to AVX, AVX2, AVX-512, MPX, and Intel PT.

The recently introduced compacted format of xsave area saves xstates only
for enabled states. This patch set saves the xsave area space per process
in compacted format by xsaves/xrstors instructions.

xsaves/xrstors also supports modified optimization which tracks modified
xstates and only saves modified xstates to xsave area to improve saving
performance.

For more information about xsaves/xrstors instructions, please refer
to latest Intel X86 SDM.


Fenghua Yu (15):
  x86/xsaves: Detect xsaves/xrstors feature
  x86/xsaves: Add kernel parameter to disable xsaves/xrstors
  x86/alternative: Add alternative_input_2
  x86/xsaves: Change compacted format xsave area header
  x86/xsaves: Define macros for xsave instructions
  x86/xsaves: Define macro for handle xsave/xrstor fault
  x86/xsaves: Use xsaves/xrstors for saving and restoring xsave area
  x86/xsaves: Use xsaves/xrstors for context switch
  x86/xsaves: Use xsave/xrstor for saving and restoring user space
    context
  x86/xsaves: Clear reserved bits in xsave header
  x86/xsaves: Add xsaves and xrstors support for booting time
  x86/xsaves: Save xstate to task's xsave area in __save_fpu during
    booting time
  x86/xsaves: Call booting time xsaves and xrstors in setup_init_fpu_buf
  x86/xsaves: Enable xsaves/xrstors
  Define kernel API to get address of each state in xsave area

 Documentation/kernel-parameters.txt   |   9 ++
 arch/x86/include/asm/alternative.h    |  13 ++
 arch/x86/include/asm/cpufeature.h     |   2 +
 arch/x86/include/asm/fpu-internal.h   |   9 +-
 arch/x86/include/asm/processor.h      |   4 +-
 arch/x86/include/asm/xsave.h          | 220 +++++++++++++++++++++++++---------
 arch/x86/include/uapi/asm/msr-index.h |   2 +
 arch/x86/kernel/cpu/common.c          |   8 ++
 arch/x86/kernel/cpu/scattered.c       |   1 +
 arch/x86/kernel/i387.c                |   2 +-
 arch/x86/kernel/process.c             |   1 +
 arch/x86/kernel/xsave.c               | 112 +++++++++++++++--
 12 files changed, 313 insertions(+), 70 deletions(-)

-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-05-26 21:47 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 17:01 [PATCH 0/15] x86/xsaves: Optimize xstate context switch by xsaves/xrstors Fenghua Yu
2014-05-26 17:01 ` [PATCH 01/15] x86/xsaves: Detect xsaves/xrstors feature Fenghua Yu
2014-05-26 17:01 ` [PATCH 02/15] x86/xsaves: Add kernel parameter to disable xsaves/xrstors Fenghua Yu
2014-05-26 17:01 ` [PATCH 03/15] x86/alternative: Add alternative_input_2 Fenghua Yu
2014-05-26 17:01 ` [PATCH 04/15] x86/xsaves: Change compacted format xsave area header Fenghua Yu
2014-05-26 17:01 ` [PATCH 05/15] x86/xsaves: Define macros for xsave instructions Fenghua Yu
2014-05-26 17:01 ` [PATCH 06/15] x86/xsaves: Define macro for handle xsave/xrstor fault Fenghua Yu
2014-05-26 17:01 ` [PATCH 07/15] x86/xsaves: Use xsaves/xrstors for saving and restoring xsave area Fenghua Yu
2014-05-26 17:01 ` [PATCH 08/15] x86/xsaves: Use xsaves/xrstors for context switch Fenghua Yu
2014-05-26 17:01 ` [PATCH 09/15] x86/xsaves: Use xsave/xrstor for saving and restoring user space context Fenghua Yu
2014-05-26 17:01 ` [PATCH 10/15] x86/xsaves: Clear reserved bits in xsave header Fenghua Yu
2014-05-26 17:01 ` [PATCH 11/15] x86/xsaves: Add xsaves and xrstors support for booting time Fenghua Yu
2014-05-26 17:01 ` [PATCH 12/15] x86/xsaves: Save xstate to task's xsave area in __save_fpu during " Fenghua Yu
2014-05-26 17:01 ` [PATCH 13/15] x86/xsaves: Call booting time xsaves and xrstors in setup_init_fpu_buf Fenghua Yu
2014-05-26 17:01 ` [PATCH 14/15] x86/xsaves: Enable xsaves/xrstors Fenghua Yu
2014-05-26 17:01 ` [PATCH 15/15] Define kernel API to get address of each state in xsave area Fenghua Yu
2014-05-26 19:37 ` [PATCH 0/15] x86/xsaves: Optimize xstate context switch by xsaves/xrstors Andy Lutomirski
2014-05-26 20:13   ` Yu, Fenghua
2014-05-26 20:53     ` H. Peter Anvin
2014-05-26 21:40     ` Andy Lutomirski
2014-05-26 21:47       ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox