All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Govindarajulu Varadarajan <_govind@gmx.com>,
	Alexander Duyck <alexander.h.duyck@redhat.com>,
	davem@davemloft.net, netdev@vger.kernel.org, ssujith@cisco.com,
	benve@cisco.com
Subject: Re: [PATCH net-next v3 1/2] net: implement dma cache skb allocator
Date: Wed, 11 Mar 2015 08:42:40 -0700	[thread overview]
Message-ID: <1426088560.11398.44.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <5500496E.1060701@gmail.com>

On Wed, 2015-03-11 at 06:55 -0700, Alexander Duyck wrote:

> That definitely helps but still leaves you open since a 257 byte packet
> would be consuming 9K in that case.  Also standard flows with frames of
> 1514 still take a hard hit with a receive buffer size of 9K.

One possible way to deal with this would be to try to use order-2 pages,
(but not compound pages) but break them.

split_page(page, 2);

struct page *page0 = page;
struct page *page1 = page + 1;
struct page *page2 = page + 2;
struct page *page3 = page + 3;


if frame length <= 4096, attach page0 as skb first frag, and free
page[1-3]

If frame length <= 8192 bytes, driver can attach page0 & page1 to the
skb, and free page[2-3]

Otherwise, attach page[0-2] to skb and free page3

Not sure if buddy allocator will be pleased, but worth trying ?

  reply	other threads:[~2015-03-11 15:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 17:43 [PATCH net-next v3 0/2] introduce dma frag allocation and reduce dma mapping Govindarajulu Varadarajan
2015-03-10 17:43 ` [PATCH net-next v3 1/2] net: implement dma cache skb allocator Govindarajulu Varadarajan
2015-03-10 20:33   ` Alexander Duyck
2015-03-11  8:57     ` Govindarajulu Varadarajan
2015-03-11 13:55       ` Alexander Duyck
2015-03-11 15:42         ` Eric Dumazet [this message]
2015-03-11 17:06     ` David Laight
2015-03-14 20:08   ` Ben Hutchings
2015-03-10 17:43 ` [PATCH net-next v3 2/2] enic: use netdev_dma_alloc Govindarajulu Varadarajan
2015-03-10 20:14   ` Alexander Duyck
2015-03-11  9:27     ` Govindarajulu Varadarajan
2015-03-11 14:00       ` Alexander Duyck
2015-03-11 17:34         ` David Laight
2015-03-11 17:51           ` Alexander Duyck

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=1426088560.11398.44.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=_govind@gmx.com \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@redhat.com \
    --cc=benve@cisco.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ssujith@cisco.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.