1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Changed size of receive and send pool

Before, this size was always 8192. Now it is only that big for
Infiniband type nodes.
This commit is contained in:
Dennis Potter 2018-07-23 22:45:29 +02:00
parent dfa098f450
commit a50de4e8e7

View file

@ -133,7 +133,9 @@ static void * send_loop(void *ctx)
struct sample *smps[node->out.vectorize];
/* Initialize memory */
ret = pool_init(&sendd.pool, MAX(8192, 2*LOG2_CEIL(node->out.vectorize)), SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage));
unsigned pool_cnt = (strcmp(node_type_name(node->_vt), "infiniband") == 0 ? 8192 : LOG2_CEIL(node->out.vectorize));
ret = pool_init(&sendd.pool, pool_cnt, SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage));
if (ret < 0)
error("Failed to allocate memory for receive pool.");
@ -201,7 +203,9 @@ static void * recv_loop(void *ctx)
struct sample *smps[node->in.vectorize];
/* Initialize memory */
ret = pool_init(&recvv.pool, MAX(8192, 2*LOG2_CEIL(node->in.vectorize)), SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage));
unsigned pool_cnt = (strcmp(node_type_name(node->_vt), "infiniband") == 0 ? 8192 : LOG2_CEIL(node->in.vectorize));
ret = pool_init(&recvv.pool, pool_cnt, SAMPLE_LEN(DEFAULT_SAMPLELEN), node_memory_type(node, &memory_hugepage));
if (ret < 0)
error("Failed to allocate memory for receive pool.");