Re: [patch] Add a writer prior lock methord for rwlock
From: William Lee Irwin III
Date: Wed Aug 04 2004 - 05:34:54 EST
On Wed, Aug 04, 2004 at 06:29:21PM +0800, Liu Tao wrote:
> write_forcelock() should be used to avoid readers starve writers, or for
> writers
> to update shared data as far as possiable, since it prevents new readers
> acquire
> the lock while it's waiting for existing readers release their locks.
> I'm not clear
> who will need it now, since it doesn't affect the original read_lock()
> and write_lock()
> I tried it.
Unfortunately this will deadlock. read locks are acquired recursively.
The algorithms dependent on this need to be redesigned.
-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/