Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
changeset 16:6c6d7fbd7e25
added ideal num work units plus PRINT_DEBUG as macro
author | Me |
---|---|
date | Thu, 14 Oct 2010 17:06:28 -0700 |
parents | 6eb80110976c |
children | bf57b83019e5 |
files | SSR.h SSR_Request_Handlers.c SSR_lib.c |
diffstat | 3 files changed, 12 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/SSR.h Sun Oct 10 09:42:24 2010 -0700 1.2 +++ b/SSR.h Thu Oct 14 17:06:28 2010 -0700 1.3 @@ -67,6 +67,8 @@ 1.4 int32 inline 1.5 SSR__end_primitive_and_give_cycles(); 1.6 1.7 +int32 1.8 +SSR__giveIdealNumWorkUnits(); 1.9 1.10 //======================= 1.11
2.1 --- a/SSR_Request_Handlers.c Sun Oct 10 09:42:24 2010 -0700 2.2 +++ b/SSR_Request_Handlers.c Thu Oct 14 17:06:28 2010 -0700 2.3 @@ -95,8 +95,8 @@ 2.4 { //waiting request is another send, so stack this up on list 2.5 semReq-> nextReqInHashEntry = waitingReq->nextReqInHashEntry; 2.6 waitingReq->nextReqInHashEntry = semReq; 2.7 - //printf("linked requests: %d, %d | ", semReq, waitingReq ); 2.8 - //printf("type: %d, %d\n", semReq->reqType, waitingReq->reqType ); 2.9 + PRINT2_DEBUG("linked requests: %d, %d | ", semReq, waitingReq ) 2.10 + PRINT2_DEBUG("type: %d, %d\n", semReq->reqType, waitingReq->reqType) 2.11 return; 2.12 } 2.13 else
3.1 --- a/SSR_lib.c Sun Oct 10 09:42:24 2010 -0700 3.2 +++ b/SSR_lib.c Thu Oct 14 17:06:28 2010 -0700 3.3 @@ -120,12 +120,17 @@ 3.4 } 3.5 3.6 3.7 -int32 3.8 +int32 inline 3.9 SSR__giveMinWorkUnitCycles( float32 percentOverhead ) 3.10 { 3.11 - return 5000; 3.12 + return MIN_WORK_UNIT_CYCLES; 3.13 } 3.14 3.15 +int32 3.16 +SSR__giveIdealNumWorkUnits() 3.17 + { 3.18 + return NUM_SCHED_SLOTS * NUM_CORES; 3.19 + } 3.20 3.21 /*For now, use TSC -- later, make these two macros with assembly that first 3.22 * saves jump point, and second jumps back several times to get reliable time 3.23 @@ -134,7 +139,7 @@ 3.24 SSR__start_primitive() 3.25 { int32 *saveAddr; 3.26 saveAddr = &(((SSRSemEnv *)(_VMSMasterEnv->semanticEnv))->primitiveStartTime); 3.27 - saveLowTimeStampCountInto( saveAddr ); 3.28 + saveLowTimeStampCountInto( (((SSRSemEnv *)(_VMSMasterEnv->semanticEnv))->primitiveStartTime) ); 3.29 } 3.30 3.31 /*Just quick and dirty for now -- make reliable later