From: Wen Congyang <wency@cn.fujitsu.com>
To: rshriram@cs.ubc.ca
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Jiang Yunhong <yunhong.jiang@intel.com>,
Dong Eddie <eddie.dong@intel.com>,
xen devel <xen-devel@lists.xen.org>,
Yang Hongyang <yanghy@cn.fujitsu.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [RFC Patch v3 13/22] blktap2: connect to backup asynchronously
Date: Thu, 25 Sep 2014 13:40:05 +0800 [thread overview]
Message-ID: <5423AAB5.30003@cn.fujitsu.com> (raw)
In-Reply-To: <CAP8mzPMtZUOop8NOkpta1RJksTaGb9OkzBr90yz4L8_bGxpAGg@mail.gmail.com>
On 09/25/2014 03:11 AM, Shriram Rajagopalan wrote:
> On Sep 5, 2014 5:30 AM, "Wen Congyang" <wency@cn.fujitsu.com> wrote:
>>
>> tapdisk2 is a single thread process. If we use remus,
>> we will block in primary_blocking_connect(). The
>> user will not have any chance to talk with tapdisk2.
>> So we should connect to backup asynchronously.
>> Before the connection is established, we queue
>> all I/O request, and handle it when the connection
>> is established.
>>
>
> Hi
> This is useful functionality but also very dangerous. I am afraid your
> comments are quite sparse in addressing how the I/O requests are handled at
> the primary until the connection is established.
> Before this patch, the guest would block halfway through boot, until the
> backup connection is established. What happens after this patch?
This patch doesn't change the behavior. ALl I/O requests are queued in a list.
When the connection is established, we will handle the pended request.
> Will the guest's write requests go through? If so, are you merging writes
> to same block in your internal ring? What about reads? Do you query your in
> memory queue to serve these reads?
Before the connections is established, if there are no pended I/O requests,
the read requests can just go through. If there are some pended I/O requests,
read requests are also pended. All write requests are pended before the connection
is established. After the coonection is established, read reqeusts can just go
through, and write requests are forwarded and go through.
> You are basically introducing a copy on write semantics at the primary
> until a backup connection is established, with the faulting writes and
> subsequent reads being served out of memory. What happens to the network io
> during this wait time? Are all outputs blocked?
> The DRBD version allows the primary to function just like a normal VM until
> Remus is started. When Remus is started, it ensures that both disks are in
> sync before the initial migration starts. Are you doing something similar
> here?
No, block-remus doesn't support it now, and it is hard to implement, because
we don't have meta data, and we don't care the file format.
>
> The patch is unfortunately too mangled to follow. You may have to break it
> up, as the diff lines seem to straddle across function boundaries in
> confusing ways, making it hard to understand.
>
OK, I will try it. And I think I need to update the commit log too.
Thanks
Wen Congyang
next prev parent reply other threads:[~2014-09-25 5:40 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 9:25 [RFC Patch v3 00/22] COarse-grain LOck-stepping Virtual Machines for Non-stop Service Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 01/22] move remus related codes to libxl_remus.c Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 02/22] rename remus device to checkpoint device Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 03/22] adjust the indentation Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 04/22] don't touch remus in checkpoint_device Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 05/22] Update libxl_save_msgs_gen.pl to support return data from xl to xc Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 06/22] Allow slave sends data to master Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 07/22] secondary vm suspend/resume/checkpoint code Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 08/22] primary vm suspend/get_dirty_pfn/resume/checkpoint code Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 09/22] xc_domain_save: flush cache before calling callbacks->postcopy() in colo mode Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 10/22] COLO: xc related codes Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 11/22] send store mfn and console mfn to xl before resuming secondary vm Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 12/22] implement the cmdline for COLO Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 13/22] blktap2: connect to backup asynchronously Wen Congyang
2014-09-24 19:11 ` Shriram Rajagopalan
2014-09-25 5:40 ` Wen Congyang [this message]
2014-09-05 9:25 ` [RFC Patch v3 14/22] switch to unprotected mode before closing Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 15/22] blktap2: move async connect related codes to block-replication.c Wen Congyang
2014-09-24 18:48 ` Shriram Rajagopalan
2014-09-05 9:25 ` [RFC Patch v3 16/22] blktap2: move ramdisk " Wen Congyang
2014-09-24 18:44 ` Shriram Rajagopalan
2014-09-26 5:18 ` Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 17/22] block-colo: implement colo disk replication Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 18/22] support blktap COLO in xl: Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 19/22] libxl/colo: setup and control disk replication for blktap2 backends Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 20/22] setup and control colo-agent for primary vm Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 21/22] setup and control colo-agent for secondary vm Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 22/22] colo: cmdline switches and config vars to control colo-agent Wen Congyang
2014-09-05 9:25 ` [RFC Patch v3 23/22] Introduce "xen-load-devices-state" Wen Congyang
2014-09-05 21:57 ` Stefano Stabellini
[not found] ` <alpine.DEB.2.02.1409052229550.2334@kaball.uk.xensource.com>
2014-09-09 2:47 ` Wen Congyang
[not found] ` <540E6A44.8090507@cn.fujitsu.com>
2014-09-10 19:15 ` Stefano Stabellini
[not found] ` <alpine.DEB.2.02.1409102005450.8137@kaball.uk.xensource.com>
2014-09-11 5:03 ` Wen Congyang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5423AAB5.30003@cn.fujitsu.com \
--to=wency@cn.fujitsu.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=eddie.dong@intel.com \
--cc=ian.campbell@citrix.com \
--cc=laijs@cn.fujitsu.com \
--cc=rshriram@cs.ubc.ca \
--cc=xen-devel@lists.xen.org \
--cc=yanghy@cn.fujitsu.com \
--cc=yunhong.jiang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).