Received: with ECARTIS (v1.0.0; list netdev); Fri, 13 Jun 2003 09:22:59 -0700 (PDT) Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.129]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5DGMf2x023678 for ; Fri, 13 Jun 2003 09:22:49 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e31.co.us.ibm.com (8.12.9/8.12.2) with ESMTP id h5DGMXll240012; Fri, 13 Jun 2003 12:22:33 -0400 Received: from nighthawk.sr71.net (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay02.boulder.ibm.com (8.12.9/NCO/VER6.5) with ESMTP id h5DGMVxF058210; Fri, 13 Jun 2003 10:22:31 -0600 Subject: RE: e1000 performance hack for ppc64 (Power4) From: Dave Hansen To: Herman Dierks Cc: "Feldman, Scott" , David Gibson , Linux Kernel Mailing List , Anton Blanchard , Nancy J Milliner , Ricardo C Gonzalez , Brian Twichell , netdev@oss.sgi.com In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1055521263.3531.2055.camel@nighthawk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 13 Jun 2003 09:21:03 -0700 Content-Transfer-Encoding: 7bit X-archive-position: 3210 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: haveblue@us.ibm.com Precedence: bulk X-list: netdev 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