# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Node ID 99174e194b6a23795b6006d2c4296f901c567fcb # Parent 0ac7c4c8ae50a26a7240c4e76e897ae67b52aa69 work around for VT-i performance issues. vcpu_itr_{i, d}() must flush vTLB according to SDM. However vTLB flush is very heavy so that it causes severe performance loss. Considering Linux usage of TRs, epsically dtr[IA64_TR_CURRENT_STACK], it is safe not to flush vTLB. vTLB flush in vcpu_itr_{i, d}() is disabled as work around until good optimization is proposed. PATCHNAME: disable_vtlb_flush_in_vcpu_itr Signed-off-by: Isaku Yamahata diff -r 0ac7c4c8ae50 -r 99174e194b6a xen/arch/ia64/xen/vcpu.c --- a/xen/arch/ia64/xen/vcpu.c Wed Jul 12 11:43:35 2006 +0900 +++ b/xen/arch/ia64/xen/vcpu.c Wed Jul 12 12:02:52 2006 +0900 @@ -1914,12 +1914,25 @@ IA64FAULT vcpu_itr_d(VCPU *vcpu, UINT64 vcpu_set_tr_entry(trp,pte,itir,ifa); vcpu_quick_region_set(PSCBX(vcpu,dtr_regions),ifa); +#if 0 + //XXX [CORRECTNESS] + // vTLB flush is required according to SDM vol2 4.1.1.4 and + // table 4-1. + // + // The following flush is too heavy and it makes + // the peformance unaceptably slow. especially when VT-i domain + // is created and qemu-dm is busy. + // Considering Linux usage of dtr[IA64_TR_CURRENT_STACK], + // it's safe not to flush. + // Disably the following flush until any good optimization + // is proposed. if ((1UL << VHPT_SIZE_LOG2) / sizeof(struct vhpt_lf_entry) < (1UL << itir_ps(itir)) / PAGE_SIZE) vhpt_flush(); else vcpu_flush_tlb_vhpt_range(ifa & itir_mask(itir), itir_ps(itir)); +#endif return IA64_NO_FAULT; } @@ -1938,12 +1951,25 @@ IA64FAULT vcpu_itr_i(VCPU *vcpu, UINT64 vcpu_set_tr_entry(trp,pte,itir,ifa); vcpu_quick_region_set(PSCBX(vcpu,itr_regions),ifa); +#if 0 + //XXX [CORRECTNESS] + // vTLB flush is required according to SDM vol2 4.1.1.4 and + // table 4-1. + // + // The following flush is too heavy and it makes + // the peformance unaceptably slow. especially when VT-i domain + // is created and qemu-dm is busy. + // Considering Linux usage of dtr[IA64_TR_CURRENT_STACK], + // it's safe not to flush. + // Disably the following flush until any good optimization + // is proposed. if ((1UL << VHPT_SIZE_LOG2) / sizeof(struct vhpt_lf_entry) < (1UL << itir_ps(itir)) / PAGE_SIZE) vhpt_flush(); else vcpu_flush_tlb_vhpt_range(ifa & itir_mask(itir), itir_ps(itir)); +#endif return IA64_NO_FAULT; }