From: Keir Fraser Subject: Re: ADs over dom0 iSCSI = high page_count() Date: Fri, 05 Dec 2008 17:25:59 +0000 Message-ID: References: <49395C04.3090105@virtualiron.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49395C04.3090105@virtualiron.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Joshua Nicholas , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 05/12/2008 16:51, "Joshua Nicholas" 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. :-) -- Keir