Skip to contentSkip to conversation

Migration assigned device interrupts

DISCUSSION Avi Kivity 1 participant 1 message Oct 1, 2009 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

It occurs to me that we're handling assigned device interrupts inefficiently: an interrupt is received on cpu A, injected, and wakes up (or forces out of guest mode) a vcpu on cpu B. This involved an IPI and bothers two cpus instead of one.

But we often known which vcpu will be woken up (DM_FIXED interupts) and which cpu it runs on (vcpu->cpu, preempt notifiers) so we can migrate the host interrupt to follow the vcpu it wakes. This should improve latency and cpu utilization.

I'm not sure how to do this generically (with irqfd), so vhost-net can benefit from it as well - migrate the vhost threads and the interrupts that feed them too.

Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.