Centos-kernel-stream-9/drivers/md/persistent-data
Benjamin Marzinski f46e531f08 dm-transaction-manager: use red-black trees instead of linear lists
JIRA: https://issues.redhat.com/browse/RHEL-84906
Upstream Status: kernel/git/torvalds/linux.git

commit a38425935f7886cef5fe04c796f36715e9d0ef3f
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Wed Jan 15 18:33:30 2025 +0100

    dm-transaction-manager: use red-black trees instead of linear lists

    There was reported performance degradation when the shadow map contained
    too many entries [1]. The shadow map uses 256-bucket hash with linear
    lists - when there are too many entries, it has quadratic complexity.

    Meir Elisha proposed to add a module parameter that could configure the
    size of the hash array - however, this is not ideal because users don't
    know that they should increase the parameter when they get bad
    performance.

    This commit replaces the linear lists with rb-trees (so that there's a
    hash of rb-trees), they have logarithmic complexity, so it solves the
    performance degradation.

    Link: https://patchwork.kernel.org/project/dm-devel/patch/20241014134944.1264991-1-meir.elisha@volumez.com/ [1]
    Reported-by: Meir Elisha <meir.elisha@volumez.com>
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
2025-04-08 11:46:32 -04:00
..
Kconfig
Makefile
dm-array.c dm array: fix cursor index when skipping across block boundaries 2025-04-08 11:46:31 -04:00
dm-array.h
dm-bitset.c
dm-bitset.h
dm-block-manager.c dm: Constify struct dm_block_validator 2024-10-21 15:58:34 -04:00
dm-block-manager.h dm: Constify struct dm_block_validator 2024-10-21 15:58:34 -04:00
dm-btree-internal.h dm: Constify struct dm_block_validator 2024-10-21 15:58:34 -04:00
dm-btree-remove.c
dm-btree-spine.c dm: Constify struct dm_block_validator 2024-10-21 15:58:34 -04:00
dm-btree.c dm: add missing blank line after declarations/fix those 2023-03-16 17:15:16 -05:00
dm-btree.h dm: add missing blank line after declarations/fix those 2023-03-16 17:15:16 -05:00
dm-persistent-data-internal.h
dm-space-map-common.c dm: Fix typo in error message 2025-04-08 11:46:31 -04:00
dm-space-map-common.h dm: favour __packed versus "__attribute__ ((packed))" 2023-03-16 17:15:16 -05:00
dm-space-map-disk.c
dm-space-map-disk.h
dm-space-map-metadata.c dm persistent data: fix memory allocation failure 2024-10-21 15:58:34 -04:00
dm-space-map-metadata.h
dm-space-map.h dm thin metadata: Fix ABBA deadlock by resetting dm_bufio_client 2023-11-07 11:27:42 -05:00
dm-transaction-manager.c dm-transaction-manager: use red-black trees instead of linear lists 2025-04-08 11:46:32 -04:00
dm-transaction-manager.h dm: Constify struct dm_block_validator 2024-10-21 15:58:34 -04:00