答复: [????] Re: [PATCH] KVM: eventfd: Remove redundant synchronize_srcu_expedited from irqfd assignment

From: Li,Rongqing(ACG CCN)

Date: Mon Mar 09 2026 - 21:38:02 EST




> On Mon, Mar 09, 2026, lirongqing wrote:
> > From: Li RongQing <lirongqing@xxxxxxxxx>
> >
> > The synchronize_srcu_expedited() call in kvm_irqfd_assign() is
> > unnecessary when adding a new irqfd to the resampler list. The list
> > insertion is already RCU-safe, and existing readers will either see
> > the old or the updated list without inconsistency.
>
> It's not required for kernel safety, but I do think it's required for KVM's ABI, e.g.
> to ensure the resampler is visible to readers before KVM_IRQFD returns to
> userspace.
>

Thanks for explanation, It would be best if a comment could be added.

> > Removing this call reduces latency during resampling irqfd setup.
>
> May I ask why you're micro-optimizing VMst with an in-kernel I/O APIC?

Few devices use it anymore; I just think the kernel ABI shouldn't require synchronize_srcu_expedited.

Thanks

[Li,Rongqing]