qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH kernel v8 3/4] mm: add inerface to offer info ab


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages
Date: Fri, 17 Mar 2017 03:21:21 +0200

On Thu, Mar 16, 2017 at 03:08:46PM +0800, Wei Wang wrote:
> +/*
> + * The record_unused_pages() function is used to record the system unused
> + * pages. The unused pages can be skipped to transfer during live migration.
> + * Though the unused pages are dynamically changing, dirty page logging
> + * mechanisms are able to capture the newly used pages though they were
> + * recorded as unused pages via this function.

You will keep confusing people as long as you keep using
this terminology which only makes sense in a very specific
use and a very specific implementation.

How does guest developer know this does the right thing wrt locking etc?
Look at hypervisor spec and try to figure it all out together?

So stop saying what caller should do, describe what does the *API* does.

You want something like this:

        Get a list of pages in the system that are unused at some point between
        record_unused_pages is called and before it returns, implying that any
        data that was present in these pages before record_unused_pages was
        called is safe to discard. Pages can be used immediately after
        this point and any data written after this point is not safe to discard,
        it is caller's responsibility to either prevent the use or
        detect such pages.

-- 
MST



reply via email to

[Prev in Thread] Current Thread [Next in Thread]