[PATCH v3 00/12] Migration: Make more ram_counters atomic

Juan Quintela posted 12 patches 1 year ago
Failed in applying to current master (apply log)
There is a newer version of this series
migration/ram.h       | 34 ++++++++++-----------
migration/migration.c | 34 ++++++++++++---------
migration/multifd.c   | 10 +++---
migration/ram.c       | 71 +++++++++++++++++++------------------------
4 files changed, 73 insertions(+), 76 deletions(-)
[PATCH v3 00/12] Migration: Make more ram_counters atomic
Posted by Juan Quintela 1 year ago
Hi

In this v3:
- Addressed reviews
- All counters are now atomic, either Stat64 or atomic.
- Rename duplicated to zero_pages
- Rename normal to zero_pages.

Please review.

[v2]
- fix typos found by David Edmondson
- Add review-by tags.

Please review.

[v1]
On previous series we cerate ram_atomic_counters.  But we basically
need that all counters are atomic.  So move back to only have
ram_counters, just with a new type that allows the atomic counters.

Once there, move update of stats out of RAM mutex.
And make multifd_bytes atomic.

Later, Juan.

Juan Quintela (12):
  migration: Merge ram_counters and ram_atomic_counters
  migration: Update atomic stats out of the mutex
  migration: Make multifd_bytes atomic
  migration: Make dirty_sync_missed_zero_copy atomic
  migration: Make precopy_bytes atomic
  migration: Make downtime_bytes atomic
  migration: Make dirty_sync_count atomic
  migration: Make postcopy_requests atomic
  migration: Make dirty_pages_rate atomic
  migration: Make dirty_bytes_last_sync atomic
  migration: Rename duplicate to zero_pages
  migration: Rename normal to full_pages

 migration/ram.h       | 34 ++++++++++-----------
 migration/migration.c | 34 ++++++++++++---------
 migration/multifd.c   | 10 +++---
 migration/ram.c       | 71 +++++++++++++++++++------------------------
 4 files changed, 73 insertions(+), 76 deletions(-)

-- 
2.39.2
Re: [PATCH v3 00/12] Migration: Make more ram_counters atomic
Posted by Peter Xu 1 year ago
On Wed, Apr 19, 2023 at 06:24:03PM +0200, Juan Quintela wrote:
> Juan Quintela (12):
>   migration: Merge ram_counters and ram_atomic_counters
>   migration: Update atomic stats out of the mutex
>   migration: Make multifd_bytes atomic
>   migration: Make dirty_sync_missed_zero_copy atomic
>   migration: Make precopy_bytes atomic
>   migration: Make downtime_bytes atomic
>   migration: Make dirty_sync_count atomic
>   migration: Make postcopy_requests atomic
>   migration: Make dirty_pages_rate atomic
>   migration: Make dirty_bytes_last_sync atomic
>   migration: Rename duplicate to zero_pages
>   migration: Rename normal to full_pages

Reviewed-by: Peter Xu <peterx@redhat.com>

One trivial comment on last patch: full_pages is slightly confusing to me,
probably because "normal" matches with the code (save_normal_page()),
meanwhile "full" makes me think of small/huge page where it can be a
huge/full page (comparing to a "partial" page).

I'd think "normal_pages" could be slightly better? No strong opinions
though.

-- 
Peter Xu
Re: [PATCH v3 00/12] Migration: Make more ram_counters atomic
Posted by Juan Quintela 1 year ago
Peter Xu <peterx@redhat.com> wrote:
> On Wed, Apr 19, 2023 at 06:24:03PM +0200, Juan Quintela wrote:
>> Juan Quintela (12):
>>   migration: Merge ram_counters and ram_atomic_counters
>>   migration: Update atomic stats out of the mutex
>>   migration: Make multifd_bytes atomic
>>   migration: Make dirty_sync_missed_zero_copy atomic
>>   migration: Make precopy_bytes atomic
>>   migration: Make downtime_bytes atomic
>>   migration: Make dirty_sync_count atomic
>>   migration: Make postcopy_requests atomic
>>   migration: Make dirty_pages_rate atomic
>>   migration: Make dirty_bytes_last_sync atomic
>>   migration: Rename duplicate to zero_pages
>>   migration: Rename normal to full_pages
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
>
> One trivial comment on last patch: full_pages is slightly confusing to me,
> probably because "normal" matches with the code (save_normal_page()),
> meanwhile "full" makes me think of small/huge page where it can be a
> huge/full page (comparing to a "partial" page).
>
> I'd think "normal_pages" could be slightly better? No strong opinions
> though.

Ok, will move it back to normal.

I think this cames from Spanish, if some pages are normal, the others
are non-normal, and that sounds really weird.

In this case full was used with the meaning that we are sending the full
page, but I can see that it is confusing that a non-full page is a
partial page.

Later, Juan.