[lkml]   [2020]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v2 0/2] x86/delay: Introduce TPAUSE instruction
Intel processors that support the WAITPKG feature implement
the TPAUSE instruction that suspends execution in a lower power
state until the TSC (Time Stamp Counter) exceeds a certain value.

Update the udelay() function to use TPAUSE on systems where it
is available. Note that we hard code the deeper (C0.2) sleep
state because exit latency is small compared to the "microseconds"
that usleep() will delay.

- Change from v1 to v2:
1. The patchset applies after Thomas's cleanup patch as below:
2. Change function/variable names as suggested by Thomas i.e.
a. Change to delay_halt_fn/delay_halt_mwaitx/delay_halt_tpause from
b. Change variable name loops to cycles.
c. Change back to the original name delay_fn from delay_platform.
3. Organize comments to use full width.
4. Add __ro_after_init for the function pointer delay_halt_fn.
5. Change patch titles as suggested by Thomas.

Kyung Min Park (2):
x86/delay: Refactor delay_mwaitx() for TPAUSE support
x86/delay: Introduce TPAUSE delay

arch/x86/include/asm/mwait.h | 17 ++++++++++
arch/x86/lib/delay.c | 75 +++++++++++++++++++++++++++++++++-----------
2 files changed, 73 insertions(+), 19 deletions(-)


 \ /
  Last update: 2020-03-20 05:14    [W:0.093 / U:7.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site