On 2/29/24 18:03, David Wei wrote:
On 2024-02-29 16:36, Pavel Begunkov wrote:
With defer taskrun we store aux cqes into a cache array and then flush
into the CQ, and we also maintain the ordering so aux cqes are flushed
before request completions. Why do we need the cache instead of pushing
them directly? We acutally don't, so let's kill it.
One nuance is synchronisation -- the path we touch here is only for
DEFER_TASKRUN and guaranteed to be executed in the task context, and
all cqe posting is serialised by that. We also don't need locks because
of that, see __io_cq_lock().
Overall the change looks good to me. Are there any tests that check
corner cases for multishot recv() CQE ordering?
In short, recv-multishot.c:test_enobuf() should do
And it's pretty safe, we want aux cqes first -- we get them
first. They're posted immediately, and it's hard to imagine
it to be any earlier, i.e. posting before anyone even asked
to post them.
--
Pavel Begunkov