2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sat, 26 Sep 2009 02:39:19 +0000 (02:39 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sat, 26 Sep 2009 02:39:19 +0000 (02:39 -0000)
commit937ca8211976c5bb7bd19922825139252bda1505
tree43bc65492f477ffbb5a46642ad1c99f996c79985
parentfd99c892d032286c5c563fc8311eb2eac20ae958
2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>

* threadpool.c:
* class-internals.h:
* mono-perfcounters-def.h:
* mono-perfcounters.c:
-There is a list of idle threads
-Each of those idle threads wait on their own WaitHandle instead
of all of them using the same semaphore. When a new work item is
added, the job is assigned directly to an idle thread or a newly
created one if possible and then the handle for that thread is
signaled. Compare that to the current approach where all the
threads in the pool compete to dequeue a job from the same
queue.
-New struct ThreadPool that brings together the bunch of static
variable for each threadpool (IO and regular).
-New performance counters: # of items added and its rate per
threadpool. The rate will be used later, perhaps together with
other perf. counters, to decide when idle threads should exit.

svn path=/trunk/mono/; revision=142667
mono/metadata/ChangeLog
mono/metadata/class-internals.h
mono/metadata/mono-perfcounters-def.h
mono/metadata/mono-perfcounters.c
mono/metadata/threadpool.c