From: Roman Zippel <zippel@linux-m68k.org>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: dhowells@redhat.com, <linux-kernel@vger.kernel.org>
Subject: Re: Patch: linux-2.5.29 __downgrade_write() for CONFIG_RWSEM_GENERIC_SPINLOCK
Date: Sun, 28 Jul 2002 20:07:35 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.44.0207282005360.8911-100000@serv> (raw)
In-Reply-To: <200207281750.KAA19369@baldur.yggdrasil.com>
Hi,
On Sun, 28 Jul 2002, Adam J. Richter wrote:
> Although noting in 2.5.29 appears to use downgrade_write(),
> I assume that the facility was added because it is going to be used
> in the near future. So, I've added what I think is an implementation
> of __downgrade_write for lib/rwsem-spinlock.c. It is the same as
> __up_write, except that it sets sem->activity to 1.
IMO you have to add the patch below, otherwise you may wake up a writer.
> Since nothing
> uses it yet, I haven't tested it.
Same problem here.
bye, Roman
diff -u -p -r1.1.1.1 rwsem-spinlock.c
--- lib/rwsem-spinlock.c 21 Oct 2001 23:50:13 -0000 1.1.1.1
+++ lib/rwsem-spinlock.c 28 Jul 2002 18:04:08 -0000
@@ -59,7 +59,7 @@ static inline struct rw_semaphore *__rws
/* try to grant a single write lock if there's a writer at the front of the queue
* - we leave the 'waiting count' incremented to signify potential contention
*/
- if (waiter->flags & RWSEM_WAITING_FOR_WRITE) {
+ if (waiter->flags & RWSEM_WAITING_FOR_WRITE && !sem->activity) {
sem->activity = -1;
list_del(&waiter->list);
waiter->flags = 0;
next prev parent reply other threads:[~2002-07-28 18:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-28 17:50 Adam J. Richter
2002-07-28 18:07 ` Roman Zippel [this message]
2002-07-28 18:08 ` Christoph Hellwig
2002-07-28 22:55 ` Roman Zippel
2002-07-29 7:42 ` David Howells
2002-07-29 8:01 ` Roman Zippel
2002-07-29 8:31 ` David Howells
2002-07-29 9:13 ` David Howells
2002-07-29 11:42 ` Roman Zippel
2002-07-29 12:08 ` David Howells
2002-07-29 12:46 ` Roman Zippel
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=Pine.LNX.4.44.0207282005360.8911-100000@serv \
--to=zippel@linux-m68k.org \
--cc=adam@yggdrasil.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®