Changes between Version 12 and Version 13 of GpuWorkFetch
- Timestamp:
- Dec 26, 2008, 12:38:01 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GpuWorkFetch
v12 v13 72 72 This is stored in an object of class PRSC_WORK_FETCH. 73 73 74 Data members of PRSC_WORK_FETCH (set by rr_simulation()): 74 Data members of PRSC_WORK_FETCH 75 76 '''ninstances''' 77 78 Used/set by rr_simulation()): 75 79 76 80 '''double shortfall''': shortfall for this resource … … 84 88 and clear shortfall. 85 89 90 '''set_nidle()''': called by RR sim after initial job assignment. 91 Set nidle to # of idle instances. 92 93 '''accumulate_shortfall(dt)''': called by RR sim for each time interval during work buf period. 94 {{{ 95 nidle_now = ninstances - instances in use 96 shortfall += dt*(nidle_now) 97 for each project p not backed off for this PRSC 98 add_proj_shortfall(p, dt) 99 }}} 86 100 ------------ 87 101 '''prepare()''': called before exists_fetchable_project(). … … 126 140 }}} 127 141 128 '''accumulate_shortfall(dt, i, n)''':129 {{{130 i = instances in use, n = total instances131 nidle = n - i132 max_nidle max= nidle133 shortfall += dt*(nidle)134 for each project p for which count_towards_share(p)135 add_proj_shortfall(p, dt)136 }}}137 138 142 Each PRSC also needs to have some per-project data. 139 143 This is stored in an object of class PRSC_PROJECT_DATA. … … 149 153 And the following transient members (used by rr_simulation()): 150 154 155 '''double share''': # of instances this project should get based on resource share 156 relative to the set of projects not backed off for this PRSC. 157 158 '''instances_used''': # of instances currently being used 159 151 160 '''double shortfall''' 152 153 '''bool runnable'''154 155 '''max deficit'''156 157 '''double share''': # of instances this project should get based on RS158 159 '''instances_used''': # of instances currently being used160 161 161 162 === debt accounting === … … 170 171 cpu_work_fetch.rr_init() 171 172 cuda_work_fetch.rr_init() 173 174 compute initial assignment of jobs 175 cpu_work_fetch.set_nidle(); 176 cuda_work_fetch.set_nidle(); 177 172 178 do simulation as current 173 179 on completion of an interval dt