On Sat, Nov 08, 2025 at 04:59:26PM -0600, Eric Blake wrote:
> In qemu-nbd and other NBD server setups where parallel clients are
> supported, it is common that the caller will re-register the same
> callback function as long as it has not reached its limit on
> simultaneous clients.  In that case, there is no need to tear down and
> reinstall GSource watches in the GMainContext.
> 
> In practice, all callers currently pass NULL for notify, and no caller
> ever changes context across calls (for async uses, either the caller
> consistently uses qio_net_listener_set_client_func_full with the same
> context, or the caller consistently uses only
> qio_net_listener_set_client_func which always uses the global
> context); but the time spent checking these two fields in addition to
> the more important func and data is still less than the savings of not
> churning through extra GSource manipulations when the result will be
> unchanged.
> 
> Signed-off-by: Eric Blake <[email protected]>
> 
> ---
> v2: move later in series, also ensure notify and context are the same
> ---
>  io/net-listener.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Daniel P. Berrangé <[email protected]>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to