All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Andi Kleen <ak@suse.de>
Cc: ak@suse.de, modica@sgi.com, johnip@sgi.com, netdev@oss.sgi.com,
	jgarzik@pobox.com, jes@sgi.com
Subject: Re: Tigon3 5701 PCI-X recv performance problem
Date: Wed, 8 Oct 2003 13:50:30 -0700	[thread overview]
Message-ID: <20031008135030.3dad33f9.davem@redhat.com> (raw)
In-Reply-To: <20031008204618.GC15611@oldwotan.suse.de>

On Wed, 8 Oct 2003 22:46:18 +0200
Andi Kleen <ak@suse.de> wrote:

> On Wed, Oct 08, 2003 at 01:32:48PM -0700, David S. Miller wrote:
> > The page chunk allocator is meant to make it easier to put the
> > non-header parts in the frag list of the SKB, see?  It means we
> > don't need to do anything special in the networking, all the
> > receive paths handle frag'd RX packets properly.
> 
> Sure, but to handle the sub allocation you need a destructor per fragment.
> (otherwise how do you want to share a page between different packets)

Aha, no you don't, this is the beauty of it.

Let's say we've packed 4 packets into a page (or 10 in 2 pages,
whatever the optimal packing is), as you attach each chunk to a SKB
you up the page count (if the buffer straddles 2 or more pages you use
one frag entry for each of those pages and bump the count as
approprise).  As far as the networking is concerned, it's some page
cache page or whatever, it doesn't care.

Then kfree_skb(skb) just does the right thing by putting all the
pages, when the page count goes to zero it's free'd up.

> BTW I think this all should be also ifdefed with CONFIG_SLOW_UNALIGNMENT.
> I certainly don't want any of this on x86-64 where unalignment cost
> one cycle only.

I agree, I don't even want this rediculious crap on sparc64 where
I can make the unaligned trap handler 30 or 40 cycles or even less.

BTW, your highmem example is interesting, but even more interesting are
the cards that do the magic multiple-TCP-packet coalescing so that the
data parts are all page aligned.  They want infrastructure like this.

  reply	other threads:[~2003-10-08 20:50 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08 17:12 Tigon3 5701 PCI-X recv performance problem John Partridge
2003-10-08 17:10 ` David S. Miller
2003-10-08 17:52   ` John Partridge
2003-10-08 18:26     ` David S. Miller
2003-10-08 19:02       ` John Partridge
2003-10-08 19:11         ` Steve Modica
2003-10-08 19:15           ` David S. Miller
2003-10-08 18:21   ` Steve Modica
2003-10-08 18:29     ` David S. Miller
2003-10-08 18:37     ` Andi Kleen
2003-10-08 19:22       ` David S. Miller
2003-10-08 20:22         ` Andi Kleen
2003-10-08 20:24           ` David S. Miller
2003-10-08 20:33             ` Andi Kleen
2003-10-08 20:32               ` David S. Miller
2003-10-08 20:46                 ` Andi Kleen
2003-10-08 20:50                   ` David S. Miller [this message]
2003-10-10 19:05           ` Steve Modica
2003-10-10 19:20             ` Andi Kleen
2003-10-11 13:17               ` Steve Modica
2003-10-11 13:19                 ` Andi Kleen
2003-10-11 17:50                   ` David S. Miller
2003-10-13 19:53                     ` John Partridge
2003-10-13 19:51                       ` David S. Miller
2003-10-14 16:49                     ` John Partridge
2003-10-14 16:53                       ` David S. Miller
2003-11-11  1:24                         ` John Partridge
2003-11-11  2:29                           ` David S. Miller
2003-11-11 20:04                             ` John Partridge
2003-11-11 20:24                               ` David S. Miller
2003-11-11 21:26                                 ` John Partridge
2003-11-11 21:32                                   ` Jeff Garzik
2003-12-03 22:11                                     ` John Partridge
2003-11-11 21:39                                 ` John Partridge
2003-11-11 23:09                                   ` David S. Miller
2003-11-11 23:53                                   ` Andi Kleen
2003-11-12  1:46                                     ` John Partridge
2003-11-12  6:19                                       ` Andi Kleen
2003-11-12  7:05                                         ` Jeff Garzik
2003-11-12 15:32                                           ` John Partridge
2003-11-12 15:43                                             ` Christoph Hellwig
2003-11-11 20:25                               ` David S. Miller
2003-11-11 20:57                                 ` Jeff Garzik
2003-10-14 18:47                   ` John Partridge

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=20031008135030.3dad33f9.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=ak@suse.de \
    --cc=jes@sgi.com \
    --cc=jgarzik@pobox.com \
    --cc=johnip@sgi.com \
    --cc=modica@sgi.com \
    --cc=netdev@oss.sgi.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.