From: Andrea Arcangeli <andrea@suse.de>
To: "D . W . Howells" <dhowells@astarte.free-online.co.uk>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org,
torvalds@transmeta.com
Subject: Re: rwsem benchmarks [Re: generic rwsem [Re: Alpha "process table hang"]]
Date: Fri, 20 Apr 2001 03:42:15 +0200 [thread overview]
Message-ID: <20010420034215.K752@athlon.random> (raw)
In-Reply-To: <01042000280900.01311@orion.ddi.co.uk>
In-Reply-To: <01042000280900.01311@orion.ddi.co.uk>; from dhowells@astarte.free-online.co.uk on Fri, Apr 20, 2001 at 12:28:09AM +0100
On Fri, Apr 20, 2001 at 12:28:09AM +0100, D . W . Howells wrote:
> I benchmarked four different environments:
>
> (1) 2.4.4-pre3 + Andrea's generic rwsem patch
> (2) 2.4.4-pre4 using XADD to implement the rwsems
> (3) same as (2) but with a tweak to make rwsem_wake() less fair
> (4) 2.4.4-pre3 using my generic spinlock code to implement the rwsems
>
> David
>
>
> TEST NUM READERS NUM WRITERS CONTENTION
> =============== =============== =============== ==========
> rwsem-rw 4 2 r-w & w-w
> rwsem-ro 4 0 no
> rwsem-wo 0 4 w-w only
> rwsem-r1 1 0 no
> rwsem-w1 0 1 no
> rwsem-r2 2 0 no
>
>
> ENVIRONMENT TEST SCHED READERS WRITERS
> =============================== ======= ======= =============== =======
> Linux-2.4.4-pre3 + AA-rwsem rws-rw no 3330281 1009
> 3331972 994
[..]
> ------------------------------- ------- ------- --------------- -------
> Linux-2.4.4-pre4 [GENERIC-SPIN] rws-rw no 545138 274002
> 545378 273785
> yes 755343 187874
> 745888 185562
Some explanation on the above extreme difference. In the misc rw benchmark the
reason in the same amount of time I get a total number of down 3332966 and you
get only 819163 is that I provide recursive down_read and that in turn can
starve the down_write (my first patches weren't implementing fair semaphores).
As you can see in my post of yesterday I made my semaphores fair in my last
patches (from rwsem-generic-5). (you didn't said which patch you used exactly
but obviously it was earlier than the -5 revision)
I'm uncertain if I should drop the list_empty() check from the fast path and if
I should still allow up_* to be called from irq/softirq, if I reduce the max
number of sleepers to 2^16 and I will provide weaker wakeup semantics I won't
be penalizied anymore and then we'll really compare apples to orange making the
comparison more interesting (probably I will do because later on I can probably
re-add that two features without too much pain).
About the benchmark you wrote it looks good measure to me, thanks.
Andrea
next prev parent reply other threads:[~2001-04-20 1:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-19 23:28 rwsem benchmarks [Re: generic rwsem [Re: Alpha "process table hang"]] D.W.Howells
2001-04-20 1:42 ` Andrea Arcangeli [this message]
2001-04-20 10:10 ` David Howells
2001-04-20 17:17 ` x86 rwsem in 2.4.4pre[234] are still buggy [was Re: rwsem benchmarks [Re: generic rwsem [Re: Alpha "process table hang"]]] Andrea Arcangeli
2001-04-20 23:45 ` Linus Torvalds
2001-04-21 14:03 ` Andrea Arcangeli
2001-04-21 14:17 ` Russell King
2001-04-21 14:29 ` Andrea Arcangeli
2001-04-21 14:37 ` rmk
2001-04-21 15:04 ` Andrea Arcangeli
2001-04-21 17:18 ` Linus Torvalds
2001-04-21 14:37 ` Russell King
2001-04-21 15:07 ` Andrea Arcangeli
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=20010420034215.K752@athlon.random \
--to=andrea@suse.de \
--cc=dhowells@astarte.free-online.co.uk \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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