diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-09-03 09:50:46 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-09-03 09:50:46 +0100 |
commit | a980249c45caa086a5e08fe8a827a865c5ea9491 (patch) | |
tree | 5b6f443d001631212b42e96d63a31c37d948c577 /xen/arch/x86/hvm/vpt.c | |
parent | 4dd7eb9f0914278ff9e4a9847788aa4ff9dc8c47 (diff) | |
download | xen-a980249c45caa086a5e08fe8a827a865c5ea9491.tar.gz xen-a980249c45caa086a5e08fe8a827a865c5ea9491.tar.bz2 xen-a980249c45caa086a5e08fe8a827a865c5ea9491.zip |
x86 vpt: Small performance fixes.
1. once one-shot timer is fired, IRQ is raised repeatedly forever.
2. Test pending_intr_nr before pt_irq_masked(), as it is cheaper.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Diffstat (limited to 'xen/arch/x86/hvm/vpt.c')
-rw-r--r-- | xen/arch/x86/hvm/vpt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index 0cb180ceba..7721873f2c 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -229,7 +229,7 @@ void pt_update_irq(struct vcpu *v) list_for_each_entry ( pt, head, list ) { - if ( !pt_irq_masked(pt) && pt->pending_intr_nr && + if ( pt->pending_intr_nr && !pt_irq_masked(pt) && ((pt->last_plt_gtime + pt->period) < max_lag) ) { max_lag = pt->last_plt_gtime + pt->period; @@ -298,6 +298,7 @@ void pt_intr_post(struct vcpu *v, struct hvm_intack intack) if ( pt->on_list ) list_del(&pt->list); pt->on_list = 0; + pt->pending_intr_nr = 0; } else { |