linux/arch/s390
Heiko Carstens 8c09871a95 s390/fpu: limit save and restore to used registers
The first invocation of kernel_fpu_begin() after switching from user to
kernel context will save all vector registers, even if only parts of the
vector registers are used within the kernel fpu context. Given that save
and restore of all vector registers is quite expensive change the current
approach in several ways:

- Instead of saving and restoring all user registers limit this to those
  registers which are actually used within an kernel fpu context.

- On context switch save all remaining user fpu registers, so they can be
  restored when the task is rescheduled.

- Saving user registers within kernel_fpu_begin() is done without disabling
  and enabling interrupts - which also slightly reduces runtime. In worst
  case (e.g. interrupt context uses the same registers) this may lead to
  the situation that registers are saved several times, however the
  assumption is that this will not happen frequently, so that the new
  method is faster in nearly all cases.

- save_user_fpu_regs() can still be called from all contexts and saves all
  (or all remaining) user registers to a tasks ufpu user fpu save area.

Overall this reduces the time required to save and restore the user fpu
context for nearly all cases.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2024-02-16 14:30:16 +01:00
..
appldata S390: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
boot s390/boot: vmlinux.lds.S: handle commonly discarded sections 2024-02-14 13:50:53 +01:00
configs s390/configs: update default configurations 2024-02-09 13:57:29 +01:00
crypto s390/fpu: decrease stack usage for some cases 2024-02-16 14:30:16 +01:00
hypfs s390/hypfs_sprp: remove unneeded DMA zone allocation 2024-02-09 13:58:14 +01:00
include s390/fpu: limit save and restore to used registers 2024-02-16 14:30:16 +01:00
kernel s390/fpu: limit save and restore to used registers 2024-02-16 14:30:16 +01:00
kvm s390/fpu: decrease stack usage for some cases 2024-02-16 14:30:16 +01:00
lib s390/nmi: implement and use local_mcck_save() / local_mcck_restore() 2023-12-11 14:33:05 +01:00
mm s390/extmem: fix virtual vs physical address confusion 2024-02-09 13:58:16 +01:00
net s390/bpf: Fix gotol with large offsets 2024-01-04 11:35:40 -08:00
pci s390/pci: fix max size calculation in zpci_memcpy_toio() 2024-01-11 18:22:58 +01:00
purgatory s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
tools s390/als: add vector facility to z13 architecture level set 2023-12-11 14:33:07 +01:00
Kbuild - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig s390: don't allow CONFIG_COMPAT with LD=ld.lld 2024-02-16 14:30:12 +01:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390: link vmlinux with '-z notext' 2024-02-14 13:50:53 +01:00