mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Ido Yariv <ido@wizery.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Shai Fultheim <shai@scalemp.com>
Subject: Re: [PATCH v2 2/2] x86/pat: Avoid contention on cpa_lock if possible
Date: Wed, 22 Aug 2012 10:47:02 +0200	[thread overview]
Message-ID: <20120822084702.GA21764@gmail.com> (raw)
In-Reply-To: <1344445299-22142-2-git-send-email-ido@wizery.com>


* Ido Yariv <ido@wizery.com> wrote:

> vSMP Foundation does not require to serialize CPA by guaranteeing that
> the most recent TLB entry will always be used.
> 
> To avoid needless contention on cpa_lock, do not lock/unlock it if it
> isn't necessary.
> 
> Based on work by Shai Fultheim <shai@scalemp.com>.
> 
> Signed-off-by: Ido Yariv <ido@wizery.com>
> Acked-by: Shai Fultheim <shai@scalemp.com>
> ---
> Changes from v1:
> - Use a synthetic CPUID bit and a use static_cpu_has() as suggested by
>   H. Peter Avnin
> 
>  arch/x86/include/asm/cpufeature.h |    1 +
>  arch/x86/kernel/vsmp_64.c         |   10 ++++++++++
>  arch/x86/mm/pageattr.c            |   30 +++++++++++++++++++++---------
>  3 files changed, 32 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
> index 6b7ee5f..92303a0 100644
> --- a/arch/x86/include/asm/cpufeature.h
> +++ b/arch/x86/include/asm/cpufeature.h
> @@ -97,6 +97,7 @@
>  #define X86_FEATURE_EXTD_APICID	(3*32+26) /* has extended APICID (8 bits) */
>  #define X86_FEATURE_AMD_DCM     (3*32+27) /* multi-node processor */
>  #define X86_FEATURE_APERFMPERF	(3*32+28) /* APERFMPERF */
> +#define X86_FEATURE_NO_CPA_LOCK	(3*32+29) /* Serializing cpa is not required */

Patch looks mostly good, but could we please use some more 
hardware-ish name, instead of referring to a kernel lock?

I.e. how would you name it if this was a real hardware feature? 
Certainly not 'No CPA Lock'.

Thanks,

	Ingo

  reply	other threads:[~2012-08-22  8:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 17:01 [PATCH 1/2] vsmp: Use hypervisor layer for initialization Ido Yariv
2012-08-08 17:01 ` [PATCH v2 2/2] x86/pat: Avoid contention on cpa_lock if possible Ido Yariv
2012-08-22  8:47   ` Ingo Molnar [this message]
2012-08-22  9:53     ` Ido Yariv
2012-08-22 10:07       ` Ingo Molnar
2012-08-19  9:12 ` [PATCH 1/2] vsmp: Use hypervisor layer for initialization Ido Yariv
2012-08-22  9:04 ` [tip:x86/platform] x86/vsmp: " tip-bot for Ido Yariv
2012-08-22  9:11   ` Ingo Molnar
2012-08-22  9:46     ` Ido Yariv
2012-08-22 10:08       ` Ingo Molnar
2012-08-22 11:20         ` [PATCH v2] " Ido Yariv
2012-08-22 17:37           ` Ingo Molnar
2012-08-22 17:39             ` Shai Fultheim (Shai@ScaleMP.com)
2012-08-22 17:48               ` Ingo Molnar
2012-08-22 18:07                 ` Shai Fultheim (Shai@ScaleMP.com)
2012-08-22 18:19                   ` Ingo Molnar

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=20120822084702.GA21764@gmail.com \
    --to=mingo@kernel.org \
    --cc=hpa@zytor.com \
    --cc=ido@wizery.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=shai@scalemp.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome