Hi...

On Thu, Dec 9, 2010 at 19:46, Leon Woestenberg
<leon.woestenb...@gmail.com> wrote:
> Hello,
>
> On Thu, Dec 9, 2010 at 7:49 AM, Michael Blizek
> <mic...@michaelblizek.twilightparadox.com> wrote:
> Why not do this, i.e. acquire the locks in the other order, then
> release the global lock first:
>
> mutex_lock(small_lock);
> mutex_lock(&global_lock);
> do_something_small_which_requires_both_locks();
> mutex_unlock(&global_lock);
> do_something_big_which_requires_only_small_lock();
> mutex_unlock(small_lock);

I second this idea...but Michael said the order of lock grab can not
be changed...

thus I wonder, why? and also, is it possible to use more fine grained
lock...which is specific to both task, thus decreasing "lock grab
interval"?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to