All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Venkatesh Pallipadi <venki@google.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	asit.k.mallick@intel.com, arjan@linux.kernel.org,
	a.p.zijlstra@chello.hl, lenb@kernel.org, tglx@linutronix.de,
	hpa@linux.intel.com, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/idle] x86, hotplug: Move WBINVD back outside the play_dead loop
Date: Mon, 20 Sep 2010 11:20:31 -0700	[thread overview]
Message-ID: <4C97A5EF.4070100@zytor.com> (raw)
In-Reply-To: <AANLkTimCXZWVb7ajANPg15Zuo22nst=d5p-MjXhzu1NX@mail.gmail.com>

On 09/17/2010 05:48 PM, Venkatesh Pallipadi wrote:
>>
>> +       wbinvd();
>> +
>>        while (1) {
>> -               mb();
>> -               wbinvd();
>>                __monitor(&current_thread_info()->flags, 0, 0);
>>                mb();
> 
> 
> Just one observation. There are some CPUs with errata that need
> clflush before monitor. So, if that CPU wakesup spuriously it may have
> problem reentering idle. Not sure whether that will be a problem as
> that errata also depended on read happening on the flag. May be its
> better to do monitor (0, 0, 0).
> 

It seems the easy way to deal with that would be to just add clflush
before monitor... it is *probably* redundant, but it should be safe to
do. It means depending on X86_FEATURE_CLFLUSH as well as
X86_FEATURE_MWAIT, but I don't think there is any x86 processor which
has MWAIT and not CLFLUSH, and I highly doubt there ever will be.

Does anyone see any downside?

	-hpa

  reply	other threads:[~2010-09-20 18:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 23:19 [patch 0/2] x86: Make offline cpus to go to deepest idle state using mwait venkatesh.pallipadi
2009-05-22 23:19 ` [patch 1/2] x86: Add pm_play_dead funcptr to power-efficiently offline CPUs venkatesh.pallipadi
2009-05-23 10:44   ` Peter Zijlstra
2009-05-23 15:07     ` Pallipadi, Venkatesh
2009-06-22 17:25     ` Pallipadi, Venkatesh
2009-05-22 23:19 ` [patch 2/2] x86: put offline CPUs into deepest mwait cstate_subcstate venkatesh.pallipadi
2009-05-25  0:56   ` Shaohua Li
2009-05-26 21:17     ` Pallipadi, Venkatesh
2010-09-17 23:46   ` [tip:x86/idle] x86, hotplug: Use mwait to offline a processor, fix the legacy case tip-bot for H. Peter Anvin
2010-09-18  0:13     ` [tip:x86/idle] x86, hotplug: Move WBINVD back outside the play_dead loop tip-bot for H. Peter Anvin
2010-09-18  0:48       ` Venkatesh Pallipadi
2010-09-20 18:20         ` H. Peter Anvin [this message]
2010-09-20 20:11           ` H. Peter Anvin
2010-09-20 22:34             ` Venkatesh Pallipadi

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=4C97A5EF.4070100@zytor.com \
    --to=hpa@zytor.com \
    --cc=a.p.zijlstra@chello.hl \
    --cc=arjan@linux.kernel.org \
    --cc=asit.k.mallick@intel.com \
    --cc=hpa@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=venki@google.com \
    /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.