TECHNOLOGY

RFS can delay following a migrated application thread

In this article
THE QUICK TAKE

The desired application CPU and current RFS processing CPU can temporarily differ to preserve packet ordering.

The application moved but receive processing stayed

A service thread migrates to another CPU, while kernel receive processing for its connection briefly remains on the old CPU. This can be intentional RFS behavior rather than proof that locality tracking is broken. Moving new packets immediately can let them overtake older packets still queued elsewhere. The useful question is whether the steering mechanism is preserving its documented ordering guard while eventually following the relevant consuming context.

Two tables describe different states

The Linux scaling documentation distinguishes the desired CPU associated with socket activity from the current CPU recorded for a flow in a receive-queue-specific table. These can diverge after scheduler migration. The desired location expresses where processing should move for locality; the current location identifies where outstanding packets have been enqueued. A snapshot of the application scheduler alone therefore cannot establish that every packet must already be processed on the new CPU.

The backlog position supplies the guard

The documentation describes tracking the last queued position and comparing it with the old CPU backlog’s advancing head. Under the normal migration case, movement waits until earlier queued work for that flow has been dequeued. Unset or offline CPU states have their own handling. This is not a universal fixed waiting interval. The amount of pending work and processing progress matter, so a timer-based assumption can misdiagnose a valid ordering delay as a stalled configuration.

Check implementation and enabled scope

The reviewed network-core source contains the corresponding desired/current comparison and backlog-position condition in get_rps_cpu. This branch snapshot supports the mechanism, not a claim that every installed kernel is identical. Preserve the actual kernel, RFS enablement, relevant flow tables and device queue. RFS is distinct from hardware RSS and basic RPS CPU maps; seeing several receive queues does not establish that application-directed flow steering is enabled or applicable.

Qualify migration with controlled work

In an isolated acceptance fixture, use a known receiving thread and connection, then induce an authorized scheduler placement change while observing old backlog progress and subsequent processing location. Validate correct byte delivery and useful completion, not only CPU proximity. Include a fresh-flow control and retain the flow identity through the migration. Aggregate CPU percentages cannot by themselves establish that this connection moved, and a heavily queued old CPU can delay the transition without a physical fabric change.

Bound the locality conclusion

The mechanism aims to avoid steering-induced reordering; it is not an end-to-end guarantee that packets never reorder in the network. Flow-table collisions, application behavior and hardware acceleration add their own context. The receive queue guide explains the broader steering stages, while counter boundaries keeps local backlog pressure distinct from physical link errors. Acceptance should identify a valid enabled mechanism and the expected transition, with the observed delay explained by outstanding work rather than an invented instantaneous affinity guarantee.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles