aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/tmem_xen.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-07-13 11:32:41 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-07-13 11:32:41 +0100
commitcfbf17ffbb03e8c8501cae1bbba5459450b3447c (patch)
treecf2e5b34ce9149243688329505ecea8e68c7eb1f /xen/common/tmem_xen.c
parent749182393c49818b03172986aa2ba6afe3615c5d (diff)
downloadxen-cfbf17ffbb03e8c8501cae1bbba5459450b3447c.tar.gz
xen-cfbf17ffbb03e8c8501cae1bbba5459450b3447c.tar.bz2
xen-cfbf17ffbb03e8c8501cae1bbba5459450b3447c.zip
Introduce and use a per-CPU read-mostly sub-section
Since mixing data that only gets setup once and then (perhaps frequently) gets read by remote CPUs with data that the local CPU may modify (again, perhaps frequently) still causes undesirable cache protocol related bus traffic, separate the former class of objects from the latter. These objects converted here are just picked based on their write-once (or write-very-rarely) properties; perhaps some more adjustments may be desirable subsequently. The primary users of the new sub-section will result from the next patch. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/tmem_xen.c')
-rw-r--r--xen/common/tmem_xen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index 9911e802ed..f1b94239f4 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -36,8 +36,8 @@ DECL_CYC_COUNTER(pg_copy);
* allocated iff opt_tmem_compress */
#define LZO_WORKMEM_BYTES LZO1X_1_MEM_COMPRESS
#define LZO_DSTMEM_PAGES 2
-static DEFINE_PER_CPU(unsigned char *, workmem);
-static DEFINE_PER_CPU(unsigned char *, dstmem);
+static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, workmem);
+static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, dstmem);
#ifdef COMPARE_COPY_PAGE_SSE2
#include <asm/flushtlb.h> /* REMOVE ME AFTER TEST */