Re: [PATCH v2 05/13] ram.c: Do not call save_page_header() from compress threads

2023-04-28 Thread Juan Quintela
Lukas Straub wrote: > save_page_header() accesses several global variables, so calling it > from multiple threads is pretty ugly. > > Instead, call save_page_header() before writing out the compressed > data from the compress buffer to the migration stream. > > This also makes the core compress co

[PATCH v2 05/13] ram.c: Do not call save_page_header() from compress threads

2023-04-20 Thread Lukas Straub
save_page_header() accesses several global variables, so calling it from multiple threads is pretty ugly. Instead, call save_page_header() before writing out the compressed data from the compress buffer to the migration stream. This also makes the core compress code more independend from ram.c.