From: bdemsky Date: Tue, 19 Jul 2011 20:28:16 +0000 (+0000) Subject: try to move code around to sync up operations between master and slaves... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a48000518e535ad5f0fad1fe3ff83bcced5c97c0;p=IRC.git try to move code around to sync up operations between master and slaves... --- diff --git a/Robust/src/Runtime/bamboo/multicorecache.c b/Robust/src/Runtime/bamboo/multicorecache.c index 6cbe2789..32445e7d 100644 --- a/Robust/src/Runtime/bamboo/multicorecache.c +++ b/Robust/src/Runtime/bamboo/multicorecache.c @@ -229,7 +229,7 @@ void cacheAdapt_policy_hottest(int coren){ } } -#define GC_CACHE_ADAPT_DOMINATE_THRESHOLD 1 +#define GC_CACHE_ADAPT_DOMINATE_THRESHOLD 2 // cache the page on the core that accesses it the most if that core accesses // it more than (GC_CACHE_ADAPT_DOMINATE_THRESHOLD)% of the total. Otherwise, // h4h the page. @@ -252,7 +252,7 @@ void cacheAdapt_policy_dominate(int coren){ // Format: page start va + cache policy if(hotfreq != 0) { totalfreq=totalfreq>>GC_CACHE_ADAPT_DOMINATE_THRESHOLD; - if((unsigned int)hotfreq < (unsigned int)totalfreq) { + if(hotfreq < totalfreq) { // use hfh policy.cache_mode = BAMBOO_CACHE_MODE_HASH; /*unsigned int block = 0; diff --git a/Robust/src/Runtime/bamboo/multicorecache.h b/Robust/src/Runtime/bamboo/multicorecache.h index 26a26105..7e903445 100644 --- a/Robust/src/Runtime/bamboo/multicorecache.h +++ b/Robust/src/Runtime/bamboo/multicorecache.h @@ -11,7 +11,7 @@ // time. #define GC_CACHE_SAMPLING_UNIT 0x800000000 // freqeuency to trigger timer interrupt -#define GC_TILE_TIMER_EVENT_SETTING 10000000 +#define GC_TILE_TIMER_EVENT_SETTING 40000000 // data structure to record policy information for a page // should be consistent with multicoreruntime.h diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index 0c53142f..c705f19f 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -438,11 +438,11 @@ void gc_master(struct garbagelist * stackptr) { tprintf("start GC!\n"); gc_status_info.gcprocessing = true; gc_status_info.gcphase = INITPHASE; + GC_SEND_MSG_1_TO_CLIENT(GCSTARTINIT); waitconfirm = false; numconfirm = 0; initGC(); - GC_SEND_MSG_1_TO_CLIENT(GCSTARTINIT); CACHEADAPT_GC(true); //tprintf("Check core status \n"); GC_CHECK_ALL_CORE_STATUS(); @@ -539,6 +539,7 @@ bool gc(struct garbagelist * stackptr) { if(0 == BAMBOO_NUM_OF_CORE) { GC_PRINTF("Check if we can do gc or not\n"); gccorestatus[BAMBOO_NUM_OF_CORE] = 0; + pregcprocessing(); //wait for other cores to catch up while(!gc_checkCoreStatus()) @@ -547,7 +548,6 @@ bool gc(struct garbagelist * stackptr) { pregccheck(); GCPROFILE_START_MASTER(); GC_PRINTF("start gc! \n"); - pregcprocessing(); gc_master(stackptr); } else if(BAMBOO_NUM_OF_CORE < NUMCORES4GC) { GC_PRINTF("Core reporting for gc.\n");