[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working
From: |
Leonardo Bras |
Subject: |
[PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working |
Date: |
Mon, 27 Jun 2022 22:09:09 -0300 |
Some errors, like the lack of Scatter-Gather support by the network
interface(NETIF_F_SG) may cause sendmsg(...,MSG_ZEROCOPY) to fail on using
zero-copy, which causes it to fall back to the default copying mechanism.
After each full dirty-bitmap scan there should be a zero-copy flush
happening, which checks for errors each of the previous calls to
sendmsg(...,MSG_ZEROCOPY). If all of them failed to use zero-copy, then
warn the user about it.
Since it happens once each full dirty-bitmap scan, even in worst case
scenario it should not print a lot of warnings, and will allow tracking
how many dirty-bitmap iterations were not able to use zero-copy send.
Signed-off-by: Leonardo Bras <leobras@redhat.com>
---
migration/multifd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/migration/multifd.c b/migration/multifd.c
index 684c014c86..9c62aec84e 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -624,6 +624,9 @@ int multifd_send_sync_main(QEMUFile *f)
if (ret < 0) {
error_report_err(err);
return -1;
+ } else if (ret == 1) {
+ warn_report("The network device is not able to use "
+ "zero-copy-send: copying is being used");
}
}
}
--
2.36.1
- [PATCH v1 0/2] Zero copy improvements (QIOChannel + multifd), Leonardo Bras, 2022/06/27
- [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working,
Leonardo Bras <=
- Re: [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working, Daniel P . Berrangé, 2022/06/28
- Re: [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working, Leonardo Bras Soares Passos, 2022/06/28
- Re: [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working, Daniel P . Berrangé, 2022/06/28
- Re: [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working, Dr. David Alan Gilbert, 2022/06/28
- Re: [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working, Leonardo Bras Soares Passos, 2022/06/28
- Re: [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working, Dr. David Alan Gilbert, 2022/06/28
[PATCH v1 1/2] QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent, Leonardo Bras, 2022/06/27