Re: KVM architecture docs

Zhao Forrest
2008-03-05T06:05:26Z

> > Normally swapping mechanism choose the Least Recently Used(LRU) pages
> > of a process to be swapped out. When KVM uses MMU notifier in linux
> > kernel to implement swapping for VM, could KVM choose LRU pages of a
> > VM to swap out? If so, could you give a brief description about how
> > this is implemented?
> >
>
> The Linux memory manager approximates LRU by scanning pages for the
> accessed bit, which is set in the pte by the processor when a page is
> accessed through that pte. mmu notifiers provide a callback for the
> check, so that kvm can check the accessed bit on the shadow ptes.

If I understand correctly, when NPT is used by KVM in the future, this mmu
notifier can't help much for swapping out pages used by VM, right?
That is, when NPT is used, a balloon para-virt driver running on gust
OS might be more efficient for swapping, am I right?

Thanks,
Forrest