WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xen-blkfront: simplify resume?

To: Daniel Stodden <daniel.stodden@xxxxxxxxxx>, Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xen-blkfront: simplify resume?
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Thu, 24 Mar 2011 21:47:54 +0000
Cc:
Delivery-date: Thu, 24 Mar 2011 14:49:11 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=h9kO9UaMNgrl0tpY5sIsxJCD/YJM022VpSveOa5krug=; b=VAaBbipTjWIn4yHu2LrRpI5UOKhA7gaf6FdcfIwyubHeGNieJAuHBm6MEOiK7IS43p fW/+I07XElnL5dlp13T0OvPIwgCYUCsm8UQwzCM8L7Oz9XLj0nPpu1dzhr/TQHtCHWo4 D+lZYn5PXjb0Neah9rL3gg9fC1igfPqz9BEG8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=CXSjsoYuh1W7isAeMvqnP7kSaQSpsGJWnb3c4t79opb8j/kqtX4XTR+/GfvFtHDxB/ uoZGvo6FWtdxNi0tofYOxZ03XkM6av+bPbx+uXWOhEjYN8RjdKhk41tC9Z7JmaRfAB+v uCaukirBv9+y54w22q+topYo3NnHYeFGPr1RM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1300959061.3507.1600.camel@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvqbSE6dA2oIpcOeEiLbBA4VDeiig==
Thread-topic: [Xen-devel] xen-blkfront: simplify resume?
User-agent: Microsoft-Entourage/12.28.0.101117
On 24/03/2011 09:31, "Daniel Stodden" <daniel.stodden@xxxxxxxxxx> wrote:

> Dear xen-devel.
> 
> I think the blkif_recover (blkfront's transparent VM resume) stuff looks
> quite overcomplicated.
> 
> We copy the ring message to a shadow request allocated during submit, a
> process involving some none-obvious-looking get_id_from_freelist()
> subroutine to obtain a vector slot, and a memcpy.
> 
> When receiving a resume callback from xenstore, we memcpy the entire
> shadow vector, reset the original one to zero, then reallocate the
> thereby freed shadow entries and not only copy the message on the ring,
> but the shadow back into the shadow vector just freed to keep stuff
> consistent. Hmmm.
> 
> I wonder, should we just take the pending request and push it back onto
> the request_queue (with a blk_requeue_request)?

Are you suggesting to get rid of the shadow state? It is needed, because
in-flight requests can be overwritten by out-of-order responses written into
the shared ring by the backend driver.

 -- Keir

> Different from the present code, this should also help preserve original
> submit order if done right. (Don't panic, not like it matters a lot
> anymore since the block barrier flags are gone.)
> 
> If we want to keep the shadow copy, let's do so with a prep_rq_fn. It
> gets called before the request gets pulled off the queue. Looks nicer,
> and one can arrange things so it only gets called once.
> 
> Counter opinions?
> 
> Thanks,
> Daniel
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>