Re: [kvm-devel] [RFC 7/8]KVM: swap out guest pages

From: Avi Kivity
Date: Wed Jul 25 2007 - 09:25:24 EST


Shaohua Li wrote:
>> So write to a file, right? Yes, it can avoid use move to swap, and
>> should be feasible.
> Say you want to write guest pages out to file A of back store fs, in
> kvm->writepage(), we could do:
> 1. lower_page = grap_cache_page(file A's mapping)
> 2. file A's ->prepare_write(lower_page)
> 3. copy kvm guest page to lower_page
> 4. file A's ->commit_write(lower_page)
> then guest page can be freed. Just like the stack fs does. The
> downside is step 1 needs allocate a new page.

Yeah. Hopefully we can find a better solution, the copy isn't pretty
(though it's probably not too bad from a performance point of view
compared to the IPIs involved).

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/