On Mon, Mar 09, 2026 at 04:48:37PM +0000, Daniel P. Berrangé wrote:
> > @@ -881,8 +881,8 @@ static int qio_channel_socket_flush_internal(QIOChannel
> > *ioc,
> > sioc->zero_copy_sent += serr->ee_data - serr->ee_info + 1;
> >
> > /* If any sendmsg() succeeded using zero copy, mark zerocopy
> > success */
> > - if (serr->ee_code != SO_EE_CODE_ZEROCOPY_COPIED) {
> > - sioc->new_zero_copy_sent_success = true;
> > + if (serr->ee_code == SO_EE_CODE_ZEROCOPY_COPIED) {
> > + sioc->zero_copy_fallback++;
>
> ...this is counting the number of MSG_ERRQUEUE items, which is not
> the same as the number of IO requests. That's why we only used it
> as a boolean marker originally, rather than making it a counter.
Would the logic still work and better than before? Say, it's a counter of
"messages" rather than "IOs" then.
The problem with the old code was we may report fallback=0 even if there
can have fallback happened, as we mask that fact as long as one zerocopy
happened in the whole batch between two flushes. So it seems this (even if
the counter is not per-IO) is still better.
Thanks,
--
Peter Xu