Kevin Lawton wrote:

> The processor will mark Accessed and Dirty bits for us in page
> table entries.  So our algorithm could be to periodically look
> at what's been used, and mark some unused pages as not-present and
> mark them as swappable in the host.  This way if the host swaps
> them out, there won't be a conflict with the monitor/guest, since
> a trap will occur on any access to them.

Yes, that's exactly what I meant.

[snip]
> Any of you OS design weenies should chime in here. :^)  I'm sure
> paging strategies have been beat to death - no sense reinventing them.
> 
> Note that we never really do any swapping.  We always pass that off
> to the host OS.  But the concept is the same.  We just use a similar
> strategy without implementing the actual swap.

Well, yes, but the really difficult thing is that the swapping strategy
should normally depend on the memory pressure that the host OS experiences.
I.e. the host swapper tries very hard to free pages only if there is currently
large demand for memory.

Our algorithm isn't aware of the host memory demand, however.  This means
that we either agressively prepare lots of pages for swapping, at the cost
of frequent monitor page faults, even if the host memory pressure is low,
or else we try to keep guest pages locked longer, which can cause out-of-
memory situations for the host although we *could* free pages if we knew
about it :-/

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688

Reply via email to