mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-16 00:00:02 +01:00
![]() The node blocks a certain amount of samples to use in its queues. Before this commit, the only moment to release them to the framwork was during ib_read()/ib_write(). But, there were a couple of problems. In the following I will take ib_read() as example, but ib_write() will be analogous. The first problem was: 1. If a QP disconnect, all Work Requests get invalidated and will be "flushed" to a Completion Queue. A possible solution would be, to save them in an intermediate buffer. We could then "exchange" these samples with the framework as soon as the node connects again and ib_read() is called again. So, we would get valid samples from the framwork, post them, and give the "invalidated" samples back. But, there is a second problem: 2. We cannot assume that ib_read() is ever called again after ib_disconnect(). This is for example the case if the disconnect is triggered by ib_stop() and not by an external node that disconnects. This would result in a memory leak, since the samples would never be returned to the framework, although the node is stopped. Because of this second problem, I decided to return all samples with sample_put() in the disconnect function. An additional benefit is that this is more convenient than another buffer to temporarily safe the invalidated samples. |
||
---|---|---|
.. | ||
api | ||
formats | ||
hooks | ||
kernel | ||
memory | ||
nodes | ||
advio.c | ||
api.c | ||
bitset.c | ||
buffer.c | ||
CMakeLists.txt | ||
compat.c | ||
config_helper.c | ||
crypt.c | ||
format_type.c | ||
hash_table.c | ||
hist.c | ||
hook.c | ||
hook_type.c | ||
io.c | ||
list.c | ||
log.c | ||
log_config.c | ||
log_helper.c | ||
mapping.c | ||
memory.c | ||
node.c | ||
node_type.c | ||
path.c | ||
plugin.c | ||
pool.c | ||
queue.c | ||
queue_signalled.c | ||
sample.c | ||
shmem.c | ||
signal.c | ||
stats.c | ||
super_node.c | ||
table.c | ||
task.c | ||
timing.c | ||
utils.c | ||
web.c |