From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Eric Dumazet <edumazet@google.com>,
xen-devel <xen-devel@lists.xen.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Konrad Rzeszutek Wilk <konrad@kernel.org>,
Sander Eikelenboom <linux@eikelenboom.it>
Subject: Re: compound skb frag pages appearing in start_xmit
Date: Tue, 09 Oct 2012 16:33:37 +0200 [thread overview]
Message-ID: <1349793217.21172.4497.camel@edumazet-glaptop> (raw)
In-Reply-To: <1349792617.21847.205.camel@zakaz.uk.xensource.com>
On Tue, 2012-10-09 at 15:23 +0100, Ian Campbell wrote:
> On Tue, 2012-10-09 at 15:01 +0100, Eric Dumazet wrote:
> > On Tue, 2012-10-09 at 15:54 +0200, Eric Dumazet wrote:
> > > On Tue, 2012-10-09 at 14:47 +0100, Ian Campbell wrote:
> > > > Hi Eric,
> > > >
> > >
> > > Hi Ian
> > >
> > > > Sander has discovered an issue where xen-netback is given a compound
> > > > page as one of the skb frag pages to transmit. Currently netback can
> > > > only handle PAGE_SIZE'd frags and bugs out.
> > > >
> > > > I suspect this is something to do with 69b08f62e174 "net: use bigger
> > > > pages in __netdev_alloc_frag", although perhaps not because it looks
> > > > like only tg3 uses it and Sander has an r8169. Also tg3 seems to only
> > > > call netdev_alloc_frag for sizes < PAGE_SIZE. I'm probably missing
> > > > something.
> > >
> > >
> > > Its not the commit you want ;)
> >
> > Hmm, I take it back. It also can give you the same problem :
> >
> > We use this allocator for rx path of drivers :
> >
> > __netdev_alloc_skb()
> >
> > So its now absolutely possible that one skb->head is backed by a order-3
> > page.
> >
> > Is the problem coming from xen_netbk_count_skb_slots() ?
> >
> > Give me more information if you want me to help.
>
> The interesting code is in netbk_gop_skb(), specifically the two calls
> to netbk_gop_frag_copy.
>
> netbk_gop_frag_copy can only copy order-0 pages to the peer since they
> go over a shared ring transport which can only deal in order-0 pages.
>
> For the SKB head there is a loop which handles order>0 heads, I suspect
> we just need something similar for the frag case.
>
> Although see my question in the other response about the maximum number
> of frags we can have when order is > 0 since if using larger pages
> causes us to end up with a much larger number of order-0 pages once
> we've broken them up then we have a problem and I need to put my
> thinking cap on a bit (perhaps substantially) tighter.
>
> Konrad, it looks like netfront has a similar issue in
> xennet_make_frags() since it doesn't shatter large order mappings
> either.
Hmm...
In theory, if a skb has 16+1 frags backed by compound pages, you could
need ~48 order-0 frags.
(4098 bytes could need 1-4096-1 (3 frags))
In practice, it should be around ~17 order-0 frags as before.
next prev parent reply other threads:[~2012-10-09 14:33 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 13:47 compound skb frag pages appearing in start_xmit Ian Campbell
2012-10-09 13:54 ` Eric Dumazet
2012-10-09 14:01 ` Eric Dumazet
2012-10-09 14:23 ` Ian Campbell
2012-10-09 14:33 ` Eric Dumazet [this message]
2012-10-09 14:54 ` Ian Campbell
2012-10-09 14:17 ` Ian Campbell
2012-10-09 14:27 ` Eric Dumazet
2012-10-09 14:40 ` Ian Campbell
2012-10-09 14:51 ` Eric Dumazet
2012-10-10 10:13 ` [Xen-devel] " Ian Campbell
2012-10-10 12:24 ` Sander Eikelenboom
2012-10-10 12:29 ` [Xen-devel] " Ian Campbell
2012-10-10 13:31 ` Sander Eikelenboom
2012-10-10 13:09 ` Ian Campbell
2012-10-10 14:49 ` Sander Eikelenboom
2012-10-11 8:02 ` Ian Campbell
2012-10-11 10:00 ` Sander Eikelenboom
2012-10-11 10:05 ` Eric Dumazet
2012-10-11 10:14 ` Ian Campbell
2012-10-11 10:20 ` Sander Eikelenboom
2012-11-15 2:31 ` ANNIE LI
2012-11-19 15:43 ` Sander Eikelenboom
2012-11-20 8:30 ` [Xen-devel] " Stefan Bader
2012-11-20 9:21 ` Ian Campbell
2012-11-20 11:36 ` [Xen-devel] " Ian Campbell
2012-11-21 2:42 ` ANNIE LI
2012-11-20 11:40 ` [PATCH] xen/netfront: handle compound page fragments on transmit Ian Campbell
2012-11-20 12:28 ` [Xen-devel] " Jan Beulich
2012-11-20 13:35 ` Ian Campbell
2012-11-20 13:51 ` Jan Beulich
2012-11-20 14:14 ` Ian Campbell
2012-11-20 14:32 ` Jan Beulich
2012-11-20 15:06 ` Ian Campbell
2012-11-20 15:28 ` Eric Dumazet
2012-11-20 15:54 ` Ian Campbell
2012-11-20 15:44 ` Jan Beulich
2012-11-20 16:14 ` Eric Dumazet
2012-11-20 13:30 ` Stefan Bader
2012-11-20 13:45 ` Sander Eikelenboom
2012-11-20 14:45 ` Eric Dumazet
2012-11-20 15:05 ` Ian Campbell
2012-11-21 2:52 ` ANNIE LI
2012-11-21 11:09 ` Ian Campbell
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=1349793217.21172.4497.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=edumazet@google.com \
--cc=konrad@kernel.org \
--cc=linux@eikelenboom.it \
--cc=netdev@vger.kernel.org \
--cc=xen-devel@lists.xen.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