On 2026-04-21 16:21, Peter Xu wrote: > Introduce this new counter to remember the total dirty bytes for the whole > system. It will be used for query-migrate command to fetch system-wise > remaining data. > > A prior attempt was made to not use this counter but query directly from > all the modules in a QMP handler, but it exposed some complexity not only > on migration state machine race conditions (where the query may be invoked > anytime of the state machine), or on locking implications (where some of > the query hooks may take BQL, which is illegal at least in a QMP handler). > For more information, see: > > https://lore.kernel.org/r/[email protected] > > This oneliner will resolve everything, except that it is not as accurate. > The hope is it is a worthwhile trade-off solution, after knowing above > challenges. > > Now, there is one more reason we should make each invocation of > save_live_iterate() to be lightweight, because this counter will only get > updated once for each loop over all save_live_iterate() hooks when present. > But that's always the goal. > > Signed-off-by: Peter Xu <[email protected]> > --- > migration/migration-stats.h | 7 +++++++ > migration/savevm.c | 7 +++++++ > 2 files changed, 14 insertions(+)
Reviewed-by: Juraj Marcin <[email protected]>
