Skip to content

viona worker LWPs should not be CPU-pinned#1146

Open
iximeow wants to merge 4 commits into
masterfrom
viona-worker-pins
Open

viona worker LWPs should not be CPU-pinned#1146
iximeow wants to merge 4 commits into
masterfrom
viona-worker-pins

Conversation

@iximeow
Copy link
Copy Markdown
Member

@iximeow iximeow commented May 27, 2026

VNA_IOC_RING_INIT* includes, as part of init'ing a ring, creating an LWP in the calling process for that ring's worker thread. This is all fine and good, but for that LWP inheriting the binding of the original ioctl-caller. The ioctl-caller, then, is functionally always a vCPU LWP, in service of an MMIO exit by a guest who is trying to start their virtio NIC.

Since one vCPU is probably handling a routine that loops over all desired virtio rings and enables them, the effective outcome is that all viona rings are handled on some sole arbitrary host CPU that is also responsible for a vCPU.

Avoid all of this by temporarily unbinding whatever LWP is getting the viona ring going, then rebinding before we've continued on.

iximeow added 2 commits May 27, 2026 00:08
VNA_IOC_RING_INIT* includes, as part of init'ing a ring, creating an LWP
in the calling process for that ring's worker thread. This is all fine
and good, but for that LWP inheriting the binding of the original
ioctl-caller. The ioctl-caller, then, is functionally always a vCPU LWP,
in service of an MMIO exit by a guest who is trying to start their
virtio NIC.

Since one vCPU is probably handling a routine that loops over all
desired virtio rings and enables them, the effective outcome is
that all viona rings are handled on some sole arbitrary host CPU that is
also responsible for a vCPU.

Avoid all of this by temporarily unbinding whatever LWP is getting the
viona ring going, then rebinding before we've continued on.
@iximeow iximeow added bug Something that isn't working. networking Related to networking devices/backends. labels May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something that isn't working. networking Related to networking devices/backends.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant