From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 3/6] KVM: Dirty memory tracking for performant checkpointing and improved live migration Date: Wed, 4 May 2016 20:57:34 +0200 Message-ID: <20160504185734.GC27590@potion> References: <33d8668e-2bba-af91-069e-6452609a6ff0@linux.intel.com> <20160429181911.GA2687@potion> <20160503141118.GA27975@potion> <32d8060e-648c-cf99-970a-3ddadc6a501a@linux.intel.com> <20160504131314.GA27590@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Huang, Kai" , Paolo Bonzini , "kvm@vger.kernel.org" To: "Cao, Lei" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49142 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752377AbcEDS5i (ORCPT ); Wed, 4 May 2016 14:57:38 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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=C4=8Dm=C3=A1=C5=99 wrote: >>> Good designs so far seem to be: >>> memslot -> lockless radix tree >>> and >>> vcpu -> memslot -> list (memslot -> vcpu -> list) >>> >>=20 >> There is no need for lookup, the dirty log is fetched in sequence, s= o why use >> radix tree with added complexity but no benefit? >>=20 >> List can be designed to be lockless, so memslot -> lockless fixed li= st? >=20 > Never mind, lookup is needed to avoid duplicates. We can use list+bit= map, 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 fe= w duplicates, depending on how dirtying and vm-exit on write to clean pa= ge cooperate. Duplicates don't introduce any bugs and we could also chec= k last few entries in the list to weed out most likely cases.)