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] ADs over dom0 iSCSI = high page_count()

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] ADs over dom0 iSCSI = high page_count()
From: Joshua Nicholas <jnicholas@xxxxxxxxxxxxxxx>
Date: Fri, 05 Dec 2008 13:44:21 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 05 Dec 2008 10:44:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C55F14A7.1FE3A%keir.fraser@xxxxxxxxxxxxx>
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: <C55F14A7.1FE3A%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081119)
Keir Fraser wrote:
Also in netback.c in net_tx_action_dealloc() after make_tx_response() I see:

    /* Ready for next use. */
    gnttab_reset_grant_page()

Sure this resets the page_mapcount() back to 0, but it also
sets the page_count() to 1 regardless of the current value.

QUESTION 2:  Why does the page_count() have to be set to 1?

A page is only acted on by net_tx_action_dealloc() after it is queued by
netif_page_release(), and that is called from free_pages(), which means
page_count() must be zero at that time (i.e., page is unused).
gnttab_reset_grant_page() is simply setting up the page for its next use.

If the page is *not* actually finished with by the net or blocks layers,
that would be very bad indeed. :-)

gnttab_copy_grant_page() can only return -EBUSY if the
page_mapcount() is set and thus the IO must have gone through
__gnttab_dma_map_page().

So is the page_count() also 0 in netback.c net_tx_action_dealloc()
when the entry has been pending too long and gnttab_copy_grant_page()
(called via copy_pending_req()) returns -EBUSY?

How does the cleanup work when this item is deleted from the
pending_inuse_head due to -EBUSY being returned?

Thank you,

Joshua


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

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