From 0761abe3fae66a8f037c2ba868239ab509d3eec6 Mon Sep 17 00:00:00 2001 From: liangzhen Date: Tue, 11 Nov 2008 07:39:37 +0000 Subject: [PATCH] Branch b1_x_lnet_gate Allow user to specify small value for o2iblnd::concurrent_sends b=15983 i=isaac --- lnet/klnds/o2iblnd/o2iblnd_modparams.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lnet/klnds/o2iblnd/o2iblnd_modparams.c b/lnet/klnds/o2iblnd/o2iblnd_modparams.c index 10edb5d..91c7520 100644 --- a/lnet/klnds/o2iblnd/o2iblnd_modparams.c +++ b/lnet/klnds/o2iblnd/o2iblnd_modparams.c @@ -316,8 +316,14 @@ kiblnd_tunables_init (void) if (*kiblnd_tunables.kib_concurrent_sends > IBLND_RX_MSGS) *kiblnd_tunables.kib_concurrent_sends = IBLND_RX_MSGS; - if (*kiblnd_tunables.kib_concurrent_sends < IBLND_MSG_QUEUE_SIZE) - *kiblnd_tunables.kib_concurrent_sends = IBLND_MSG_QUEUE_SIZE; + if (*kiblnd_tunables.kib_concurrent_sends < IBLND_MSG_QUEUE_SIZE / 2) + *kiblnd_tunables.kib_concurrent_sends = IBLND_MSG_QUEUE_SIZE / 2; + + if (*kiblnd_tunables.kib_concurrent_sends < IBLND_MSG_QUEUE_SIZE) { + CWARN("Concurrent sends %d is lower than message queue size: %d, " + "performance may drop slightly.\n", + *kiblnd_tunables.kib_concurrent_sends, IBLND_MSG_QUEUE_SIZE); + } return 0; } -- 1.8.3.1