All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/10] x86: Allocate AVX512 xstate ondemand
@ 2021-12-03  0:36 Jiaxun Yang
  2021-12-03  0:36 ` [RFC PATCH 01/10] x86/fpu: Remove duplicated declaration of __fpu_state_size_dynamic Jiaxun Yang
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Jiaxun Yang @ 2021-12-03  0:36 UTC (permalink / raw)
  To: x86
  Cc: tglx, mingo, bp, dave.hansen, hpa, chang.seok.bae, linux-kernel,
	Jiaxun Yang

This series makes allocation of AVX512 xstate buffer ondemand.
It can save some memory (~2k for a thread not using AVX512).

Also we are going to have heterogeneous processors that
only some cores support AVX512, it can be helpful when
dealing with such processors.

Patch 1~6 are some preparations.
Patch 7 moves reallocation of xstate buffer to save_fpregs_to_fpstate.
Patch 8~10 are some cleanup and enablement work.

Tested on a Skylake-X system with AVX512 intensive y-cruncher and numpy,
the performance impact seems neglectable.

Any sugguestions are welcomed.

Cheers!
---
Jiaxun Yang
Year 1 ECS Undergraduate
University of Edinburgh

Jiaxun Yang (10):
  x86/fpu: Remove duplicated declaration of __fpu_state_size_dynamic
  x86/fpu: Split fpu_xfd_enabled from fpu_state_size_dynamic
  x86/fpu: Calculate xsave state addr on fly
  x86/fpu: Remove xstate_comp_offsets cache
  x86/fpu: Cache xstate_is_aligned
  x86/fpu/xcr: Return all enabled xfeature if CPU doesn't support
  x86/fpu: Rellocate fpstate on save_fpregs_to_fpstate
  x86/fpu: Don't keep state_size in perm struct
  x86/fpu: Split out XFEATURE_MASK_KERNEL_DYNAMIC
  x86/fpu: Mark AVX512 xfeatures as kernel dynamic

 arch/x86/include/asm/fpu/types.h  |   8 -
 arch/x86/include/asm/fpu/xcr.h    |  16 +-
 arch/x86/include/asm/fpu/xstate.h |  19 +-
 arch/x86/kernel/fpu/core.c        |  21 ++-
 arch/x86/kernel/fpu/xstate.c      | 281 ++++++++++++++----------------
 arch/x86/kernel/fpu/xstate.h      |   3 +-
 6 files changed, 181 insertions(+), 167 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-12-04 11:56 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  0:36 [RFC PATCH 00/10] x86: Allocate AVX512 xstate ondemand Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 01/10] x86/fpu: Remove duplicated declaration of __fpu_state_size_dynamic Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 02/10] x86/fpu: Split fpu_xfd_enabled from fpu_state_size_dynamic Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 03/10] x86/fpu: Calculate xsave state addr on fly Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 04/10] x86/fpu: Remove xstate_comp_offsets cache Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 05/10] x86/fpu: Cache xstate_is_aligned Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 06/10] x86/fpu/xcr: Return all enabled xfeature if CPU doesn't support Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 07/10] x86/fpu: Rellocate fpstate on save_fpregs_to_fpstate Jiaxun Yang
2021-12-03  0:44   ` Dave Hansen
2021-12-03 11:39     ` Jiaxun Yang
2021-12-03 15:18       ` Dave Hansen
2021-12-03 15:51         ` Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 08/10] x86/fpu: Don't keep state_size in perm struct Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 09/10] x86/fpu: Split out XFEATURE_MASK_KERNEL_DYNAMIC Jiaxun Yang
2021-12-03  0:36 ` [RFC PATCH 10/10] x86/fpu: Mark AVX512 xfeatures as kernel dynamic Jiaxun Yang
2021-12-03  0:40 ` [RFC PATCH 00/10] x86: Allocate AVX512 xstate ondemand Dave Hansen
2021-12-03  0:45   ` Jiaxun Yang
2021-12-03  0:58     ` Dave Hansen
2021-12-03  9:20       ` David Laight
2021-12-03 11:42       ` Jiaxun Yang
2021-12-03 11:51         ` Borislav Petkov
2021-12-03 11:55           ` Jiaxun Yang
2021-12-04 11:55 ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.