riscv: introduce vDSO common flow
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 1 replyIn review
- v32 patches 0 repliesSuperseded
- v22 patches 1 replySuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 3 replies | Superseded |
Changes in v4 from the cover letter
1. Fix build warnings reported by kbuild system
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | riscv: use vDSO common flow to reduce the latency of the time-related functionsarch/ arch/ arch/ +13 more | +199 | 0 replies | |
| 2/2 | riscv: set the permission of vdso_data to read-onlyarch/ | +14 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Atish Patra |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/2] riscv: introduce vDSO common flow
Even if RISC-V has supported the vDSO feature, the latency of the functions for obtaining the system time is still expensive. It is because these functions still trigger a corresponding system call in the process, which slows down the response time. If we want to remove the system call to reduce the latency, the kernel should have the ability to output the system clock information to userspace. This patch introduces the vDSO common flow to enable the kernel to achieve the above feature and uses "rdtime" instruction to obtain the current time in the user space. Under this condition, the latency cost by the ecall from U-mode to S-mode can be eliminated. After applying this patch, the latency of gettimeofday() measured on the HiFive unleashed board can be reduced by %61.
change since v3:
1. Fix build warnings reported by kbuild system
change since v2:
1. Fix build errors that occurred in the case of rv32 and nommu.
change since v1:
1. Modify the permission of vdso_data to read-only
Vincent Chen (2):
riscv: use vDSO common flow to reduce the latency of the time-related
functions
riscv: set the permission of vdso_data to read-only
arch/riscv/Kconfig | 4 ++ arch/riscv/include/asm/clocksource.h | 7 +++ arch/riscv/include/asm/processor.h | 12 +---- arch/riscv/include/asm/vdso.h | 2 + arch/riscv/include/asm/vdso/clocksource.h | 8 +++ arch/riscv/include/asm/vdso/gettimeofday.h | 79 ++++++++++++++++++++++++++++++ arch/riscv/include/asm/vdso/processor.h | 19 +++++++ arch/riscv/include/asm/vdso/vsyscall.h | 27 ++++++++++ arch/riscv/kernel/time.c | 9 ++++ arch/riscv/kernel/vdso.c | 24 +++++++-- arch/riscv/kernel/vdso/Makefile | 12 +++-- arch/riscv/kernel/vdso/clock_getres.S | 18 ------- arch/riscv/kernel/vdso/clock_gettime.S | 18 ------- arch/riscv/kernel/vdso/gettimeofday.S | 18 ------- arch/riscv/kernel/vdso/vdso.lds.S | 2 + arch/riscv/kernel/vdso/vgettimeofday.c | 25 ++++++++++ 16 files changed, 213 insertions(+), 71 deletions(-) create mode 100644 arch/riscv/include/asm/clocksource.h create mode 100644 arch/riscv/include/asm/vdso/clocksource.h create mode 100644 arch/riscv/include/asm/vdso/gettimeofday.h create mode 100644 arch/riscv/include/asm/vdso/processor.h create mode 100644 arch/riscv/include/asm/vdso/vsyscall.h delete mode 100644 arch/riscv/kernel/vdso/clock_getres.S delete mode 100644 arch/riscv/kernel/vdso/clock_gettime.S delete mode 100644 arch/riscv/kernel/vdso/gettimeofday.S create mode 100644 arch/riscv/kernel/vdso/vgettimeofday.c
Signature · 1 line
2.7.4