librdmacm: Change wake-up timeout from rpoll

[ Upstream commit 0b9d2f113e07bc1e0369e7251655e9af41a6c544 ]

The changes to rpoll to use a signaling fd to wake up blocked threads,
combined with suspending polling while rsockets states may be changing
_should_ prevent any threads from blocking indefinitely in rpoll()
when a desired state change occurs.

We periodically wake up any polling thread, so that it can recheck its
rsocket states. The sleeping interval was set to an arbitrary value of
5 seconds, this interval is too long for apps that request a connection
and are dependent on the thread waking up, so it's changed now to 0.5
seconds, but can be overridden using config files.

Signed-off-by: Batsheva Black <bblack@nvidia.com>
Signed-off-by: Nicolas Morey <nmorey@suse.com>
diff --git a/librdmacm/rsocket.c b/librdmacm/rsocket.c
index 47de00a..30c72c9 100644
--- a/librdmacm/rsocket.c
+++ b/librdmacm/rsocket.c
@@ -135,7 +135,7 @@
 static uint32_t def_mem = (1 << 17);
 static uint32_t def_wmem = (1 << 17);
 static uint32_t polling_time = 10;
-static int wake_up_interval = 5000;
+static int wake_up_interval = 500;
 
 /*
  * Immediate data format is determined by the upper bits