From: Waiman Long <longman@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org,
linux-s390@vger.kernel.org, linux-arch@vger.kernel.org,
Davidlohr Bueso <dave@stgolabs.net>,
Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH-tip v7 00/15] locking/rwsem: Rework rwsem-xadd & enable new rwsem features
Date: Thu, 19 Oct 2017 11:21:40 -0400 [thread overview]
Message-ID: <ecb6fd0b-a242-1426-112e-e582898565d2@redhat.com> (raw)
In-Reply-To: <1508351431-22375-1-git-send-email-longman@redhat.com>
Hi,
I had just run the rwsem microbenchmark on a 1-socket 44-core Qualcomm
Amberwing (Centriq 2400) arm64 system. There were 18 writer and 18
reader threads running.
For the patched kernel, the results were:
Reader Writer
CS Load Locking Ops/Thread Locking Ops/Thread
------- ------------------ ------------------
1 18,800/103,894/223,371 496,362/695,560/1,034,278
10 28,503/ 68,834/154,348 425,708/791,553/1,469,845
50 7,997/ 28,278/102,327 431,577/897,064/1,898,146
100 31,628/ 52,555/ 89,431 432,844/580,496/ 910,290
1us sleep 15,625/ 16,071/ 16,535 42,339/ 44,866/ 46,189
Reader Writer
CS Load Slowpath Locking Ops Slowpath Locking Ops
------- -------------------- --------------------
1 1,296,904 11,196,177
10 1,125,334 13,242,082
50 284,342 14,960,882
100 916,305 9,652,818
1us sleep 289,177 807,584
All Writers Half Writers
CS Load Locking Ops/Thread Locking Ops/Thread % Change
------- ------------------ ------------------ --------
1 1,634,230 695,560 -57.4
10 1,658,228 791,553 -52.3
50 1,494,180 897,064 -40.0
100 1,089,364 580,496 -46.7
1us sleep 25,380 44,866 +76.8
It is obvious that for arm64, the writers are preferred under all
circumstances. One special thing about the results was that for the
all writers case, the number of slowpath calls were exceedingly small.
It was about 1000 or less which are significantly less than in x86-64
which was in the millions. Maybe it was due to the LL/SC architecture
that allows it to stay in the fast path as much as possible with
homogenous operation.
The corresponding results for the unpatched kernel were:
Reader Writer
CS Load Locking Ops/Thread Locking Ops/Thread
------- ------------------ ------------------
1 23,898/23,899/23,905 45,264/177,375/461,387
10 25,114/25,115/25,122 26,188/190,517/458,960
50 23,762/23,762/23,763 67,862/174,640/269,519
100 25,050/25,051/25,053 57,214/200,725/814,178
1us sleep 6/ 6/ 7 6/ 58,512/180,892
All Writers Half Writers
CS Load Locking Ops/Thread Locking Ops/Thread % Change
------- ------------------ ------------------ --------
1 1,687,691 177,375 -89.5
10 1,627,061 190,517 -88.3
50 1,469,431 174,640 -88.1
100 1,148,905 200,725 -82.5
1us sleep 29,865 58,512 +95.9
Cheers,
Longman
prev parent reply other threads:[~2017-10-19 15:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 18:30 [PATCH-tip v7 00/15] locking/rwsem: Rework rwsem-xadd & enable new rwsem features Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 01/15] locking/rwsem: relocate rwsem_down_read_failed() Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 02/15] locking/rwsem: Implement a new locking scheme Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 03/15] locking/rwsem: Move owner setting code from rwsem.c to rwsem-xadd.h Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 04/15] locking/rwsem: Remove kernel/locking/rwsem.h Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 05/15] locking/rwsem: Move rwsem internal function declarations to rwsem-xadd.h Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 06/15] locking/rwsem: Remove arch specific rwsem files Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 07/15] locking/rwsem: Implement lock handoff to prevent lock starvation Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 08/15] locking/rwsem: Enable readers spinning on writer Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 09/15] locking/rwsem: Make rwsem_spin_on_owner() return a tri-state value Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 10/15] locking/rwsem: Enable count-based spinning on reader Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 11/15] locking/rwsem: Remove rwsem_wake spinlock optimization Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 12/15] locking/rwsem: Eliminate redundant writer wakeup calls Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 13/15] locking/rwsem: Improve fairness to writers Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 14/15] locking/rwsem: Make waiting writer to optimistically spin for the lock Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-18 18:30 ` [PATCH-tip v7 15/15] locking/rwsem: Wake up all readers in wait queue Waiman Long
2017-10-18 18:30 ` Waiman Long
2017-10-19 15:21 ` Waiman Long [this message]
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=ecb6fd0b-a242-1426-112e-e582898565d2@redhat.com \
--to=longman@redhat.com \
--cc=dave@stgolabs.net \
--cc=david@fromorbit.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).