All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Keir Fraser <keir@xen.org>,
	IanJackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH 1/2] x86: suppress event check IPI to MWAITing CPUs
Date: Thu, 11 Sep 2014 11:09:51 +0100	[thread overview]
Message-ID: <541174EF.4040506@citrix.com> (raw)
In-Reply-To: <5411908F0200007800033C1D@mail.emea.novell.com>

On 11/09/14 11:07, Jan Beulich wrote:
>>>> On 11.09.14 at 12:02, <andrew.cooper3@citrix.com> wrote:
>> On 11/09/14 10:40, Jan Beulich wrote:
>>> @@ -349,7 +359,7 @@ void mwait_idle_with_hints(unsigned int 
>>>       * Timer deadline passing is the event on which we will be woken via
>>>       * cpuidle_mwait_wakeup. So check it now that the location is armed.
>>>       */
>>> -    if ( expires > NOW() || expires == 0 )
>>> +    if ( (expires > NOW() || expires == 0) && !softirq_pending(cpu) )
>>>      {
>>>          cpumask_set_cpu(cpu, &cpuidle_mwait_flags);
>> Don't you need a smp_wmb() or better here for the results of
>> cpumask_set_cpu() to be guaranteed to be externally visible?  mwait does
>> not appear to be a serialising instruction, and doesn't appear to have
>> any ordering guarantees in the manual.
> I think cpumask_set_cpu() using a LOCKed r-m-w instruction should
> provide all the needed ordering.
>
> Jan
>

Ah yes, and you haven't gotten around to changing the cpumask_*
functions wrt atomicity yet.

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

  reply	other threads:[~2014-09-11 10:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  9:36 [PATCH 0/2] x86: improve remote CPU wakeup Jan Beulich
2014-09-11  9:40 ` [PATCH 1/2] x86: suppress event check IPI to MWAITing CPUs Jan Beulich
2014-09-11 10:02   ` Andrew Cooper
2014-09-11 10:07     ` Jan Beulich
2014-09-11 10:09       ` Andrew Cooper [this message]
2014-09-11 10:26         ` Jan Beulich
2014-09-11  9:40 ` [PATCH 2/2] x86/HVM: batch vCPU wakeups Jan Beulich
2014-09-11 10:48   ` Andrew Cooper
2014-09-11 11:03     ` Jan Beulich
2014-09-11 11:11       ` Andrew Cooper
2014-09-18 10:59 ` [PATCH 0/2] x86: improve remote CPU wakeup Tim Deegan

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=541174EF.4040506@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.