Received: from eggs.gnu.org ([2001:4830:134:3::10]:53752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6cU4-0002Mt-V5 for qemu-devel@nongnu.org; Thu, 12 Apr 2018 09:41:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6cU1-0006dj-QK for qemu-devel@nongnu.org; Thu, 12 Apr 2018 09:41:52 -0400 Received: from 4.mo4.mail-out.ovh.net ([178.32.98.131]:53043) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f6cU1-0006b0-Hb for qemu-devel@nongnu.org; Thu, 12 Apr 2018 09:41:49 -0400 Received: from player773.ha.ovh.net (unknown [10.109.105.37]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id EE65516635A for ; Thu, 12 Apr 2018 15:41:46 +0200 (CEST) References: <20180412101858.21304-1-clg@kaod.org> <20180412115326.GF2704@work-vm> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <3432d654-c562-505e-e341-afe9d8fdf6cb@kaod.org> Date: Thu, 12 Apr 2018 15:41:30 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , "Dr. David Alan Gilbert" Cc: QEMU Developers , Juan Quintela , David Gibson , Alex Williamson , Yulei Zhang , "Tian, Kevin" , joonas.lahtinen@linux.intel.com, zhenyuw@linux.intel.com, Kirti Wankhede , zhi.a.wang@intel.com, Eric Blake On 04/12/2018 02:08 PM, Peter Maydell wrote: > On 12 April 2018 at 12:53, Dr. David Alan Gilbert = wrote: >> * Peter Maydell (peter.maydell@linaro.org) wrote: >>> David suggested on IRC that we would want a flag on the ramblock >>> for "not migratable", because there are other uses for "don't >>> migrate this" than just "is this a ram device". >> >> My original suggestion to your series was with a flag, but I'd forgott= en >> about that by the time I'd made the suggestion to C=C3=A9dric. >> In your case would just adding an extra term to the >> ram_block_is_migratable function work, or do you really need a flag? >=20 > I don't see how else you would identify the ram block that needs > to be skipped. Also I think it's just better design to decouple > the decision about "should we migrate this ram block" from the > migration code itself, and push it up to the code layer that knows > it's creating ram blocks that shouldn't be migrated. Do you mean adding a new RAMBlock flag RAM_NON_MIGRATABLE=20 in exec.c ? That would require to add an extra bool to the=20 following functions : memory_region_init_ram_ptr() qemu_ram_alloc_from_ptr() qemu_ram_alloc_internal() Would that be ok ?=20 Thanks, C.=20