kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai Huang <kaih.linux@gmail.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: "Cao, Lei" <Lei.Cao@stratus.com>,
	"Huang, Kai" <kai.huang@linux.intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 3/6] KVM: Dirty memory tracking for performant checkpointing and improved live migration
Date: Sat, 7 May 2016 13:48:03 +1200	[thread overview]
Message-ID: <572D4953.30108@gmail.com> (raw)
In-Reply-To: <20160506120909.GK30059@potion>



On 05/07/2016 12:09 AM, Radim Krčmář wrote:
> 2016-05-06 21:46+1200, Kai Huang:
>> On Thu, May 5, 2016 at 6:57 AM, Radim Krčmář <rkrcmar@redhat.com> wrote:
>>> 2016-05-04 18:33+0000, Cao, Lei:
>>>>   On 5/4/2016 1:15 PM, Cao, Lei wrote:
>>>>>   On 5/4/2016 9:13 AM, Radim Krčmář wrote:
>>>>>>   Good designs so far seem to be:
>>>>>>    memslot -> lockless radix tree
>>>>>>   and
>>>>>>    vcpu -> memslot -> list  (memslot -> vcpu -> list)
>>>>>>
>>>>>   There is no need for lookup, the dirty log is fetched in
>>>>> sequence, so why use
>>>>>   radix tree with added complexity but no benefit?
>>>>>
>>>>>   List can be designed to be lockless, so memslot -> lockless
>>>>> fixed list?
>>>>   Never mind, lookup is needed to avoid duplicates. We can use
>>>> list+bitmap, but
>>>>   it's obviously not as efficient as radix tree.
>>> Are duplicates a significant problem?
>>>
>>> (The dirtied page is marked as dirty, so we should have zero to very few
>>>   duplicates, depending on how dirtying and vm-exit on write to clean
>>> page
>>>   cooperate.  Duplicates don't introduce any bugs and we could also check
>>>   last few entries in the list to weed out most likely cases.)
>> I don't think duplicated pages are significant problem. The point is we
>> don't lose pages.
>>
>> I actually don't quite follow why there will be duplicated pages. Is it
>> because lockless thing?
> Not really.  The ugly bitmap to avoid duplicates in this series makes me
> think that hardware does force an exit on multiple VCPUs if they
> concurrently write to the same clear page.  A list, or any per-vcpu
> structure, will have multiple dirty entries if that happens.
Oh yes. This makes sense. This also counts a disadvantage of per-vcpu 
structure.

Thanks,
-Kai

  parent reply	other threads:[~2016-05-07  1:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201604261855.u3QItn85024244@dev1.sn.stratus.com>
2016-04-26 19:24 ` [PATCH 3/6] KVM: Dirty memory tracking for performant checkpointing and improved live migration Cao, Lei
2016-04-28  9:13   ` Huang, Kai
2016-04-28 19:58     ` Cao, Lei
2016-04-29 18:19       ` Radim Krčmář
2016-05-02 15:24         ` Cao, Lei
2016-05-02 15:46           ` Radim Krčmář
2016-05-02 15:51             ` Cao, Lei
2016-05-03  6:06           ` Huang, Kai
2016-05-03 14:11             ` Radim Krčmář
2016-05-04  7:45               ` Huang, Kai
2016-05-04 13:13                 ` Radim Krčmář
2016-05-04 13:51                   ` Cao, Lei
2016-05-04 17:15                   ` Cao, Lei
2016-05-04 18:33                     ` Cao, Lei
2016-05-04 18:57                       ` Radim Krčmář
2016-05-06  9:46                         ` Kai Huang
2016-05-06 12:09                           ` Radim Krčmář
2016-05-06 15:13                             ` Cao, Lei
2016-05-06 16:04                               ` Radim Krčmář
2016-05-24 17:19                                 ` Cao, Lei
2016-06-30 13:49                                 ` Cao, Lei
2016-05-07  1:48                             ` Kai Huang [this message]
2016-05-04 19:27                     ` Radim Krčmář
2016-05-05 16:26                       ` Radim Krčmář
2016-05-06 15:19                         ` Cao, Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=572D4953.30108@gmail.com \
    --to=kaih.linux@gmail.com \
    --cc=Lei.Cao@stratus.com \
    --cc=kai.huang@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).