From: jzhou Date: Thu, 14 Jul 2011 15:31:12 +0000 (+0000) Subject: For a page that is not used, set its host core as the home core that caches it X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=49ce088be4d28ec477df6a6063439a337f231ce0;p=IRC.git For a page that is not used, set its host core as the home core that caches it --- diff --git a/Robust/src/Runtime/bamboo/multicorecache.c b/Robust/src/Runtime/bamboo/multicorecache.c index 512bd9d3..c9d44e8e 100644 --- a/Robust/src/Runtime/bamboo/multicorecache.c +++ b/Robust/src/Runtime/bamboo/multicorecache.c @@ -217,6 +217,12 @@ void cacheAdapt_policy_hottest(int coren){ if(hotfreq != 0) { // locally cache the page in the hottest core CACHEADAPT_POLICY_SET_HOST_CORE(policy, hottestcore); + } else { + // reset it to be homed by its host core + unsigned int block = 0; + BLOCKINDEX(block, (void *) page_sva); + unsigned int coren = gc_block2core[block%(NUMCORES4GC*2)]; + CACHEADAPT_POLICY_SET_HOST_CORE(policy, coren); } CACHEADAPT_CHANGE_POLICY_4_PAGE(tmp_p,page_index,policy); page_sva += BAMBOO_PAGE_SIZE; @@ -257,6 +263,12 @@ void cacheAdapt_policy_dominate(int coren){ // locally cache the page in the hottest core CACHEADAPT_POLICY_SET_HOST_CORE(policy, hottestcore); } + } else { + // reset it to be homed by its host core + unsigned int block = 0; + BLOCKINDEX(block, (void *) page_sva); + unsigned int coren = gc_block2core[block%(NUMCORES4GC*2)]; + CACHEADAPT_POLICY_SET_HOST_CORE(policy, coren); } CACHEADAPT_CHANGE_POLICY_4_PAGE(tmp_p,page_index,policy); page_sva += BAMBOO_PAGE_SIZE;