From: Keith Owens <kaos@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.arm.linux.org.uk, rmk@arm.linux.org.uk,
takata@linux-m32r.org, linux-mips@linux-mips.org,
parisc-linux@lists.parisc-linux.org, linux-sh@m17n.org,
lethal@linux-sh.org, davem@davemloft.net,
sparclinux@vger.kernel.org
Subject: generic read_trylock() never tries, it always waits
Date: Mon, 12 Dec 2005 15:55:38 +1100 [thread overview]
Message-ID: <9942.1134363338@kao2.melbourne.sgi.com> (raw)
Copied to assorted architecture maintainers and mailing lists, please
trim cc: list back to lkml plus arch if you reply.
The generic version of read_trylock() never tests if the lock is in
use, it always spins waiting for the lock to be free. IOW, it behaves
like read_lock(). Given the different implementations of rwlock_t, it
is hard for generic__raw_read_trylock() to do anything else.
I strongly recommend that the architectures below define their own
version of __raw_read_trylock() that really test the lock first, then
we can ditch generic__raw_read_trylock(). I have already sent an ia64
patch to that mailing list.
include/asm-arm/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-ia64/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-m32r/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-mips/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-parisc/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-sh/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
include/asm-sparc64/spinlock.h:#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
reply other threads:[~2005-12-12 4:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9942.1134363338@kao2.melbourne.sgi.com \
--to=kaos@sgi.com \
--cc=davem@davemloft.net \
--cc=lethal@linux-sh.org \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-sh@m17n.org \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=rmk@arm.linux.org.uk \
--cc=sparclinux@vger.kernel.org \
--cc=takata@linux-m32r.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®