All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Park, Kyung Min" <kyung.min.park@intel.com>
To: Joe Perches <joe@perches.com>, "x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"Luck, Tony" <tony.luck@intel.com>,
	"Raj, Ashok" <ashok.raj@intel.com>,
	"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
	"Yu, Fenghua" <fenghua.yu@intel.com>
Subject: RE: [PATCH v2 2/2] x86/delay: Introduce TPAUSE delay
Date: Mon, 23 Mar 2020 05:18:36 +0000	[thread overview]
Message-ID: <3658BA65DD26AF4BA909BEB2C6DF6181A2A624C9@ORSMSX102.amr.corp.intel.com> (raw)
In-Reply-To: <b771dfc7409a99b35575c14cd4dd55d24f81ca98.camel@perches.com>

Hi Joe,

> -----Original Message-----
> From: Joe Perches <joe@perches.com>
> Sent: Friday, March 20, 2020 3:07 AM
> To: Park, Kyung Min <kyung.min.park@intel.com>; x86@kernel.org; linux-
> kernel@vger.kernel.org
> Cc: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com;
> gregkh@linuxfoundation.org; ak@linux.intel.com; Luck, Tony
> <tony.luck@intel.com>; Raj, Ashok <ashok.raj@intel.com>; Shankar, Ravi V
> <ravi.v.shankar@intel.com>; Yu, Fenghua <fenghua.yu@intel.com>
> Subject: Re: [PATCH v2 2/2] x86/delay: Introduce TPAUSE delay
> 
> On Thu, 2020-03-19 at 21:13 -0700, Kyung Min Park wrote:
> > TPAUSE instructs the processor to enter an implementation-dependent
> > optimized state. The instruction execution wakes up when the
> > time-stamp counter reaches or exceeds the implicit EDX:EAX 64-bit input value.
> > The instruction execution also wakes up due to the expiration of the
> > operating system time-limit or by an external interrupt or exceptions
> > such as a debug exception or a machine check exception.
> []
> > diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
> []
> > @@ -97,6 +97,27 @@ static void delay_tsc(u64 cycles)  }
> >
> >  /*
> > + * On Intel the TPAUSE instruction waits until any of:
> > + * 1) the TSC counter exceeds the value provided in EAX:EDX
> > + * 2) global timeout in IA32_UMWAIT_CONTROL is exceeded
> > + * 3) an external interrupt occurs
> > + */
> > +static void delay_halt_tpause(u64 start, u64 cycles) {
> > +	u64 until = start + cycles;
> > +	unsigned int eax, edx;
> > +
> > +	eax = (unsigned int)(until & 0xffffffff);
> > +	edx = (unsigned int)(until >> 32);
> 
> trivia:
> 
> perhaps lower_32_bits and upper_32_bits

Thank you for your comment. I'll update in the next patch.


  reply	other threads:[~2020-03-23  5:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-03-20  9:57 ` [PATCH v2 0/2] x86/delay: Introduce TPAUSE instruction Thomas Gleixner
2020-03-20 23:43   ` Park, Kyung Min

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3658BA65DD26AF4BA909BEB2C6DF6181A2A624C9@ORSMSX102.amr.corp.intel.com \
    --to=kyung.min.park@intel.com \
    --cc=ak@linux.intel.com \
    --cc=ashok.raj@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.