ctdb: Adding memory pool for queue callback
authorSwen Schillig <swen@vnet.ibm.com>
Mon, 12 Mar 2018 16:56:21 +0000 (17:56 +0100)
committerChristof Schmitt <cs@samba.org>
Fri, 7 Dec 2018 22:27:16 +0000 (23:27 +0100)
commit353a947b4a983f6664391da6769b914d42612567
treefa37c377521da0258be116ecd084989e746bf22e
parent382705f495dd7f196efc8bb24b9cee3649b44836
ctdb: Adding memory pool for queue callback

The received packet is copied into a newly allocated memory chunk for further
processing by the assigned callback. Once this is done, the memory is free'd.
This is repeated for each received packet making the memory allocation / free
an expensive task. To optimize this process, a memory pool is defined which
is sized identically to the queue's buffer.
During tests it could be seen that more than 95% of all messages were sized
below the standard buffer_size of 1k.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Fri Dec  7 23:27:16 CET 2018 on sn-devel-144
ctdb/common/ctdb_io.c