From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] net: allow configuration of the size of page in __netdev_alloc_frag
Date: Wed, 24 Oct 2012 17:21:08 +0200 [thread overview]
Message-ID: <1351092068.6537.107.camel@edumazet-glaptop> (raw)
In-Reply-To: <1351087326.18035.50.camel@zakaz.uk.xensource.com>
On Wed, 2012-10-24 at 15:02 +0100, Ian Campbell wrote:
> On Wed, 2012-10-24 at 14:30 +0100, Eric Dumazet wrote:
> > It seems to me its a driver issue, for example
> > drivers/net/xen-netfront.c has assumptions that can be easily fixed.
>
> The netfront ->head thing is a separate (although perhaps related)
> issue, I intended to fix along the same lines as the previous netback
> except for some unfathomable reason I haven't been able to reproduce the
> problem with netfront -- I've no idea why though since it seems like it
> should be a no brainer!
>
> > Why skb->head can be on order-1 or order-2 pages and this is working ?
>
> skb->head being order 1 or 2 isn't working for me. The driver I'm having
> issues with which caused me to create this particular patch is the tg3
> driver (although I don't think this is by any means specific to tg3).
>
> For the ->head the tg3 driver does:
> mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE);
> while for the frags it does:
> mapping = skb_frag_dma_map(&tp->pdev->dev, frag, 0, len, DMA_TO_DEVICE);
>
> This ought to do the Right Thing but doesn't seem to be working. Konrad
> suspected an issue with the swiotlb's handling of order>0 pages in some
> cases. As I said in the commit message he is looking into this issue.
>
> My concern however was that even once the swiotlb is fixed to work right
> the effect of pci_map_single on a order>0 page is going to be that the
> data gets bounced into contiguous memory -- that is a memcpy which would
> undo the benefit of having allocating large pages to start with. So I
> figured that in such cases we'd be better off just using order 0
> allocations to start with.
I am really confused.
If you really have such problems, why locally generated TCP traffic
doesnt also have it ?
Your patch doesnt touch sk_page_frag_refill(), does it ?
next prev parent reply other threads:[~2012-10-24 15:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 11:42 [PATCH] net: allow configuration of the size of page in __netdev_alloc_frag Ian Campbell
2012-10-24 12:28 ` Eric Dumazet
2012-10-24 13:16 ` Ian Campbell
2012-10-24 13:30 ` Eric Dumazet
2012-10-24 14:02 ` Ian Campbell
2012-10-24 15:21 ` Eric Dumazet [this message]
2012-10-24 16:22 ` Ian Campbell
2012-10-24 16:43 ` Eric Dumazet
2012-10-30 16:53 ` Konrad Rzeszutek Wilk
2012-10-30 17:23 ` Konrad Rzeszutek Wilk
2012-10-31 11:01 ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-10-31 11:19 ` Eric Dumazet
2012-10-24 18:19 ` David Miller
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=1351092068.6537.107.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=edumazet@google.com \
--cc=konrad.wilk@oracle.com \
--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