From: David Miller <davem@davemloft.net>
To: jeremy@goop.org
Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org
Subject: Re: [PATCH RFC] net: add alloc_skb_mustcopy() to make clone copy
Date: Tue, 20 Oct 2009 00:52:47 -0700 (PDT) [thread overview]
Message-ID: <20091020.005247.59537364.davem@davemloft.net> (raw)
In-Reply-To: <4ADD5666.9090409@goop.org>
From: Jeremy Fitzhardinge <jeremy@goop.org>
Date: Tue, 20 Oct 2009 15:19:18 +0900
> When doing network IO on behalf of guests, a Xen dom0 kernel gets granted
> pages from guests. These pages cannot be released normally, so we must
> handle releasing them specially, which can do with a skb_destructor.
>
> This is complicated by the fact that the lifetime of an skb's
> frags can be extended via cloning. To address this, this patch adds
> alloc_skb_mustcopy() which allocates an skb with fclone==SKB_MUST_COPY.
> If skb_clone() sees an skb with this set, it simply calls skb_copy
> instead so that there are no aliases to the granted pages.
>
> /* Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> */
This looks perfectly fine to me.
Let me know if it actually works out for you and we can merge
this.
prev parent reply other threads:[~2009-10-20 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 6:19 [PATCH RFC] net: add alloc_skb_mustcopy() to make clone copy Jeremy Fitzhardinge
2009-10-20 7:52 ` David Miller [this message]
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=20091020.005247.59537364.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jeremy@goop.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).