Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-06-02 Thread Peter Xu
On Mon, Jun 03, 2019 at 02:10:34PM +0800, Wei Yang wrote: > On Mon, Jun 03, 2019 at 02:05:47PM +0800, Wei Yang wrote: > >On Mon, Jun 03, 2019 at 01:40:13PM +0800, Peter Xu wrote: > >> > >>Ah I see, thanks for the pointer. Then I would agree it's fine. > >> > >>I'm not an expert of TCG - I'm curiou

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-06-02 Thread Wei Yang
On Mon, Jun 03, 2019 at 02:05:47PM +0800, Wei Yang wrote: >On Mon, Jun 03, 2019 at 01:40:13PM +0800, Peter Xu wrote: >> >>Ah I see, thanks for the pointer. Then I would agree it's fine. >> >>I'm not an expert of TCG - I'm curious on why all those three dirty >>bitmaps need to be set at the very be

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-06-02 Thread Wei Yang
On Mon, Jun 03, 2019 at 01:40:13PM +0800, Peter Xu wrote: > >Ah I see, thanks for the pointer. Then I would agree it's fine. > >I'm not an expert of TCG - I'm curious on why all those three dirty >bitmaps need to be set at the very beginning. IIUC at least the VGA >bitmap should not require that

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-06-02 Thread Peter Xu
On Mon, Jun 03, 2019 at 11:36:00AM +0800, Wei Yang wrote: > On Mon, Jun 03, 2019 at 10:35:27AM +0800, Peter Xu wrote: > >On Mon, Jun 03, 2019 at 09:33:05AM +0800, Wei Yang wrote: > >> On Sat, Jun 01, 2019 at 11:34:41AM +0800, Peter Xu wrote: > >> >On Fri, May 31, 2019 at 05:43:37PM +0100, Dr. David

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-06-02 Thread Wei Yang
On Mon, Jun 03, 2019 at 10:35:27AM +0800, Peter Xu wrote: >On Mon, Jun 03, 2019 at 09:33:05AM +0800, Wei Yang wrote: >> On Sat, Jun 01, 2019 at 11:34:41AM +0800, Peter Xu wrote: >> >On Fri, May 31, 2019 at 05:43:37PM +0100, Dr. David Alan Gilbert wrote: >> >> * Wei Yang (richardw.y...@linux.intel.c

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-06-02 Thread Peter Xu
On Mon, Jun 03, 2019 at 09:33:05AM +0800, Wei Yang wrote: > On Sat, Jun 01, 2019 at 11:34:41AM +0800, Peter Xu wrote: > >On Fri, May 31, 2019 at 05:43:37PM +0100, Dr. David Alan Gilbert wrote: > >> * Wei Yang (richardw.y...@linux.intel.com) wrote: > >> > During migration, we would sync bitmap from

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-06-02 Thread Wei Yang
On Sat, Jun 01, 2019 at 11:34:41AM +0800, Peter Xu wrote: >On Fri, May 31, 2019 at 05:43:37PM +0100, Dr. David Alan Gilbert wrote: >> * Wei Yang (richardw.y...@linux.intel.com) wrote: >> > During migration, we would sync bitmap from ram_list.dirty_memory to >> > RAMBlock.bmap in cpu_physical_memory

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-05-31 Thread Peter Xu
On Fri, May 31, 2019 at 05:43:37PM +0100, Dr. David Alan Gilbert wrote: > * Wei Yang (richardw.y...@linux.intel.com) wrote: > > During migration, we would sync bitmap from ram_list.dirty_memory to > > RAMBlock.bmap in cpu_physical_memory_sync_dirty_bitmap(). > > > > Since we set RAMBlock.bmap and

Re: [Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-05-31 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > During migration, we would sync bitmap from ram_list.dirty_memory to > RAMBlock.bmap in cpu_physical_memory_sync_dirty_bitmap(). > > Since we set RAMBlock.bmap and ram_list.dirty_memory both to all 1, this > means at the first round this sync is

[Qemu-devel] [PATCH] migratioin/ram: leave RAMBlock->bmap blank on allocating

2019-05-06 Thread Wei Yang
During migration, we would sync bitmap from ram_list.dirty_memory to RAMBlock.bmap in cpu_physical_memory_sync_dirty_bitmap(). Since we set RAMBlock.bmap and ram_list.dirty_memory both to all 1, this means at the first round this sync is meaningless and is a duplicated work. Leaving RAMBlock->bma