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

[Xen-devel] [PATCH v2 01/11] tmem: cleanup: drop COMPARE_COPY_PAGE_SSE2



COMPARE_COPY_PAGE_SSE2 never be used in other place, memcpy() is enough.

Signed-off-by: Bob Liu <bob.liu@xxxxxxxxxx>
---
 xen/common/tmem.c     |   14 --------------
 xen/common/tmem_xen.c |   35 -----------------------------------
 2 files changed, 49 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index a122651..215722b 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -95,14 +95,7 @@ DECL_CYC_COUNTER(non_succ_get);
 DECL_CYC_COUNTER(non_succ_put);
 DECL_CYC_COUNTER(flush);
 DECL_CYC_COUNTER(flush_obj);
-#ifdef COMPARE_COPY_PAGE_SSE2
-EXTERN_CYC_COUNTER(pg_copy1);
-EXTERN_CYC_COUNTER(pg_copy2);
-EXTERN_CYC_COUNTER(pg_copy3);
-EXTERN_CYC_COUNTER(pg_copy4);
-#else
 EXTERN_CYC_COUNTER(pg_copy);
-#endif
 DECL_CYC_COUNTER(compress);
 DECL_CYC_COUNTER(decompress);
 
@@ -2172,14 +2165,7 @@ static int tmemc_list_global_perf(tmem_cli_va_param_t 
buf, int off,
     n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,non_succ_put,"p");
     n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,flush,"F");
     n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,flush_obj,"O");
-#ifdef COMPARE_COPY_PAGE_SSE2
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,pg_copy1,"1");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,pg_copy2,"2");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,pg_copy3,"3");
-    n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,pg_copy4,"4");
-#else
     n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,pg_copy,"C");
-#endif
     n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,compress,"c");
     n += SCNPRINTF_CYC_COUNTER(info+n,BSIZE-n,decompress,"d");
     n--; /* overwrite trailing comma */
diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index 54ec09f..4725558 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -36,14 +36,7 @@ integer_param("tmem_lock", opt_tmem_lock);
 
 EXPORT atomic_t freeable_page_count = ATOMIC_INIT(0);
 
-#ifdef COMPARE_COPY_PAGE_SSE2
-DECL_CYC_COUNTER(pg_copy1);
-DECL_CYC_COUNTER(pg_copy2);
-DECL_CYC_COUNTER(pg_copy3);
-DECL_CYC_COUNTER(pg_copy4);
-#else
 DECL_CYC_COUNTER(pg_copy);
-#endif
 
 /* these are a concurrency bottleneck, could be percpu and dynamically
  * allocated iff opt_tmem_compress */
@@ -53,40 +46,12 @@ static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, workmem);
 static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, dstmem);
 static DEFINE_PER_CPU_READ_MOSTLY(void *, scratch_page);
 
-#ifdef COMPARE_COPY_PAGE_SSE2
-#include <asm/flushtlb.h>  /* REMOVE ME AFTER TEST */
-#include <asm/page.h>  /* REMOVE ME AFTER TEST */
-#endif
 void tmh_copy_page(char *to, char*from)
 {
-#ifdef COMPARE_COPY_PAGE_SSE2
-    DECL_LOCAL_CYC_COUNTER(pg_copy1);
-    DECL_LOCAL_CYC_COUNTER(pg_copy2);
-    DECL_LOCAL_CYC_COUNTER(pg_copy3);
-    DECL_LOCAL_CYC_COUNTER(pg_copy4);
-    *to = *from;  /* don't measure TLB misses */
-    flush_area_local(to,FLUSH_CACHE|FLUSH_ORDER(0));
-    flush_area_local(from,FLUSH_CACHE|FLUSH_ORDER(0));
-    START_CYC_COUNTER(pg_copy1);
-    copy_page_sse2(to, from);  /* cold cache */
-    END_CYC_COUNTER(pg_copy1);
-    START_CYC_COUNTER(pg_copy2);
-    copy_page_sse2(to, from);  /* hot cache */
-    END_CYC_COUNTER(pg_copy2);
-    flush_area_local(to,FLUSH_CACHE|FLUSH_ORDER(0));
-    flush_area_local(from,FLUSH_CACHE|FLUSH_ORDER(0));
-    START_CYC_COUNTER(pg_copy3);
-    memcpy(to, from, PAGE_SIZE);  /* cold cache */
-    END_CYC_COUNTER(pg_copy3);
-    START_CYC_COUNTER(pg_copy4);
-    memcpy(to, from, PAGE_SIZE); /* hot cache */
-    END_CYC_COUNTER(pg_copy4);
-#else
     DECL_LOCAL_CYC_COUNTER(pg_copy);
     START_CYC_COUNTER(pg_copy);
     memcpy(to, from, PAGE_SIZE);
     END_CYC_COUNTER(pg_copy);
-#endif
 }
 
 #if defined(CONFIG_ARM)
-- 
1.7.10.4


_______________________________________________
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®.