multipathd: deterministic io throughput in multipath
cover multipathd: deterministic io throughput in multipath
This patch adds three configuration parameters, "san_path_err_threshold", "san_path_err_recovery_time" and "san_path_err_forget_rate". multipathd will watch paths and check how many times a path has been failed due to errors.If the number of failures on a particular path is greater then the san_path_err_threshold then the path will not reinstante till san_path_err_recovery_time.These path failures should occur within a san_path_err_forget_rate checks, if not we will consider the path is good enough to reinstantate.If it is the only available path, it will immediately be reintegrated.
This helps us to place the path in failed state if we hit lot of errors on a particular path due to network /target issues and allow the admin to rectify the errors on a path.
M Muneendra Kumar (1):
multipathd: deterministic io throughput in multipath
libmultipath/config.c | 6 ++++ libmultipath/config.h | 9 +++++ libmultipath/configure.c | 3 ++ libmultipath/defaults.h | 3 +- libmultipath/dict.c | 86 ++++++++++++++++++++++++++++++++-------------- libmultipath/dict.h | 3 +- libmultipath/propsel.c | 48 ++++++++++++++++++++++++-- libmultipath/propsel.h | 3 ++ libmultipath/structs.h | 14 +++++--- multipath/multipath.conf.5 | 57 ++++++++++++++++++++++++++++++ multipathd/main.c | 83 ++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 281 insertions(+), 34 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/1 multipathd: deterministic io throughput in multipath
This patch adds three configuration parameters, "san_path_err_threshold", "san_path_err_recovery_time" and "san_path_err_forget_rate". multipathd will watch paths and check how many times a path has been failed due to errors.If the number of failures on a particular path is greater then the san_path_err_threshold then the path will not reinstante till san_path_err_recovery_time.These path failures should occur within a san_path_err_forget_rate checks, if not we will consider the path is good enough to reinstantate.If it is the only available path, it will immediately be reintegrated.
This helps us to place the path in failed state if we hit lot of errors on a particular path due to network /target issues and allow the admin to rectify the errors on a path.
--- libmultipath/config.c | 6 ++++ libmultipath/config.h | 9 +++++ libmultipath/configure.c | 3 ++ libmultipath/defaults.h | 3 +- libmultipath/dict.c | 86 ++++++++++++++++++++++++++++++++-------------- libmultipath/dict.h | 3 +- libmultipath/propsel.c | 48 ++++++++++++++++++++++++-- libmultipath/propsel.h | 3 ++ libmultipath/structs.h | 14 +++++--- multipath/multipath.conf.5 | 57 ++++++++++++++++++++++++++++++ multipathd/main.c | 83 ++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 281 insertions(+), 34 deletions(-)
libmultipath/config.c +6 -0
@@ -348,6 +348,9 @@ merge_hwe (struct hwentry * dst, struct hwentry * src)merge_num (delay_wait_checks);merge_num (skip_kpartx);merge_num (max_sectors_kb); +merge_num (san_path_err_threshold); +merge_num (san_path_err_forget_rate); +merge_num (san_path_err_recovery_time);/* * Make sure features is consistent with
@@ -621,6 +624,9 @@ load_config (char * file) conf->disable_changed_wwids =DEFAULT_DISABLE_CHANGED_WWIDS ; conf->remove_retries =0 ; conf->max_sectors_kb =DEFAULT_MAX_SECTORS_KB ; + conf->san_path_err_threshold =DEFAULT_ERR_CHECKS ; + conf->san_path_err_forget_rate =DEFAULT_ERR_CHECKS ; + conf->san_path_err_recovery_time =DEFAULT_ERR_CHECKS ;/* * preload default hwtable
libmultipath/config.h +9 -0
@@ -65,6 +65,9 @@ struct hwentry {int deferred_remove;int delay_watch_checks;int delay_wait_checks; +int san_path_err_threshold; +int san_path_err_forget_rate; +int san_path_err_recovery_time;int skip_kpartx;int max_sectors_kb;char * bl_product;
@@ -93,6 +96,9 @@ struct mpentry {int deferred_remove;int delay_watch_checks;int delay_wait_checks; +int san_path_err_threshold; +int san_path_err_forget_rate; +int san_path_err_recovery_time;int skip_kpartx;int max_sectors_kb;uid_t uid;
@@ -138,6 +144,9 @@ struct config {int processed_main_config;int delay_watch_checks;int delay_wait_checks; +int san_path_err_threshold; +int san_path_err_forget_rate; +int san_path_err_recovery_time;int uxsock_timeout;int strict_timing;int retrigger_tries;
libmultipath/configure.c +3 -0
@@ -294,6 +294,9 @@ int setup_map(struct multipath *mpp, char *params, int params_size)select_deferred_remove (conf, mpp);select_delay_watch_checks (conf, mpp);select_delay_wait_checks (conf, mpp); +select_san_path_err_threshold (conf, mpp); +select_san_path_err_forget_rate (conf, mpp); +select_san_path_err_recovery_time (conf, mpp);select_skip_kpartx (conf, mpp);select_max_sectors_kb (conf, mpp);
libmultipath/defaults.h +2 -1
@@ -23,7 +23,8 @@#define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_ON#define DEFAULT_DETECT_PRIO DETECT_PRIO_ON#define DEFAULT_DEFERRED_REMOVE DEFERRED_REMOVE_OFF -#define DEFAULT_DELAY_CHECKS DELAY_CHECKS_OFF +#define DEFAULT_DELAY_CHECKS NU_NO +#define DEFAULT_ERR_CHECKS NU_NO#define DEFAULT_UEVENT_STACKSIZE 256#define DEFAULT_RETRIGGER_DELAY 10#define DEFAULT_RETRIGGER_TRIES 3
libmultipath/dict.c +61 -25
139 lines not on this page · raw message
libmultipath/dict.h +1 -2
@@ -14,6 +14,5 @@ int print_no_path_retry(char * buff, int len, void *ptr);int print_fast_io_fail (char * buff,int len,void *ptr);int print_dev_loss (char * buff,int len,void *ptr);int print_reservation_key (char * buff,int len,void * ptr); -int print_delay_checks (char * buff,int len,void *ptr); - +int print_off_int_undef (char * buff,int len,void *ptr);#endif /* _DICT_H */
libmultipath/propsel.c +46 -2
65 lines not on this page · raw message
libmultipath/propsel.h +3 -0
@@ -24,3 +24,6 @@ int select_delay_watch_checks (struct config *conf, struct multipath * mp);int select_delay_wait_checks (struct config *conf,struct multipath * mp);int select_skip_kpartx (struct config *conf,struct multipath * mp);int select_max_sectors_kb (struct config *conf,struct multipath * mp); +int select_san_path_err_forget_rate (struct config *conf,struct multipath *mp); +int select_san_path_err_threshold (struct config *conf,struct multipath *mp); +int select_san_path_err_recovery_time (struct config *conf,struct multipath *mp);
libmultipath/structs.h +10 -4
@@ -152,9 +152,9 @@ enum scsi_protocol { SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */ }; -enum delay_checks_states { -DELAY_CHECKS_OFF =-1 , -DELAY_CHECKS_UNDEF =0 , +enum no_undef_states { +NU_NO =-1 , +NU_UNDEF =0 , };enum initialized_states {
@@ -223,7 +223,10 @@ struct path {int initialized;int retriggers;int wwid_changed; - +unsigned int path_failures; +time_t dis_reinstate_time; +int disable_reinstate; +int san_path_err_forget_rate;/* configlet pointers */ struct hwentry * hwe; };
@@ -255,6 +258,9 @@ struct multipath {int deferred_remove;int delay_watch_checks;int delay_wait_checks; +int san_path_err_threshold; +int san_path_err_forget_rate; +int san_path_err_recovery_time;int skip_kpartx;int max_sectors_kb;unsigned int dev_loss;
multipath/multipath.conf.5 +57 -0
81 lines not on this page · raw message
multipathd/main.c +83 -0
95 lines not on this page · raw message
Signature · 1 line
1.8.3.1