}
}
-#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.
// 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;
// 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
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();
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())
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");