On Tue, 11 Nov 2008 20:48:16 +0200KSM is separate driver , it doesn't change anything in the VM but adding two helper functions.
Avi Kivity <avi@xxxxxxxxxx> wrote:
Andrew Morton wrote:
The whole approach seems wrong to me. The kernel lost track of theseFor kvm, the kernel never knew those pages were shared. They are loaded from independent (possibly compressed and encrypted) disk images. These images are different; but some pages happen to be the same because they came from the same installation media.
pages and then we run around post-facto trying to fix that up again. Please explain (for the changelog) why the kernel cannot get this right
via the usual sharing, refcounting and COWing approaches.
What userspace-only changes could fix this? Identify the common data,
write it to a flat file and mmap it, something like that?
For OpenVZ the situation is less clear, but if you allow users to independently upgrade their chroots you will eventually arrive at the same scenario (unless of course you apply the same merging strategy at the filesystem level).
hm.
There has been the occasional discussion about idenfifying all-zeroes
pages and scavenging them, repointing them at the zero page. Could
this infrastructure be used for that? (And how much would we gain from
it?)
[I'm looking for reasons why this is more than a muck-up-the-vm-for-kvm
thing here ;) ]