]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drbd: Four new configuration settings for resync speed control
authorPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 4 May 2010 09:12:00 +0000 (11:12 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 17 May 2010 23:25:00 +0000 (01:25 +0200)
To reasonably control resync speed over drbd-proxy connections,
drbd has to measure the current delay of packets transmitted over
the (possibly congested) data socket vs the meta-data socket.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_nl.c
include/linux/drbd_limits.h
include/linux/drbd_nl.h

index 6cb703686b280503059e46f06871a61e3586fd84..93d150661f4b1dd18c2be6d6fa90bc7308b46dac 100644 (file)
@@ -1555,6 +1555,10 @@ static int drbd_nl_syncer_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n
                sc.rate       = DRBD_RATE_DEF;
                sc.after      = DRBD_AFTER_DEF;
                sc.al_extents = DRBD_AL_EXTENTS_DEF;
+               sc.dp_volume  = DRBD_DP_VOLUME_DEF;
+               sc.dp_interval = DRBD_DP_INTERVAL_DEF;
+               sc.throttle_th = DRBD_RS_THROTTLE_TH_DEF;
+               sc.hold_off_th = DRBD_RS_HOLD_OFF_TH_DEF;
        } else
                memcpy(&sc, &mdev->sync_conf, sizeof(struct syncer_conf));
 
index 51f47a586ad87a79bbf57bde32776c746ca4b67a..440b42e38e898278c7e4742e29cc578add0840e1 100644 (file)
 #define DRBD_MAX_BIO_BVECS_MAX 128
 #define DRBD_MAX_BIO_BVECS_DEF 0
 
+#define DRBD_DP_VOLUME_MIN 4
+#define DRBD_DP_VOLUME_MAX 1048576
+#define DRBD_DP_VOLUME_DEF 16384
+
+#define DRBD_DP_INTERVAL_MIN 1
+#define DRBD_DP_INTERVAL_MAX 600
+#define DRBD_DP_INTERVAL_DEF 5
+
+#define DRBD_RS_THROTTLE_TH_MIN 1
+#define DRBD_RS_THROTTLE_TH_MAX 600
+#define DRBD_RS_THROTTLE_TH_DEF 20
+
+#define DRBD_RS_HOLD_OFF_TH_MIN 1
+#define DRBD_RS_HOLD_OFF_TH_MAX 6000
+#define DRBD_RS_HOLD_OFF_TH_DEF 100
+
 #undef RANGE
 #endif
index de055c07c2ba4a266477bed990cd41eb0bb7f805..ce77a746fc9d526cad83f5abd96506e221e26fd9 100644 (file)
@@ -78,6 +78,10 @@ NL_PACKET(syncer_conf, 8,
        NL_INTEGER(     30,     T_MAY_IGNORE,   rate)
        NL_INTEGER(     31,     T_MAY_IGNORE,   after)
        NL_INTEGER(     32,     T_MAY_IGNORE,   al_extents)
+       NL_INTEGER(     71,     T_MAY_IGNORE,   dp_volume)
+       NL_INTEGER(     72,     T_MAY_IGNORE,   dp_interval)
+       NL_INTEGER(     73,     T_MAY_IGNORE,   throttle_th)
+       NL_INTEGER(     74,     T_MAY_IGNORE,   hold_off_th)
        NL_STRING(      52,     T_MAY_IGNORE,   verify_alg,     SHARED_SECRET_MAX)
        NL_STRING(      51,     T_MAY_IGNORE,   cpu_mask,       32)
        NL_STRING(      64,     T_MAY_IGNORE,   csums_alg,      SHARED_SECRET_MAX)