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/
Home Products Support Community News


Re: [Xen-devel][Pv-ops][PATCH] Netback multiple tasklet support

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel][Pv-ops][PATCH] Netback multiple tasklet support
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Fri, 11 Dec 2009 09:24:03 -0500
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>, Dongxiao Xu <dongxiao.xu@xxxxxxxxx>, Steven Smith <Steven.Smith@xxxxxxxxxxxxx>
Delivery-date: Fri, 11 Dec 2009 06:35:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1260524082.10348.4914.camel@xxxxxxxxxxxxxxxxxxxxxx>
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>
References: <4B182D87.6030901@xxxxxxxx> <EADF0A36011179459010BDF5142A457501D11C20F8@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4B187513.80003@xxxxxxxx> <EADF0A36011179459010BDF5142A457501D13FDE62@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4B200727.8040000@xxxxxxxx> <1260436078.23698.45463.camel@xxxxxxxxxxxxxxxxxxxxxx> <4B2135CC.6000004@xxxxxxxx> <1260468444.3057.7.camel@xxxxxxxxxxxxxxxxxxxxx> <4B22120F02000078000251EF@xxxxxxxxxxxxxxxxxx> <1260524082.10348.4914.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
On Fri, Dec 11, 2009 at 09:34:42AM +0000, Ian Campbell wrote:
> On Fri, 2009-12-11 at 08:34 +0000, Jan Beulich wrote:
> > 
> > Btw., can any of you explain why 2.6.18 needs this (and the related)
> > code,but pv-ops doesn't? 
> The 2.6.18 bits came from
> http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/a395e58bd234

Oh boy. That code (and its friends):
/* Has the page been DMA-mapped? */
+       if (unlikely(page_mapped(page))) {

caused us at Virtual Iron so much head-ache. If a guest
had iSCSI backed storage, and the page was grant mapped back
to Dom0, in some cases we would two page references taken with one
put - meaning that 'page_mapped(page))' would true forever.
Joshua Nicholas traced it down to the TCP stack
taking a page reference and never giving it up. The end result is
that during migration (and shutdown) the guest would never die due
to outstanding page grants.

We never troubleshooted the TCP stack, but we implemented a similar
mechanism in the blkback that netback does - squash the page reference
when done. Not the most cleanest but it did the job.

> I can't immediately see why this wouldn't apply to pv ops too. There are
> comments in drivers/pci/xen-iommu.c (e.g. in xen_dma_unmap_page) which
> suggest someone has though about it at some point...

Lets wait and see if its needed ?

Xen-devel mailing list