Skip to contentSkip to conversation

parallelize migration_bitmap_sync()

RFC Paolo Bonzini 2 participants 3 messages Mar 1, 2013 – Mar 2, 2013 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Il 01/03/2013 00:22, Michael R. Hines ha scritto:te

Quoted 9 lines

Hi,

Currently migration_bitmap_sync() is very expensive: on the order of 15-20 milliseconds by my count using timestamps (for a simple 2GB ram virtual machine).
Until new EPT processor versions come out in 2014, we need software support for cutting this time down much lower........by at least an order of magnitude.

Quoted 3 lines

Would anyone be opposed to me writing a patch that creates N threads and dividing up the migration_bitmap_sync() function to have the dirty page scanning run in parallel?

Yes, that's a possibility. You can make a quick prototype using OpenMP.

But Juan is working on making the dirty bitmap really a bitmap (not a "bytemap"). That should speed up migration_bitmap_sync by a factor of 64 (i.e. sizeof(long)*8).

Paolo

#2 lore raw

Oh, that's fantastic - thanks for the response.

- Michael

Quoted 21 lines · Paolo Bonzini

Il 01/03/2013 00:22, Michael R. Hines ha scritto:te

Quoted 9 lines

Hi,

Currently migration_bitmap_sync() is very expensive: on the order of 15-20 milliseconds by my count using timestamps (for a simple 2GB ram virtual machine).
Until new EPT processor versions come out in 2014, we need software support for cutting this time down much lower........by at least an order of magnitude.

Quoted 3 lines

Would anyone be opposed to me writing a patch that creates N threads and dividing up the migration_bitmap_sync() function to have the dirty page scanning run in parallel?

Yes, that's a possibility. You can make a quick prototype using OpenMP.

But Juan is working on making the dirty bitmap really a bitmap (not a "bytemap"). That should speed up migration_bitmap_sync by a factor of 64 (i.e. sizeof(long)*8).

Paolo

#3 lore raw
In reply to Paolo Bonzini

Juan,

Can I try this patch that Paolo mentioned?

Does it go directly from GET_LOG_DIRTY => migration_bitmap?

Or is there still an intermediate sync in your patch?

Thanks,
- Michael

Quoted 21 lines · Paolo Bonzini

Il 01/03/2013 00:22, Michael R. Hines ha scritto:te

Quoted 9 lines

Hi,

Currently migration_bitmap_sync() is very expensive: on the order of 15-20 milliseconds by my count using timestamps (for a simple 2GB ram virtual machine).
Until new EPT processor versions come out in 2014, we need software support for cutting this time down much lower........by at least an order of magnitude.

Quoted 3 lines

Would anyone be opposed to me writing a patch that creates N threads and dividing up the migration_bitmap_sync() function to have the dirty page scanning run in parallel?

Yes, that's a possibility. You can make a quick prototype using OpenMP.

But Juan is working on making the dirty bitmap really a bitmap (not a "bytemap"). That should speed up migration_bitmap_sync by a factor of 64 (i.e. sizeof(long)*8).

Paolo