All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Herman Dierks <hdierks@us.ibm.com>
Cc: "Feldman, Scott" <scott.feldman@intel.com>,
	David Gibson <dwg@au1.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Anton Blanchard <anton@samba.org>,
	Nancy J Milliner <milliner@us.ibm.com>,
	Ricardo C Gonzalez <ricardoz@us.ibm.com>,
	Brian Twichell <twichell@us.ibm.com>,
	netdev@oss.sgi.com
Subject: RE: e1000 performance hack for ppc64 (Power4)
Date: 13 Jun 2003 09:21:03 -0700	[thread overview]
Message-ID: <1055521263.3531.2055.camel@nighthawk> (raw)
In-Reply-To: <OF0078342A.E131D4B1-ON85256D44.0051F7C0@pok.ibm.com>

Too long to quote:
http://marc.theaimsgroup.com/?t=105538879600001&r=1&w=2

Wouldn't you get most of the benefit from copying that stuff around in
the driver if you allocated the skb->data aligned in the first place? 

There's already code to align them on CPU cache boundaries:
#define SKB_DATA_ALIGN(X)       (((X) + (SMP_CACHE_BYTES - 1)) & \
                                 ~(SMP_CACHE_BYTES - 1))

So, do something like this:
#ifdef ARCH_ALIGN_SKB_BYTES
#define SKB_ALIGN_BYTES ARCH_ALIGN_SKB_BYTES
#else
#define SKB_ALIGN_BYTES SMP_CACHE_BYTES
#endif
#define SKB_DATA_ALIGN(X)       (((X) + (ARCH_ALIGN_SKB - 1)) & \
                                 ~(SKB_ALIGN_BYTES - 1))

You could easily make this adaptive to no align on th arch size when the
request is bigger than that, just like in the e1000 patch you posted.  
-- 
Dave Hansen
haveblue@us.ibm.com


  reply	other threads:[~2003-06-13 16:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-13 15:17 e1000 performance hack for ppc64 (Power4) Herman Dierks
2003-06-13 16:21 ` Dave Hansen [this message]
2003-06-13 22:38   ` Anton Blanchard
2003-06-13 22:46     ` David S. Miller
2003-06-13 23:18       ` Anton Blanchard
2003-06-14  1:52         ` Lincoln Dale
2003-06-14  5:41           ` David S. Miller
2003-06-14  5:52             ` Lincoln Dale
2003-06-14  6:08               ` David S. Miller
2003-06-14  6:14                 ` David S. Miller
2003-06-14  6:27                   ` William Lee Irwin III
2003-06-14 17:08                   ` Greg KH
2003-06-14 17:19                     ` Greg KH
2003-06-14 17:21                     ` Riley Williams
2003-06-15  3:01                     ` David S. Miller
2003-06-14  5:16       ` Nivedita Singhvi
2003-06-14  5:36         ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2003-06-16 18:56 Feldman, Scott
2003-06-16 18:21 Feldman, Scott
2003-06-16 18:30 ` Dave Hansen
2003-06-15 14:40 Herman Dierks
2003-06-15 14:44 ` David S. Miller
2003-06-16 16:17 ` Nivedita Singhvi
2003-06-15 14:32 Herman Dierks
2003-06-13 23:52 Feldman, Scott
2003-06-13 23:52 ` David S. Miller
2003-06-14  0:55   ` Anton Blanchard
2003-06-14  1:34     ` David S. Miller
2003-06-14  0:03 ` Anton Blanchard
2003-06-13 22:13 Feldman, Scott
2003-06-13 17:03 Herman Dierks
2003-06-13  1:16 Feldman, Scott
2003-06-13 23:15 ` Anton Blanchard
2003-06-12  3:32 David Gibson

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=1055521263.3531.2055.camel@nighthawk \
    --to=haveblue@us.ibm.com \
    --cc=anton@samba.org \
    --cc=dwg@au1.ibm.com \
    --cc=hdierks@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milliner@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    --cc=ricardoz@us.ibm.com \
    --cc=scott.feldman@intel.com \
    --cc=twichell@us.ibm.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.