First page Back Continue Last page Overview Graphics
Possible solutions
Allow UML to declare pages as clean even though they're not
- UML process text is clean to UML, but dirty to host
- UML declares it to host as clean
- Host is free to free it without swapping it
- UML gets signal when it next accesses it
Notes:
A possible solution is to allow UML to declare to the host that pages are clean even though they're dirty on the host. Pages that are clean within UML, such as UML process text, are dirty on the host because they're been copied from elsewhere into anonymous memory. The host has no idea that these pages have a backing store, let alone that they are clean with respect to it, so it considers them dirty, and will write them to swap if necessary.
They are clean within UML because UML does know that they are the same as their backing store. To take advantage of this knowlege, the UML could tell the host to consider them to be clean. Then, if the host needs memory, it can simply free those pages without writing them to swap. The only thing that is needed at this point is for the UML to receive a signal when it next tries to access any of those pages which have been released. This will tell it to read it in from the backing store before trying to use the data.
This mechanism would allow the host to avoid writing those pages to swap, saving IO, and making those pages available for reuse much more quickly.