All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH v2] x86: avoid flush IPI when possible
Date: Wed, 17 Feb 2016 14:48:41 +0000	[thread overview]
Message-ID: <56C48849.4000801@citrix.com> (raw)
In-Reply-To: <56C304A502000078000D2879@prv-mh.provo.novell.com>

On 16/02/16 10:14, Jan Beulich wrote:
> --- a/xen/arch/x86/smp.c
> +++ b/xen/arch/x86/smp.c
> @@ -205,26 +205,30 @@ static unsigned int flush_flags;
>  
>  void invalidate_interrupt(struct cpu_user_regs *regs)
>  {
> +    unsigned int flags = flush_flags;
>      ack_APIC_irq();
>      perfc_incr(ipis);
> -    if ( !__sync_local_execstate() ||
> -         (flush_flags & (FLUSH_TLB_GLOBAL | FLUSH_CACHE)) )
> -        flush_area_local(flush_va, flush_flags);
> +    if ( __sync_local_execstate() )
> +        flags &= ~FLUSH_TLB;

If a switch happened, write_ptbase() also flushed global mappings.  I
believe you can also mask out FLUSH_TLB_GLOBAL here.

Otherwise, the rest looks ok.  Reviewed-by: Andrew Cooper
<andrew.cooper3@citrix.com>

  reply	other threads:[~2016-02-17 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 10:14 [PATCH v2] x86: avoid flush IPI when possible Jan Beulich
2016-02-17 14:48 ` Andrew Cooper [this message]
2016-02-18  8:44   ` Jan Beulich

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=56C48849.4000801@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@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.