From: Joshua Nicholas <jnicholas@virtualiron.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: ADs over dom0 iSCSI = high page_count()
Date: Fri, 05 Dec 2008 13:44:21 -0500 [thread overview]
Message-ID: <49397685.3000605@virtualiron.com> (raw)
In-Reply-To: <C55F14A7.1FE3A%keir.fraser@eu.citrix.com>
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
next prev parent reply other threads:[~2008-12-05 18:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-05 16:51 ADs over dom0 iSCSI = high page_count() Joshua Nicholas
2008-12-05 17:25 ` Keir Fraser
2008-12-05 18:44 ` Joshua Nicholas [this message]
2008-12-05 20:31 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49397685.3000605@virtualiron.com \
--to=jnicholas@virtualiron.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.