From: Sean Christopherson <sean.j.christopherson@intel.com>
To: "Zhoujian (jay)" <jianjay.zhou@huawei.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"peterx@redhat.com" <peterx@redhat.com>,
"wangxin (U)" <wangxinxin.wang@huawei.com>,
"linfeng (M)" <linfeng23@huawei.com>,
"Huangweidong (C)" <weidong.huang@huawei.com>,
"Liujinsong (Paul)" <liu.jinsong@huawei.com>
Subject: Re: [PATCH] KVM: x86: enable dirty log gradually in small chunks
Date: Wed, 19 Feb 2020 07:08:21 -0800 [thread overview]
Message-ID: <20200219150820.GA15888@linux.intel.com> (raw)
In-Reply-To: <B2D15215269B544CADD246097EACE7474BAFEC8D@DGGEMM528-MBX.china.huawei.com>
On Wed, Feb 19, 2020 at 06:58:33AM +0000, Zhoujian (jay) wrote:
> > > --- a/include/linux/kvm_host.h
> > > +++ b/include/linux/kvm_host.h
> > > @@ -360,6 +360,11 @@ static inline unsigned long
> > *kvm_second_dirty_bitmap(struct kvm_memory_slot *mem
> > > return memslot->dirty_bitmap + len / sizeof(*memslot->dirty_bitmap);
> > > }
> > >
> > > +static inline void kvm_set_first_dirty_bitmap(struct kvm_memory_slot
> > > +*memslot) {
> > > + bitmap_set(memslot->dirty_bitmap, 0, memslot->npages); }
> >
> > I'd prefer this be open coded with a comment, e.g. "first" is misleading because
> > it's really "initial dirty bitmap for this memslot after enabling dirty logging".
>
> kvm_create_dirty_bitmap allocates twice size as large as the actual dirty bitmap
> size, and there is kvm_second_dirty_bitmap to get the second part of the map,
> this is the reason why I use first_dirty_bitmap here, which means the first part
> (not first time) of the dirty bitmap.
Ha, I didn't consider that usage of "first", obviously :-)
> I'll try to be more clear if this is misleading...
next prev parent reply other threads:[~2020-02-19 15:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 11:00 [PATCH] KVM: x86: enable dirty log gradually in small chunks Jay Zhou
2020-02-18 11:39 ` Paolo Bonzini
2020-02-18 13:39 ` Zhoujian (jay)
2020-02-18 17:26 ` Peter Xu
2020-02-19 4:11 ` Zhoujian (jay)
2020-02-18 21:23 ` Sean Christopherson
2020-02-19 6:58 ` Zhoujian (jay)
2020-02-19 15:08 ` Sean Christopherson [this message]
2020-02-20 6:05 ` kbuild test robot
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=20200219150820.GA15888@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=jianjay.zhou@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=linfeng23@huawei.com \
--cc=liu.jinsong@huawei.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.