Re: [PATCH 12/14] vfio: add region info cache

2025-04-29 Thread John Levon
On Mon, Apr 28, 2025 at 05:39:46PM +0200, Cédric Le Goater wrote: > > +static void vfio_device_get_all_region_info(VFIODevice *vbasedev) > > +{ > > +struct vfio_region_info *info; > > +int i; > > + > > +for (i = 0; i < vbasedev->num_regions; i++) { > > +vfio_device_get_region_i

Re: [PATCH 12/14] vfio: add region info cache

2025-04-28 Thread John Levon
On Mon, Apr 28, 2025 at 05:39:46PM +0200, Cédric Le Goater wrote: > On 4/9/25 15:48, John Levon wrote: > > Instead of requesting region information on demand with > > VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become > > necessary for performance for vfio-user, where this call become

Re: [PATCH 12/14] vfio: add region info cache

2025-04-28 Thread Cédric Le Goater
On 4/9/25 15:48, John Levon wrote: Instead of requesting region information on demand with VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become necessary for performance for vfio-user, where this call becomes a message over the control socket, so is of higher overhead than the traditio

Re: [PATCH 12/14] vfio: add region info cache

2025-04-28 Thread John Levon
On Mon, Apr 28, 2025 at 05:16:50PM +0200, Cédric Le Goater wrote: > > i.e. every region read/write needs to look up info each time? > > Oh I didn't this. So the introduction VFIODeviceIOOps is not seamless. Correct. > > If not, what are you suggesting? > > vfio_device_io_region_read and vfio_d

Re: [PATCH 12/14] vfio: add region info cache

2025-04-28 Thread Cédric Le Goater
On 4/24/25 18:26, John Levon wrote: On Thu, Apr 24, 2025 at 06:08:21PM +0200, Cédric Le Goater wrote: On 4/9/25 15:48, John Levon wrote: Instead of requesting region information on demand with VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become necessary for performance for vfio-us

Re: [PATCH 12/14] vfio: add region info cache

2025-04-24 Thread John Levon
On Thu, Apr 24, 2025 at 06:08:21PM +0200, Cédric Le Goater wrote: > On 4/9/25 15:48, John Levon wrote: > > Instead of requesting region information on demand with > > VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become > > necessary for performance for vfio-user, where this call become

Re: [PATCH 12/14] vfio: add region info cache

2025-04-24 Thread Cédric Le Goater
On 4/9/25 15:48, John Levon wrote: Instead of requesting region information on demand with VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become necessary for performance for vfio-user, where this call becomes a message over the control socket, so is of higher overhead than the traditio

[PATCH 12/14] vfio: add region info cache

2025-04-09 Thread John Levon
Instead of requesting region information on demand with VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become necessary for performance for vfio-user, where this call becomes a message over the control socket, so is of higher overhead than the traditional path. We will also need it to ge