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>, "Jeremy Fitzhardinge" <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel][Pv-ops][PATCH] Netback multiple tasklet support
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 11 Dec 2009 08:34:07 +0000
Cc: Steven Smith <Steven.Smith@xxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
Delivery-date: Fri, 11 Dec 2009 00:34:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1260468444.3057.7.camel@xxxxxxxxxxxxxxxxxxxxx>
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: <EADF0A36011179459010BDF5142A457501D006B913@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4FA716B1526C7C4DB0375C6DADBC4EA342A7A7E951@xxxxxxxxxxxxxxxxxxxxxxxxx> <EADF0A36011179459010BDF5142A457501D006BBAC@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4FA716B1526C7C4DB0375C6DADBC4EA342A7A7E95E@xxxxxxxxxxxxxxxxxxxxxxxxx> <EADF0A36011179459010BDF5142A457501D11C1BE3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Ian Campbell <Ian.Campbell@xxxxxxxxxx> 10.12.09 19:07 >>>
>On Thu, 2009-12-10 at 17:54 +0000, Jeremy Fitzhardinge wrote: 
>> On 12/10/09 01:07, Ian Campbell wrote:
>> > Subject: xen: ensure locking gnttab_copy_grant_page is safe against 
>> > interrupts.
>> >
>> > Now that netback processing occurs in a thread instead of a tasklet
>> > gnttab_copy_grant_page needs to be safe against interrupts.
>> >
>> > The code is currently commented out in this tree but on 2.6.18 we observed 
>> > a
>> > deadlock where the netback thread called gnttab_copy_grant_page, locked
>> > gnttab_dma_lock for writing, was interrupted and on return from interrupt 
>> > the
>> > network stack's TX tasklet ended up calling __gnttab_dma_map_page via the
>> > hardware driver->swiotlb and tries to take gnttab_dma_lock for reading.
>> >
>> > Correct the commented code so we don't get bitten if/when it is re-enabled.
>> >    
>> What's the issue here?
>a deadlock if someone naively uncomments the existing code.

Btw., can any of you explain why 2.6.18 needs this (and the related) code,
but pv-ops doesn't?

Thanks, Jan

Xen-devel mailing list