]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm space maps: improve performance with inc/dec on ranges of blocks
authorJoe Thornber <ejt@redhat.com>
Tue, 13 Apr 2021 10:03:45 +0000 (11:03 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 26 May 2021 20:18:29 +0000 (16:18 -0400)
commitd9571f9e26265935b3c7cf3824bd4ed2f13f0219
tree8e25bcbc6e4371c690ff2febd8a4c73fb38fc960
parent3bcecb93e4a00652258bc626b8001500dabcf24c
dm space maps: improve performance with inc/dec on ranges of blocks

When we break sharing on btree nodes we typically need to increment
the reference counts to every value held in the node.  This can
cause a lot of repeated calls to the space maps.  Fix this by changing
the interface to the space map inc/dec methods to take ranges of
adjacent blocks to be operated on.

For installations that are using a lot of snapshots this will reduce
cpu overhead of fundamental operations such as provisioning a new block,
or deleting a snapshot, by as much as 10 times.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 files changed:
drivers/md/dm-era-target.c
drivers/md/dm-thin-metadata.c
drivers/md/persistent-data/dm-array.c
drivers/md/persistent-data/dm-btree-internal.h
drivers/md/persistent-data/dm-btree-remove.c
drivers/md/persistent-data/dm-btree-spine.c
drivers/md/persistent-data/dm-btree.c
drivers/md/persistent-data/dm-btree.h
drivers/md/persistent-data/dm-space-map-common.c
drivers/md/persistent-data/dm-space-map-common.h
drivers/md/persistent-data/dm-space-map-disk.c
drivers/md/persistent-data/dm-space-map-metadata.c
drivers/md/persistent-data/dm-space-map.h
drivers/md/persistent-data/dm-transaction-manager.c
drivers/md/persistent-data/dm-transaction-manager.h