Date: Thu, 5 Feb 2009 14:02:04 +0000 (UTC) From: Doug Rabson <dfr@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r188143 - user/dfr/xenhvm/6/sys/amd64/amd64 Message-ID: <200902051402.n15E24bY028587@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dfr Date: Thu Feb 5 14:02:04 2009 New Revision: 188143 URL: http://svn.freebsd.org/changeset/base/188143 Log: Add some disabled code which calls the hypervisor to flush TLBs. Disabled because it seems to be slower in my tests. Modified: user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c Modified: user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c ============================================================================== --- user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c Thu Feb 5 11:48:10 2009 (r188142) +++ user/dfr/xenhvm/6/sys/amd64/amd64/pmap.c Thu Feb 5 14:02:04 2009 (r188143) @@ -144,6 +144,11 @@ __FBSDID("$FreeBSD$"); #ifdef SMP #include <machine/smp.h> #endif +#ifdef XENHVM +#include <machine/xen/xen-os.h> +#include <xen/hypervisor.h> +#include <xen/interface/hvm/hvm_op.h> +#endif #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 @@ -793,8 +798,20 @@ pmap_invalidate_all(pmap_t pmap) sched_pin(); if (pmap == kernel_pmap || pmap->pm_active == all_cpus) { - invltlb(); - smp_invltlb(); +#if defined(XENHVM) && defined(notdef) + /* + * As far as I can tell, this makes things slower, at + * least where there are only two physical cpus and + * the host is not overcommitted. + */ + if (is_running_on_xen()) { + HYPERVISOR_hvm_op(HVMOP_flush_tlbs, NULL); + } else +#endif + { + invltlb(); + smp_invltlb(); + } } else { cpumask = PCPU_GET(cpumask); other_cpus = PCPU_GET(other_cpus);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902051402.n15E24bY028587>