[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 19/19] migration: Flush receive queue
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v6 19/19] migration: Flush receive queue |
Date: |
Fri, 11 Aug 2017 12:16:49 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Aug 08, 2017 at 06:26:29PM +0200, Juan Quintela wrote:
> Each time that we sync the bitmap, it is a possiblity that we receive
> a page that is being processed by a different thread. We fix this
> problem just making sure that we wait for all receiving threads to
> finish its work before we procedeed with the next stage.
>
> We are low on page flags, so we use a combination that is not valid to
> emit that message: MULTIFD_PAGE and COMPRESSED.
>
> I tried to make a migration command for it, but it don't work because
> we sync the bitmap sometimes when we have already sent the beggining
> of the section, so I just added a new page flag.
>
> Signed-off-by: Juan Quintela <address@hidden>
Oh, I just pop up an idea on whether we can just avoid introduing the
new flush command...
Can we just hash the page address into the channel number we send?
Then if we are sending the same page, it will always be on the same
channel. Since it's on the same channel, the order of arrival is also
deterministic.
It may affect performance, at least in two ways:
- it can be slower, considering we may need to wait on specific
channel when send. But it may not be a big problem since we have a
local IOV array buffer, then when the array buffer is full, the old
send() should mostly be completed I guess.
- it can be faster, considering that we don't need the flush any more,
so receiving is faster (no need to wait for all the channels to
complete on flush).
Makes any sense?
--
Peter Xu
- [Qemu-devel] [PATCH v6 11/19] migration: Start of multiple fd work, (continued)
- [Qemu-devel] [PATCH v6 11/19] migration: Start of multiple fd work, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 12/19] migration: Create ram_multifd_page, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 14/19] migration: Send the fd number which we are going to use for this page, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 13/19] migration: Really use multiple pages at a time, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 15/19] migration: Create thread infrastructure for multifd recv side, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 16/19] migration: Test new fd infrastructure, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 17/19] migration: Rename initial_bytes, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 18/19] migration: Transfer pages over new channels, Juan Quintela, 2017/08/08
- [Qemu-devel] [PATCH v6 19/19] migration: Flush receive queue, Juan Quintela, 2017/08/08
- Re: [Qemu-devel] [PATCH v6 19/19] migration: Flush receive queue,
Peter Xu <=
- Re: [Qemu-devel] [PATCH v6 00/19] Multifd, no-reply, 2017/08/08