Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-22 Thread Stefano Garzarella
Hi Huaitong Han, On Thu, 22 May 2025 at 05:39, Huaitong Han wrote: > > Hi Stefano, > > I’ve implemented the version based on your suggestion. The core logic > now looks like this: > if (k->query_guest_notifiers && > !k->query_guest_notifiers(qbus->parent) && > virtio_queue_vector(vdev, id

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-21 Thread Huaitong Han
Hi Stefano, I’ve implemented the version based on your suggestion. The core logic now looks like this: if (k->query_guest_notifiers && !k->query_guest_notifiers(qbus->parent) && virtio_queue_vector(vdev, idx) == VIRTIO_NO_VECTOR) { ... } And in virtio_pci_query_guest_notifiers(): if (

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-20 Thread Stefano Garzarella
On Tue, May 20, 2025 at 08:30:39PM +0800, Huaitong Han wrote: Stefano Garzarella 于2025年5月20日周二 19:41写道: On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: >From: Huaitong Han > >The vring call fd is set even when the guest does not use MSI-X (e.g., in the >case of virtio PMD),

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-20 Thread Huaitong Han
Stefano Garzarella 于2025年5月20日周二 19:41写道: > > On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: > >From: Huaitong Han > > > >The vring call fd is set even when the guest does not use MSI-X (e.g., in the > >case of virtio PMD), leading to unnecessary CPU overhead for processing > >

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-20 Thread Michael S. Tsirkin
On Tue, May 20, 2025 at 01:04:10PM +0200, Stefano Garzarella wrote: > On Fri, May 16, 2025 at 09:03:33PM +0800, Huaitong Han wrote: > > Stefano Garzarella 于2025年5月16日周五 16:19写道: > > > > > > On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: > > > >From: Huaitong Han > > > > > > >

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-20 Thread Stefano Garzarella
On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: From: Huaitong Han The vring call fd is set even when the guest does not use MSI-X (e.g., in the case of virtio PMD), leading to unnecessary CPU overhead for processing interrupts. The commit 96a3d98d2c("vhost: don't set vring c

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-20 Thread Stefano Garzarella
On Fri, May 16, 2025 at 09:03:33PM +0800, Huaitong Han wrote: Stefano Garzarella 于2025年5月16日周五 16:19写道: On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: >From: Huaitong Han > >The vring call fd is set even when the guest does not use MSI-X (e.g., in the >case of virtio PMD),

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-16 Thread Huaitong Han
Stefano Garzarella 于2025年5月16日周五 16:19写道: > > On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: > >From: Huaitong Han > > > >The vring call fd is set even when the guest does not use MSI-X (e.g., in the > >case of virtio PMD), leading to unnecessary CPU overhead for processing > >

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-16 Thread Stefano Garzarella
On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: From: Huaitong Han The vring call fd is set even when the guest does not use MSI-X (e.g., in the case of virtio PMD), leading to unnecessary CPU overhead for processing interrupts. The commit 96a3d98d2c("vhost: don't set vring c

[PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-13 Thread oenhan
From: Huaitong Han The vring call fd is set even when the guest does not use MSI-X (e.g., in the case of virtio PMD), leading to unnecessary CPU overhead for processing interrupts. The commit 96a3d98d2c("vhost: don't set vring call if no vector") optimized the case where MSI-X is enabled but the