Skip to content

Commit 2613eab

Browse files
khazhyksnitm
authored andcommitted
dm mpath: add Historical Service Time Path Selector
This new selector keeps an exponential moving average of the service time for each path (losely defined as delta between start_io and end_io), and uses this along with the number of inflight requests to estimate future service time for a path. Since we don't have a prober to account for temporally slow paths, re-try "slow" paths every once in a while (num_paths * historical_service_time). To account for fast paths transitioning to slow, if a path has not completed any request within (num_paths * historical_service_time), limit the number of outstanding requests. To account for low volume situations where number of inflight IOs would be zero, the last finish time of each path is factored in. Signed-off-by: Khazhismel Kumykov <khazhy@google.com> Co-developed-by: Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent 087615b commit 2613eab

3 files changed

Lines changed: 573 additions & 0 deletions

File tree

drivers/md/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,17 @@ config DM_MULTIPATH_ST
452452

453453
If unsure, say N.
454454

455+
config DM_MULTIPATH_HST
456+
tristate "I/O Path Selector based on historical service time"
457+
depends on DM_MULTIPATH
458+
help
459+
This path selector is a dynamic load balancer which selects
460+
the path expected to complete the incoming I/O in the shortest
461+
time by comparing estimated service time (based on historical
462+
service time).
463+
464+
If unsure, say N.
465+
455466
config DM_DELAY
456467
tristate "I/O delaying target"
457468
depends on BLK_DEV_DM

drivers/md/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ obj-$(CONFIG_DM_FLAKEY) += dm-flakey.o
5555
obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o
5656
obj-$(CONFIG_DM_MULTIPATH_QL) += dm-queue-length.o
5757
obj-$(CONFIG_DM_MULTIPATH_ST) += dm-service-time.o
58+
obj-$(CONFIG_DM_MULTIPATH_HST) += dm-historical-service-time.o
5859
obj-$(CONFIG_DM_SWITCH) += dm-switch.o
5960
obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o
6061
obj-$(CONFIG_DM_PERSISTENT_DATA) += persistent-data/

0 commit comments

Comments
 (0)