Skip to content
Commit 00a72516 authored by Yuval Peress's avatar Yuval Peress Committed by Maureen Helm
Browse files

rtio: rework RTIO mempool management



The previous RTIO mempool allocation was found to be faulty. Since the
map entries were indexed using the sqe, as soon as the sqe and cqe were
no longer in sync, there was a contention. Effectively a new sqe needing
memory would assume the entry was already consumed by themselves. This
was caused by 'rtio_sqe_rx_buf()' being effectively reentrant (i.e. if
called more than once, it'll return the same buffer). So when the map
entry was marked as allocated it was assumed that it belonged to the sqe
in question and used. This led to the producer writing to memory that
was actively being read by the consumer.

Instead, the sqe's own buf/buf_len fields are used to store the memory.
Once allocated, the memory is stored there and no mapping is needed.

Signed-off-by: default avatarYuval Peress <peress@google.com>
parent bacc8d92
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment