[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Huge perf degradation from missing xen_tlb_flush_all



On Fri, 26 Oct 2012 18:58:13 -0400
Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:

> On Fri, Oct 26, 2012 at 03:43:11PM -0700, Mukesh Rathor wrote:
> > Hi,
> > 
> Like this I presume (not compile tested):
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 6226c99..dd91c3c 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -1288,6 +1288,23 @@ unsigned long xen_read_cr2_direct(void)
>       return this_cpu_read(xen_vcpu_info.arch.cr2);
>  }
>  
> +void xen_flush_tbl_all(void)
> +{
> +     struct mmuext_op *op;
> +     struct multicall_space mcs;
> +
> +     preempt_disable();
> +
> +     mcs = xen_mc_entry(sizeof(*op));
> +
> +     op = mcs.args;
> +     op->cmd = MMUEXT_TLB_FLUSH_ALL;
> +     MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);
> +
> +     xen_mc_issue(PARAVIRT_LAZY_MMU);
> +
> +     preempt_enable();
> +}
>  static void xen_flush_tlb(void)
>  {
>       struct mmuext_op *op;
> @@ -2518,7 +2535,7 @@ int xen_remap_domain_mfn_range(struct
> vm_area_struct *vma, err = 0;
>  out:
>  
> -     flush_tlb_all();
> +     xen_flush_tbl_all();

We should examine other places flush_tlb_all() is called from too.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.