| Thread Tools | Search this thread |
|---|
abhishek84
| November 7, 2008 4:34 PM PST Information on TBB Scheduler and Task Stealing | ||||
Hi all, I am trying to get some information on the details of the TBB scheduler code in task.cpp. I basically want to profile how well the random task scheduler performs by tracking each instance of a false negative -- that is, one thread tries to steal a task from another randomly selected task queue, and fails to do so despite the fact that other task queues in fact do have tasks available. Tracking this behavior boils down to maintaing an occupancy status per taskpool which gets modified on every task insertion and deletion. Looking through the code, I think that void GenericScheduler::spawn( task& first, task*& next ) sees the insertion of a task in the relevant queue. Therefore, I have inserted a counter increment at: if( arena_slot==&dummy_slot ) {
Similarly, it seems that there are two points where the tasks are removed from the task pool. The first is in task* GenericScheduler::get_task( depth_type d ) called by the main scheduler loop wait_for_all. The second point is when a task is actually stolen which is in task* GenericScheduler::steal_task( UnpaddedArenaSlot& arena_slot, depth_type d ) { ... TaskPool* tp = arena_slot.task_pool; if( result = tp->array[i] ) { #ifdef(MY_COUNTER) ... } Unfortunately, just tracking these points do not suffice as my queue occupancies become negative. It therefore seems that I have missed some points in the code where tasks are added. Does anyone know where these additional points might be and where I should look for them?
Thanks!
| |||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
| 8289 users have contributed to 31235 threads and 99109 posts to date. |
|---|
| In the past 24 hours, we have 7 new thread(s) 24 new posts(s), and 30 new user(s). In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing... Escalated as Please welcome our newest member Michael Johanson |