]> git.baikalelectronics.ru Git - kernel.git/commit
s390: convert to GENERIC_VDSO
authorSven Schnelle <svens@linux.ibm.com>
Tue, 28 Apr 2020 07:52:23 +0000 (09:52 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 26 Aug 2020 16:47:21 +0000 (18:47 +0200)
commit45ce549376941bdc51dbcf2c2c0f1e5216869b34
tree4cc4c378f7541d4b8fd080663d2f0847a24c2cfc
parent75735358bfaf3a5d761ac4dd86be4352fd1e8305
s390: convert to GENERIC_VDSO

Convert s390 to generic vDSO. There are a few special things on s390:

- vDSO can be called without a stack frame - glibc did this in the past.
  So we need to allocate a stackframe on our own.

- The former assembly code used stcke to get the TOD clock and applied
  time steering to it. We need to do the same in the new code. This is done
  in the architecture specific __arch_get_hw_counter function. The steering
  information is stored in an architecure specific area in the vDSO data.

- CPUCLOCK_VIRT is now handled with a syscall fallback, which might
  be slower/less accurate than the old implementation.

The getcpu() function stays as an assembly function because there is no
generic implementation and the code is just a few lines.

Performance number from my system do 100 mio gettimeofday() calls:

Plain syscall: 8.6s
Generic VDSO:  1.3s
old ASM VDSO:  1s

So it's a bit slower but still much faster than syscalls.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
20 files changed:
arch/s390/Kconfig
arch/s390/include/asm/clocksource.h [new file with mode: 0644]
arch/s390/include/asm/vdso.h
arch/s390/include/asm/vdso/clocksource.h [new file with mode: 0644]
arch/s390/include/asm/vdso/data.h [new file with mode: 0644]
arch/s390/include/asm/vdso/gettimeofday.h [new file with mode: 0644]
arch/s390/include/asm/vdso/processor.h [new file with mode: 0644]
arch/s390/include/asm/vdso/vdso.h [new file with mode: 0644]
arch/s390/include/asm/vdso/vsyscall.h [new file with mode: 0644]
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/entry.S
arch/s390/kernel/setup.c
arch/s390/kernel/time.c
arch/s390/kernel/vdso.c
arch/s390/kernel/vdso64/Makefile
arch/s390/kernel/vdso64/clock_getres.S [deleted file]
arch/s390/kernel/vdso64/clock_gettime.S [deleted file]
arch/s390/kernel/vdso64/gettimeofday.S [deleted file]
arch/s390/kernel/vdso64/vdso64_generic.c [new file with mode: 0644]
arch/s390/kernel/vdso64/vdso_user_wrapper.S [new file with mode: 0644]