mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Jason Baron <jbaron@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	tglx@linutronix.de, mingo@elte.hu, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 3/3] x86, cpu: Change NOP selection for certain Intel CPUs
Date: Mon, 18 Apr 2011 19:34:34 -0400	[thread overview]
Message-ID: <1303169674.7181.74.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1303166160-10315-4-git-send-email-hpa@linux.intel.com>

On Mon, 2011-04-18 at 15:36 -0700, H. Peter Anvin wrote:
> Due to a decoder implementation quirk, some specific Intel CPUs
> actually perform better with the "k8_nops" than with the
> SDM-recommended NOPs.  For runtime-selected NOPs, if we detect those
> specific CPUs then use the k8_nops instead of the ones we would
> normally use.
> 
> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Jason Baron <jbaron@redhat.com>
> ---
>  arch/x86/kernel/alternative.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> index 2ca3f65..34bf87e 100644
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -190,7 +190,14 @@ void __init arch_init_ideal_nops(void)
>  {
>  	switch (boot_cpu_data.x86_vendor) {
>  	case X86_VENDOR_INTEL:

Please add:

/*
 * Due to a decoder implementation quirk, some specific Intel CPUs
 * actually perform better with the "k8_nops" than with the
 * SDM-recommended NOPs.  For runtime-selected NOPs, if we detect those
 * specific CPUs then use the k8_nops instead of the ones we would
 * normally use.
 */

I tend to read comments by the code more than change logs that added the
code.

Thanks,

-- Steve

> -		if (boot_cpu_has(X86_FEATURE_NOPL)) {
> +		if (boot_cpu_data.x86 == 6 &&
> +		    boot_cpu_data.x86_model >= 0x0f &&
> +		    boot_cpu_data.x86_model != 0x1c &&
> +		    boot_cpu_data.x86_model != 0x26 &&
> +		    boot_cpu_data.x86_model != 0x27 &&
> +		    boot_cpu_data.x86_model < 0x30) {
> +			ideal_nops = k8_nops;
> +		} else if (boot_cpu_has(X86_FEATURE_NOPL)) {
>  			   ideal_nops = p6_nops;
>  		} else {
>  #ifdef CONFIG_X86_64



  reply	other threads:[~2011-04-18 23:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 22:35 [RFC PATCHSET] x86, cpu: Clean up and unify the NOP selection infrastructure H. Peter Anvin
2011-04-18 22:35 ` [PATCH 1/3] x86, percpu: Use ASM_NOP4 instead of hardcoding P6_NOP4 H. Peter Anvin
2011-04-19  1:01   ` [tip:x86/cpu] " tip-bot for H. Peter Anvin
2011-04-18 22:35 ` [PATCH 2/3] x86, cpu: Clean up and unify the NOP selection infrastructure H. Peter Anvin
2011-04-18 23:31   ` Steven Rostedt
2011-04-18 23:39     ` H. Peter Anvin
2011-04-18 23:58       ` Steven Rostedt
2011-04-19  1:01   ` [tip:x86/cpu] " tip-bot for H. Peter Anvin
2011-04-18 22:36 ` [PATCH 3/3] x86, cpu: Change NOP selection for certain Intel CPUs H. Peter Anvin
2011-04-18 23:34   ` Steven Rostedt [this message]
2011-04-19  1:02   ` [tip:x86/cpu] " tip-bot for H. Peter Anvin

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=1303169674.7181.74.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@linux.intel.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®