drbd: New sync parameters for the smart resync rate controller
authorPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 5 Jul 2010 11:42:03 +0000 (13:42 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 16:38:12 +0000 (18:38 +0200)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_nl.c
include/linux/drbd_limits.h
include/linux/drbd_nl.h

index 410d3d4f361e3d0814d236c44495e25c65cf88d3..5a484c1f5ce742bd4cbe966ed50f002438fd31d2 100644 (file)
@@ -2690,7 +2690,11 @@ static void drbd_set_defaults(struct drbd_conf *mdev)
                /* .cpu_mask = */       {}, 0,
                /* .csums_alg = */      {}, 0,
                /* .use_rle = */        0,
-               /* .on_no_data = */     DRBD_ON_NO_DATA_DEF
+               /* .on_no_data = */     DRBD_ON_NO_DATA_DEF,
+               /* .c_plan_ahead = */   DRBD_C_PLAN_AHEAD_DEF,
+               /* .c_delay_target = */ DRBD_C_DELAY_TARGET_DEF,
+               /* .c_fill_target = */  DRBD_C_FILL_TARGET_DEF,
+               /* .c_max_rate = */     DRBD_C_MAX_RATE_DEF
        };
 
        /* Have to use that way, because the layout differs between
index 6c08e637e25c13567b179d26b87650a3516a4076..7d384fd39c16c140674704f7d4772e929351066b 100644 (file)
@@ -1599,6 +1599,10 @@ static int drbd_nl_syncer_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n
                sc.after      = DRBD_AFTER_DEF;
                sc.al_extents = DRBD_AL_EXTENTS_DEF;
                sc.on_no_data  = DRBD_ON_NO_DATA_DEF;
+               sc.c_plan_ahead = DRBD_C_PLAN_AHEAD_DEF;
+               sc.c_delay_target = DRBD_C_DELAY_TARGET_DEF;
+               sc.c_fill_target = DRBD_C_FILL_TARGET_DEF;
+               sc.c_max_rate   = DRBD_C_MAX_RATE_DEF;
        } else
                memcpy(&sc, &mdev->sync_conf, sizeof(struct syncer_conf));
 
index 7eb1e98009ece91e48fe4f9f5379156e5213c424..06dbba47a8ef2c0c1c439364a7c4b09d9cbcd148 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_C_PLAN_AHEAD_MIN  0
+#define DRBD_C_PLAN_AHEAD_MAX  300
+#define DRBD_C_PLAN_AHEAD_DEF  0 /* RS rate controller disabled by default */
 
-#define DRBD_DP_INTERVAL_MIN 1
-#define DRBD_DP_INTERVAL_MAX 600
-#define DRBD_DP_INTERVAL_DEF 5
+#define DRBD_C_DELAY_TARGET_MIN 1
+#define DRBD_C_DELAY_TARGET_MAX 100
+#define DRBD_C_DELAY_TARGET_DEF 10
 
-#define DRBD_RS_THROTTLE_TH_MIN 1
-#define DRBD_RS_THROTTLE_TH_MAX 600
-#define DRBD_RS_THROTTLE_TH_DEF 20
+#define DRBD_C_FILL_TARGET_MIN 0
+#define DRBD_C_FILL_TARGET_MAX 100000
+#define DRBD_C_FILL_TARGET_DEF 0 /* By default disabled -> controlled by delay_target */
 
-#define DRBD_RS_HOLD_OFF_TH_MIN 1
-#define DRBD_RS_HOLD_OFF_TH_MAX 6000
-#define DRBD_RS_HOLD_OFF_TH_DEF 100
+#define DRBD_C_MAX_RATE_MIN     250 /* kByte/sec */
+#define DRBD_C_MAX_RATE_MAX     (4 << 20)
+#define DRBD_C_MAX_RATE_DEF     102400
 
 #undef RANGE
 #endif
index 9aebd0d80a5db53482b1cbd5ea37e8755ac77d0c..e23683c87ca1e186bd8e4d3bfa8ff8791682ef48 100644 (file)
@@ -88,6 +88,10 @@ NL_PACKET(syncer_conf, 8,
        NL_STRING(      64,     T_MAY_IGNORE,   csums_alg,      SHARED_SECRET_MAX)
        NL_BIT(         65,     T_MAY_IGNORE,   use_rle)
        NL_INTEGER(     75,     T_MAY_IGNORE,   on_no_data)
+       NL_INTEGER(     76,     T_MAY_IGNORE,   c_plan_ahead)
+       NL_INTEGER(     77,     T_MAY_IGNORE,   c_delay_target)
+       NL_INTEGER(     78,     T_MAY_IGNORE,   c_fill_target)
+       NL_INTEGER(     79,     T_MAY_IGNORE,   c_max_rate)
 )
 
 NL_PACKET(invalidate, 9, )