All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH stable 5.10 0/7] Remove reader optimistic spinning
@ 2023-02-07 19:01 Shaoying Xu
  2023-02-07 19:01 ` [PATCH stable 5.10 1/7] locking/rwsem: Better collate rwsem_read_trylock() Shaoying Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Shaoying Xu @ 2023-02-07 19:01 UTC (permalink / raw)
  To: stable; +Cc: abuehaze, peterz, longman, Shaoying Xu

This patch series is to remove reader optimistic spinning in
kernel 5.10 to improve the MongoDB performance. Performance measurements
(10 times running average of overall throughput ops/sec) are using
MongoDB 5.0.11 and YCSB [1] microbenchmark with workloadA [2] on AWS EC2
m5.4xlarge/m6g.4xlarge (16-vCPU 64GiB-memory) instances with a 512GB EBS
IO1 drive disk with 5000 IOPS and separating MongoDB and YCSB load generator
on 2 instances and setting recordcount=25000000 and operationcount=10000000
to see the impacts of these changes:

  Before - v5.10.165 kernel in OS Amazon Linux 2
  After  - v5.10.165 kernel with reader spinning disabled in OS Amazon Linux 2

  | Arch    | Instance Type | Before  | After   |
  |---------+---------------+---------+---------|
  | x86_64  | m5.4xlarge    | 37365.4 | 42373.9 |
  |---------+---------------+---------+---------|
  | aarch64 | m6g.4xlarge   | 33823.1 | 43113.7 |
  |---------+---------------+---------+---------|

It can be seen that the MongoDB throughput can be improved around 13% in x86_64
and 27% in aarch64 after disabling reader optimistic spinning and these patches 
can be applied to 5.10 with no conflict so we wonder if it's possible to backport 
them to stable 5.10? 

[1] https://github.com/brianfrankcooper/YCSB/releases/download/0.17.0/ycsb-0.17.0.tar.gz
[2] https://github.com/brianfrankcooper/YCSB/blob/master/workloads/workloada

Thanks,
Shaoying

Peter Zijlstra (3):
  locking/rwsem: Better collate rwsem_read_trylock()
  locking/rwsem: Introduce rwsem_write_trylock()
  locking/rwsem: Fold __down_{read,write}*()

Waiman Long (4):
  locking/rwsem: Pass the current atomic count to
    rwsem_down_read_slowpath()
  locking/rwsem: Prevent potential lock starvation
  locking/rwsem: Enable reader optimistic lock stealing
  locking/rwsem: Remove reader optimistic spinning

 kernel/locking/lock_events_list.h |   6 +-
 kernel/locking/rwsem.c            | 359 +++++++++---------------------
 2 files changed, 106 insertions(+), 259 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-17 14:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 19:01 [PATCH stable 5.10 0/7] Remove reader optimistic spinning Shaoying Xu
2023-02-07 19:01 ` [PATCH stable 5.10 1/7] locking/rwsem: Better collate rwsem_read_trylock() Shaoying Xu
2023-02-07 19:01 ` [PATCH stable 5.10 2/7] locking/rwsem: Introduce rwsem_write_trylock() Shaoying Xu
2023-02-07 19:01 ` [PATCH stable 5.10 3/7] locking/rwsem: Fold __down_{read,write}*() Shaoying Xu
2023-02-07 19:01 ` [PATCH stable 5.10 4/7] locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath() Shaoying Xu
2023-02-07 19:09 ` [PATCH stable 5.10 5/7] locking/rwsem: Prevent potential lock starvation Shaoying Xu
2023-02-07 19:09   ` [PATCH stable 5.10 6/7] locking/rwsem: Enable reader optimistic lock stealing Shaoying Xu
2023-02-07 19:09   ` [PATCH stable 5.10 7/7] locking/rwsem: Remove reader optimistic spinning Shaoying Xu
2023-02-09 10:36 ` [PATCH stable 5.10 0/7] " Greg KH
2023-02-13 12:11   ` Mohamed Abuelfotoh, Hazem
2023-02-17 14:03     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.