﻿# Retiring unsignaled RDMA sends without exhausting the queue

Design an explicit retirement boundary for unsignaled send work while preserving buffer ownership, queue capacity and error handling.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/rdma-unsignaled-completion-boundary/
Language: en

## Fewer completions do not mean fewer requests

A sender suppresses successful completions to reduce polling overhead. It keeps posting from a ring of buffers until progress stalls or old data appears at the receiver. The optimization removed individual completion evidence, not the operations referencing those buffers. It needs a retirement protocol that identifies when a bounded prefix is no longer live. Counting submitted calls or elapsed time cannot supply that ownership transition.

## Name the local reuse contract

The [ibv_post_send reference](https://man7.org/linux/man-pages/man3/ibv_post_send.3.html) distinguishes selective signaling from the inline-data exception. Non-inline buffers remain live until the relevant work is fully executed and completion evidence is obtained. Inline copying permits immediate reuse under its own supported size and opcode constraints. Do not infer inline behavior from a small message or assume that an unsignaled request copies its payload merely because it creates no successful CQ entry.

## Define a queue-specific retirement marker

Maintain an ordered ledger for each send queue, tying submitted work to buffers and the chosen completion boundary. A supported signaled marker can retire a validated preceding group under the applicable ordering contract. Where dependencies require fencing, the [work-request builder reference](https://man7.org/linux/man-pages/man3/ibv_wr_send.3.html) documents a fence that prevents the request starting before prior work completes. This is a deliberately scoped design, not permission to apply a marker from another QP to unrelated reads, atomics or asynchronous application activity.

## Reserve space to obtain evidence

The producer must retain enough submission capacity to post its next retirement marker before filling the queue with unsignaled work. Otherwise, it can wait for evidence it has left no room to request. [Device attributes](https://man7.org/linux/man-pages/man3/ibv_query_device.3.html) expose work-request and completion capacities, but documented maxima are not guarantees of resources currently available. Track successful posting separately from planned posting, including a partially accepted linked-list prefix and any marker that failed to enter the queue.

## Verify wraparound and errors

An isolated qualification should exercise buffer-ring wraparound, a final short group that does not reach the usual signaling interval, delayed polling and an injected supported error path. Check exact payload ownership and completion status before reclaiming the corresponding ledger prefix. Do not label a failed marker successful or assume that suppressing ordinary success entries suppresses all failure evidence. Shutdown must drain or reconcile the last live group rather than silently returning every buffer to an allocator.

## Bound the guarantee

The result establishes local resource retirement under a specified QP and provider contract. It does not prove that a remote application committed the data or that one signaling interval is optimal for every workload. The [completion error guide](/journal/guide-net-rdma-completion/) addresses ambiguous failures, while [registration lifetime](/journal/guide-net-rdma-memory-registration/) covers the mappings these buffers depend on. Measure any polling benefit separately from correctness; a lower completion count is an implementation choice, not an independent improvement in accepted work.
