public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] x86/delay: Introduce TPAUSE instruction
@ 2020-03-20  4:13 Kyung Min Park
  2020-03-20  4:13 ` [PATCH v2 1/2] x86/delay: Refactor delay_mwaitx() for TPAUSE support Kyung Min Park
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Kyung Min Park @ 2020-03-20  4:13 UTC (permalink / raw)
  To: x86, linux-kernel
  Cc: tglx, mingo, hpa, gregkh, ak, tony.luck, ashok.raj,
	ravi.v.shankar, fenghua.yu, kyung.min.park

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.

ChangeLog:
- Change from v1 to v2:
  1. The patchset applies after Thomas's cleanup patch as below:
     https://lkml.org/lkml/diff/2020/3/18/893/1
  2. Change function/variable names as suggested by Thomas i.e.
     a. Change to delay_halt_fn/delay_halt_mwaitx/delay_halt_tpause from
        wait_func/mwaitx/tpause.
     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(-)

-- 
2.7.4


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

end of thread, other threads:[~2020-03-30 23:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-20  4:13 [PATCH v2 0/2] x86/delay: Introduce TPAUSE instruction Kyung Min Park
2020-03-20  4:13 ` [PATCH v2 1/2] x86/delay: Refactor delay_mwaitx() for TPAUSE support Kyung Min Park
2020-03-20  4:13 ` [PATCH v2 2/2] x86/delay: Introduce TPAUSE delay Kyung Min Park
2020-03-20  4:23   ` Andy Lutomirski
2020-03-20 10:00     ` Thomas Gleixner
2020-03-20 21:51       ` Andy Lutomirski
2020-03-20 23:23         ` Thomas Gleixner
2020-03-20 23:57           ` Andy Lutomirski
2020-03-30 23:42             ` Park, Kyung Min
2020-03-20 10:07   ` Joe Perches
2020-03-23  5:18     ` Park, Kyung Min
2020-03-20  9:57 ` [PATCH v2 0/2] x86/delay: Introduce TPAUSE instruction Thomas Gleixner
2020-03-20 23:43   ` Park, Kyung Min

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox