Re: 2.0.6 released
"Calin A. Culianu" <[email protected]>
| Newsgroups | gmane.linux.dazuko.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 23 Mar 2005, Sami Tikka wrote: > figure out if the "other daemon" caused this disk access. But to be safe, > this means I always need to have free threads waiting in dazukoGetAccess_TS() > (and how exactly do you make sure you have enough free threads? :) > Well you ensure there are free threads by keeping track of which threads are busy and which are idle. You can define idle as a thread that is sitting blockd inside dazukoGetAccess_TS(). Busy can be defined as a thread that has a dazuko access and is in the process of servicing it. Anyway, if idle ever hits zero, create a new thread. This way, there are never 0 idle threads for long. Each new access that is being serviced has the potential for generating a new thread to service a future access. This way the system can never hang.. Oh.. and you need to check the idle and busy count on thread creation and/or when threads transition to new states. That's my approach.. there probably are others... -Calin