linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/delay: Introduce TPAUSE instruction
@ 2020-02-26 19:10 Kyung Min Park
  2020-02-26 19:10 ` [PATCH 1/2] x86/asm: Define a few helpers in delay_waitx() Kyung Min Park
  2020-02-26 19:10 ` [PATCH 2/2] x86/asm/delay: Introduce TPAUSE delay Kyung Min Park
  0 siblings, 2 replies; 8+ messages in thread
From: Kyung Min Park @ 2020-02-26 19:10 UTC (permalink / raw)
  To: x86, linux-kernel
  Cc: tglx, mingo, hpa, gregkh, ak, tony.luck, ashok.raj,
	ravi.v.shankar, fenghua.yu

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.

Kyung Min Park (2):
  x86/asm: Define a few helpers in delay_waitx()
  x86/asm/delay: Introduce TPAUSE delay

 arch/x86/include/asm/mwait.h | 17 +++++++++
 arch/x86/lib/delay.c         | 82 ++++++++++++++++++++++++++++++++------------
 2 files changed, 78 insertions(+), 21 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2020-03-18 20:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26 19:10 [PATCH 0/2] x86/delay: Introduce TPAUSE instruction Kyung Min Park
2020-02-26 19:10 ` [PATCH 1/2] x86/asm: Define a few helpers in delay_waitx() Kyung Min Park
2020-03-18 20:19   ` Thomas Gleixner
2020-02-26 19:10 ` [PATCH 2/2] x86/asm/delay: Introduce TPAUSE delay Kyung Min Park
2020-02-26 21:10   ` Andi Kleen
2020-02-26 21:20     ` Luck, Tony
2020-02-26 21:59       ` Andi Kleen
2020-02-26 21:31     ` Fenghua Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).