All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Liu Tao <liutao@safe-mail.net>
Cc: arjanv@redhat.com, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] Add a writer prior lock methord for rwlock
Date: Wed, 4 Aug 2004 03:33:37 -0700	[thread overview]
Message-ID: <20040804103337.GN2334@holomorphy.com> (raw)
In-Reply-To: <4110BA81.4030309@safe-mail.net>

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

  reply	other threads:[~2004-08-04 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04  9:09 [patch] Add a writer prior lock methord for rwlock Liu Tao
2004-08-04  9:16 ` Arjan van de Ven
2004-08-04 10:29   ` Liu Tao
2004-08-04 10:33     ` William Lee Irwin III [this message]
2004-08-04 11:30       ` Liu Tao
2004-08-04 12:14     ` Rik van Riel
2004-08-04  9:45 ` Oliver Neukum
2004-08-04 10:30   ` Liu Tao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040804103337.GN2334@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liutao@safe-mail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.