On 01/05/2025 05:52, Peter Xu wrote: >> +#include <sys/resource.h> >> +#define REQUIRED_MEMLOCK (128 * 1024 * 1024) // 128MB > How does the 128M come from? Is it correlated to the VM size somehow? > Btw, migrate_start() says for x86 we use 150MB VM.
Good question, After a brief debugging session, it was discovered that the size of mlock remains relatively stable at around 100M in this test(even though enlarge the guest memory to 1024M), while the remainder is transmitted to the destination using zero-page compression. > > When you feel confident, feel free to send a formal patch, it can also > include the reposted version of the current patch so that can be a series. > > It'll also be great if you could make sure they apply on top of: > > https://gitlab.com/peterx/qemu/-/tree/migration-staging No problem. Thanks Zhijian > > Thanks,