CFS_MODULE_PARM(peer_buffer_credits, "i", int, 0444,
"# per-peer router buffer credits");
-static int peer_timeout = 0;
+static int peer_timeout = 180;
CFS_MODULE_PARM(peer_timeout, "i", int, 0444,
"Seconds without aliveness news to declare peer dead (<=0 to disable)");
static int fmr_pool_size = 512;
CFS_MODULE_PARM(fmr_pool_size, "i", int, 0444,
- "size of the fmr pool (>= ntx)");
+ "size of the fmr pool (>= ntx / 4)");
static int fmr_flush_trigger = 384;
CFS_MODULE_PARM(fmr_flush_trigger, "i", int, 0444,
int
kiblnd_tunables_init (void)
{
- if (*kiblnd_tunables.kib_credits > *kiblnd_tunables.kib_ntx) {
- CERROR("Can't set credits(%d) > ntx(%d)\n",
- *kiblnd_tunables.kib_credits,
- *kiblnd_tunables.kib_ntx);
- return -EINVAL;
- }
-
if (kiblnd_translate_mtu(*kiblnd_tunables.kib_ib_mtu) < 0) {
CERROR("Invalid ib_mtu %d, expected 256/512/1024/2048/4096\n",
*kiblnd_tunables.kib_ib_mtu);
if (*kiblnd_tunables.kib_peertxcredits > IBLND_CREDITS_MAX)
*kiblnd_tunables.kib_peertxcredits = IBLND_CREDITS_MAX;
+ if (*kiblnd_tunables.kib_peertxcredits > *kiblnd_tunables.kib_credits)
+ *kiblnd_tunables.kib_peertxcredits = *kiblnd_tunables.kib_credits;
+
if (*kiblnd_tunables.kib_peercredits_hiw < *kiblnd_tunables.kib_peertxcredits / 2)
*kiblnd_tunables.kib_peercredits_hiw = *kiblnd_tunables.kib_peertxcredits / 2;
*kiblnd_tunables.kib_peercredits_hiw = *kiblnd_tunables.kib_peertxcredits - 1;
if (*kiblnd_tunables.kib_map_on_demand < 0 ||
- *kiblnd_tunables.kib_map_on_demand >= IBLND_MAX_RDMA_FRAGS)
+ *kiblnd_tunables.kib_map_on_demand > IBLND_MAX_RDMA_FRAGS)
*kiblnd_tunables.kib_map_on_demand = 0; /* disable map-on-demand */
+ if (*kiblnd_tunables.kib_map_on_demand == 1)
+ *kiblnd_tunables.kib_map_on_demand = 2; /* don't make sense to create map if only one fragment */
+
if (*kiblnd_tunables.kib_concurrent_sends == 0) {
if (*kiblnd_tunables.kib_map_on_demand > 0 &&
*kiblnd_tunables.kib_map_on_demand <= IBLND_MAX_RDMA_FRAGS / 8)