Skip to content

dm bufio, thin: improve concurrent IO performance

Mike Snitzer dm-devel linux-block 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest20 patches 0 repliesNew
  2. v29 patches 4 repliesSuperseded
  3. v18 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- fixed inconsistent braces in conditionals and other whitespace nits in response to the quick review Jens offered on v2
- also fixed struct layout Jens noted, so locks and data they protect are on the same cacheline
- split v2's really large dm-bufio-improve-concurrent-IO-performance patch to be 4 patches (patches 5-8)
- removed the (ab)use of BUG_ON in most of dm-bufio.c (in preliminary patches 2-4 and also within patches 5-7)
- removed the bio-prison-v1.c's BUG_ON (introduced in patch 14) in favor of higher level dm-thin.c code checking when it builds the prison key (allowing for graceful error handling), in patch 15.
- introduced dm_num_sharded_locks and use it to remove the "NR_LOCKS" magic value (64) used to split locks in both dm-bio-prison-v1 and dm-bufio (patches 16-20).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20dm bufio: remove unused dm_bufio_release_move interfacedrivers/md/dm-bufio.c include/linux/dm-bufio.h+0 -830 replies
2/20dm bufio: use WARN_ON in dm_bufio_client_destroy and dm_bufio_exitdrivers/md/dm-bufio.c+4 -40 replies
3/20dm bufio: never crash if dm_bufio_in_request()drivers/md/dm-bufio.c+12 -60 replies
4/20dm bufio: don't bug for clear developer oversightdrivers/md/dm-bufio.c+8 -50 replies
5/20dm bufio: add LRU abstractiondrivers/md/dm-bufio.c+235 -00 replies
6/20dm bufio: add dm_buffer_cache abstractiondrivers/md/dm-bufio.c+526 -620 replies
7/20dm bufio: improve concurrent IO performancedrivers/md/dm-bufio.c+487 -4720 replies
8/20dm bufio: add lock_history optimization for cache iteratorsdrivers/md/dm-bufio.c+111 -80 replies
9/20dm bufio: move dm_bufio_client members to avoid spanning cachelinesdrivers/md/dm-bufio.c+13 -110 replies
10/20dm bufio: use waitqueue_active in __free_buffer_wakedrivers/md/dm-bufio.c+6 -10 replies
11/20dm bufio: use multi-page bio vectordrivers/md/dm-bufio.c+4 -200 replies
12/20dm thin: speed up cell_defer_no_holder()drivers/md/dm-thin.c+8 -60 replies
13/20dm: split discards further if target sets max_discard_granularitydrivers/md/dm.c include/linux/device-mapper.h include/uapi/linux/dm-ioctl.h+27 -80 replies
14/20dm bio prison v1: improve concurrent IO performancedrivers/md/dm-bio-prison-v1.c drivers/md/dm-bio-prison-v1.h drivers/md/dm-thin.c+121 -680 replies
15/20dm bio prison v1: add dm_cell_key_has_valid_rangedrivers/md/dm-bio-prison-v1.c drivers/md/dm-bio-prison-v1.h drivers/md/dm-thin.c+29 -110 replies
16/20dm: add dm_num_sharded_locks()drivers/md/dm.h+10 -00 replies
17/20dm bufio: prepare to intelligently size dm_buffer_cache's buffer_treesdrivers/md/dm-bufio.c+26 -220 replies
18/20dm bufio: intelligently size dm_buffer_cache's buffer_treesdrivers/md/dm-bufio.c+8 -60 replies
19/20dm bio prison v1: prepare to intelligently size dm_bio_prison's prison_regionsdrivers/md/dm-bio-prison-v1.c+11 -100 replies
20/20dm bio prison v1: intelligently size dm_bio_prison's prison_regionsdrivers/md/dm-bio-prison-v1.c+6 -50 replies

Reviews trailers per patch

1 of 20 patches has a Reviewed-by or Acked-by.

PatchMikulas PatockaJoe Thornber
1/20A-b
2/20
3/20
4/20
5/20
6/20
7/20
8/20
9/20
10/20
11/20
12/20
13/20Requested-by
14/20
15/20
16/20
17/20
18/20
19/20
20/20

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [dm-6.4 PATCH v3 00/20] dm bufio, thin: improve concurrent IO performance

Hi,

Please review and/or test. Thanks.

Available via git here:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/log/?h=dm-6.4-dev3

Diffstat from v2 to v3:

git diff dm/dm-6.4-dev2 dm/dm-6.4-dev3 | diffstat

 dm-bio-prison-v1.c |   80 ++++++++++--------
 dm-bio-prison-v1.h |    5 +
 dm-bufio.c         |  226 ++++++++++++++++++++++++++++-------------------------
 dm-thin.c          |   29 ++++--
 dm.h               |   10 ++
 5 files changed, 197 insertions(+), 153 deletions(-)

Changes from v2 to v3:
- fixed inconsistent braces in conditionals and other whitespace nits in response to the quick review Jens offered on v2
- also fixed struct layout Jens noted, so locks and data they protect are on the same cacheline
- split v2's really large dm-bufio-improve-concurrent-IO-performance patch to be 4 patches (patches 5-8)
- removed the (ab)use of BUG_ON in most of dm-bufio.c (in preliminary patches 2-4 and also within patches 5-7)
- removed the bio-prison-v1.c's BUG_ON (introduced in patch 14) in favor of higher level dm-thin.c code checking when it builds the prison key (allowing for graceful error handling), in patch 15.
- introduced dm_num_sharded_locks and use it to remove the "NR_LOCKS" magic value (64) used to split locks in both dm-bio-prison-v1 and dm-bufio (patches 16-20).

Changes from v1 to v2:
- fixed dm-thin to properly split discards to respect dm-bio-prison-v1's BIO_PRISON_MAX_RANGE limit

Joe Thornber (7):
dm bufio: remove unused dm_bufio_release_move interface dm bufio: add LRU abstraction
dm bufio: add dm_buffer_cache abstraction
dm bufio: improve concurrent IO performance
dm bufio: add lock_history optimization for cache iterators dm thin: speed up cell_defer_no_holder()
dm bio prison v1: improve concurrent IO performance

Mike Snitzer (11):
dm bufio: use WARN_ON in dm_bufio_client_destroy and dm_bufio_exit dm bufio: never crash if dm_bufio_in_request()
dm bufio: don't bug for clear developer oversight
dm bufio: move dm_bufio_client members to avoid spanning cachelines
dm: split discards further if target sets max_discard_granularity dm bio prison v1: add dm_cell_key_has_valid_range
dm: add dm_num_sharded_locks()
dm bufio: prepare to intelligently size dm_buffer_cache's buffer_trees dm bufio: intelligently size dm_buffer_cache's buffer_trees dm bio prison v1: prepare to intelligently size dm_bio_prison's
prison_regions
dm bio prison v1: intelligently size dm_bio_prison's prison_regions

Mikulas Patocka (2):
dm bufio: use waitqueue_active in __free_buffer_wake dm bufio: use multi-page bio vector

 drivers/md/dm-bio-prison-v1.c |   93 +-
 drivers/md/dm-bio-prison-v1.h |   15 +
 drivers/md/dm-bufio.c         | 1988 +++++++++++++++++++++++----------
 drivers/md/dm-thin.c          |  125 ++-
 drivers/md/dm.c               |   25 +-
 drivers/md/dm.h               |   10 +
 include/linux/device-mapper.h |    6 +
 include/linux/dm-bufio.h      |    6 -
 include/uapi/linux/dm-ioctl.h |    4 +-
 9 files changed, 1558 insertions(+), 714 deletions(-)
Signature · 6 lines
2.40.0

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel