From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUnRt-0001DM-R3 for qemu-devel@nongnu.org; Sun, 27 Nov 2011 17:43:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUnRr-0005aQ-93 for qemu-devel@nongnu.org; Sun, 27 Nov 2011 17:43:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUnRq-0005a1-Ta for qemu-devel@nongnu.org; Sun, 27 Nov 2011 17:43:47 -0500 From: Juan Quintela In-Reply-To: (Peter Feiner's message of "Fri, 25 Nov 2011 14:02:39 -0500") References: Date: Sun, 27 Nov 2011 23:43:42 +0100 Message-ID: <87ipm5uqxt.fsf@trasno.mitica> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] pc: map pc ram from user-specified file Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Feiner Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Peter Feiner wrote: > Enables providing a backing file for the PC's ram. The file is specified by the > new -pcram-file option. The file is mmap'd shared, so the RAMBlock that it backs > doesn't need to be saved by vm_save / migration. > > Signed-off-by: Peter Feiner Hi Do you have any performance number for this? And examples on how your are using it? > +#ifdef __linux__ > + new_block->host = mem_file_ram_alloc(new_block, size); > + if (new_block->host) { > + assert(!host); > + } else > +#endif > if (host) { This test is (at least suspicious). Shouldn't we check first if host is not NULL? (Not that I fully understand that part) Thanks, Juan.