Welcome! Log In Create A New Profile

Zero-ing pages when freed

Posted by tgc 
tgc
Zero-ing pages when freed
February 16, 2009 07:55AM
Hi,

I'm working on migrating a virtual machine running Linux, from one host to another, sending the memory via network. Since the hosts are connected via the internet, the connection is somewhat limited, so I compress the memory before sending it, to minimize it.

I'd like to make the conditions for compression better, so I'd like to zero-ing pages when freed, but after reading through mm/page_alloc.c I'm not sure how to do it, so I'd appreciate it if someone could give me a few pointers smiling smiley
tgc
Re: Zero-ing pages when freed
February 18, 2009 07:51AM
Just as a follow up...
After talking to Peter Zijlstra in the kernelnewbies IRC channel, I tried inserting a call to prep_zero_page() in __free_one_page(), which actually got the job done, and compression of the saved memory improved a great deal! Unfortunately the performance penalty for a program which allocates and deallocates a lot is quite high, so it is unlikely that this approach is actually useful...
Re: Zero-ing pages when freed
March 19, 2009 02:15AM
since the page is already free, why do we need to compress it? how about intelligently compressing only those still in use, and then decompress and restore back only all these during migration.....zeroing is not really needed.....
tgc
Re: Zero-ing pages when freed
March 23, 2009 06:47AM
Quote:
tthtlc
since the page is already free, why do we need to compress it? how about intelligently compressing only those still in use, and then decompress and restore back only all these during migration.....zeroing is not really needed.....
When using para virtualization you might be right, but when using full virtualization that approach is not possible.
Author:

Your Email:


Subject:


Message: