summary refs log tree commit diff stats
path: root/migration/migration-stats.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* migration: Remove transferred atomic counterJuan Quintela2023-10-311-4/+0
| | | | | | | | After last commit, it is a write only variable. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231025091117.6342-12-quintela@redhat.com>
* migration: migration_rate_limit_reset() don't need the QEMUFileJuan Quintela2023-10-311-3/+1
| | | | | | Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231025091117.6342-9-quintela@redhat.com>
* migration: migration_transferred_bytes() don't need the QEMUFileJuan Quintela2023-10-311-3/+1
| | | | | | Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231025091117.6342-8-quintela@redhat.com>
* qemu_file: Use a stat64 for qemu_file_transferredJuan Quintela2023-10-311-0/+4
| | | | | | | | | | This way we can read it from any thread. I checked that it gives the same value as the current one. We never use two qemu_files at the same time. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231025091117.6342-3-quintela@redhat.com>
* migration: Don't abuse qemu_file transferred for RDMAJuan Quintela2023-09-291-0/+4
| | | | | | | | | Just create a variable for it, the same way that multifd does. This way it is safe to use for other thread, etc, etc. Reviewed-by: Leonardo Bras <leobras@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <20230515195709.63843-11-quintela@redhat.com>
* migration: We don't need the field rate_limit_used anymoreJuan Quintela2023-05-181-14/+0
| | | | | | | | | | Since previous commit, we calculate how much data we have send with migration_transferred_bytes() so no need to maintain this counter and remember to always update it. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230515195709.63843-10-quintela@redhat.com>
* migration: Use migration_transferred_bytes() to calculate rate_limitJuan Quintela2023-05-181-1/+7
| | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230515195709.63843-9-quintela@redhat.com>
* migration: Move migration_total_bytes() to migration-stats.cJuan Quintela2023-05-181-0/+11
| | | | | | | | | Once there rename it to migration_transferred_bytes() and pass a QEMUFile instead of a migration object. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230515195709.63843-7-quintela@redhat.com>
* migration: Move rate_limit_max and rate_limit_used to migration_statsJuan Quintela2023-05-181-0/+46
| | | | | | | | | | | | | | | | | | | These way we can make them atomic and use this functions from any place. I also moved all functions that use rate_limit to migration-stats. Functions got renamed, they are not qemu_file anymore. qemu_file_rate_limit -> migration_rate_exceeded qemu_file_set_rate_limit -> migration_rate_set qemu_file_get_rate_limit -> migration_rate_get qemu_file_reset_rate_limit -> migration_rate_reset qemu_file_acct_rate_limit -> migration_rate_account. Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <20230515195709.63843-6-quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: Don't use INT64_MAX for unlimited rateJuan Quintela2023-05-181-0/+6
| | | | | | | | Define and use RATE_LIMIT_DISABLED instead. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Message-Id: <20230515195709.63843-2-quintela@redhat.com>
* migration: Put zero_pages in alphabetical orderJuan Quintela2023-05-051-4/+4
| | | | | | | | | I forgot to move it when I rename it from duplicated_pages. Message-Id: <20230504103357.22130-3-quintela@redhat.com> Reviewed-by: David Edmondson <david.edmondson@oracle.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: Document all migration_statsJuan Quintela2023-05-051-0/+43
| | | | | | | Message-Id: <20230504103357.22130-2-quintela@redhat.com> Reviewed-by: David Edmondson <david.edmondson@oracle.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: Rename RAMStats to MigrationAtomicStatsJuan Quintela2023-05-031-2/+2
| | | | | | | | | | | | It is lousely based on MigrationStats, but that name is taken, so this is the best one that I came with. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de> --- If you have any good suggestion for the name, I am all ears.
* migration: Rename ram_counters to mig_statsJuan Quintela2023-05-031-1/+1
| | | | | | | | migration_stats is just too long, and it is going to have more than ram counters in the near future. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de>
* migration: Move ram_stats to its own file migration-stats.[ch]Juan Quintela2023-05-031-0/+41
There is already include/qemu/stats.h, so stats.h was a bad idea. We want this file to not depend on anything else, we will move all the migration counters/stats to this struct. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de>