[PATCH] rw_semaphores, optimisations try #4

From: D.W.Howells (dhowells@astarte.free-online.co.uk)
Date: Wed Apr 25 2001 - 15:06:38 EST


This patch (made against linux-2.4.4-pre6 + rwsem-opt3) somewhat improves
performance on the i386 XADD optimised implementation:

A patch against -pre6 can be obtained too:

        ftp://infradead.org/pub/people/dwh/rwsem-pre6-opt4.diff

Here's some benchmarks (take with a pinch of salt of course):

TEST NUM READERS NUM WRITERS CONTENTION DURATION
=============== =============== =============== =============== ========
rwsem-r1 1 0 no 10s
rwsem-r2 2 0 no 10s
rwsem-ro 4 0 no 10s
rwsem-w1 0 1 no 10s
rwsem-wo 0 4 w-w only 10s
rwsem-rw 4 2 r-w & w-w 10s
rwsem-worm 30 1 r-w & w-w 10s
rwsem-xx 30 15 r-w & w-w 50s

                        rwsem-opt4 (mine) 00_rwsem-9 (Andrea's)
                ------------------------------- -------------------------------
TEST READERS WRITERS READERS WRITERS
=============== =============== =============== ===============
===============
rwsem-r1 30347096 n/a 30130004 n/a
                30362972 n/a 30127882 n/a
rwsem-r2 11031268 n/a 11035072 n/a
                11038232 n/a 11030787 n/a
rwsem-ro 12641408 n/a 12722192 n/a
                12636058 n/a 12729404 n/a
rwsem-w1 n/a 28607326 n/a 28505470
                n/a 28609208 n/a 28508206
rwsem-wo n/a 1607789 n/a 1783876
                n/a 1608603 n/a 1800982
rwsem-rw 1111545 557071 1106763 554698
                1109773 555901 1103090 552567
rwsem-worm 5229696 54807 1585755 52438
                5219531 54528 1588428 52222
rwsem-xx 5396096 2786619 5361894 2768893
                5398443 2787613 5400716 2788801

I've compared my patch to Andrea's 00_rwsem-9, both built on top of
linux-2.4.4-pre6.

David



-
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/



This archive was generated by hypermail 2b29 : Mon Apr 30 2001 - 21:00:14 EST