From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wenchao Xia Subject: Re: [RFC] provide an API to userspace doing memory snapshot Date: Tue, 16 Apr 2013 15:54:15 +0800 Message-ID: <516D03A7.1060206@gmail.com> References: <516BFAA8.2030608@gmail.com> <20130416055112.GB5286@stefanha-thinkpad.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm-devel To: Stefan Hajnoczi Return-path: Received: from mail-qe0-f43.google.com ([209.85.128.43]:35206 "EHLO mail-qe0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755262Ab3DPHyb (ORCPT ); Tue, 16 Apr 2013 03:54:31 -0400 Received: by mail-qe0-f43.google.com with SMTP id f6so104175qej.16 for ; Tue, 16 Apr 2013 00:54:30 -0700 (PDT) In-Reply-To: <20130416055112.GB5286@stefanha-thinkpad.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: =E4=BA=8E 2013-4-16 13:51, Stefan Hajnoczi =E5=86=99=E9=81=93: > On Mon, Apr 15, 2013 at 09:03:36PM +0800, Wenchao Xia wrote: >> I'd like to add/export an function which allow userspace program >> to take snapshot for a region of memory. Since it is not implemented= yet >> I will describe it as C APIs, it is quite simple now and if it is wo= rthy >> I'll improve the interface later: > > We talked about a simple approach using fork(2) on IRC yesterday. > > Is this email outdated? > > Stefan > No, after the discuss on IRC, I agree that fork() is a simpler method to do it, which can comes to qemu fast, since user wants it. With a more consideration, still I think a KVM's mem snapshot would be an long term solution for it: The source of the problem comes from acceleration module, kvm.ko, wh= en qemu does not use it, no troubles. This means an acceleration module missed a function while caller requires. My instinct idea is: when acceleration module replace a pure software one, it should try provide all parts or not stop software filling the gap, and doing so brings benefits, so hope to add it. My API description is old, the core is COW pages, maybe redesign if reasonable.