From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] xen: correctly check for pending events when restoring irq flags
Date: Thu, 26 Apr 2012 16:08:14 -0400 [thread overview]
Message-ID: <20120426200814.GA1130@phenom.dumpdata.com> (raw)
In-Reply-To: <1335465846-22229-1-git-send-email-david.vrabel@citrix.com>
On Thu, Apr 26, 2012 at 07:44:06PM +0100, David Vrabel wrote:
> From: David Vrabel <david.vrabel@citrix.com>
>
> In xen_restore_fl_direct(), xen_force_evtchn_callback() was being
> called even if no events were pending. This resulted in (depending on
> workload) about a 100 times as many xen_version hypercalls as
> necessary.
>
> Fix this by correcting the sense of the conditional jump.
>
> This seems to give a significant performance benefit for some
> workloads.
>
Will put stable@kernel.org here as well.
Thx!
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> ---
> I'd prefer to do more testing and benchmarking but the gains appear to
> be significant. e.g., lmbench3's 'lat_proc fork' test has improved
> from 404 us to 357 us (~11% faster).
> ---
> arch/x86/xen/xen-asm.S | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm.S
> index 79d7362..3e45aa0 100644
> --- a/arch/x86/xen/xen-asm.S
> +++ b/arch/x86/xen/xen-asm.S
> @@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct)
>
> /* check for unmasked and pending */
> cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
> - jz 1f
> + jnz 1f
> 2: call check_events
> 1:
> ENDPATCH(xen_restore_fl_direct)
> --
> 1.7.2.5
next prev parent reply other threads:[~2012-04-26 20:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 18:44 [PATCH] xen: correctly check for pending events when restoring irq flags David Vrabel
2012-04-26 20:08 ` Konrad Rzeszutek Wilk [this message]
2012-04-27 8:47 ` Ian Campbell
2012-04-27 11:41 ` David Vrabel
2012-04-27 11:42 ` Jan Beulich
2012-04-27 11:58 ` Ian Campbell
2012-04-27 12:46 ` Jan Beulich
2012-04-27 13:09 ` Ian Campbell
2012-04-27 13:51 ` 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=20120426200814.GA1130@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).