From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH RFC] KVM: use kmalloc() for small dirty bitmaps Date: Thu, 21 Oct 2010 17:45:53 +0900 Message-ID: <4CBFFDC1.3020803@oss.ntt.co.jp> References: <20101020183401.b8241b73.yoshikawa.takuya@oss.ntt.co.jp> <4CBF9CAF.4010305@oss.ntt.co.jp> <4CBFFC06.5070809@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, takuya.yoshikawa@gmail.com To: Avi Kivity Return-path: Received: from serv2.oss.ntt.co.jp ([222.151.198.100]:37558 "EHLO serv2.oss.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307Ab0JUIoB (ORCPT ); Thu, 21 Oct 2010 04:44:01 -0400 In-Reply-To: <4CBFFC06.5070809@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: (2010/10/21 17:38), Avi Kivity wrote: > On 10/21/2010 03:51 AM, Takuya Yoshikawa wrote: >> (2010/10/20 18:34), Takuya Yoshikawa wrote: >>> ** NOT TESTED WELL YET ** >>> >>> Currently, we are using vmalloc() for all dirty bitmaps even though >>> they are small enough, say 256 bytes or less. >>> >>> So we use kmalloc() if dirty bitmap size is less than or equal to >>> PAGE_SIZE. >> >> >> Ah, I forgot about the plan to do double buffering. >> >> Making the size of bitmap twice may reduce the benefit of this patch. > > Well, 4K single buffer is 128MB worth of RAM. This won't help live migration much, but will help vga dirty logging, which is active at all times and uses much smaller memory slots. So I think it's worthwhile. > Thanks, the patch I sent now should might be better. Which one do you prefer?