netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: David Miller <davem@davemloft.net>,
	eric.dumazet@gmail.com, netdev@vger.kernel.org,
	xen-devel@lists.xensource.com, rusty@rustcorp.com.au
Subject: Re: SKB paged fragment lifecycle on receive
Date: Sat, 25 Jun 2011 12:58:41 +0100	[thread overview]
Message-ID: <1309003121.5807.20.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <4E04EF8F.6070900@goop.org>

On Fri, 2011-06-24 at 13:11 -0700, Jeremy Fitzhardinge wrote:
> On 06/24/2011 12:46 PM, David Miller wrote:
> > Pages get transferred between different SKBs all the time.
> >
> > For example, GRO makes extensive use of this technique.
> > See net/core/skbuff.c:skb_gro_receive().
> >
> > It is just one example.
> 
> I see, and the new skb doesn't get a destructor copied from the
> original, so there'd be no second callback.

What about if we were to have a per-shinfo destructor (called once for
each page as its refcount goes 1->0, from whichever skb ends up with the
last ref) as well as the skb-destructors. This already handles the
cloning case but when pages are moved between shinfo then would it make
sense for that to be propagated between skb's under these circumstances
and/or require them to be the same? Since in the case of something like
skb_gro_receive the skbs (and hence the frag array pages) are all from
the same 'owner' (even if the skb is actually created by the stack on
their behalf) I suspect this could work?

But I bet this assumption isn't valid in all cases.

In which case I end up wondering about a destructor per page in the frag
array. At which point we might as well consider it as a part of the core
mm stuff rather than something net specific?

Ian.


  parent reply	other threads:[~2011-06-25 11:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 15:43 SKB paged fragment lifecycle on receive Ian Campbell
2011-06-24 17:29 ` Jeremy Fitzhardinge
2011-06-24 17:56   ` Eric Dumazet
2011-06-24 18:21     ` Jeremy Fitzhardinge
2011-06-24 19:46       ` David Miller
2011-06-24 20:11         ` Jeremy Fitzhardinge
2011-06-24 20:27           ` David Miller
2011-06-25 11:58           ` Ian Campbell [this message]
2011-06-27 20:51             ` Jeremy Fitzhardinge
2011-06-28 10:25               ` Ian Campbell
2011-06-27 14:42     ` Ian Campbell
2011-06-27 22:49       ` David Miller
2011-06-28 10:24         ` Ian Campbell
2011-06-24 22:44   ` Ian Campbell
2011-06-24 22:48     ` Jeremy Fitzhardinge
2011-06-26 10:25 ` Michael S. Tsirkin
2011-06-27  9:41   ` Ian Campbell
2011-06-27 10:21     ` Michael S. Tsirkin
2011-06-27 10:54       ` Ian Campbell
2011-06-27 11:19         ` Michael S. Tsirkin

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=1309003121.5807.20.camel@dagon.hellion.org.uk \
    --to=ian.campbell@citrix.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jeremy@goop.org \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --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 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).