[Devel] [PATCH RHEL7 COMMIT] ploop: push_backup: add timeout tunable
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jun 27 00:11:23 PDT 2016
The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.20
------>
commit b5c5467deed92d543d1c26fba018fc0f5f1418e0
Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
Date: Mon Jun 27 11:11:23 2016 +0400
ploop: push_backup: add timeout tunable
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 3e794ba..d6dcc83 100644
--- a/drivers/block/ploop/sysfs.c
+++ b/drivers/block/ploop/sysfs.c
@@ -467,6 +467,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 {
@@ -526,6 +527,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 6f41570..deee8a7 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -316,6 +316,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,
@@ -340,7 +341,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