This patch (made against linux-2.4.4-pre6) makes a number of changes to the
rwsem implementation:
(1) Fixes a subtle contention bug between up_write and the down_* functions.
(2) Optimises the i386 fastpath implementation and changed the slowpath
implementation to aid it.
- The arch/i386/lib/rwsem.c is now gone.
- Better inline asm constraints have been applied.
(3) Changed the sparc64 fastpath implementation to use revised slowpath
interface.
[Dave Miller: can you check this please]
(4) Makes the generic spinlock implementation non-inline.
- lib/rwsem.c has been duplicated to lib/rwsem-spinlock.c and a
slightly different algorithm has been created. This one is simpler
since it does not have to use atomic operations on the counters as
all accesses to them are governed by a blanket spinlock.
David
--------------Boundary-00=_KX36T7DOAVAKJABQ8AXX
Content-Type: text/plain;
charset="iso-8859-1";
name="rwsem-opt.diff"
Content-Transfer-Encoding: base64
Content-Description: rw-semaphore optimisations patch
Content-Disposition: attachment; filename="rwsem-opt.diff"
ZGlmZiAtdU5yIGxpbnV4LTIuNC40LXByZTYvYXJjaC9pMzg2L2tlcm5lbC9pMzg2X2tzeW1zLmMg
bGludXgvYXJjaC9pMzg2L2tlcm5lbC9pMzg2X2tzeW1zLmMKLS0tIGxpbnV4LTIuNC40LXByZTYv
YXJjaC9pMzg2L2tlcm5lbC9pMzg2X2tzeW1zLmMJU2F0IEFwciAyMSAyMToyNDoyNSAyMDAxCisr
KyBsaW51eC9hcmNoL2kzODYva2VybmVsL2kzODZfa3N5bXMuYwlTYXQgQXByIDIxIDIyOjUyOjUw
IDIwMDEKQEAgLTgwLDExICs4MCw2IEBACiBFWFBPUlRfU1lNQk9MX05PVkVSUyhfX2Rvd25fZmFp
bGVkX2ludGVycnVwdGlibGUpOwogRVhQT1JUX1NZTUJPTF9OT1ZFUlMoX19kb3duX2ZhaWxlZF90
cnlsb2NrKTsKIEVYUE9SVF9TWU1CT0xfTk9WRVJTKF9fdXBfd2FrZXVwKTsKLSNpZmRlZiBDT05G
SUdfUldTRU1fWENIR0FERF9BTEdPUklUSE0KLUVYUE9SVF9TWU1CT0xfTk9WRVJTKF9fcndzZW1f
Z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WRV9NQVNLKT09UldTRU1fQUNUSVZFX0JJQVMpIHsKKwkJc2VtID0gX19y
d3NlbV9kb193YWtlKC1SV1NFTV9XQUlUSU5HX0JJQVMsc2VtKTsKKwl9CisJZWxzZSB7CisJCS8q
IHRyaWNreSAtIHdlIG11c3RuJ3QgcmV0dXJuIHRoZSBhY3RpdmUgcGFydCBvZiB0aGUgY291bnQg
dG8gMCAqLworCQluZXcgPSBjb3VudCAtIFJXU0VNX0FDVElWRV9XUklURV9CSUFTOworCQluZXcg
PSByd3NlbV9jbXB4Y2hnKHNlbSxjb3VudCxuZXcpOworCQlpZiAoY291bnQhPW5ldykgeworCQkJ
Y291bnQgPSBuZXc7CisJCQlnb3RvIHRyeV9hZ2FpbjsKKwkJfQorCX0KKworCXNwaW5fdW5sb2Nr
KCZzZW0tPndhaXRfbG9jayk7CisKKwlyd3NlbXRyYWNlKHNlbSwiTGVhdmluZyByd3NlbV91cF93
cml0ZV93YWtlIik7CiB9CiAKIEVYUE9SVF9TWU1CT0wocndzZW1fZG93bl9yZWFkX2ZhaWxlZCk7
CiBFWFBPUlRfU1lNQk9MKHJ3c2VtX2Rvd25fd3JpdGVfZmFpbGVkKTsKLUVYUE9SVF9TWU1CT0wo
cndzZW1fd2FrZSk7CitFWFBPUlRfU1lNQk9MKHJ3c2VtX3VwX3JlYWRfd2FrZSk7CitFWFBPUlRf
U1lNQk9MKHJ3c2VtX3VwX3dyaXRlX3dha2UpOwogI2lmIFJXU0VNX0RFQlVHCiBFWFBPUlRfU1lN
Qk9MKHJ3c2VtdHJhY2UpOwogI2VuZGlmCg==
--------------Boundary-00=_KX36T7DOAVAKJABQ8AXX--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/