linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Graham Stoney <greyham@research.canon.com.au>
To: Dan Malek <dan@mvista.com>
Cc: Graham Stoney <greyham@research.canon.com.au>,
	Brian Ford <ford@vss.fsi.com>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: 2.5 or 2.4 kernel profiling
Date: Thu, 14 Dec 2000 18:21:26 +1100	[thread overview]
Message-ID: <20001214182126.E8430@brixi.research.canon.com.au> (raw)
In-Reply-To: <3A37A048.46E692A0@mvista.com>; from dan@mvista.com on Wed, Dec 13, 2000 at 11:14:00AM -0500


On Wed, Dec 13, 2000 at 11:14:00AM -0500, Dan Malek wrote:
> Although I have not yet proven this, I am leaning toward the following.
> Allocate a small fixed set of receive buffers (like we used to do)
> in the driver and mark them copy-back cached.  The received BDs will
> always point to thesed buffers.

I dunno; now that I've heard about the "buffer deficit scheme", I think it
gives better memory utilisation, since the receive buffers aren't permanently
tied up in the network driver.  It's the way the other drivers now do it.

> Then, copy-and-sum these into IP aligned skbuffs.

I think it depends whether the gain of having IP headers aligned outweighs the
cost of the extra copy in place of just a checksum.  The copy will tend to
throw more stuff out of the cache since it's dealing with the data twice.
Conventional logic when optimising network stacks is to eliminate copies, and
the only thing I see here that contradicts that is that we end up with not-
nicely-aligned IP headers.  In my application, eliminating the copy more than
offset the loss due to unaligned headers.

> The advantage of Graham's DMA into skbufs isn't that the driver doesn't
> copy/sum, it is that later when the IP stack does it we get burst transfers
> into cache.

But we get burst transfers into cache in either case, whether it's during
the checksum in csum_partial or the copy/sum in csum_partial_copy_generic.
The difference is that in the copy case, the data that gets loaded is only
used once, to write to another address in another cache line.  This extra
write will carry both a caching and bus penalty, and the impact is likely to
be worse in real applications than in simplistic throuhput tests.  Hence I
believe the conventional wisdom about eliminating the copy applies.

I know everything has second order effects and profiling is a perilous
minefield, but just occasionally things really do end up the way first order
thinking suggests :-).

Regards,
Graham
--
Graham Stoney
Assistant Technology Manager
Canon Information Systems Research Australia
Ph: +61 2 9805 2909  Fax: +61 2 9805 2929

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2000-12-14  7:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.4.21.0012071148420.515-100000@eos>
2000-12-07 18:11 ` 2.5 or 2.4 kernel profiling Brian Ford
2000-12-08 17:41   ` diekema_jon
2000-12-08 18:24     ` Brian Ford
2000-12-11  0:45   ` Graham Stoney
2000-12-11 15:27     ` Brian Ford
2000-12-12  2:36       ` Graham Stoney
2000-12-12  3:26         ` Dan Malek
2000-12-12  7:28           ` Graham Stoney
2000-12-12 16:32             ` Brian Ford
2000-12-12 16:58               ` Dan Malek
2000-12-12 17:17                 ` Brian Ford
2000-12-12 21:03                   ` Dan Malek
2000-12-13  1:15               ` Graham Stoney
2000-12-13 16:14                 ` Dan Malek
2000-12-13 17:23                   ` Arto Vuori
2000-12-13 17:33                     ` Dan Malek
2000-12-13 17:55                       ` Arto Vuori
2000-12-13 22:08                   ` Brian Ford
2000-12-13 22:45                     ` Jerry Van Baren
2000-12-13 22:53                     ` Dan Malek
2000-12-14 17:29                       ` FEC/FCC driver issues Brian Ford
2000-12-14  7:21                   ` Graham Stoney [this message]
2000-12-14 16:58                     ` 2.5 or 2.4 kernel profiling Dan Malek
2000-12-15  0:18                       ` Graham Stoney
2000-12-12 15:26         ` Brian Ford
2000-12-12 17:12           ` Jerry Van Baren

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=20001214182126.E8430@brixi.research.canon.com.au \
    --to=greyham@research.canon.com.au \
    --cc=dan@mvista.com \
    --cc=ford@vss.fsi.com \
    --cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).