From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [RFC] Moving dirty bitmaps to userspace - Double buffering approach Date: Mon, 15 Mar 2010 19:50:44 +0900 Message-ID: <4B9E1104.5010209@oss.ntt.co.jp> References: <4B94B3D3.2010801@oss.ntt.co.jp> <20100315083306.GA30179@amt.cnet> <4B9DF491.5010805@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, =?UTF-8?B?RmVybmFuZG8gTHVpcyBWw6F6cXVleiBDYW8=?= To: Avi Kivity Return-path: Received: from serv2.oss.ntt.co.jp ([222.151.198.100]:49480 "EHLO serv2.oss.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136Ab0COKsI (ORCPT ); Mon, 15 Mar 2010 06:48:08 -0400 In-Reply-To: <4B9DF491.5010805@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > On 03/15/2010 10:33 AM, Marcelo Tosatti wrote: >> >>> Are there any good ways to solve this kind of problems? >>> >> You can introduce a new get_dirty_log ioctl that passes the address >> of the next bitmap in userspace, and use it (after pinning with >> get_user_pages), instead of vmalloc'ing. >> Thank you for your advice! >> > > No pinning please, put_user_bit() or set_bit_user(). > > (can be implemented generically using get_user_pages() and > kmap_atomic(), but x86 should get an optimized implementation) > Given your advice last time, I started this with my colleague. -- We were just talking about how to strugle with every architectures. As your comment, we'll make the generic implementation with optimized one for x86 first. Thanks Takuya