From fa65bbbb3dd4d388c0505987049a470279b2f5ef Mon Sep 17 00:00:00 2001 From: adash Date: Thu, 12 Mar 2009 20:06:40 +0000 Subject: [PATCH] Brian's changes to manual prefetching for array and chase --- .../LookUpService/dsm2/DistributedHashMap.java | 11 ----------- .../Prefetch/ManualPrefetch/Array/Array.java | 8 +++++++- .../Prefetch/ManualPrefetch/Chase/Chase.java | 17 +++++++++-------- Robust/src/Benchmarks/Prefetch/bm.txt | 4 ++-- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/Robust/src/Benchmarks/Distributed/LookUpService/dsm2/DistributedHashMap.java b/Robust/src/Benchmarks/Distributed/LookUpService/dsm2/DistributedHashMap.java index 180945e4..c9cbdfd7 100644 --- a/Robust/src/Benchmarks/Distributed/LookUpService/dsm2/DistributedHashMap.java +++ b/Robust/src/Benchmarks/Distributed/LookUpService/dsm2/DistributedHashMap.java @@ -54,17 +54,6 @@ public class DistributedHashMap { if (dhe==null) return null; - /****** Add Manual Prefetch *****/ - //dhe.array.next(5).key - Object obj1 = dhe.array; - short[] offsets1 = new short[4]; - offsets1[0] = getoffset {DHashEntry, next}; - offsets1[1] = (short) 5; - offsets1[2] = getoffset {DHashEntry, key}; - offsets1[3] = (short) 0; - System.rangePrefetch(obj1, offsets1); - /********************************/ - DHashEntry ptr=dhe.array; while(ptr!=null) { diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Array/Array.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Array/Array.java index 48badc4e..fe886181 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Array/Array.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Array/Array.java @@ -26,7 +26,13 @@ public class Array extends Thread { offsets[0] = getoffset{Array, array}; offsets[1] = (short) 0; offsets[2] = (short) 0; - offsets[3] = (short) 100; + offsets[3] = (short) 4000; + System.rangePrefetch(this, offsets); + offsets[2] = (short) 4001; + offsets[3] = (short) 4000; + System.rangePrefetch(this, offsets); + offsets[2] = (short) 8002; + offsets[3] = (short) 1997; System.rangePrefetch(this, offsets); atomic { int xlength=array.length; diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Chase/Chase.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Chase/Chase.java index b9a25743..176bfa0e 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Chase/Chase.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/Chase/Chase.java @@ -13,7 +13,7 @@ public class Chase extends Thread { public static void main(String [] argv) { Chase c; - int numTraverse = 10000; + int numTraverse = 40000; atomic { Foo fold=global new Foo(); @@ -31,23 +31,24 @@ public class Chase extends Thread { public void run() { short[] offsets = new short[4]; + short[] offsets1 = new short[2]; + offsets[0] = getoffset{Chase, base}; offsets[1] = (short) 0; offsets[2] = getoffset{Foo, next}; - offsets[3] = (short) 127; + offsets[3] = (short) 3000; System.rangePrefetch(this, offsets); atomic { Foo b=base; - int i = 0; + int i = 50; while(b!=null) { b=b.next; i++; - base = base.next; - if((i&127) == 0) { - short[] offsets1 = new short[2]; + if((i&3000) == 0) { + i=50; offsets1[0] = getoffset{Foo, next}; - offsets1[1] = (short) 127; - System.rangePrefetch(base, offsets1); + offsets1[1] = (short) 3000; + System.rangePrefetch(b, offsets1); } } } diff --git a/Robust/src/Benchmarks/Prefetch/bm.txt b/Robust/src/Benchmarks/Prefetch/bm.txt index a09cf184..fa74ed87 100644 --- a/Robust/src/Benchmarks/Prefetch/bm.txt +++ b/Robust/src/Benchmarks/Prefetch/bm.txt @@ -11,8 +11,8 @@ MatrixMultiply:MatrixMultiply/dsm:1 1200:2 1200:3 1200:4 1200:5 1200:6 1200:7 12 Em3d:Em3d/dsm:-T 1 -N 4000 -d 130 -p -i 6:-T 2 -N 4000 -d 130 -p -i 6:-T 3 -N 4000 -d 130 -p -i 6:-T 4 -N 4000 -d 130 -p -i 6:-T 5 -N 4000 -d 130 -p -i 6:-T 6 -N 4000 -d 130 -p -i 6:-T 7 -N 4000 -d 130 -p -i 6:-T 8 -N 4000 -d 130 -p -i 6:em3dver40001306 Em3d:Em3d/dsm:-T 1 -N 6000 -d 200 -p -i 10:-T 2 -N 6000 -d 200 -p -i 10:-T 3 -N 6000 -d 200 -p -i 10:-T 4 -N 6000 -d 200 -p -i 10:-T 5 -N 6000 -d 200 -p -i 10:-T 6 -N 6000 -d 200 -p -i 10:-T 7 -N 6000 -d 200 -p -i 10:-T 8 -N 6000 -d 200 -p -i 10:em3dver600020010 Em3d:Em3d/dsm:-T 1 -N 10000 -d 1000 -i 15:-T 2 -N 10000 -d 1000 -i 15:-T 3 -N 10000 -d 1000 -i 15:-T 4 -N 10000 -d 1000 -i 15:-T 5 -N 10000 -d 1000 -i 15:-T 6 -N 10000 -d 1000 -i 15:-T 7 -N 10000 -d 1000 -i 15:-T 8 -N 10000 -d 1000 -i 15:em3dver10000100015 -Chase:Chase:::::chase -Array:Array:::::array +Chase:Chase:::::::::chase +Array:Array:::::::::array fft2d:2DFFT/dsm:1 1600:2 1600:3 1600:4 1600:5 1600:6 1600:7 1600:8 1600:1600fft2d fft2d:2DFFT/dsm:1 1152:2 1152:3 1152:4 1152:5 1152:6 1152:7 1152:8 1152:1152fft2d fft2d:2DFFT/dsm:1 3200:2 3200:3 3200:4 3200:5 3200:6 3200:7 3200:8 3200:3200fft2d -- 2.34.1