From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbYX0-0006e2-Bu for qemu-devel@nongnu.org; Tue, 07 Oct 2014 13:26:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbYWu-0004xD-58 for qemu-devel@nongnu.org; Tue, 07 Oct 2014 13:26:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbYWt-0004x9-Tc for qemu-devel@nongnu.org; Tue, 07 Oct 2014 13:26:32 -0400 Date: Tue, 7 Oct 2014 18:25:48 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20141007172547.GQ2404@work-vm> References: <1412356087-16115-1-git-send-email-aarcange@redhat.com> <1412356087-16115-11-git-send-email-aarcange@redhat.com> <20141006085540.GD2336@work-vm> <20141006164156.GA31075@redhat.com> <20141007170731.GO2404@work-vm> <54341F77.6060400@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54341F77.6060400@redhat.com> Subject: Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Robert Love , Dave Hansen , Jan Kara , KVM list , Neil Brown , Stefan Hajnoczi , qemu-devel@nongnu.org, linux-mm , KOSAKI Motohiro , Michel Lespinasse , Andrea Arcangeli , Taras Glek , Andrew Jones , Juan Quintela , Hugh Dickins , Isaku Yamahata , Mel Gorman , Sasha Levin , Android Kernel Team , "Huangpeng (Peter)" , Andres Lagar-Cavilla , Christopher Covington , Anthony Liguori , Keith Packard , Wenchao Xia , Linux API , Linux Kernel Mailing List , Andy Lutomirski , Minchan Kim , Dmitry Adamushko , Johannes Weiner , Mike Hommey , Andrew Morton , Linus Torvalds , Peter Feiner * Paolo Bonzini (pbonzini@redhat.com) wrote: > Il 07/10/2014 19:07, Dr. David Alan Gilbert ha scritto: > >> > > >> > So I'd *much* rather have a "write()" style interface (ie _copying_ > >> > bytes from user space into a newly allocated page that gets mapped) > >> > than a "remap page" style interface > > Something like that might work for the postcopy case; it doesn't work > > for some of the other uses that need to stop a page being changed by the > > guest, but then need to somehow get a copy of that page internally to QEMU, > > and perhaps provide it back later. > > I cannot parse this. Which uses do you have in mind? Is it for > QEMU-specific or is it for other applications of userfaults? > As long as the page is atomically mapped, I'm not sure what the > difference from remap_anon_pages are (as far as the destination page is > concerned). Are you thinking of having userfaults enabled on the source > as well? What I'm talking about here is when I want to stop a page being accessed by the guest, do something with the data in qemu, and give it back to the guest sometime later. The main example is: Memory pools for guests where you swap RAM between a series of VM hosts. You have to take the page out, send it over the wire, sometime later if the guest tries to access it you userfault and pull it back. (There's at least one or two companies selling something like this, and at least one Linux based implementations with their own much more involved kernel hacks) Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK