On Thu, 16 Mar 2017 15:08:46 +0800 Wei Wang <wei.w.wang@xxxxxxxxx> wrote:Thanks for the suggestion. Small helpers do look more elegant. The nice thing is that I also didn't see any performance loss.
From: Liang Li <liang.z.li@xxxxxxxxx>I don't think this will be useful for anything other than
This patch adds a function to provides a snapshot of the present system
unused pages. An important usage of this function is to provide the
unsused pages to the Live migration thread, which skips the transfer of
thoses unused pages. Newly used pages can be re-tracked by the dirty
page logging mechanisms.
virtio-balloon. I guess it would be better to keep this code in the
virtio-balloon driver if possible, even though that's rather a layering
violation :( What would have to be done to make that possible? Perhaps
we can put some *small* helpers into page_alloc.c to prevent things
from becoming too ugly.