Changes between Version 12 and Version 13 of GpuWorkFetch


Ignore:
Timestamp:
Dec 26, 2008, 12:38:01 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GpuWorkFetch

    v12 v13  
    7272This is stored in an object of class PRSC_WORK_FETCH.
    7373
    74 Data members of PRSC_WORK_FETCH (set by rr_simulation()):
     74Data members of PRSC_WORK_FETCH
     75
     76'''ninstances'''
     77
     78Used/set by rr_simulation()):
    7579
    7680'''double shortfall''': shortfall for this resource
     
    8488and clear shortfall.
    8589
     90'''set_nidle()''': called by RR sim after initial job assignment.
     91Set nidle to # of idle instances.
     92
     93'''accumulate_shortfall(dt)''': called by RR sim for each time interval during work buf period.
     94{{{
     95nidle_now = ninstances - instances in use
     96shortfall += dt*(nidle_now)
     97for each project p not backed off for this PRSC
     98    add_proj_shortfall(p, dt)
     99}}}
    86100------------
    87101'''prepare()''': called before exists_fetchable_project().
     
    126140}}}
    127141
    128 '''accumulate_shortfall(dt, i, n)''':
    129 {{{
    130 i = instances in use, n = total instances
    131 nidle = n - i
    132 max_nidle max= nidle
    133 shortfall += dt*(nidle)
    134 for each project p for which count_towards_share(p)
    135     add_proj_shortfall(p, dt)
    136 }}}
    137 
    138142Each PRSC also needs to have some per-project data.
    139143This is stored in an object of class PRSC_PROJECT_DATA.
     
    149153And the following transient members (used by rr_simulation()):
    150154
     155'''double share''': # of instances this project should get based on resource share
     156relative to the set of projects not backed off for this PRSC.
     157
     158'''instances_used''': # of instances currently being used
     159
    151160'''double shortfall'''
    152 
    153 '''bool runnable'''
    154 
    155 '''max deficit'''
    156 
    157 '''double share''': # of instances this project should get based on RS
    158 
    159 '''instances_used''': # of instances currently being used
    160161
    161162=== debt accounting ===
     
    170171cpu_work_fetch.rr_init()
    171172cuda_work_fetch.rr_init()
     173
     174compute initial assignment of jobs
     175cpu_work_fetch.set_nidle();
     176cuda_work_fetch.set_nidle();
     177
    172178do simulation as current
    173179on completion of an interval dt