[Devel] [PATCH rh7 4/6] ploop: push_backup: add timeout tunable
Maxim Patlasov
mpatlasov at virtuozzo.com
Tue Jun 14 17:54:40 PDT 2016
The patch adds new ploop tunable: push_backup_timeout.
It is measured in seconds. The default is 42. The meaning is:
if a preq sits in pending or reported tree for more than that,
let's abort push_backup operation.
Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
drivers/block/ploop/sysfs.c | 2 ++
include/linux/ploop/ploop.h | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/block/ploop/sysfs.c b/drivers/block/ploop/sysfs.c
index 034713a..afe46f8 100644
--- a/drivers/block/ploop/sysfs.c
+++ b/drivers/block/ploop/sysfs.c
@@ -460,6 +460,7 @@ _TUNE_BOOL(disable_user_threshold);
_TUNE_U32(congestion_high_watermark);
_TUNE_U32(congestion_low_watermark);
_TUNE_U32(max_active_requests);
+_TUNE_U32(push_backup_timeout);
struct pattr_sysfs_entry {
@@ -519,6 +520,7 @@ static struct attribute *tune_attributes[] = {
_A2(congestion_high_watermark),
_A2(congestion_low_watermark),
_A2(max_active_requests),
+ _A2(push_backup_timeout),
NULL
};
diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h
index 2b63493..61e8faf 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -309,6 +309,7 @@ struct ploop_tunable
int congestion_high_watermark;
int congestion_low_watermark;
int max_active_requests;
+ int push_backup_timeout; /* in seconds */
unsigned int pass_flushes : 1, pass_fuas : 1,
congestion_detection : 1,
check_zeros : 1,
@@ -333,7 +334,8 @@ struct ploop_tunable
.pass_flushes = 1, \
.pass_fuas = 1, \
.check_zeros = 1, \
-.max_active_requests = DEFAULT_PLOOP_BATCH_ENTRY_QLEN / 2, }
+.max_active_requests = DEFAULT_PLOOP_BATCH_ENTRY_QLEN / 2, \
+.push_backup_timeout = 42, }
struct ploop_stats
{
More information about the Devel
mailing list